|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{10906:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return ye}});var ke=Re(72308),Se=Re(59301),Be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},Le=Be,Ce=Re(7657),xe=function(pe,de){return Se.createElement(Ce.Z,(0,ke.Z)({},pe,{ref:de,icon:Le}))},be=Se.forwardRef(xe),ye=be},76618:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return ye}});var ke=Re(72308),Se=Re(59301),Be={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"},Le=Be,Ce=Re(7657),xe=function(pe,de){return Se.createElement(Ce.Z,(0,ke.Z)({},pe,{ref:de,icon:Le}))},be=Se.forwardRef(xe),ye=be},88540:function(){"use strict"},42271:function(){"use strict"},15547:function(xn,un){"use strict";un.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},36610:function(xn,un){"use strict";un.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},31066:function(){"use strict"},70374:function(xn,un,Re){"use strict";var ke=Re(59301),Se=Object.defineProperty,Be=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,xe=(we,pe,de)=>pe in we?Se(we,pe,{enumerable:!0,configurable:!0,writable:!0,value:de}):we[pe]=de,be=(we,pe)=>{for(var de in pe||(pe={}))Le.call(pe,de)&&xe(we,de,pe[de]);if(Be)for(var de of Be(pe))Ce.call(pe,de)&&xe(we,de,pe[de]);return we};const ye=we=>React.createElement("svg",be({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},we),React.createElement("title",null,"\u5360\u7528\u5185\u5B58"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{fillOpacity:.01,fill:"#FFF",d:"M0 0h30v30H0z"}),React.createElement("path",{d:"M6.866 26.928h-1.28a2.561 2.561 0 0 1-2.562-2.561V5.585a2.561 2.561 0 0 1 2.561-2.56h1.28v4.268a2.561 2.561 0 0 0 2.562 2.56h3.842a2.561 2.561 0 0 0 2.56-2.56V3.024h2.915l8.184 8.184v13.159a2.561 2.561 0 0 1-2.561 2.561h-1.28v-5.976c0-.943-.765-1.707-1.708-1.707H8.573c-.943 0-1.707.764-1.707 1.707v5.976Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M8.573 3.024h5.55v4.269a.854.854 0 0 1-.854.853H9.427a.854.854 0 0 1-.854-.853V3.024ZM8.573 26.928v-5.976H21.38v5.976z",fill:"#1890FF"})));un.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},42886:function(xn,un,Re){"use strict";var ke=Re(59301),Se=Object.defineProperty,Be=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,xe=(we,pe,de)=>pe in we?Se(we,pe,{enumerable:!0,configurable:!0,writable:!0,value:de}):we[pe]=de,be=(we,pe)=>{for(var de in pe||(pe={}))Le.call(pe,de)&&xe(we,de,pe[de]);if(Be)for(var de of Be(pe))Ce.call(pe,de)&&xe(we,de,pe[de]);return we};const ye=we=>React.createElement("svg",be({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},we),React.createElement("title",null,"\u8FD0\u884C\u65F6\u95F4"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M30 15c0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0c8.284 0 15 6.716 15 15Z",fill:"#BAFFF0"}),React.createElement("path",{d:"M25.5 15c0 5.8-4.7 10.5-10.5 10.5S4.5 20.8 4.5 15 9.2 4.5 15 4.5 25.5 9.2 25.5 15Z",fill:"#44D7B6"}),React.createElement("path",{d:"M13.5 9a1.5 1.5 0 0 1 1.5 1.5v4.379l3.56 3.56a1.5 1.5 0 0 1-2.12 2.122l-4-4A1.5 1.5 0 0 1 12 15.5v-5A1.5 1.5 0 0 1 13.5 9Z",fill:"#FFF"})));un.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},71584:function(){"use strict";function xn(ue,ee,z,oe){z===void 0&&(z=0),oe===void 0&&(oe=1/0),this._name=ue,this._defaultValue=ee,this._minimum=z,this._maximum=oe}Object.defineProperty(xn.prototype,"name",{get:function(){return this._name},set:function(ue){if(typeof ue!="string"||ue==="")throw new Error("Shape name must be a valid string.");this._name=ue}}),Object.defineProperty(xn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("The default value must be a real number, not: "+ue);this._defaultValue=ue}}),Object.defineProperty(xn.prototype,"minimum",{get:function(){return this._minimum},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("Minimum must be a real number, not: "+ue);this._minimum=ue}}),Object.defineProperty(xn.prototype,"maximum",{get:function(){return this._maximum},set:function(ue){if(typeof ue!="number"||isNaN(ue))throw new Error("Maximum must be a real number, not: "+ue);this._maximum=ue}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(ue,ee){var z=go.Shape._FigureParameters[ue];return z?z[ee]:null},go.Shape.setFigureParameter=function(ue,ee,z){if(!(z instanceof xn))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[ue];oe||(oe=[],go.Shape._FigureParameters[ue]=oe),oe[ee]=z};var un=[];function Re(ue,ee){var z=un.pop();return z===void 0?new go.Point(ue,ee):(z.x=ue,z.y=ee,z)}function ke(){var ue=un.pop();return ue===void 0?new go.Point:ue}function Se(ue){un.push(ue)}function Be(ue,ee,z,oe,re,ae,le,me,ve){ve||(ve=new go.Point);var Pe=ue-z,Ae=re-le,Oe=NaN,Ie=NaN;if(Pe===0)if(Ae===0)ue===z&&(Oe=ue,Ie=ee);else{var Ze=(ae-me)/Ae,qe=ae-Ze*re;Oe=ue,Ie=Ze*Oe+qe}else if(Ae===0){var Je=(ee-oe)/Pe,mt=ee-Je*ue;Oe=re,Ie=Je*Oe+mt}else{var Je=(ee-oe)/Pe,Ze=(ae-me)/Ae,mt=ee-Je*ue,qe=ae-Ze*re;Oe=(qe-mt)/(Je-Ze),Ie=Je*Oe+mt}return ve.x=Oe,ve.y=Ie,ve}function Le(ue,ee,z,oe,re,ae,le,me,ve,Pe,Ae,Oe,Ie,Ze){var qe=1-ve,Je=ve,mt=ue*qe+z*Je,gt=ee*qe+oe*Je,Mt=z*qe+re*Je,at=oe*qe+ae*Je,_t=re*qe+le*Je,ht=ae*qe+me*Je,Dt=mt*qe+Mt*Je,ut=gt*qe+at*Je,ot=Mt*qe+_t*Je,ct=at*qe+ht*Je,yt=Dt*qe+ot*Je,wt=ut*qe+ct*Je;Pe.x=mt,Pe.y=gt,Ae.x=Dt,Ae.y=ut,Oe.x=yt,Oe.y=wt,Ie.x=ot,Ie.y=ct,Ze.x=_t,Ze.y=ht}var Ce=new go.Spot(.156,.156),xe=new go.Spot(.844,.844),be=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new xn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=5),oe=Math.min(oe,ee/3),oe=Math.min(oe,z/3);var re=oe*be,ae=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-re,0,ee,re)).add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)).add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,z-re,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,oe,z)).add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,re,z,0,z-re)).add(new go.PathSegment(go.PathSegment.Line,0,oe)).add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,re,re,0).close()));return re>1&&(ae.spot1=new go.Spot(0,0,re,re),ae.spot2=new go.Spot(1,1,-re,-re)),ae}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,ee,z){var oe=ee/2,re=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 re.spot1=Ce,re.spot2=xe,re.defaultStretch=go.GraphObject.Uniform,re}),go.Shape.defineFigureGenerator("Line1",function(ue,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(ue,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(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ee,z,be*ee,0,ee,(1-be)*z)))}),go.Shape.defineFigureGenerator("Curve2",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ee,z,0,be*z,(1-be)*ee,z)))}),go.Shape.defineFigureGenerator("Curve3",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(ee,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,z,ee,be*z,be*ee,z)))}),go.Shape.defineFigureGenerator("Curve4",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(ee,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,z,(1-be)*ee,0,0,(1-be)*z)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(ue,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(ue,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(ue,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(ue,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 xn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=.1:oe<-1?oe=-1:oe>1&&(oe=1);var re=Math.abs(oe)*ee;if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new xn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=10:oe<-ee?oe=-ee:oe>ee&&(oe=ee);var re=Math.abs(oe);if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}}),go.Shape.setFigureParameter("Trapezoid1",0,new xn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=.2:oe<.5?oe=-.5:oe>.5&&(oe=.5);var re=Math.abs(oe)*ee;if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new xn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=20:oe<-ee?oe=-ee/2:oe>ee&&(oe=ee/2);var re=Math.abs(oe);if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}}),go.Shape.setFigureParameter("ManualOperation",0,new xn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)?oe=10:oe<-ee?oe=-ee/2:oe>ee&&(oe=ee/2);var re=Math.abs(oe);if(oe===0){var ae=new go.Geometry(go.Geometry.Rectangle);return ae.startX=0,ae.startY=0,ae.endX=ee,ae.endY=z,ae}else{var ae=new go.Geometry;return oe>0?ae.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-re,z)).add(new go.PathSegment(go.PathSegment.Line,re,z).close())):ae.add(new go.PathFigure(re,0).add(new go.PathSegment(go.PathSegment.Line,ee-re,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())),re<ee/2&&ae.setSpots(re/ee,0,(ee-re)/ee,1),ae}});var ye=[];function we(){var ue=ye.pop();return ue===void 0?[]:ue}function pe(ue){ue.length=0,ye.push(ue)}function de(ue){for(var ee=we(),z=.5,oe=.5,re=Math.PI*1.5,ae=0,le=0;le<ue;le++)ae=2*Math.PI/ue*le+re,ee[le]=new go.Point(oe+z*Math.cos(ae),oe+z*Math.sin(ae));return ee.push(ee[0]),ee}function ge(ue){var ee=fe(ue),z=we();z[0]=ee[0];for(var oe=1,re=1;oe<ee.length;oe+=2,re+=3)z[re]=ee[oe],z[re+1]=ee[oe],z[re+2]=ee[oe+1];return pe(ee),z}function fe(ue){for(var ee=de(ue),z=we(),oe=Math.floor(ee.length/2),re=ee.length-1,ae=ue%2===0?2:1,le=0;le<re;le++){var me=ee[le],ve=ee[le+1],Pe=ee[(oe+le-1)%re],Ae=ee[(oe+le+ae)%re];z[le*2]=me,z[le*2+1]=Be(me.x,me.y,Pe.x,Pe.y,ve.x,ve.y,Ae.x,Ae.y,new go.Point)}return z[z.length]=z[0],pe(ee),z}go.Shape.defineFigureGenerator("Pentagon",function(ue,ee,z){var oe=de(5),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<5;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.2,.22),re.spot2=new go.Spot(.8,.9),re}),go.Shape.defineFigureGenerator("Hexagon",function(ue,ee,z){var oe=de(6),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<6;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.07,.25),re.spot2=new go.Spot(.93,.75),re}),go.Shape.defineFigureGenerator("Heptagon",function(ue,ee,z){var oe=de(7),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<7;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.2,.15),re.spot2=new go.Spot(.8,.85),re}),go.Shape.defineFigureGenerator("Octagon",function(ue,ee,z){var oe=de(8),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<8;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.15,.15),re.spot2=new go.Spot(.85,.85),re}),go.Shape.defineFigureGenerator("Nonagon",function(ue,ee,z){var oe=de(9),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<9;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.17,.13),re.spot2=new go.Spot(.82,.82),re}),go.Shape.defineFigureGenerator("Decagon",function(ue,ee,z){var oe=de(10),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<10;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.16,.16),re.spot2=new go.Spot(.84,.84),re}),go.Shape.defineFigureGenerator("Dodecagon",function(ue,ee,z){var oe=de(12),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<12;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.16,.16),re.spot2=new go.Spot(.84,.84),re}),go.Shape.defineFigureGenerator("FivePointedStar",function(ue,ee,z){var oe=fe(5),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<10;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.266,.333),re.spot2=new go.Spot(.733,.733),re}),go.Shape.defineFigureGenerator("SixPointedStar",function(ue,ee,z){var oe=fe(6),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<12;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.17,.25),re.spot2=new go.Spot(.83,.75),re}),go.Shape.defineFigureGenerator("SevenPointedStar",function(ue,ee,z){var oe=fe(7),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<14;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.222,.277),re.spot2=new go.Spot(.777,.666),re}),go.Shape.defineFigureGenerator("EightPointedStar",function(ue,ee,z){var oe=fe(8),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<16;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.25,.25),re.spot2=new go.Spot(.75,.75),re}),go.Shape.defineFigureGenerator("NinePointedStar",function(ue,ee,z){var oe=fe(9),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<18;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.222,.277),re.spot2=new go.Spot(.777,.666),re}),go.Shape.defineFigureGenerator("TenPointedStar",function(ue,ee,z){var oe=fe(10),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<20;le++)ae.add(new go.PathSegment(go.PathSegment.Line,oe[le].x*ee,oe[le].y*z));return ae.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),pe(oe),re.spot1=new go.Spot(.281,.261),re.spot2=new go.Spot(.723,.748),re}),go.Shape.defineFigureGenerator("FivePointedBurst",function(ue,ee,z){var oe=ge(5),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.277),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("SixPointedBurst",function(ue,ee,z){var oe=ge(6),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.17,.222),re.spot2=new go.Spot(.833,.777),re}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(ue,ee,z){var oe=ge(7),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("EightPointedBurst",function(ue,ee,z){var oe=ge(8),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("NinePointedBurst",function(ue,ee,z){var oe=ge(9),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.defineFigureGenerator("TenPointedBurst",function(ue,ee,z){var oe=ge(10),re=new go.Geometry,ae=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);re.add(ae);for(var le=1;le<oe.length;le+=3)ae.add(new go.PathSegment(go.PathSegment.Bezier,oe[le+2].x*ee,oe[le+2].y*z,oe[le].x*ee,oe[le].y*z,oe[le+1].x*ee,oe[le+1].y*z));return ae.segments.last().close(),pe(oe),re.spot1=new go.Spot(.222,.222),re.spot2=new go.Spot(.777,.777),re}),go.Shape.setFigureParameter("FramedRectangle",0,new xn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new xn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(ue,ee,z){var oe=ue?ue.parameter1:NaN,re=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=8),isNaN(re)&&(re=8);var ae=new go.Geometry,le=new go.PathFigure(0,0,!0);return ae.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()),oe<ee/2&&re<z/2&&(le.add(new go.PathSegment(go.PathSegment.Move,oe,re)),le.add(new go.PathSegment(go.PathSegment.Line,oe,z-re)),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,z-re)),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,re).close())),ae.setSpots(0,0,1,1,oe,re,-oe,-re),ae}),go.Shape.setFigureParameter("Ring",0,new xn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=8);var re=ee/2,ae=new go.Geometry,le=new go.PathFigure(ee,ee/2,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,0,360,re,re,re,re).close());var me=Math.max(re-oe,0);return me>0&&(le.add(new go.PathSegment(go.PathSegment.Move,ee/2+me,ee/2)),le.add(new go.PathSegment(go.PathSegment.Arc,0,-360,re,re,me,me).close())),ae.spot1=Ce,ae.spot2=xe,ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Cloud",function(ue,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(ue,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 xn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new xn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(ue,ee,z){var oe=ue?ue.parameter1:NaN,re=ue?ue.parameter2:NaN;isNaN(oe)&&(oe=0),isNaN(re)&&(re=315);var ae=oe%360;ae<0&&(ae+=360);var le=re%360,me=Math.min(ee,z)/2;return new go.Geometry().add(new go.PathFigure(me,me).add(new go.PathSegment(go.PathSegment.Arc,ae,le,me,me,me,me).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(ue,ee,z){var oe=be/Math.SQRT2*.5,re=Math.SQRT2/2,ae=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ee,z,!0).add(new go.PathSegment(go.PathSegment.Bezier,re*ee,ae*z,ee,(1-oe)*z,(re+oe)*ee,(ae+oe)*z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close()))}),go.Shape.setFigureParameter("ThickCross",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30);var re=Math.min(oe,ee)/2,ae=ee/2,le=z/2;return new go.Geometry().add(new go.PathFigure(ae-re,0,!0).add(new go.PathSegment(go.PathSegment.Line,ae+re,0)).add(new go.PathSegment(go.PathSegment.Line,ae+re,le-re)).add(new go.PathSegment(go.PathSegment.Line,ee,le-re)).add(new go.PathSegment(go.PathSegment.Line,ee,le+re)).add(new go.PathSegment(go.PathSegment.Line,ae+re,le+re)).add(new go.PathSegment(go.PathSegment.Line,ae+re,z)).add(new go.PathSegment(go.PathSegment.Line,ae-re,z)).add(new go.PathSegment(go.PathSegment.Line,ae-re,le+re)).add(new go.PathSegment(go.PathSegment.Line,0,le+re)).add(new go.PathSegment(go.PathSegment.Line,0,le-re)).add(new go.PathSegment(go.PathSegment.Line,ae-re,le-re).close()))}),go.Shape.setFigureParameter("ThinCross",0,new xn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var re=Math.min(oe,ee)/2,ae=ee/2,le=z/2;return new go.Geometry().add(new go.PathFigure(ae-re,0,!0).add(new go.PathSegment(go.PathSegment.Line,ae+re,0)).add(new go.PathSegment(go.PathSegment.Line,ae+re,le-re)).add(new go.PathSegment(go.PathSegment.Line,ee,le-re)).add(new go.PathSegment(go.PathSegment.Line,ee,le+re)).add(new go.PathSegment(go.PathSegment.Line,ae+re,le+re)).add(new go.PathSegment(go.PathSegment.Line,ae+re,z)).add(new go.PathSegment(go.PathSegment.Line,ae-re,z)).add(new go.PathSegment(go.PathSegment.Line,ae-re,le+re)).add(new go.PathSegment(go.PathSegment.Line,0,le+re)).add(new go.PathSegment(go.PathSegment.Line,0,le-re)).add(new go.PathSegment(go.PathSegment.Line,ae-re,le-re).close()))}),go.Shape.setFigureParameter("ThickX",0,new xn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;if((isNaN(oe)||oe<0)&&(oe=30),ee===0||z===0){var re=new go.Geometry(go.Geometry.Rectangle);return re.startX=0,re.startY=0,re.endX=ee,re.endY=z,re}else{var ae=ee/2,le=z/2,me=Math.atan2(z,ee),ve=oe-Math.min(Math.cos(me)*oe/2,ae),Pe=oe-Math.min(Math.sin(me)*oe/2,le),re=new go.Geometry,Ae=new go.PathFigure(ve,0,!0);return re.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,ae,.2*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee-ve,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee,Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee,z-Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee-ve,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,ae,.8*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,ve,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,z-Pe)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,Pe).close()),re}}),go.Shape.setFigureParameter("ThinX",0,new xn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var re=new go.Geometry,ae=new go.PathFigure(.1*ee,0,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.9*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.1*z).close()),re}),go.Shape.setFigureParameter("SquareIBeam",0,new xn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.2);var re=new go.Geometry,ae=new go.PathFigure(0,0,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,oe*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*ee,oe*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*ee,(1-oe)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,(1-oe)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*ee,(1-oe)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*ee,oe*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,oe*z).close()),re}),go.Shape.setFigureParameter("RoundedIBeam",0,new xn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.5);var re=new go.Geometry,ae=new go.PathFigure(0,0,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Bezier,ee,z,Math.abs(1-oe)*ee,.25*z,Math.abs(1-oe)*ee,.75*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*ee,.75*z,oe*ee,.25*z).close()),re}),go.Shape.defineFigureGenerator("HalfEllipse",function(ue,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,be*ee,0,ee,(.5-be/2)*z)).add(new go.PathSegment(go.PathSegment.Bezier,0,z,ee,(.5+be/2)*z,be*ee,z).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(ue,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(ue,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(ue,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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.4*ee,.6*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.15*ee,z,.5*ee,.75*z,.45*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.6*ee,.6*z,.55*ee,.95*z,.5*ee,.75*z));var ae=.2,le=.3,me=0,ve=ae*be;return re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5+ae+me)*z,(.5-ae+le)*ee,(.5+ve+me)*z,(.5-ve+le)*ee,(.5+ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ae+le)*ee,(.5+me)*z,(.5+ve+le)*ee,(.5+ae+me)*z,(.5+ae+le)*ee,(.5+ve+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-ae+me)*z,(1-.5+ae+le)*ee,(.5-ve+me)*z,(.5+ve+le)*ee,(.5-ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.65*ee,.36771243*z,(.5-ve+le)*ee,(.5-ae+me)*z,(.5-ae+le+.05)*ee,(.5-ve+me-.02)*z)),ae=.2,le=0,me=-.3,ve=ae*be,re.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ae+le)*ee,(.5+me)*z,(.5+ve+le)*ee,(.5+ae+me)*z,(.5+ae+le)*ee,(.5+ve+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-ae+me)*z,(1-.5+ae+le)*ee,(.5-ve+me)*z,(.5+ve+le)*ee,(.5-ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ae+le)*ee,(.5+me)*z,(.5-ve+le)*ee,(.5-ae+me)*z,(.5-ae+le)*ee,(.5-ve+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ve+le)*ee,(.5+ae+me)*z,(.5-ae+le)*ee,(.5+ve+me)*z,(.5-ve+le)*ee,(.5+ae+me)*z)),ae=.2,le=-.3,me=0,ve=ae*be,re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-ae+me)*z,(1-.5+ae+le-.05)*ee,(.5-ve+me-.02)*z,(.5+ve+le)*ee,(.5-ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ae+le)*ee,(.5+me)*z,(.5-ve+le)*ee,(.5-ae+me)*z,(.5-ae+le)*ee,(.5-ve+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5+ae+me)*z,(.5-ae+le)*ee,(.5+ve+me)*z,(.5-ve+le)*ee,(.5+ae+me)*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,.6*z,(.5+ve+le)*ee,(.5+ae+me)*z,(.5+ae+le)*ee,(.5+ve+me)*z).close()),oe.setSpots(.06,.33,.93,.68),oe}),go.Shape.defineFigureGenerator("YinYang",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*.5,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,ee*.5,ee*.5,ee*.5,ee*.5)),re.add(new go.PathSegment(go.PathSegment.Arc,90,-180,ee*.5,ee*.75,ee*.25,ee*.25)),re.add(new go.PathSegment(go.PathSegment.Arc,90,180,ee*.5,ee*.25,ee*.25,ee*.25));var ae=.1,le=.5,me=.25;return re.add(new go.PathSegment(go.PathSegment.Move,(le+ae)*ee,me*z)),re.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ee*le,z*me,ae*ee,ae*ee).close()),re=new go.PathFigure(ee*.5,0,!1),oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ee*.5,ee*.5,ee*.5,ee*.5)),me=.75,re=new go.PathFigure((le+ae)*ee,me*z,!0),oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,0,360,ee*le,z*me,ae*ee,ae*ee).close()),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Peace",function(ue,ee,z){var oe=.8535533905932737,re=.5*ee,ae=.5*z;return new go.Geometry().add(new go.PathFigure(re,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,re,ae,re,ae)).add(new go.PathSegment(go.PathSegment.Line,re,z)).add(new go.PathSegment(go.PathSegment.Move,re,ae)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Move,re,ae)).add(new go.PathSegment(go.PathSegment.Line,oe*ee,oe*z)))}),go.Shape.defineFigureGenerator("NotAllowed",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=.5,me=.5,ve=new go.PathFigure(le*ee,(me-ae)*z);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),ae=.4,re=be*.4;var Pe=ke(),Ae=ke(),Oe=ke(),Ie=ke();Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.42,Pe,Ae,Oe,Ie,Ie);var Ze=ke(),qe=ke(),Je=ke();Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.58,Ie,Ie,Je,Ze,qe);var mt=ke(),gt=ke(),Mt=ke();Le(le,me+ae,le-re,me+ae,le-ae,me+re,le-ae,me,.42,mt,gt,Mt,Ie,Ie);var at=ke(),_t=ke(),ht=ke();return Le(le,me+ae,le-re,me+ae,le-ae,me+re,le-ae,me,.58,Ie,Ie,ht,at,_t),ve.add(new go.PathSegment(go.PathSegment.Move,ht.x*ee,ht.y*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,at.x*ee,at.y*z,_t.x*ee,_t.y*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z,(le-re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Oe.x*ee,Oe.y*z,Pe.x*ee,Pe.y*z,Ae.x*ee,Ae.y*z)),ve.add(new go.PathSegment(go.PathSegment.Line,ht.x*ee,ht.y*z).close()),ve.add(new go.PathSegment(go.PathSegment.Move,Mt.x*ee,Mt.y*z)),ve.add(new go.PathSegment(go.PathSegment.Line,Je.x*ee,Je.y*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,Ze.x*ee,Ze.y*z,qe.x*ee,qe.y*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Mt.x*ee,Mt.y*z,mt.x*ee,mt.y*z,gt.x*ee,gt.y*z).close()),Se(Pe),Se(Ae),Se(Oe),Se(Ie),Se(Ze),Se(qe),Se(Je),Se(mt),Se(gt),Se(Mt),Se(at),Se(_t),Se(ht),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Fragile",function(ue,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 xn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30),oe>ee&&(oe=ee);var re=(ee-oe)/2,ae=re+oe;return new go.Geometry().add(new go.PathFigure(ae,.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,re,.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(ue,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(ue,ee,z){var oe=new go.Geometry,re=be*.4,ae=.4,le=.5,me=.5,ve=ke(),Pe=ke(),Ae=ke(),Oe=ke(),Ie=new go.PathFigure((le-ae)*ee,me*z,!1);oe.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z,(le-re)*ee,(me-ae)*z)),Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.44,Ae,Oe,Pe,ve,ve),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*ee,Pe.y*z,Ae.x*ee,Ae.y*z,Oe.x*ee,Oe.y*z));var Ze=Re(Pe.x,Pe.y);Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.56,ve,ve,Pe,Ae,Oe);var qe=Re(Pe.x,Pe.y);Ie.add(new go.PathSegment(go.PathSegment.Line,(Ze.x*.1+.95*.9)*ee,Ze.y*.1*z)),Ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,Ze.y*.1*z)),Ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,0)),Ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),Ie.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),Ie.add(new go.PathSegment(go.PathSegment.Line,(qe.x*.1+.9)*ee,.15*z)),Ie.add(new go.PathSegment(go.PathSegment.Line,(qe.x*.1+.9)*ee,(qe.y*.1+.05*.9)*z)),Ie.add(new go.PathSegment(go.PathSegment.Line,qe.x*ee,qe.y*z)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,Ae.x*ee,Ae.y*z,Oe.x*ee,Oe.y*z)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z)),ae=.35,re=be*.35;var Je=new go.PathFigure(le*ee,(me-ae)*z,!1);oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),Je.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Je.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z));var mt=new go.PathFigure((le-ae)*ee,me*z,!1);return oe.add(mt),Se(ve),Se(Pe),Se(Ae),Se(Oe),Se(Ze),Se(qe),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(ue,ee,z){var oe=new go.Geometry,re=.375,ae=0,le=-.125,me=re*be,ve=new go.PathFigure((.525+ae)*ee,(.5+re+le)*z,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+re+ae)*ee,(.5+le)*z,(.5+me+ae)*ee,(.5+re+le)*z,(.5+re+ae)*ee,(.5+me+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ae)*ee,(.5-re+le)*z,(1-.5+re+ae)*ee,(.5-me+le)*z,(.5+me+ae)*ee,(.5-re+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+ae)*ee,(.5+le)*z,(.5-me+ae)*ee,(.5-re+le)*z,(.5-re+ae)*ee,(.5-me+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ae)*ee,(.5+re+le)*z,(.5-re+ae)*ee,(.5+me+le)*z,(.5-me+ae)*ee,(.5+re+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.475*ee,.85*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.85*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.9*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.475*ee,.9*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.475*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Line,.525*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.9*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.9*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.85*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.85*z).close()),re=.325,ae=0,le=-.125,me=re*be;var ve=new go.PathFigure((1-.5+re+ae)*ee,(.5+le)*z,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ae)*ee,(.5+re+le)*z,(.5+re+ae)*ee,(.5+me+le)*z,(.5+me+ae)*ee,(.5+re+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+ae)*ee,(.5+le)*z,(.5-me+ae)*ee,(.5+re+le)*z,(.5-re+ae)*ee,(.5+me+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ae)*ee,(.5-re+le)*z,(.5-re+ae)*ee,(.5-me+le)*z,(.5-me+ae)*ee,(.5-re+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+re+ae)*ee,(.5+le)*z,(.5+me+ae)*ee,(.5-re+le)*z,(1-.5+re+ae)*ee,(.5-me+le)*z));var ve=new go.PathFigure((.525+ae)*ee,(.5+re+le)*z,!1);return oe.add(ve),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(ue,ee,z){var oe=ue?ue.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(ue,ee,z){var oe=ue?ue.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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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(ue,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 xn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new xn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var re=ue?ue.parameter2:NaN;isNaN(re)&&(re=.3);var ae=(1-oe)*ee,le=(.5-re/2)*z,me=(.5+re/2)*z,ve=new go.Geometry,Pe=new go.PathFigure(0,le,!0);ve.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,le)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,z)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,me)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,me).close()),ve.spot1=new go.Spot(0,le/z);var Ae=Be(0,me/z,1,me/z,ae/ee,1,1,.5,ke());return ve.spot2=new go.Spot(Ae.x,Ae.y),Se(Ae),ve}),go.Shape.setFigureParameter("Arrow2",0,new xn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new xn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=30),oe>ee&&(oe=ee);var re=ue?ue.parameter2:NaN;isNaN(re)&&(re=30),re=Math.min(re,z/2);var ae=ee-oe,le=(z-re)/2,me=le+re,ve=new go.Geometry,Pe=new go.PathFigure(0,le,!0);ve.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,le)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,z)),Pe.add(new go.PathSegment(go.PathSegment.Line,ae,me)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,me).close()),ve.spot1=new go.Spot(0,le/z);var Ae=Be(0,me/z,1,me/z,ae/ee,1,1,.5,ke());return ve.spot2=new go.Spot(Ae.x,Ae.y),Se(Ae),ve}),go.Shape.defineFigureGenerator("Chevron",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("DoubleArrow",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.214*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,1*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.786*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,1*z).close()),oe}),go.Shape.setFigureParameter("DoubleEndArrow",0,new xn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var re=(.5-oe/2)*z,ae=(.5+oe/2)*z,le=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.3*ee,ae)),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,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close());var ve=Be(0,.5,.3,0,0,re/z,.1,re/z,ke());return le.spot1=new go.Spot(ve.x,ve.y),ve=Be(.7,1,1,.5,0,ae/z,1,ae/z,ve),le.spot2=new go.Spot(ve.x,ve.y),Se(ve),le}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new xn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new xn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var re=ue?ue.parameter2:NaN;isNaN(re)&&(re=100);var ae=(z-oe)/2,le=ae+oe,me=(z-re)/2,ve=me+re;(oe>z||re>z)&&(re>oe?(oe=oe*z/re,ae=(z-oe)/2,le=ae+oe,me=0,ve=z):(ae=0,le=z,me=0,ve=z));var Pe=new go.Geometry,Ae=new go.PathFigure(ee,.5*z,!0);Pe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,me)),Ae.add(new go.PathSegment(go.PathSegment.Line,.3*ee,ae)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,me).close());var Oe=Be(0,.5,.3,me/z,0,ae/z,1,ae/z,ke());return Pe.spot1=new go.Spot(Oe.x,Oe.y),Oe=Be(.7,ve/z,1,.5,0,le/z,1,le/z,Oe),Pe.spot2=new go.Spot(Oe.x,Oe.y),Se(Oe),Pe}),go.Shape.setFigureParameter("IBeamArrow",0,new xn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var re=(.5-oe/2)*z,ae=(.5+oe/2)*z,le=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ae)),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,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),le.spot1=new go.Spot(0,re/z);var ve=Be(.7,1,1,.5,0,ae/z,1,ae/z,ke());return le.spot2=new go.Spot(ve.x,ve.y),Se(ve),le}),go.Shape.setFigureParameter("IBeamArrow2",0,new xn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new xn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=40);var re=ue?ue.parameter2:NaN;isNaN(re)&&(re=100);var ae=(z-oe)/2,le=ae+oe,me=(z-re)/2,ve=me+re;(oe>z||re>z)&&(re>oe?(oe=oe*z/re,ae=(z-oe)/2,le=ae+oe,me=0,ve=z):(ae=0,le=z,me=0,ve=z));var Pe=new go.Geometry,Ae=new go.PathFigure(ee,.5*z,!0);Pe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,le)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,ve)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,me)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,me)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ae)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),Ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,me).close()),Pe.spot1=new go.Spot(0,ae/z);var Oe=Be(.7,ve/z,1,.5,0,le/z,1,le/z,ke());return Pe.spot2=new go.Spot(Oe.x,Oe.y),Se(Oe),Pe}),go.Shape.setFigureParameter("Pointer",0,new xn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.1);var re=new go.Geometry,ae=new go.PathFigure(ee,.5*z,!0);re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,oe*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),re.spot1=new go.Spot(oe,.35);var le=Be(.2,.65,1,.65,0,1,1,.5,ke());return re.spot2=new go.Spot(le.x,le.y),Se(le),re}),go.Shape.setFigureParameter("RoundedPointer",0,new xn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.3);var re=new go.Geometry,ae=new go.PathFigure(ee,.5*z,!0);re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*ee,.75*z,oe*ee,.25*z).close()),re.spot1=new go.Spot(oe,.35);var le=Be(0,.65,1,.65,0,1,1,.5,ke());return re.spot2=new go.Spot(le.x,le.y),Se(le),re}),go.Shape.setFigureParameter("SplitEndArrow",0,new xn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.4);var re=(.5-oe/2)*z,ae=(.5+oe/2)*z,le=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,0,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,0,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),le.spot1=new go.Spot(.2,.3);var ve=Be(.7,1,1,.5,0,ae/z,1,ae/z,ke());return le.spot2=new go.Spot(ve.x,ve.y),Se(ve),le}),go.Shape.setFigureParameter("SplitEndArrow2",0,new xn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=50);var re=(z-oe)/2,ae=re+oe;oe>z&&(re=0,ae=z);var le=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ae)),me.add(new go.PathSegment(go.PathSegment.Line,0,ae)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,0,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),le.spot1=new go.Spot(.2,re/z);var ve=Be(.7,1,1,.5,0,ae/z,1,ae/z,ke());return le.spot2=new go.Spot(ve.x,ve.y),Se(ve),le}),go.Shape.setFigureParameter("SquareArrow",0,new xn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.7);var re=new go.Geometry,ae=new go.PathFigure(ee,.5*z,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,oe*ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,0)),ae.add(new go.PathSegment(go.PathSegment.Line,oe*ee,0).close()),re.spot1=go.Spot.TopLeft,re.spot2=new go.Spot(oe,1),re}),go.Shape.defineFigureGenerator("Cone1",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=be*.1,le=new go.PathFigure(0,.9*z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.9+ae)*z,(.5+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-re)*ee,z,0,(.9+ae)*z).close()),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.97),oe}),go.Shape.defineFigureGenerator("Cone2",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.9*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.9*z,(1-.85/.9)*ee,z,.85/.9*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.9*z).close());var ae=new go.PathFigure(0,.9*z,!1);return oe.add(ae),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.15*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.85*z).close());var ae=new go.PathFigure(.5*ee,z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.15*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.3*z)),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.3*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0).close());var ae=new go.PathFigure(0,.3*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Move,.7*ee,.3*z)),ae.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(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var re=new go.Geometry,ae=be*.5,le=new go.PathFigure(0,oe,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,be*oe,(.5-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,1*ee,oe,(.5+ae)*ee,0,1*ee,be*oe)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,1*z,1*ee,z-be*oe,(.5+ae)*ee,1*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,(.5-ae)*ee,1*z,0,z-be*oe)),le.add(new go.PathSegment(go.PathSegment.Line,0,oe));var me=new go.PathFigure(ee,oe,!1);return re.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,2*oe,1*ee,2*oe-be*oe,(.5+ae)*ee,2*oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,oe,(.5-ae)*ee,2*oe,0,2*oe-be*oe)),re.spot1=new go.Spot(0,0,0,2*oe),re.spot2=new go.Spot(1,1),re}),go.Shape.defineFigureGenerator("Cylinder2",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var re=new go.Geometry,ae=be*.5,le=new go.PathFigure(0,z-oe,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,be*oe,(.5-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,(.5+ae)*ee,0,ee,be*oe)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,z-be*oe,(.5+ae)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,(.5-ae)*ee,z,0,z-be*oe));var me=new go.PathFigure(0,z-oe,!1);return re.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z-2*oe,0,z-oe-be*oe,(.5-ae)*ee,z-2*oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee,z-oe,(.5+ae)*ee,z-2*oe,ee,z-oe-be*oe)),re.spot1=new go.Spot(0,0),re.spot2=new go.Spot(1,1,0,-2*oe),re}),go.Shape.defineFigureGenerator("Cylinder3",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var re=new go.Geometry,ae=be*.5,le=new go.PathFigure(oe,0,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,ee-be*oe,0,ee,(.5-ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,(.5+ae)*z,ee-be*oe,z)),le.add(new go.PathSegment(go.PathSegment.Line,oe,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,be*oe,z,0,(.5+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-ae)*z,be*oe,0));var me=new go.PathFigure(oe,0,!1);return re.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,2*oe,.5*z,oe+be*oe,0,2*oe,(.5-ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,oe,z,2*oe,(.5+ae)*z,oe+be*oe,z)),re.spot1=new go.Spot(0,0,2*oe,0),re.spot2=new go.Spot(1,1),re}),go.Shape.defineFigureGenerator("Cylinder4",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var re=new go.Geometry,ae=be*.5,le=new go.PathFigure(ee-oe,0,!0);re.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,ee-be*oe,0,ee,(.5-ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,(.5+ae)*z,ee-be*oe,z)),le.add(new go.PathSegment(go.PathSegment.Line,oe,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,be*oe,z,0,(.5+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-ae)*z,be*oe,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0));var me=new go.PathFigure(ee-oe,0,!1);return re.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,ee-2*oe,.5*z,ee-oe-be*oe,0,ee-2*oe,(.5-ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee-2*oe,(.5+ae)*z,ee-oe-be*oe,z)),re.spot1=new go.Spot(0,0),re.spot2=new go.Spot(1,1,-2*oe,0),re}),go.Shape.defineFigureGenerator("Prism1",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.25*ee,.25*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ae=new go.PathFigure(.25*ee,.25*z,!1);return oe.add(ae),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.25*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ae=new go.PathFigure(0,z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ae.add(new go.PathSegment(go.PathSegment.Move,0,.25*z)),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*z).close());var ae=new go.PathFigure(.5*ee,0,!1);return oe.add(ae),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.85*z).close());var ae=new go.PathFigure(.5*ee,0,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.7*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.85*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.7*z)),ae.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(ue,ee,z){var oe=new go.Geometry,re=.2,ae=.1,le=be*re,me=be*ae,ve=.5,Pe=.1,Ae=new go.PathFigure(ve*ee,(Pe+ae)*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve-re)*ee,Pe*z,(ve-le)*ee,(Pe+ae)*z,(ve-re)*ee,(Pe+me)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-ae)*z,(ve-re)*ee,(Pe-me)*z,(ve-le)*ee,(Pe-ae)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve+re)*ee,Pe*z,(ve+le)*ee,(Pe-ae)*z,(ve+re)*ee,(Pe-me)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+ae)*z,(ve+re)*ee,(Pe+me)*z,(ve+le)*ee,(Pe+ae)*z));var Oe=.05,Ie=be*Oe;ve=.05,Pe=.25;var Ze=new go.PathFigure(.5*ee,.2*z,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,.95*ee,.2*z)),ve=.95,Pe=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve+Oe)*ee,Pe*z,(ve+Ie)*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-Ie)*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.35*z)),Oe=.025,Ie=be*Oe,ve=.825,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-Ie)*z,(ve+Ie)*ee,(Pe-Oe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-Oe)*ee,Pe*z,(ve-Ie)*ee,(Pe-Oe)*z,(ve-Oe)*ee,(Pe-Ie)*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*ee,z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.7*z)),Oe=.05,Ie=be*Oe,ve=.5,Pe=.7,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-Ie)*z,(ve+Ie)*ee,(Pe-Oe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-Oe)*ee,Pe*z,(ve-Ie)*ee,(Pe-Oe)*z,(ve-Oe)*ee,(Pe-Ie)*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.45*ee,z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.35*z)),Oe=.025,Ie=be*Oe,ve=.175,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-Ie)*z,(ve+Ie)*ee,(Pe-Oe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-Oe)*ee,Pe*z,(ve-Ie)*ee,(Pe-Oe)*z,(ve-Oe)*ee,(Pe-Ie)*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,0,.6*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),Oe=.05,Ie=be*Oe,ve=.05,Pe=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-Oe)*z,(ve-Oe)*ee,(Pe-Ie)*z,(ve-Ie)*ee,(Pe-Oe)*z)),Ze.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 xn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;isNaN(oe)&&(oe=.2);var re=new go.Geometry,ae=new go.PathFigure(ee,0,!0);return re.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,oe*z)),ae.add(new go.PathSegment(go.PathSegment.Line,oe*ee,0).close()),re.spot1=new go.Spot(0,oe),re.spot2=go.Spot.BottomRight,re}),go.Shape.defineFigureGenerator("Collate",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,.5*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z));var ae=new go.PathFigure(.5*ee,.5*z,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.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(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(0,re*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,re*z)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-re)*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,(1-re)*z)),oe}),go.Shape.defineFigureGenerator("Database",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=be*.1,le=new go.PathFigure(ee,.1*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.9+ae)*z,(.5+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-re)*ee,z,0,(.9+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,(.1-ae)*z,(.5-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,(.5+re)*ee,0,ee,(.1-ae)*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+ae)*z,(.5+re)*ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*z,(.5-re)*ee,.2*z,0,(.1+ae)*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+ae)*z,(.5+re)*ee,.3*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*z,(.5-re)*ee,.3*z,0,(.2+ae)*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+ae)*z,(.5+re)*ee,.4*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*z,(.5-re)*ee,.4*z,0,(.3+ae)*z)),oe.spot1=new go.Spot(0,.4),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("DataStorage",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,ee,0,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.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(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=be*.1,le=new go.PathFigure(ee,.1*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.9+ae)*z,(.5+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-re)*ee,z,0,(.9+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,(.1-ae)*z,(.5-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,(.5+re)*ee,0,ee,(.1-ae)*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+ae)*z,(.5+re)*ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*z,(.5-re)*ee,.2*z,0,(.1+ae)*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+ae)*z,(.5+re)*ee,.3*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*z,(.5-re)*ee,.3*z,0,(.2+ae)*z)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("Display",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.25*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,ee,0,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,z)),re.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(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)?re=.2:re<.15&&(re=.15);var ae=be*.2,le=new go.PathFigure(0,.2*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,0,0,(.2-ae)*z,(.2-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.2*z,(.8+ae)*ee,0,ee,(.2-ae)*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,z,ee,(.8+ae)*z,(.8+ae)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*z,(.2-ae)*ee,z,0,(.8+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*z));var me=new go.PathFigure(0,re*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,re*z)),oe}),go.Shape.defineFigureGenerator("DividedProcess",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;(isNaN(re)||re<.1)&&(re=.1);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(0,re*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,re*z)),oe}),go.Shape.defineFigureGenerator("Document",function(ue,ee,z){var oe=new go.Geometry;z=z/.8;var re=new go.PathFigure(0,.7*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;(isNaN(re)||re<.2)&&(re=.2);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(re*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,re*z)),le.add(new go.PathSegment(go.PathSegment.Move,ee,re*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,(1-re)*z)),le.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),le.add(new go.PathSegment(go.PathSegment.Move,(1-re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,(1-re)*z)),oe}),go.Shape.defineFigureGenerator("ExternalProcess",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close());var ae=new go.PathFigure(.1*ee,.4*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.9*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.6*ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.4*ee,.9*z)),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ae=new go.PathFigure(.75*ee,0,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.25*z)),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,.5*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z));var ae=new go.PathFigure(ee,.5*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z));var le=new go.PathFigure(ee,.5*z,!1);return oe.add(le),le.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(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN,ae=ue?ue.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(ae)&&(ae=.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 me=new go.PathFigure(re*ee,0,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),me.add(new go.PathSegment(go.PathSegment.Move,0,ae*z)),me.add(new go.PathSegment(go.PathSegment.Line,ee,ae*z)),oe}),go.Shape.defineFigureGenerator("Junction",function(ue,ee,z){var oe=new go.Geometry,re=1/Math.SQRT2,ae=(1-1/Math.SQRT2)/2,le=be*.5,me=.5,ve=new go.PathFigure(ee,me*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,z,ee,(me+le)*z,(me+le)*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,me*z,(me-le)*ee,z,0,(me+le)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,0,0,(me-le)*z,(me-le)*ee,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ee,me*z,(me+le)*ee,0,ee,(me-le)*z));var Pe=new go.PathFigure((ae+re)*ee,(ae+re)*z,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ae*ee,ae*z)),Pe.add(new go.PathSegment(go.PathSegment.Move,ae*ee,(ae+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Line,(ae+re)*ee,ae*z)),oe}),go.Shape.defineFigureGenerator("LinedDocument",function(ue,ee,z){var oe=new go.Geometry;z=z/.8;var re=new go.PathFigure(0,.7*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.5*ee,.4*z,.5*ee,z).close());var ae=new go.PathFigure(.1*ee,0,!1);return oe.add(ae),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=new go.PathFigure(.5*ee,z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ae*z,(ae-re)*ee,z,0,(ae+re)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,0,0,(ae-re)*z,(ae-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,ae*z,(ae+re)*ee,0,ee,(ae-re)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,(ae+.1)*ee,.9*z,ee,(ae+re)*z,(ae+re)*ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.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(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.7);var ae=new go.PathFigure(0,0,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,re*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("MicroformProcessing",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.25);var ae=new go.PathFigure(0,0,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,re*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,(1-re)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("MicroformRecording",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.75*z)),re.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(ue,ee,z){var oe=new go.Geometry;z=z/.8;var re=new go.PathFigure(ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.44*z,.96*ee,.47*z,.93*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.54*z,.86*ee,.57*z,.83*ee,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.4*ee,.4*z,.4*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0).close());var ae=new go.PathFigure(.1*ee,.2*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.54*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.1*z)),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.1*ee,.1*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z).close());var ae=new go.PathFigure(.2*ee,.1*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.1*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.1*ee,.2*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ae.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(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=1-re,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,.5*ee,z).close());var me=new go.PathFigure(.5*re*ee,re*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-.5*re)*ee,re*z)),oe}),go.Shape.defineFigureGenerator("OffPageConnector",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,z)),re.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(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=new go.PathFigure(ee,ae*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,z,ee,(ae+re)*z,(ae+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ae*z,(ae-re)*ee,z,0,(ae+re)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,0,0,(ae-re)*z,(ae-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,ae*z,(ae+re)*ee,0,ee,(ae-re)*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(ue,ee,z){var oe=new go.Geometry;z=z/.8;var re=new go.PathFigure(0,.7*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.3*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.3*z,.5*ee,.6*z,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN,ae=ue?ue.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(ae)&&(ae=.3);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,(1-ae)*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}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN,ae=ue?ue.parameter2:NaN;isNaN(re)&&(re=.1),isNaN(ae)&&(ae=.3);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-ae)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("Procedure",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure((1-re)*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,(1-re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Move,re*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),oe}),go.Shape.defineFigureGenerator("Process",function(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=new go.PathFigure(0,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(re*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Sort",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close());var ae=new go.PathFigure(0,.5*z,!1);return oe.add(ae),ae.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(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.25);var ae=new go.PathFigure(re*ee,0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ee,.5*z,.25*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ee,.5*z,.25*ee,.5*z));var le=new go.PathFigure(re*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,re*ee,z)),le.add(new go.PathSegment(go.PathSegment.Move,(1-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,(1-re)*ee,z)),oe.spot1=new go.Spot(re,0),oe.spot2=new go.Spot(1-re,1),oe}),go.Shape.defineFigureGenerator("Terminator",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.25*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ee,.5*z,.25*ee,.5*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=ue?ue.parameter1:NaN;isNaN(re)&&(re=.1);var ae=new go.PathFigure(0,0,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.75*ee,(1-re)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,(1-re)*z).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("AndGate",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=new go.PathFigure(0,0,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(.5+re)*ee,0,ee,(.5-re)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.5+re)*z,(.5+re)*ee,z)),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=new go.PathFigure(ee,ae*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,z,ee,(ae+re)*z,(ae+re)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,ae*z,(ae-re)*ee,z,0,(ae+re)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ae*ee,0,0,(ae-re)*z,(ae-re)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,ae*z,(ae+re)*ee,0,ee,(ae-re)*z));var me=new go.PathFigure(ee,ae*z,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,ae*z));var ve=new go.PathFigure(.8*ee,.75*z,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.75*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.75*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.75*z)),oe}),go.Shape.defineFigureGenerator("Ground",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Move,.3*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Move,.4*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z)),oe}),go.Shape.defineFigureGenerator("Inverter",function(ue,ee,z){var oe=new go.Geometry,re=be*.1,ae=.1,le=.9,me=.5,ve=new go.PathFigure(.8*ee,.5*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,z)),ve.add(new go.PathSegment(go.PathSegment.Line,0,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z));var Pe=new go.PathFigure((le+ae)*ee,me*z,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z,(le-re)*ee,(me-ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me-ae)*z,(le+ae)*ee,(me-re)*z)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.4,.75),oe}),go.Shape.defineFigureGenerator("NandGate",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=be*.4,le=be*.1,me=.1,ve=.9,Pe=.5,Ae=new go.PathFigure(.8*ee,.5*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,z,.8*ee,(.5+ae)*z,(.4+re)*ee,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(.4+re)*ee,0,.8*ee,(.5-ae)*z));var Oe=new go.PathFigure((ve+me)*ee,Pe*z,!0);return oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+me)*z,(ve+me)*ee,(Pe+le)*z,(ve+le)*ee,(Pe+me)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee,Pe*z,(ve-le)*ee,(Pe+me)*z,(ve-me)*ee,(Pe+le)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-me)*z,(ve-me)*ee,(Pe-le)*z,(ve-le)*ee,(Pe-me)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee,Pe*z,(ve+le)*ee,(Pe-me)*z,(ve+me)*ee,(Pe-le)*z)),oe.spot1=new go.Spot(0,.05),oe.spot2=new go.Spot(.55,.95),oe}),go.Shape.defineFigureGenerator("NorGate",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*re,le=0,me=.5,ve=new go.PathFigure(.8*ee,.5*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.7*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.75*z,.25*ee,.25*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(le+ae)*ee,(me-re)*z,.7*ee,(me-ae)*z)),re=.1,ae=be*.1,le=.9,me=.5;var Pe=new go.PathFigure((le-re)*ee,me*z,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.6,.75),oe}),go.Shape.defineFigureGenerator("OrGate",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*re,le=0,me=.5,ve=new go.PathFigure(0,0,!0);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(le+ae+ae)*ee,(me-re)*z,.8*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.8*ee,(me+ae)*z,(le+ae+ae)*ee,(me+re)*z)),ve.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(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*re,le=.2,me=.5,ve=new go.PathFigure(.1*ee,0,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,z,.35*ee,.25*z,.35*ee,.75*z));var Pe=new go.PathFigure(.8*ee,.5*z,!0);oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,z,.7*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,0,.45*ee,.75*z,.45*ee,.25*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(le+ae)*ee,(me-re)*z,.7*ee,(me-ae)*z)),re=.1,ae=be*.1,le=.9,me=.5;var Ae=new go.PathFigure((le-re)*ee,me*z,!0);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.65,.75),oe}),go.Shape.defineFigureGenerator("XorGate",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*re,le=.2,me=.5,ve=new go.PathFigure(.1*ee,0,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,z,.35*ee,.25*z,.35*ee,.75*z));var Pe=new go.PathFigure(.2*ee,0,!0);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(le+ae)*ee,(me-re)*z,.9*ee,(me-ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,z,.9*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Pe.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("Resistor",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.5*z)),oe}),go.Shape.defineFigureGenerator("Inductor",function(ue,ee,z){var oe=new go.Geometry,re=be*.1,ae=.1,le=.1,me=.5,ve=new go.PathFigure((le-re*.5)*ee,z,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,0,(le-re)*ee,z,(le-ae)*ee,0)),le=.3,ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,(le+ae)*ee,0,(le+re)*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,0,(le-re)*ee,z,(le-ae)*ee,0)),le=.5,ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,(le+ae)*ee,0,(le+re)*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,0,(le-re)*ee,z,(le-ae)*ee,0)),le=.7,ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,(le+ae)*ee,0,(le+re)*ee,z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,0,(le-re)*ee,z,(le-ae)*ee,0)),le=.9,ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+re*.5)*ee,z,(le+ae)*ee,0,(le+re)*ee,z)),oe}),go.Shape.defineFigureGenerator("ACvoltageSource",function(ue,ee,z){var oe=new go.Geometry,re=be*.5,ae=.5,le=.5,me=.5,ve=new go.PathFigure((le-ae)*ee,me*z,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z,(le-re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me-ae)*z,(le+ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Move,(le-ae+.1)*ee,me*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae-.1)*ee,me*z,le*ee,(me-ae)*z,le*ee,(me+ae)*z)),oe}),go.Shape.defineFigureGenerator("DCvoltageSource",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.75*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("Diode",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=ee,ae=z;ee=ee*.38,z=z*.6;var le=be*.8,me=.8,ve=0,Pe=.5,Ae=(re-ee)/2,Oe=(ae-z)/2,Ie=new go.PathFigure(ve*ee+Ae,(Pe+me)*z+Oe,!0);oe.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee+Ae,Pe*z+Oe,(ve-le)*ee+Ae,(Pe+me)*z+Oe,(ve-me)*ee+Ae,(Pe+le)*z+Oe)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+Oe,(ve-me)*ee+Ae,(Pe-le)*z+Oe,(ve-le)*ee+Ae,(Pe-me)*z+Oe)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me+le*.5)*ee+Ae,Pe*z+Oe,ve*ee+Ae,(Pe-me)*z+Oe,(ve-me+le*.5)*ee+Ae,(Pe-le)*z+Oe)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+Oe,(ve-me+le*.5)*ee+Ae,(Pe+le)*z+Oe,ve*ee+Ae,(Pe+me)*z+Oe).close()),le=be*.4,me=.4,ve=.2,Pe=.5;var Ze=new go.PathFigure(ve*ee+Ae,(Pe+me)*z+Oe,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee+Ae,Pe*z+Oe,(ve-le)*ee+Ae,(Pe+me)*z+Oe,(ve-me)*ee+Ae,(Pe+le)*z+Oe)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+Oe,(ve-me)*ee+Ae,(Pe-le)*z+Oe,(ve-le)*ee+Ae,(Pe-me)*z+Oe)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me+le*.5)*ee+Ae,Pe*z+Oe,ve*ee+Ae,(Pe-me)*z+Oe,(ve-me+le*.5)*ee+Ae,(Pe-le)*z+Oe)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+Oe,(ve-me+le*.5)*ee+Ae,(Pe+le)*z+Oe,ve*ee+Ae,(Pe+me)*z+Oe).close()),le=be*.2,me=.2,ve=.5,Pe=.5;var qe=new go.PathFigure((ve-me)*ee+Ae,Pe*z+Oe,!0);oe.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+Oe,(ve-me)*ee+Ae,(Pe-le)*z+Oe,(ve-le)*ee+Ae,(Pe-me)*z+Oe)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee+Ae,Pe*z+Oe,(ve+le)*ee+Ae,(Pe-me)*z+Oe,(ve+me)*ee+Ae,(Pe-le)*z+Oe)),qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+Oe,(ve+me)*ee+Ae,(Pe+le)*z+Oe,(ve+le)*ee+Ae,(Pe+me)*z+Oe)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee+Ae,Pe*z+Oe,(ve-le)*ee+Ae,(Pe+me)*z+Oe,(ve-me)*ee+Ae,(Pe+le)*z+Oe)),le=be*.4,me=.4,ve=.8,Pe=.5;var Je=new go.PathFigure(ve*ee+Ae,(Pe-me)*z+Oe,!0);oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee+Ae,Pe*z+Oe,(ve+le)*ee+Ae,(Pe-me)*z+Oe,(ve+me)*ee+Ae,(Pe-le)*z+Oe)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+Oe,(ve+me)*ee+Ae,(Pe+le)*z+Oe,(ve+le)*ee+Ae,(Pe+me)*z+Oe)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me-le*.5)*ee+Ae,Pe*z+Oe,ve*ee+Ae,(Pe+me)*z+Oe,(ve+me-le*.5)*ee+Ae,(Pe+le)*z+Oe)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+Oe,(ve+me-le*.5)*ee+Ae,(Pe-le)*z+Oe,ve*ee+Ae,(Pe-me)*z+Oe).close()),le=be*.8,me=.8,ve=1,Pe=.5;var mt=new go.PathFigure(ve*ee+Ae,(Pe-me)*z+Oe,!0);return oe.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee+Ae,Pe*z+Oe,(ve+le)*ee+Ae,(Pe-me)*z+Oe,(ve+me)*ee+Ae,(Pe-le)*z+Oe)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+Oe,(ve+me)*ee+Ae,(Pe+le)*z+Oe,(ve+le)*ee+Ae,(Pe+me)*z+Oe)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me-le*.5)*ee+Ae,Pe*z+Oe,ve*ee+Ae,(Pe+me)*z+Oe,(ve+me-le*.5)*ee+Ae,(Pe+le)*z+Oe)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+Oe,(ve+me-le*.5)*ee+Ae,(Pe-le)*z+Oe,ve*ee+Ae,(Pe-me)*z+Oe).close()),oe}),go.Shape.defineFigureGenerator("Email",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ae=new go.PathFigure(0,0,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ae.add(new go.PathSegment(go.PathSegment.Move,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.54*z)),ae.add(new go.PathSegment(go.PathSegment.Move,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.54*z)),oe}),go.Shape.defineFigureGenerator("Ethernet",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.35*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,0).close());var ae=new go.PathFigure(.1*ee,z,!0,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z).close());var le=new go.PathFigure(.6*ee,z,!0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.6*z)),le.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(ue,ee,z){var oe=new go.Geometry,re=be*.4,ae=.4,le=.5,me=.5,ve=ke(),Pe=ke(),Ae=ke(),Oe=ke();Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.5,ve,ve,Pe,Ae,Oe);var Ie=Re(Pe.x,Pe.y),Ze=new go.PathFigure(Pe.x*ee,Pe.y*z,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,Ae.x*ee,Ae.y*z,Oe.x*ee,Oe.y*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z)),Le(le-ae,me,le-ae,me-re,le-re,me-ae,le,me-ae,.5,Ae,Oe,Pe,ve,ve),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*ee,Pe.y*z,Ae.x*ee,Ae.y*z,Oe.x*ee,Oe.y*z)),re=be*.3,ae=.3,Le(le-ae,me,le-ae,me-re,le-re,me-ae,le,me-ae,.5,Ae,Oe,Pe,ve,ve),Ze.add(new go.PathSegment(go.PathSegment.Line,Pe.x*ee,Pe.y*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,Oe.x*ee,Oe.y*z,Ae.x*ee,Ae.y*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.5,ve,ve,Pe,Ae,Oe),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*ee,Pe.y*z,Oe.x*ee,Oe.y*z,Ae.x*ee,Ae.y*z).close());var Ze=new go.PathFigure(.45*ee,0,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.5*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.5*z)),Ze.add(new go.PathSegment(go.PathSegment.Line,.55*ee,0).close()),Se(ve),Se(Pe),Se(Ae),Se(Oe),Se(Ie),oe.spot1=new go.Spot(.25,.45),oe.spot2=new go.Spot(.75,.8),oe}),go.Shape.defineFigureGenerator("Fallout",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z/2,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,180,360,ee/2,z/2,ee/2,z/2));function ae(le,me,ve){le.add(new go.PathSegment(go.PathSegment.Move,(.3+me)*ee,(.8+ve)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+me)*ee,(.5+ve)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.1+me)*ee,(.5+ve)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.3+me)*ee,(.8+ve)*z).close())}return ae(re,0,0),ae(re,.4,0),ae(re,.2,-.3),oe}),go.Shape.defineFigureGenerator("IrritationHazard",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.2*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.3*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.5*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.37*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.11*z)),re.add(new go.PathSegment(go.PathSegment.Line,.77*ee,.04*z)),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.49*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.37*z)),re.add(new go.PathSegment(go.PathSegment.Line,.63*ee,.86*z)),re.add(new go.PathSegment(go.PathSegment.Line,.77*ee,.91*z)),re.add(new go.PathSegment(go.PathSegment.Line,.34*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.34*ee,.78*z)),re.add(new go.PathSegment(go.PathSegment.Line,.44*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.56*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.68*z).close()),oe}),go.Shape.defineFigureGenerator("FireHazard",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.1*ee,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.29*ee,0,-.25*ee,.63*z,.45*ee,.44*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.51*ee,.42*z,.48*ee,.17*z,.54*ee,.35*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.59*ee,.18*z,.59*ee,.29*z,.58*ee,.28*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,.6*z,.8*ee,.34*z,.88*ee,.43*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.88*ee,.31*z,.87*ee,.48*z,.88*ee,.43*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=.5,ae=0,le=0,me=re*be,ve=.4*Math.SQRT2/2+.5,Pe=.5-.5*Math.SQRT2/2,Ae=1,Oe=.5,Ie=.5,Ze=0,qe=new go.PathFigure(ve*ee,(1-Pe)*z,!1);return oe.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,Oe*z,Ae*ee,.7*z,Ae*ee,Oe*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+ae)*ee,(Ze+ae)*z,(.5+re+ae)*ee,(.5-me+ae)*z,(.5+me+ae)*ee,(.5-re+ae)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-re+ae)*ee,(.5+le)*z,(.5-me+ae)*ee,(.5-re+le)*z,(.5-re+ae)*ee,(.5-me+le)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ae)*ee,.9*z,(.5-re+ae)*ee,(.5+me+le)*z,(.5-me+ae)*ee,.9*z)),qe.add(new go.PathSegment(go.PathSegment.Move,(.25+ae)*ee,.8*z)),qe.add(new go.PathSegment(go.PathSegment.Line,(.35+ae)*ee,.9*z)),qe.add(new go.PathSegment(go.PathSegment.Line,(.2+ae)*ee,.95*z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Move,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Move,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);oe.add(re);var ae=new go.PathFigure(ee,z,!1);oe.add(ae);var le=new go.PathFigure(0,.5*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.5*z,.2*ee,.35*z,.3*ee,.35*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,.7*ee,.65*z,.8*ee,.65*z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z).close()),oe}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.2*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z).close());var re=new go.PathFigure(0,.2*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),oe}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.7*ee,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,0,.6*ee,.5*z,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,z,.4*ee,.5*z,ee,.5*z).close());var ae=new go.PathFigure(.45*ee,.73*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.73*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.38*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.63*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.31*ee,.27*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.56*ee,.27*z)),oe}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);oe.add(re);var ae=new go.PathFigure(.335*ee,(1-.555)*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.335*ee,(1-.405)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.405)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.555)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,ee,.68*z,(1-.12)*ee,.46*z,(1-.02)*ee,.54*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.68*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.335*ee,(1-.555)*z,.02*ee,.54*z,.12*ee,.46*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.365*ee,(1-.595)*z));var le=.5-.285,me=.5,ve=le,Pe=Math.PI/4,Ae=4*(1-Math.cos(Pe))/(3*Math.sin(Pe)),Oe=Ae*.5,Ie=le,Ze=le,qe=Ae*Ie,Je=Ae*Ze;ae.add(new go.PathSegment(go.PathSegment.Bezier,(me-Ie)*ee,ve*z,(me-(qe+Ie)/2)*ee,(ve+(Ze+Je)/2)*z,(me-Ie)*ee,(ve+Je)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,(ve-Ze)*z,(me-Ie)*ee,(ve-Je)*z,(me-qe)*ee,(ve-Ze)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(me+Ie)*ee,ve*z,(me+qe)*ee,(ve-Ze)*z,(me+Ie)*ee,(ve-Je)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ee,(1-.595)*z,(me+Ie)*ee,(ve+Je)*z,(me+(qe+Ie)/2)*ee,(ve+(Ze+Je)/2)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ee,(1-.595)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.555)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.405)*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.335*ee,(1-.405)*z));var mt=new go.PathFigure(.2*ee,z,!1);oe.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.8*z));var gt=new go.PathFigure(.8*ee,z,!1);return oe.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.8*z)),oe}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.1*ee,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z).close());var ae=new go.PathFigure(.2*ee,.2*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.8*z)),oe}),go.Shape.defineFigureGenerator("BpmnEventError",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);oe.add(re);var ae=new go.PathFigure(ee,z,!1);oe.add(ae);var le=new go.PathFigure(.1*ee,z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("Caution",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.05*ee,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,.8*z,0,z,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.55*ee,.1*z,.5*ee,0,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.95*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,z,ee,z,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.05*ee,z));var ae=.05;return re.add(new go.PathSegment(go.PathSegment.Move,(.5-ae)*ee,.875*z)),re.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ee,.875*z,ae*ee,ae*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.325*z,.575*ee,.725*z,.625*ee,.375*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.45*ee,.95*z,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.185*ee,.85*z,.17*ee,.95*z,.15*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.235*ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.625*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.65*z)),re.add(new go.PathSegment(go.PathSegment.Line,.275*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.05*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.05*ee,.575*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.1875*ee,.95*z,0,.675*z,0,.7*z)),re.add(new go.PathSegment(go.PathSegment.Move,.45*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.775*z)),re.add(new go.PathSegment(go.PathSegment.Line,.22*ee,.775*z));var ae=new go.PathFigure(.475*ee,.2*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.225*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.275*ee,.175*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.325*ee,.05*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,.05*z,.35*ee,0,.375*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.375*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.475*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.315*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.32*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.05*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.575*ee,0,.65*ee,.05*z,.625*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.38*ee,.0105*z));var le=new go.PathFigure(.675*ee,.575*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.875*ee,.525*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.775*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.85*ee,.95*z,ee,.8*z,ee,.85*z)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.95*z)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.85*z)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.725*z)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.775*z)),le.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.775*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.775*z)),le.add(new go.PathSegment(go.PathSegment.Move,.675*ee,.575*z)),le.add(new go.PathSegment(go.PathSegment.Line,.775*ee,.775*z)),oe}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*.5,le=new go.PathFigure(ee,re*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,re*ee,z,ee,(re+ae)*z,(re+ae)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,re*z,(re-ae)*ee,z,0,(re+ae)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,re*ee,0,0,(re-ae)*z,(re-ae)*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,re*z,(re+ae)*ee,0,ee,(re-ae)*z));var me=new go.PathFigure(re*ee,0,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,re*ee,.15*z)),me.add(new go.PathSegment(go.PathSegment.Move,re*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,re*ee,.85*z)),me.add(new go.PathSegment(go.PathSegment.Move,0,re*z)),me.add(new go.PathSegment(go.PathSegment.Line,.15*ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Move,ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Line,.85*ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Move,re*ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Line,.58*ee,.1*z)),me.add(new go.PathSegment(go.PathSegment.Move,re*ee,re*z)),me.add(new go.PathSegment(go.PathSegment.Line,.78*ee,.54*z)),oe}),go.Shape.defineFigureGenerator("Package",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.15*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ae=new go.PathFigure(0,.15*z,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,0,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),ae.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ae=new go.PathFigure(0,.2*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.2*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).close()),oe}),go.Shape.defineFigureGenerator("Component",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z).close());var ae=new go.PathFigure(0,.2*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.2*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.2*z).close());var le=new go.PathFigure(0,.6*z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.8*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.6*z).close()),oe}),go.Shape.defineFigureGenerator("Boat Shipment",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.15*ee,.6*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z));var ae=new go.PathFigure(.15*ee,.6*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),oe}),go.Shape.defineFigureGenerator("Customer/Supplier",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.66*ee,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,.66*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,.33*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe}),go.Shape.defineFigureGenerator("Workcell",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.35*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("Supermarket",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.33*z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,.33*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.66*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.66*z)),re.add(new go.PathSegment(go.PathSegment.Move,ee,.66*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),oe}),go.Shape.defineFigureGenerator("TruckShipment",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ae=new go.PathFigure(ee,.8*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z).close());var le=.1,me=be*.1,ve=.2,Pe=.9,Ae=new go.PathFigure((ve-le)*ee,Pe*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-le)*z,(ve-le)*ee,(Pe-me)*z,(ve-me)*ee,(Pe-le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve+le)*ee,Pe*z,(ve+me)*ee,(Pe-le)*z,(ve+le)*ee,(Pe-me)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+le)*z,(ve+le)*ee,(Pe+me)*z,(ve+me)*ee,(Pe+le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ve-le)*ee,Pe*z,(ve-me)*ee,(Pe+le)*z,(ve-le)*ee,(Pe+me)*z).close()),le=.1,me=be*.1,ve=.8,Pe=.9;var Oe=new go.PathFigure((ve-le)*ee,Pe*z,!0);return oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-le)*z,(ve-le)*ee,(Pe-me)*z,(ve-me)*ee,(Pe-le)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+le)*ee,Pe*z,(ve+me)*ee,(Pe-le)*z,(ve+le)*ee,(Pe-me)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+le)*z,(ve+le)*ee,(Pe+me)*z,(ve+me)*ee,(Pe+le)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-le)*ee,Pe*z,(ve-me)*ee,(Pe+le)*z,(ve-le)*ee,(Pe+me)*z).close()),oe}),go.Shape.defineFigureGenerator("KanbanPost",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.2*ee,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),oe}),go.Shape.defineFigureGenerator("Forklift",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0));var ae=new go.PathFigure(0,.5*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.8*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var le=new go.PathFigure(.5*ee,.8*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.8*z)),le.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 ve=.1,Pe=be*.1,Ae=.1,Oe=.9,Ie=new go.PathFigure((Ae-ve)*ee,Oe*z,!0);oe.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(Oe-ve)*z,(Ae-ve)*ee,(Oe-Pe)*z,(Ae-Pe)*ee,(Oe-ve)*z)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+ve)*ee,Oe*z,(Ae+Pe)*ee,(Oe-ve)*z,(Ae+ve)*ee,(Oe-Pe)*z)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(Oe+ve)*z,(Ae+ve)*ee,(Oe+Pe)*z,(Ae+Pe)*ee,(Oe+ve)*z)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-ve)*ee,Oe*z,(Ae-Pe)*ee,(Oe+ve)*z,(Ae-ve)*ee,(Oe+Pe)*z)),ve=.1,Pe=be*.1,Ae=.4,Oe=.9;var Ze=new go.PathFigure((Ae-ve)*ee,Oe*z,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(Oe-ve)*z,(Ae-ve)*ee,(Oe-Pe)*z,(Ae-Pe)*ee,(Oe-ve)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+ve)*ee,Oe*z,(Ae+Pe)*ee,(Oe-ve)*z,(Ae+ve)*ee,(Oe-Pe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(Oe+ve)*z,(Ae+ve)*ee,(Oe+Pe)*z,(Ae+Pe)*ee,(Oe+ve)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-ve)*ee,Oe*z,(Ae-Pe)*ee,(Oe+ve)*z,(Ae-ve)*ee,(Oe+Pe)*z)),oe}),go.Shape.defineFigureGenerator("RailShipment",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.1*ee,.4*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.9*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.4*z).close());var ae=new go.PathFigure(.45*ee,.7*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.7*z));var le=new go.PathFigure(.55*ee,.4*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.4*z).close());var Ae=.05,Oe=be*.05,Ie=.175,Ze=.95,me=new go.PathFigure((Ie-Ae)*ee,Ze*z,!0);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,Ie*ee,(Ze-Ae)*z,(Ie-Ae)*ee,(Ze-Oe)*z,(Ie-Oe)*ee,(Ze-Ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Ae)*ee,Ze*z,(Ie+Oe)*ee,(Ze-Ae)*z,(Ie+Ae)*ee,(Ze-Oe)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,Ie*ee,(Ze+Ae)*z,(Ie+Ae)*ee,(Ze+Oe)*z,(Ie+Oe)*ee,(Ze+Ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Ae)*ee,Ze*z,(Ie-Oe)*ee,(Ze+Ae)*z,(Ie-Ae)*ee,(Ze+Oe)*z));var Ae=.05,Oe=be*.05,Ie=.375,Ze=.95,ve=new go.PathFigure((Ie-Ae)*ee,Ze*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,Ie*ee,(Ze-Ae)*z,(Ie-Ae)*ee,(Ze-Oe)*z,(Ie-Oe)*ee,(Ze-Ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Ae)*ee,Ze*z,(Ie+Oe)*ee,(Ze-Ae)*z,(Ie+Ae)*ee,(Ze-Oe)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Ie*ee,(Ze+Ae)*z,(Ie+Ae)*ee,(Ze+Oe)*z,(Ie+Oe)*ee,(Ze+Ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Ae)*ee,Ze*z,(Ie-Oe)*ee,(Ze+Ae)*z,(Ie-Ae)*ee,(Ze+Oe)*z));var Ae=.05,Oe=be*.05,Ie=.625,Ze=.95,Pe=new go.PathFigure((Ie-Ae)*ee,Ze*z,!0);oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ie*ee,(Ze-Ae)*z,(Ie-Ae)*ee,(Ze-Oe)*z,(Ie-Oe)*ee,(Ze-Ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Ae)*ee,Ze*z,(Ie+Oe)*ee,(Ze-Ae)*z,(Ie+Ae)*ee,(Ze-Oe)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ie*ee,(Ze+Ae)*z,(Ie+Ae)*ee,(Ze+Oe)*z,(Ie+Oe)*ee,(Ze+Ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Ae)*ee,Ze*z,(Ie-Oe)*ee,(Ze+Ae)*z,(Ie-Ae)*ee,(Ze+Oe)*z));var Ae=.05,Oe=be*.05,Ie=.825,Ze=.95,qe=new go.PathFigure((Ie-Ae)*ee,Ze*z,!0);oe.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,Ie*ee,(Ze-Ae)*z,(Ie-Ae)*ee,(Ze-Oe)*z,(Ie-Oe)*ee,(Ze-Ae)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Ie+Ae)*ee,Ze*z,(Ie+Oe)*ee,(Ze-Ae)*z,(Ie+Ae)*ee,(Ze-Oe)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,Ie*ee,(Ze+Ae)*z,(Ie+Ae)*ee,(Ze+Oe)*z,(Ie+Oe)*ee,(Ze+Ae)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Ie-Ae)*ee,Ze*z,(Ie-Oe)*ee,(Ze+Ae)*z,(Ie-Ae)*ee,(Ze+Oe)*z).close());var Je=new go.PathFigure(0,z,!1);return oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe}),go.Shape.defineFigureGenerator("Warehouse",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ae=new go.PathFigure(0,.2*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z).close());var le=new go.PathFigure(.15*ee,z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z).close());var me=.05,ve=be*.05,Pe=.35,Ae=.775,Oe=new go.PathFigure((Pe-me)*ee,Ae*z,!0);return oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ee,(Ae-me)*z,(Pe-me)*ee,(Ae-ve)*z,(Pe-ve)*ee,(Ae-me)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+me)*ee,Ae*z,(Pe+ve)*ee,(Ae-me)*z,(Pe+me)*ee,(Ae-ve)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ee,(Ae+me)*z,(Pe+me)*ee,(Ae+ve)*z,(Pe+ve)*ee,(Ae+me)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-me)*ee,Ae*z,(Pe-ve)*ee,(Ae+me)*z,(Pe-me)*ee,(Ae+ve)*z).close()),oe}),go.Shape.defineFigureGenerator("ControlCenter",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,.1*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z).close()),oe}),go.Shape.defineFigureGenerator("Bluetooth",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.75*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,0,0)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Globe",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Move,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,.75*ee,0,ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,.75*z,.75*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,.25*ee,z,0,.75*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,.25*z,.25*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,.15*ee,.25*z,.15*ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.85*ee,.75*z,.85*ee,.25*z)),re.add(new go.PathSegment(go.PathSegment.Move,.1675*ee,.15*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ee,.15*z,.35*ee,.3*z,.65*ee,.3*z)),re.add(new go.PathSegment(go.PathSegment.Move,.1675*ee,.85*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.25*z,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.25*z,.1*ee,0,.2*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,.25*z,.425*ee,.5*z,.575*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.25*z,.8*ee,0,.9*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),re.add(new go.PathSegment(go.PathSegment.Move,0,.25*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.75*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.75*z,.1*ee,.5*z,.2*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,.75*z,.425*ee,z,.575*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.75*z,.8*ee,.5*z,.9*ee,.5*z)),oe}),go.Shape.defineFigureGenerator("Operator",function(ue,ee,z){var oe=new go.Geometry,re=.3,ae=be*.3,le=.5,me=.7,ve=new go.PathFigure((le-re)*ee,me*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z));var Pe=new go.PathFigure(0,.7*z,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ee,.7*z,0,0,ee,0)),oe}),go.Shape.defineFigureGenerator("TripleFanBlades",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.5*ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.65*ee,.3*z,.65*ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.35*ee,.5*z,.35*ee,.3*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.65*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.3*ee,.6*z,.1*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.2*ee,z,.35*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.65*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,z,.7*ee,.6*z,.9*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.8*ee,z,.65*ee,.95*z)),oe}),go.Shape.defineFigureGenerator("CentrifugalPump",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee,0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,0,.075*z,0,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,z,0,z,.4*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.4*z,.8*ee,z,.85*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,0)),oe}),go.Shape.defineFigureGenerator("Battery",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,.4*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.1*z));var ae=new go.PathFigure(0,.6*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Move,0,.4*z)),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Delete",function(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*.5,le=.5,me=.5,ve=new go.PathFigure((le-re)*ee,me*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z));var Pe=new go.PathFigure(.15*ee,.5*z,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.5*z)),oe}),go.Shape.defineFigureGenerator("Flag",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.1*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Move,0,.1*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.1*z,.15*ee,0,.35*ee,0)),re.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,.65*ee,.2*z,.85*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.5*z,.85*ee,.6*z,.65*ee,.6*z)),re.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(ue,ee,z){var oe=new go.Geometry,re=.5,ae=be*.5,le=.5,me=.5,ve=new go.PathFigure((le-re)*ee,me*z,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z).close()),re=.05,ae=be*.05,le=.5,me=.8;var Pe=new go.PathFigure((le-re)*ee,me*z,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me-re)*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le+re)*ee,me*z,(le+ae)*ee,(me-re)*z,(le+re)*ee,(me-ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+re)*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(le-re)*ee,me*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.7*z)),Pe.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,.75*ee,.475*z,.75*ee,.225*z)),Pe.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(ue,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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var ae=new go.PathFigure(.2*ee,.5*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.3*z,.25*ee,0,.75*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.3*z)),oe}),go.Shape.defineFigureGenerator("Unlocked",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var ae=new go.PathFigure(.2*ee,.5*z,!1);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.5*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.3*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.3*z,.25*ee,0,.75*ee,0)),ae.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.35*z)),oe}),go.Shape.defineFigureGenerator("Gear",function(ue,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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.5*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,.3*z,0,.375*z,.05*ee,.325*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.45*ee,.075*z,.3*ee,.225*z,.4*ee,.175*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.525*ee,.075*z,.46*ee,.05*z,.525*ee,.05*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.4*z,.525*ee,.275*z,.475*ee,.325*z)),re.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.55*z,ee,.4*z,ee,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.55*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.6*ee,.7*z,.675*ee,.55*z,.675*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.575*ee,.85*z,.65*ee,.7*z,.65*ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.85*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.535*ee,z,.61*ee,.85*z,.61*ee,z)),re.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,.435*ee,z,0,z).close()),oe}),go.Shape.defineFigureGenerator("Map",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,.2*z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),re.add(new go.PathSegment(go.PathSegment.Move,.25*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.8*z)),re.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),re.add(new go.PathSegment(go.PathSegment.Move,.75*ee,0)),re.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.8*z)),oe}),go.Shape.defineFigureGenerator("Eject",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee,z)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z*.7)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.7).close());var ae=new go.PathFigure(0,z*.6,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0).close()),oe}),go.Shape.defineFigureGenerator("Pencil",function(ue,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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*1,z*1,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.85)),re.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.85)),re.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.3)),re.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.3)),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.3)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z*.3)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.85)),re.add(new go.PathSegment(go.PathSegment.Line,ee,z*.85).close());var ae=new go.PathFigure(.126*ee,.85*z,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,.126*ee,.45*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.322*ee,.45*z)),ae.add(new go.PathSegment(go.PathSegment.Line,.322*ee,.85*z).close());var le=new go.PathFigure(.402*ee,.85*z,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.402*ee,.45*z)),le.add(new go.PathSegment(go.PathSegment.Line,.598*ee,.45*z)),le.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 ve=new go.PathFigure(.5*ee,.1*z,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ee,.3*z)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*ee,.3*z).close()),oe}),go.Shape.defineFigureGenerator("Staircase",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z*1,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*.8)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.8)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.6)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.6)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.4)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.4)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.2)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.2)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.15)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.15)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.35)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.35)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.15,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.15,z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*.95).close()),oe}),go.Shape.defineFigureGenerator("5Bars",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,z*1,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.184,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.184,z*(1-.184)).close());var ae=new go.PathFigure(ee*.204,z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.204,z*(1-.184))),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.388,z*(1-.184*2))),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.388,z*1).close());var le=new go.PathFigure(ee*.408,z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.408,z*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,ee*.592,z*(1-.184*3))),le.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 ve=new go.PathFigure(ee*.816,z,!0);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.816,z*(1-.184*4))),ve.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-.184*5))),ve.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1).close()),oe}),go.Shape.defineFigureGenerator("PC",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,0).close());var ae=new go.PathFigure(ee*.055,.07*z,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.07)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.1)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.055,z*.1).close());var le=new go.PathFigure(ee*.055,.13*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.13)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.16)),le.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 ve=new go.PathFigure(ee*1,0,!0);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.4,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.65)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.65).close()),oe}),go.Shape.defineFigureGenerator("Plane",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(.55*ee,z,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.7*z)),re.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.475*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.35*ee,.525*z,0,.4*z,.225*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.475*z)),re.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.35*z)),re.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.325*z)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.325*z)),re.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.1*z)),re.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.2*z,.975*ee,0,ee,.08*z)),re.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.45*z)),re.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.95*z)),re.add(new go.PathSegment(go.PathSegment.Line,.55*ee,z).close()),oe}),go.Shape.defineFigureGenerator("Key",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*1,z*.5,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.9,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.4*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.35*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,.35*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.15,.2*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.35*z)),re.add(new go.PathSegment(go.PathSegment.Line,0,.65*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.15,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,.8*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,.65*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.65*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.6,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.65,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.7,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,.55*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,.6*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.85,.575*z)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.9,.6*z).close()),re.add(new go.PathSegment(go.PathSegment.Move,.17*ee,.425*z)),re.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*ee,.5*z,.075*ee,.075*z).close()),oe}),go.Shape.defineFigureGenerator("FilmTape",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(0,0,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Arc,270,180,ee*0,ee*.3,ee*.055)),re.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.08,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.08,z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*1),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*1),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*2),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*2),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*3),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*3),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*4),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*4),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*5),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*5),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*6),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*6),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*7),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*7),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*8),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*8),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*9),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*9),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*10),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*10),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*11),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*11),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*12),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*12),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*13),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*13),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*14),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*14),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*15),z*.95)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*15),z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1));var ae=new go.PathFigure(0,0,!1);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*0)),ae.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ee*1,ee*.3,ee*.055)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1));var le=new go.PathFigure(ee*.11,z*.1,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*1+.028*0),z*.1)),le.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*1+.028*0),z*.8)),le.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 ve=new go.PathFigure(ee*(.11+.24133333*2+.028*2),z*.1,!1);return oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*3+.028*2),z*.1)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*3+.028*2),z*.8)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*2+.028*2),z*.8).close()),oe}),go.Shape.defineFigureGenerator("FloppyDisk",function(ue,ee,z){var oe=new go.Geometry,re=8,ae=re*be,le=new go.PathFigure(re,0,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.86,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.14)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z-re)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-re,z,ee,z-ae,ee-ae,z)),le.add(new go.PathSegment(go.PathSegment.Line,re,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-re,ae,z,0,z-ae)),le.add(new go.PathSegment(go.PathSegment.Line,0,re)),le.add(new go.PathSegment(go.PathSegment.Bezier,re,0,0,ae,ae,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 ve=new go.PathFigure(ee*.83,z*1,!1);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.83,z*.5)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*.5)),ve.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*1).close());var Pe=new go.PathFigure(ee*.78,z*.05,!1);return oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.05)),Pe.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.25)),Pe.add(new go.PathSegment(go.PathSegment.Line,ee*.78,z*.25).close()),oe}),go.Shape.defineFigureGenerator("SpeechBubble",function(ue,ee,z){var oe=ue?ue.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=15),oe=Math.min(oe,ee/3),oe=Math.min(oe,z/3);var re=oe*be,ae=z*.8,le=new go.Geometry,me=new go.PathFigure(oe,0,!0);return le.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,ee-re,0,ee,re)),me.add(new go.PathSegment(go.PathSegment.Line,ee,ae-oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,ae,ee,ae-re,ee-re,ae)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.7,ae)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.55,ae)),me.add(new go.PathSegment(go.PathSegment.Line,oe,ae)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ae-oe,re,ae,0,ae-re)),me.add(new go.PathSegment(go.PathSegment.Line,0,oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,re,re,0).close()),re>1?(le.spot1=new go.Spot(0,0,re,re),le.spot2=new go.Spot(1,.8,-re,-re)):(le.spot1=go.Spot.TopLeft,le.spot2=new go.Spot(1,.8)),le}),go.Shape.defineFigureGenerator("Repeat",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*.45,!0);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*.9)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.9)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*.45).close());var ae=new go.PathFigure(ee*1,z*.55,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*1)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.55)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*.55)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*.1)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.1)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.55).close()),oe}),go.Shape.defineFigureGenerator("Windows",function(ue,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(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*.1,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.9)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*.9).close());var ae=new go.PathFigure(ee*.1,z*.2,!0);oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.25)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.22,z*.285)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.32)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.37)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.275,z*.32)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.275,z*.25).close());var le=new go.PathFigure(ee*.28,z*.37,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.37)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.41)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.28,z*.41).close()),oe}),go.Shape.defineFigureGenerator("Beaker",function(ue,ee,z){var oe=new go.Geometry,re=15,ae=re*be,le=new go.PathFigure(ee*.62,z*.475,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,z-re)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee-re,z,ee,z-ae,ee-ae,z)),le.add(new go.PathSegment(go.PathSegment.Line,re,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,z-re,ae,z,0,z-ae)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.38,z*.475)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.38,z*.03)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*0)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*0)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.62,z*.03).close()),ae>1?(oe.spot1=new go.Spot(0,0,ae,ae),oe.spot2=new go.Spot(1,1,-ae,-ae)):(oe.spot1=go.Spot.TopLeft,oe.spot2=go.Spot.BottomRight),oe}),go.Shape.defineFigureGenerator("Download",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*1,!0);oe.add(re);var ae=.1/.3;re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-ae)).close());var le=new go.PathFigure(ee*.4,z*0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.44)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.26,z*.44)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.66)),le.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.26),z*.44)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.44)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*0).close()),oe}),go.Shape.defineFigureGenerator("Bin",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*1,!0);oe.add(re);var ae=.1/.3;return re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-ae)).close()),oe}),go.Shape.defineFigureGenerator("Upload",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*0,z*1,!0);oe.add(re);var ae=.1/.3;re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-ae))),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-ae)).close());var le=new go.PathFigure(ee*.5,z*0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.26,z*.25)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.25)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.63)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.63)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.25)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.74,z*.25).close()),oe}),go.Shape.defineFigureGenerator("EmptyDrink",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*.15,z*0,!1);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.85,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1).close()),oe}),go.Shape.defineFigureGenerator("Drink",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*.15,z*0,!1);oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.85,z*0)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1).close());var ae=new go.PathFigure(ee*.235,z*.28,!0);return oe.add(ae),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.765,z*.28)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.655,z*.97)),ae.add(new go.PathSegment(go.PathSegment.Line,ee*.345,z*.97).close()),oe}),go.Shape.defineFigureGenerator("4Arrows",function(ue,ee,z){var oe=new go.Geometry,re=new go.PathFigure(ee*.5,z*0,!0);return oe.add(re),re.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*.25)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.25)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.35)),re.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.5)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.65)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*1)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.75)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.55)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.65)),re.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*.5)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.35)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.45)),re.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.25)),re.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")},91e3: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 xn={},un="5.0",Re={},ke=null,Se=!1,Be=!1,Le=null,Ce=!1,xe=null,be=null,ye=0;ye<arguments.length;ye++){var we=arguments[ye];if(we!==null)switch(typeof we){case"number":un=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?un=we:Le=we;break;case"object":typeof we.is3D!="undefined"?ke=we:Re=we;break;case"boolean":Se=we,Be=!0;break}}ke===null&&(ke={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Re.material_id!==void 0&&!Be&&(Se=!0)),Le!==null&&Re.id===void 0&&(Re.id=Le);var pe="",de="",ge=!1,fe=null,ue=null,ee=null,z=!1,oe=null,re=null,ae=null,le=null,me=null;Re.height!==void 0&&(Re.height=Math.round(Re.height)),Re.width!==void 0&&(Re.width=Math.round(Re.width));var ve=function(xt){return parseFloat(xt)>4?parseFloat(xt):5};xn.setHTML5Codebase=function(xt,zt){be=xt,ct(xt,zt)},xn.setJavaCodebase=xn.setJavaCodebaseVersion=xn.isCompiledInstalled=xn.setPreCompiledScriptPath=xn.setPreCompiledResourcePath=function(){},xn.setHTML5CodebaseVersion=function(xt,zt){var Ut=parseFloat(xt);if(Ut!==NaN&&Ut<5){console.log("The GeoGebra HTML5 codebase version "+Ut+" is deprecated. Using version latest instead.");return}xe=xt,ot(xt,zt)},xn.getHTML5CodebaseVersion=function(){return ue},xn.getParameters=function(){return Re},xn.setFontsCSSURL=function(xt){le=xt},xn.setGiacJSURL=function(xt){},xn.setJNLPFile=function(xt){pe=xt},xn.setJNLPBaseDir=function(xt){},xn.inject=function(){function xt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var zt="auto",Ut=Re.id,cn,jt=!1,mn=0;mn<arguments.length;mn++){var Ft=arguments[mn];typeof Ft=="string"?(Ft=Ft.toLowerCase(),Ft.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?zt=Ft:Ut=arguments[mn]):typeof Ft=="boolean"?jt=Ft:Ft instanceof HTMLElement&&(cn=Ft)}Yt();function Yt(){if(!Ce){setTimeout(Yt,200);return}zt=Dt(zt);var tn=cn||document.getElementById(Ut);if(!tn){console.log("possibly bug on ajax loading? ");return}if(xn.removeExistingApplet(tn,!1),Re.width===void 0&&tn.clientWidth&&(Re.width=tn.clientWidth),Re.height===void 0&&tn.clientHeight&&(Re.height=tn.clientHeight),!(Re.width&&Re.height)&&zt==="html5"&&(delete Re.width,delete Re.height),fe=zt,zt==="screenshot")gt(tn,Re);else{var lt=!1;Re.hasOwnProperty("playButton")&&Re.playButton||Re.hasOwnProperty("clickToLoad")&&Re.clickToLoad?lt=!0:Re.hasOwnProperty("playButtonAutoDecide")&&Re.playButtonAutoDecide&&(lt=(!Pe()||xt())&&Ae()),lt?(fe="screenshot",at(tn,Re,jt,zt)):mt(tn,Re,jt)}}};function Pe(){try{return window.self!==window.top}catch(xt){return!0}}function Ae(){return Re.hasOwnProperty("screenshotGenerator")&&Re.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}xn.getViews=function(){return ke},xn.isJavaInstalled=function(){return!1};var Oe=function(xt){var zt=function(mn){var Ft=JSON.parse(mn),Yt=function(Ue){return Ue.type=="G"||Ue.type=="E"},tn=Ft.elements?Ft.elements.filter(Yt)[0]:Ft;if(!tn||!tn.url){Ut();return}Re.fileName=tn.url,Ie(tn.settings||{}),ke.is3D=!0;var lt="https://www.geogebra.org/images/";xn.setPreviewImage(oe||tn.previewUrl,lt+"GeoGebra_loading.png",lt+"applet_play.png"),xt()},Ut=function(){Re.onError&&Re.onError(),yt("Error: Fetching material (id "+Re.material_id+") failed.",Re)},cn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",jt="/materials/"+Re.material_id+"?scope=basic";Ze("https://"+cn+"/api/proxy.php?path="+encodeURIComponent(jt),zt,Ut)};function Ie(xt){var zt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ut){xt[Ut]=!!xt[Ut]}),zt.forEach(function(Ut){Re[Ut]===void 0&&xt[Ut]!==void 0&&(Re[Ut]=xt[Ut])}),Re.showToolBarHelp===void 0&&(Re.showToolBarHelp=Re.showToolBar)}function Ze(xt,zt,Ut){var cn=new XMLHttpRequest;cn.open("GET",xt),cn.onload=function(){zt(cn.responseText)},cn.onerror=Ut,cn.send()}xn.isHTML5Installed=function(){return!0},xn.getLoadedAppletType=function(){return fe},xn.setPreviewImage=function(xt,zt,Ut){oe=xt,re=zt,ae=Ut},xn.removeExistingApplet=function(xt,zt){var Ut;typeof xt=="string"&&(xt=document.getElementById(xt)),fe=null;var cn=null;for(Ut=0;Ut<xt.childNodes.length;Ut++){var jt=xt.childNodes[Ut],mn=jt.className;mn==="applet_screenshot"?zt?(jt.style.display="block",fe="screenshot"):jt.style.display="none":mn!=="applet_scaler prerender"&&(xt.removeChild(jt),cn=mn&&mn.indexOf("appletParameters")!=-1?jt.id:null,Ut--)}var Ft=Re.id!==void 0?Re.id:cn,Yt=window[Ft];Yt&&typeof Yt.getBase64=="function"&&(Yt.remove(),window[Ft]=null)},xn.refreshHitPoints=function(){if(ve(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var xt=xn.getAppletObject();return xt&&typeof xt.recalculateEnvironments=="function"?(xt.recalculateEnvironments(),!0):!1},xn.startAnimation=function(){var xt=xn.getAppletObject();return xt&&typeof xt.startAnimation=="function"?(xt.startAnimation(),!0):!1},xn.stopAnimation=function(){var xt=xn.getAppletObject();return xt&&typeof xt.stopAnimation=="function"?(xt.stopAnimation(),!0):!1},xn.getAppletObject=function(){var xt=Re.id!==void 0?Re.id:"ggbApplet";return window[xt]},xn.resize=function(){};var qe=function(xt,zt,Ut){var cn=document.createElement("param");cn.setAttribute("name",zt),cn.setAttribute("value",Ut),xt.appendChild(cn)},Je=function(xt){return xt&&xt!=="false"},mt=function(xt,zt,Ut){ve(ue)<=4.2&&(Ut=!0);var cn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ue||ggbHTML5LoadedCodebaseIsWebSimple&&!z)&&(cn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var jt=document.createElement("div");jt.classList.add("appletParameters","notranslate");var mn=zt.width,Ft=zt.height;if(zt.disableAutoScale=zt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():zt.disableAutoScale,zt.width!==void 0)if(ve(ue)<=4.4)Je(zt.showToolBar)&&(zt.height-=7),Je(zt.showAlgebraInput)&&(zt.height-=37),zt.width<605&&Je(zt.showToolBar)&&(zt.width=605,mn=605);else{var Yt=100;(Je(zt.showToolBar)||Je(zt.showMenuBar))&&(zt.hasOwnProperty("customToolBar")&&(zt.customToolbar=zt.customToolBar),Yt=Je(zt.showMenuBar)?245:155),mn<Yt&&(zt.width=Yt,mn=Yt)}jt.style.border="none",jt.style.display="inline-block";for(var tn in zt)zt.hasOwnProperty(tn)&&tn!=="appletOnLoad"&&jt.setAttribute("data-param-"+tn,zt[tn]);le&&jt.setAttribute("data-param-fontscssurl",le),xn.resize=function(){GGBAppletUtils.responsiveResize(xt,zt)},window.addEventListener("resize",function(pt){xn.resize()});var lt=typeof zt.appletOnLoad=="function"?zt.appletOnLoad:function(){};if(!Ut&&zt.width!==void 0){zt.hasOwnProperty("showSplash")||jt.setAttribute("data-param-showSplash","false");var Ue=xt.querySelector(".applet_scaler.prerender"),je=Ue!==null;if(je)var rt=Ue.querySelector(".ggb_preview");else{var rt=ht(mn,Ft,zt.borderColor,!1);Ue=document.createElement("div"),Ue.className="applet_scaler",Ue.style.position="relative",Ue.style.display="block",Ue.style.width=mn+"px",Ue.style.height=Ft+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ue,"66%"),ve(ue)>=5?(zt.appletOnLoad=function(pt){var Lt=xt.querySelector(".ggb_preview");Lt&&Lt.parentNode.removeChild(Lt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ue),window.GGBT_wsf_view&&$(window).trigger("resize"),lt(pt)},je||Ue.appendChild(rt)):jt.appendChild(rt),Ue.appendChild(jt),je||xt.appendChild(Ue),setTimeout(function(){xn.resize()},1)}else{var dt=document.createElement("div");dt.className="applet_scaler",dt.style.position="relative",dt.style.display="block",dt.appendChild(jt),xt.appendChild(dt),zt.appletOnLoad=function(pt){xn.resize(),lt(pt)}}function tt(pt,Lt){Lt&&typeof Lt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(pt,Lt.appletOnLoad):renderGGBElement(pt),yt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Lt)}function Ke(pt,Lt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:pt,params:Lt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(on){tt(on.article,on.params)}),html5AppletsToProcess=null)},ve(ue)<5&&(pt.className+=" geogebraweb")):tt(pt,Lt)}if(cn){scriptLoadStarted=!0;for(var De=0;De<jt.childNodes.length;De++){var ze=jt.childNodes[De].tagName;ze==="TABLE"&&(jt.removeChild(jt.childNodes[De]),De--)}if(ggbHTML5LoadedScript!==null){var $e=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');$e!=null&&$e.parentNode.removeChild($e)}var We=document.createElement("script"),Ve=function(){Ke(jt,zt)};We.src=de+ee,ggbHTML5LoadedCodebaseIsWebSimple=z,ggbHTML5LoadedCodebaseVersion=ue,ggbHTML5LoadedScript=We.src,yt("GeoGebra HTML5 codebase loaded: '"+de+"'.",zt),!be&&(!xe||xe=="5.0")?(z?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ve()):de.requirejs?__webpack_require__.e(245).then(function(){var pt=[__webpack_require__(40245)];Ve.apply(null,pt)}.bind(this)).catch(__webpack_require__.oe):(We.onload=Ve,xt.appendChild(We))}else Ke(jt,zt);zt.height=Ft,zt.width=mn},gt=function(xt,zt,Ut){var cn=ht(zt.width,zt.height,zt.borderColor,Ut),jt=document.createElement("div");jt.style.position="relative",jt.style.display="block",jt.style.width=zt.width+"px",jt.style.height=zt.height+"px",jt.className="applet_screenshot applet_scaler"+(Ut?" applet_screenshot_play":""),jt.appendChild(cn);var mn=GGBAppletUtils.getScale(zt,xt,Ut);Ut?(xt.appendChild(_t()),window.GGBT_wsf_view||(xt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(jt,"66%"),xt.appendChild(jt),mn!==1&&!isNaN(mn)&&(GGBAppletUtils.scaleElement(jt,mn),jt.style.width=zt.width+"px",jt.style.height=zt.height+"px",jt.parentNode.style.width=zt.width*mn+"px",jt.parentNode.style.height=zt.height*mn+"px"),xn.resize=function(){Mt(xt,cn,jt,Ut)},window.addEventListener("resize",function(Ft){xn.resize()}),xn.resize()};function Mt(xt,zt,Ut,cn){if(xt.contains(zt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(xt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(xt)}var jt=GGBAppletUtils.getScale(Re,xt,cn);Ut.parentNode!==null&&(!isNaN(jt)&&jt!==1?(GGBAppletUtils.scaleElement(Ut,jt),Ut.parentNode.style.width=Re.width*jt+"px",Ut.parentNode.style.height=Re.height*jt+"px"):(GGBAppletUtils.scaleElement(Ut,1),Ut.parentNode.style.width=Re.width+"px",Ut.parentNode.style.height=Re.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(xt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}xn.onExitFullscreen=function(xt,zt){zt.appendChild(xt)};var at=function(xt,zt,Ut,cn){gt(xt,zt,!0);for(var jt=function(){var Yt=[];for(Ft=0;Ft<xt.childNodes.length;Ft++)Yt.push(xt.childNodes[Ft]);if(window.GGBT_wsf_view){var tn=window.GGBT_wsf_view.renderFullScreen(xt,zt.id),lt=document.getElementById("fullscreencontainer"),Ue=jQuery(xt).find(".fullscreencontent");Ue.length>0?(tn.remove(),Ue.attr("id","fullscreencontent").show(),jQuery(lt).append(Ue),window.dispatchEvent(new Event("resize"))):mt(tn,zt,!1),window.GGBT_wsf_view.launchFullScreen(lt)}else fe=cn,mt(xt,zt,!1);if(!window.GGBT_wsf_view)for(Ft=0;Ft<Yt.length;Ft++)xt.removeChild(Yt[Ft])},mn=xt.getElementsByClassName("ggb_preview_play"),Ft=0;Ft<mn.length;Ft++)mn[Ft].addEventListener("click",jt,!1),mn[Ft].addEventListener("ontouchstart",jt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(xt),Ae()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},_t=function(){var xt=document.createElement("div");if(xt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var zt='.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=zt:Ut.appendChild(document.createTextNode(zt)),document.getElementsByTagName("head")[0].appendChild(Ut)}return xt},ht=function(xt,zt,Ut,cn){var jt=document.createElement("div");jt.className="ggb_preview",jt.style.position="absolute",jt.style.zIndex="90",jt.style.width=xt-2+"px",jt.style.height=zt-2+"px",jt.style.top="0px",jt.style.left="0px",jt.style.overflow="hidden",jt.style.backgroundColor="white";var mn="lightgrey";Ut!==void 0&&(Ut==="none"?mn="transparent":mn=Ut),jt.style.border="1px solid "+mn;var Ft=document.createElement("img");if(Ft.style.position="relative",Ft.style.zIndex="1000",Ft.style.top="-1px",Ft.style.left="-1px",oe!==null&&Ft.setAttribute("src",oe),Ft.style.opacity=.7,re!==null){var Yt,tn,lt;if(!cn){Yt=document.createElement("img"),Yt.style.position="absolute",Yt.style.zIndex="1001",Yt.style.opacity=1,Ft.style.opacity=.3,tn=360,tn>xt/4*3&&(tn=xt/4*3),lt=tn/5.8,Yt.setAttribute("src",re),Yt.setAttribute("width",tn),Yt.setAttribute("height",lt);var Ue=(xt-tn)/2,je=(zt-lt)/2;Yt.style.left=Ue+"px",Yt.style.top=je+"px",jt.appendChild(Yt)}}return jt.appendChild(Ft),jt},Dt=function(xt){return xt=xt.toLowerCase(),xt==="html5"||xt==="screenshot"?xt:"html5"},ut=["web","webSimple","web3d","tablet","tablet3d","phone"],ot=function(xt,zt){if(ue=xt,zt){ct(ue,!0);return}var Ut=!Se;if(Ut){var cn=ve(ue);!isNaN(cn)&&cn<4.4&&(Ut=!1)}var jt,mn;window.location.protocol.substr(0,4)==="http"?jt=window.location.protocol:jt="http:";var Ft=ue.indexOf("//");Ft>0?mn=ue:Ft===0?mn=jt+ue:mn="https://www.geogebra.org/apps/5.2.814.0/";for(var Yt in ut)if(ue.slice(ut[Yt].length*-1)===ut[Yt]||ue.slice((ut[Yt].length+1)*-1)===ut[Yt]+"/"){ct(mn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ut&&!ke.is3D&&!ke.AV&&!ke.SV&&!ke.CV&&!ke.EV2&&!ke.CP&&!ke.PC&&!ke.DA&&!ke.FI&&!ke.PV&&!Je(Re.showToolBar)&&!Je(Re.showMenuBar)&&!Je(Re.showAlgebraInput)&&!Je(Re.enableRightClick)&&(!Re.appName||Re.appName=="classic")?mn+="webSimple/":mn+="web3d/",ct(mn,!1)},ct=function(xt,zt){if(xt.requirejs){de=xt;return}xt.slice(-1)!=="/"&&(xt+="/"),de=xt,zt===null&&(zt=xt.indexOf("http")===-1),ge=zt,ee="web.nocache.js",z=!1;var Ut=de.split("/");Ut.length>1&&(!zt&&Ut[Ut.length-2]==="webSimple"?(ee="webSimple.nocache.js",z=!0):ut.indexOf(Ut[Ut.length-2])>=0&&(ee=Ut[Ut.length-2]+".nocache.js")),Ut=xt.split("/"),ue=Ut[Ut.length-3],ue.substr(0,4)==="test"?ue=ue.substr(4,1)+"."+ue.substr(5,1):(ue.substr(0,3)==="war"||ue.substr(0,4)==="beta")&&(ue="5.0");var cn=parseFloat(ue);cn!==NaN&&cn<5&&xt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+cn+" is deprecated. Using version latest instead."),ot("5.0",zt))},yt=function(xt,zt){window.console&&window.console.log&&(!zt||typeof zt.showLogging=="undefined"||zt.showLogging&&zt.showLogging!=="false")&&console.log(xt)};Re.material_id!==void 0?Oe(wt):wt();function wt(){var xt=un;xe!==null?xt=xe:parseFloat(xt)<5&&(xt="5.0"),ot(xt,!1),be!==null&&ct(be,ge),Ce=!0}return xn},GGBAppletUtils=function(){"use strict";function xn(){return window.GGBT_wsf_edit!==void 0}function un(Ce,xe){xe!=1?(Ce.style.transformOrigin="0% 0% 0px",Ce.style.webkitTransformOrigin="0% 0% 0px",Ce.style.transform="scale("+xe+","+xe+")",Ce.style.webkitTransform="scale("+xe+","+xe+")",Ce.style.maxWidth="initial",Ce.querySelector(".ggb_preview")!==null&&(Ce.querySelector(".ggb_preview").style.maxWidth="initial"),Ce.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ce.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ce.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ce.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ce.style.transform="none",Ce.style.webkitTransform="none")}function Re(Ce,xe,be,ye,we,pe){var de=null;if(pe!=null&&pe!="")for(var ge=Ce.parentNode;ge!=null;)if((" "+ge.className+" ").indexOf(" "+pe+" ")>-1){de=ge;break}else ge=ge.parentNode;var fe=0,ue=0,ee=0,z=0,oe=0,re=0,ae=0;if(de)fe=de.offsetWidth,ue=Math.max(ye?de.offsetWidth:0,de.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(fe=Math.min(window.innerWidth,document.documentElement.clientWidth),ue=Math.min(window.innerHeight,document.documentElement.clientHeight),ee=fe):(fe=window.innerWidth,ue=window.innerHeight,ee=window.innerWidth),Ce){var le=Ce.getBoundingClientRect();le.left>0&&le.left<=fe&&(we===void 0||!we)&&(document.dir==="rtl"?(oe=fe-le.width-le.left,re=ee<=480?10:30):(re=le.left,oe=ee<=480?10:30),z=re+oe)}if(Ce&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var me=Ce.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(z=40,ae=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(z=0,ae=40)}}return Ce&&((be===void 0||!be)&&xe>0&&xe+z<fe?fe=xe:fe-=z,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(be===void 0||!be)&&(ue-=ae)),{width:fe,height:ue}}function ke(Ce,xe,be,ye,we){if(Ce.isScreenshoGenerator)return 1;var pe=ye!==void 0&&ye,de=Ce.noScaleMargin!=null&&Ce.noScaleMargin,ge=function(me){return me&&me!=="false"},fe=ge(Ce.autoHeight),ue=Re(xe,Ce.width,be,fe,pe&&window.GGBT_wsf_view||de,we),ee=parseInt(ue.width),z=Ce.width,oe=Ce.height;if(z===void 0){var re=xe.querySelector(".appletParameters");re&&(z=re.offsetWidth,oe=re.offsetHeight)}var ae=ee/z,le=pe?1:ue.height/oe;return be!==void 0&&!be&&(ae=Math.min(1,ae),le=Math.min(1,le)),Math.min(ae,le)}function Se(Ce,xe,be){var ye=1,we,pe=!1;if(Ce.hasOwnProperty("allowUpscale")&&(pe=Ce.allowUpscale),Ce.hasOwnProperty("scale")&&(ye=parseFloat(Ce.scale),(isNaN(ye)||ye===null||ye===0)&&(ye=1),ye>1&&(pe=!0)),xe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(pe=!0),!(Ce.hasOwnProperty("disableAutoScale")&&Ce.disableAutoScale))we=ke(Ce,xe,pe,be,Ce.scaleContainerClass);else return ye;return pe&&(!Ce.hasOwnProperty("scale")||ye===1)?we:Math.min(ye,we)}function Be(Ce){var xe=Math.min(window.innerWidth,document.documentElement.clientWidth),be=Math.min(window.innerHeight,document.documentElement.clientHeight),ye=Ce.getBoundingClientRect(),we=(xe-ye.width)/2,pe=(be-ye.height)/2;pe<0&&(pe=0),Ce.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?Ce.style.left="40px":Ce.style.left=we+"px",Ce.style.top=pe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(pe<40?Ce.style.top="40px":Ce.style.top=pe+"px",Ce.style.left=we+"px")}function Le(Ce,xe){var be=Ce.querySelector(".appletParameters");if(be){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(xe.id!==be.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ce)}if(be.parentElement&&/fullscreen/.test(be.parentElement.className))return;var ye=Se(xe,Ce);xn()&&be.setAttribute("data-param-scale",ye);for(var we=null,pe=0;pe<Ce.childNodes.length;pe++)if(Ce.childNodes[pe].className!==void 0&&Ce.childNodes[pe].className.match(/^applet_scaler/)){we=Ce.childNodes[pe];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var de=xe.id!==void 0?xe.id:"ggbApplet",ge=window[de];(ge==null||!ge.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(ye)&&ye!==1?(we.parentNode.style.width=xe.width*ye+"px",we.parentNode.style.height=xe.height*ye+"px",un(we,ye)):(un(we,1),we.parentNode.style.width=xe.width+"px",we.parentNode.style.height=xe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Be(Ce),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(be).parents(".content-added-content"))}}return{responsiveResize:Le,isFlexibleWorksheetEditor:xn,positionCenter:Be,getScale:Se,scaleElement:un}}();__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 xn=n.location.search;return xn.indexOf(J)!=-1||xn.indexOf(K)!=-1}function q(xn,un){}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(xn){var un=s[L].bindings;s[L].bindings=function(){for(var Re=un?un():{},ke=xn[webModule.__softPermutationId],Se=O;Se<ke.length;Se++){var Be=ke[Se];Re[Be[O]]=Be[P]}return Re}};var t;function u(){return v(),t}function v(){if(!t){var xn=o.createElement(Q);if(xn.id=L,xn.style.cssText=R+S,xn.tabIndex=-1,o.body.appendChild(xn),t=xn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var un=document.compatMode==U?V:W;t.write(un+X),t.close()}}}function w(xn){function un(ke){function Se(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Be=Se();if(Be){ke();return}function Le(){if(!Be){if(!Se())return;Be=!0,ke(),o.removeEventListener&&o.removeEventListener(Z,Le,!1),Ce&&clearInterval(Ce)}}o.addEventListener&&o.addEventListener(Z,Le,!1);var Ce=setInterval(function(){Le()},$)}function Re(ke){var Se=u(),Be=Se.body,Le=Se.createElement(_);Le.language=ab,Le.crossOrigin=W,Le.src=ke,webModule.__errFn&&(Le.onerror=function(){webModule.__errFn(L,new Error(bb+ke))}),Be.appendChild(Le)}un(function(){Re(xn)})}webModule.__startLoadingFragment=function(xn){return C(xn)},webModule.__installRunAsyncCode=function(xn){var un=u(),Re=un.body,ke=un.createElement(_);ke.language=ab,ke.text=xn,Re.appendChild(ke),Re.removeChild(ke)};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(xn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(xn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(xn){var un=c[xn];return un==null?null:un},r=d,webModule.__errFn=e}function B(){function xn(Ce){var xe=Ce.lastIndexOf(rb);xe==-1&&(xe=Ce.length);var be=Ce.indexOf(sb);be==-1&&(be=Ce.length);var ye=Ce.lastIndexOf(tb,Math.min(be,xe));return ye>=O?Ce.substring(O,ye+P):W}function un(Ce){if(!Ce.match(/^\w+:\/\//)){var xe=o.createElement(ub);xe.src=Ce+vb,Ce=xn(xe.src)}return Ce}function Re(){var Ce=__gwt_getMetaProperty(wb);return Ce!=null?Ce:W}function ke(){for(var Ce=o.getElementsByTagName(_),xe=O;xe<Ce.length;++xe)if(Ce[xe].src.indexOf(xb)!=-1)return xn(Ce[xe].src);return W}function Se(){var Ce=o.getElementsByTagName(yb);return Ce.length>O?Ce[Ce.length-P].href:W}function Be(){var Ce=o.location;return Ce.href==Ce.protocol+zb+Ce.host+Ce.pathname+Ce.search+Ce.hash}var Le=Re();return Le==W&&(Le=ke()),Le==W&&(Le=Se()),Le==W&&Be()&&(Le=xn(o.location.href)),Le=un(Le),Le}function C(xn){return xn.match(/^\//)||xn.match(/^[a-zA-Z]+:\/\//)?xn:webModule.__moduleBase+xn}function D(){var xn=[],un=O,Re=[],ke=[];function Se(Ce){var xe=ke[Ce](),be=Re[Ce];if(xe in be)return xe;var ye=[];for(var we in be)ye[be[we]]=we;throw r&&r(Ce,ye,xe),null}if(__gwt_isKnownPropertyValue=function(Ce,xe){return xe in Re[Ce]},webModule.__getPropMap=function(){var Ce={};for(var xe in Re)Re.hasOwnProperty(xe)&&(Ce[xe]=Se(xe));return Ce},webModule.__computePropValue=Se,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Be;try{Be=Cb;var Le=Be.indexOf(Db);Le!=-1&&(un=parseInt(Be.substring(Le+P),$),Be=Be.substring(O,Le))}catch(Ce){}return webModule.__softPermutationId=un,C(Be+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})()},55322:function(xn,un,Re){"use strict";Re.d(un,{Ax:function(){return Le},Ds:function(){return Ce},KI:function(){return be},SI:function(){return Be},f1:function(){return Se}});var ke=Re(12242);function Se(ye){let we=!0;if(ye.length>0){for(let pe=0;pe<ye.length;pe++)if(ye[pe].compile_success==0||!ye[pe].compile_success){we=!1;break}}else we=!1;return we}function Be(ye,we=""){let pe=[];for(let de=0;de<ye.length;de++){let ge=ye[de],fe=we?`${we}/${ge.name}`:`${ge.name}`;pe.push({title:ge.name,type:ge.type,isLeaf:ge.type!=="tree",key:fe})}return pe}function Le(ye,we,pe){for(let de=0;de<ye.length;de++){let ge=ye[de];if(ge.key===we){ge.children=pe;break}ge.children&&Le(ge.children,we,pe)}return ye}function Ce(ye,we,pe){let de;return function(){let ge=this,fe=arguments,ue=function(){de=null,pe||ye.apply(ge,fe)},ee=pe&&!de;clearTimeout(de),de=setTimeout(ue,we),ee&&ye.apply(ge,fe)}}const xe=!0,be=ke.Z.API_SERVER},25138:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return de}});var ke=Re(59301),Se={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Be=Re(92310),Le=Re.n(Be),Ce=Re(29787),xe=Re(2859),be=Re(24092),ye=Re(59895),we=(ge,fe,ue)=>new Promise((ee,z)=>{var oe=le=>{try{ae(ue.next(le))}catch(me){z(me)}},re=le=>{try{ae(ue.throw(le))}catch(me){z(me)}},ae=le=>le.done?ee(le.value):Promise.resolve(le.value).then(oe,re);ae((ue=ue.apply(ge,fe)).next())}),de=({data:ge,className:fe,fullWidth:ue,style:ee={},onClose:z,onOk:oe,showFullTools:re,noAssociationId:ae})=>{const le=(0,ke.useRef)(null),me=(0,ke.useRef)(null),ve=(0,ke.useRef)(null),Pe=(0,ke.useRef)(null),[Ae,Oe]=(0,ke.useState)(!1),[Ie,Ze]=(0,ke.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ke.useEffect)(()=>(ve.current||(ve.current=document.createElement("style"),document.head.appendChild(ve.current)),ge!=null&&ge.visible?(document.body.setAttribute("data-custom","y-hidden"),ve.current.innerHTML=" html { overflow-y: hidden; }",ge!=null&&ge.src&&qe()):(document.body.removeAttribute("data-custom"),ve.current&&(document.head.removeChild(ve.current),ve.current=null)),()=>{document.body.removeAttribute("data-custom"),ve.current&&(document.head.removeChild(ve.current),ve.current=null)}),[ge==null?void 0:ge.visible]);const qe=()=>we(void 0,null,function*(){Oe(!0),Ze("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Mt=yield(0,ye.ZJ)(ge==null?void 0:ge.src);le.current.src="",le.current.src=Mt,le.current.onload=function(){gt()},Oe(!1),Ze("")}),Je=Mt=>we(void 0,null,function*(){Oe(!0),Ze("\u6B63\u5728\u4FDD\u5B58\u4E2D");const at=yield(0,be.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ge.title,file:Mt.dataUrl}});at!=null&&at.id&&!ae?(yield(0,be.ZP)(`/api/attachments/${ge.id}/add_subitem.json`,{method:"post",body:{subitem_id:at==null?void 0:at.id,settings:JSON.stringify(Mt.state)}})).status===0&&oe():at!=null&&at.id&&oe(at),Oe(!1),Ze("")}),mt=()=>{const Mt=document.querySelector('a[href="https://markerjs.com/"]');Mt&&Mt.parentNode&&(Mt.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(_t=>{const ht=document.querySelector(_t.name);ht&&ht.setAttribute("title",_t.title)})},gt=()=>{me.current=new xe.hP(le.current),me.current.targetRoot=Pe.current,me.current.addEventListener("render",Je),me.current.addEventListener("beforeclose",z),re&&(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(),ge!=null&&ge.snapshotData&&me.current.restoreState(ge.snapshotData),setTimeout(()=>{window.scrollTo(0,0),mt()},300)};return ke.createElement(ke.Fragment,null,(ge==null?void 0:ge.visible)&&ke.createElement(Ce.Z,{spinning:Ae,tip:Ie,style:{position:"absolute",width:"100vw"}},ke.createElement("div",{ref:Pe,className:Le()(Se.imageDimensions,fe,ue?Se.fullWidth:""),style:ee},ke.createElement("img",{className:Se.img,ref:le}))))}},88831:function(xn,un,Re){"use strict";var ke=Re(59301),Se=Re(77019),Be=Re(5269),Le=Re(20554),Ce=Re(99571),xe=Re(79074),be=Re(15547),ye=Re(48136),we=Re(59301);const pe=(0,ke.forwardRef)(({callback:de,showSaveButton:ge,value:fe=""},ue)=>{const ee=(0,ke.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}`}]}]}],re=me=>{ee.current.setValue(ee.current.getValue()+" "+me.value+" ")},ae=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(Se.Z,{className:be.Z.lists,gutter:[10,10]},z.map((me,ve)=>we.createElement(Be.Z,{flex:"110px",className:be.Z.item},we.createElement("div",null,we.createElement(xe.Z,{value:`$$${me.value}$$`}),me.name),we.createElement("div",{className:be.Z.children},me.children.map((Pe,Ae)=>we.createElement("div",{key:Ae},we.createElement("h1",null,Pe.name),we.createElement(Se.Z,{gutter:[10,10]},Pe.data.map((Oe,Ie)=>we.createElement(Be.Z,{key:Ie,onClick:()=>re(Oe),className:be.Z.diamond},we.createElement(xe.Z,{value:"`$$"+Oe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(Se.Z,{className:be.Z.lists,gutter:[10,10]},oe.map((me,ve)=>we.createElement(Be.Z,{flex:"110px",className:be.Z.item},we.createElement("div",null,we.createElement(xe.Z,{value:"`$$"+me.value+"$$`"}),me.name),we.createElement("div",{className:be.Z.children},me.children.map((Pe,Ae)=>we.createElement("div",{key:Ae},Pe.name&&we.createElement("h1",null,Pe.name),we.createElement(Se.Z,{gutter:[10,10]},Pe.data.map((Oe,Ie)=>we.createElement(Be.Z,{key:Ie,onClick:()=>re(Oe),className:be.Z.diamond},we.createElement(xe.Z,{value:"`$$"+Oe.value+"$$`"}))))))))))}],le=()=>{var me=document.createElement("div");me.innerHTML=ee.current.getValue();var ve=me.innerText;return de&&de(ve),ve};return(0,ke.useImperativeHandle)(ue,()=>({getData:le})),we.createElement("div",{className:be.Z.mathWrap},we.createElement(Le.default,{defaultActiveKey:"1",items:ae}),we.createElement("math-field",{locale:"zh_cn",className:be.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ee,style:{width:800,marginTop:30,fontSize:18}},fe||""),ge&&we.createElement("div",{className:be.Z.button},we.createElement(Ce.ZP,{size:"large",onClick:le,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});un.Z=pe},12635:function(xn,un,Re){"use strict";var ke=Re(59301),Se=Re(93314),Be=Re(99571),Le=Object.defineProperty,Ce=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,pe=(ue,ee,z)=>ee in ue?Le(ue,ee,{enumerable:!0,configurable:!0,writable:!0,value:z}):ue[ee]=z,de=(ue,ee)=>{for(var z in ee||(ee={}))ye.call(ee,z)&&pe(ue,z,ee[z]);if(be)for(var z of be(ee))we.call(ee,z)&&pe(ue,z,ee[z]);return ue},ge=(ue,ee)=>Ce(ue,xe(ee));const fe=({img:ue,buttonProps:ee={},styles:z={},customText:oe,ButtonText:re,ButtonClick:ae,Buttonclass:le,ButtonTwo:me,imgStyles:ve,loading:Pe=!1,className:Ae=""})=>ke.createElement("section",{className:`tc animated fadeIn ${Ae}`,style:de({color:"#999",margin:"100px auto",visibility:Pe?"hidden":"visible"},z)},ke.createElement("img",{src:ue||Se,style:ge(de({},ve),{pointerEvents:"none",userSelect:"none"})}),ke.createElement("p",{className:"mt20 font14"},oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),re&&ke.createElement(Be.ZP,de({className:le,onClick:ae},ee),re),me&&me);un.Z=fe},6311:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return le}});var ke=Re(59301),Se={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Be=Re(99571),Le=Re(70557),Ce=Re(89081),xe=Re(25399),be=Re(59895),ye=Re(76011),we=Re(12635),pe=Re(12242),de=Re(65789),ge=Re(59301),fe=Object.defineProperty,ue=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(me,ve,Pe)=>ve in me?fe(me,ve,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):me[ve]=Pe,re=(me,ve)=>{for(var Pe in ve||(ve={}))ee.call(ve,Pe)&&oe(me,Pe,ve[Pe]);if(ue)for(var Pe of ue(ve))z.call(ve,Pe)&&oe(me,Pe,ve[Pe]);return me},ae=(me,ve,Pe)=>new Promise((Ae,Oe)=>{var Ie=Je=>{try{qe(Pe.next(Je))}catch(mt){Oe(mt)}},Ze=Je=>{try{qe(Pe.throw(Je))}catch(mt){Oe(mt)}},qe=Je=>Je.done?Ae(Je.value):Promise.resolve(Je.value).then(Ie,Ze);qe((Pe=Pe.apply(me,ve)).next())}),le=({editOffice:me="view",data:ve,theme:Pe,type:Ae,filename:Oe,monacoEditor:Ie,className:Ze,style:qe,close:Je,onClose:mt,hasMask:gt,disabledDownload:Mt,onImgDimensions:at,showNodata:_t,recordInfo:ht})=>{const[Dt,ut]=(0,ke.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[ot,ct]=(0,ke.useState)(""),[yt,wt]=(0,ke.useState)(),xt=window.ENV==="build"?"/react/build":"",zt=location.host.startsWith("localhost")?pe.Z.PROXY_SERVER:pe.Z.API_SERVER,cn=10*(1024*1024),jt=(0,ke.useRef)();ve!=null&&ve.startsWith("/api")&&Ae!=="txt"&&(ve=pe.Z.API_SERVER+ve);const mn=lt=>lt.substring(lt.lastIndexOf("/")+1).split(".").pop();Oe&&Ie&&(Ie.filename=Oe),(0,ke.useEffect)(()=>{var lt,Ue;const je=(Ue=(lt=document.cookie)==null?void 0:lt.replace(/\s/g,""))==null?void 0:Ue.split(";");je==null||je.map(rt=>{let dt=rt.split("=");dt[0]==="_educoder_session"&&ct(dt[1])})},[]),(0,ke.useEffect)(()=>{Ae==="office"&&(ve.indexOf("bigfilescdn.")>-1||ve.indexOf("bigfiles1")>-1?wt({url:ve,fileType:mn(ve),model:ve.indexOf("model=edit")?"edit":"view"}):Ft())},[Ae,ve]);const Ft=()=>ae(void 0,null,function*(){console.log("data:",ve);let lt=ve;ve.startsWith("http")||(lt=location.origin+lt);let Ue=new URL(lt).pathname.split("/").pop();const je=yield(0,ye.gJ)({attachment_id:Ue});je.url=zt+je.url,wt(je)}),Yt=()=>{if(ve.startsWith("http")||ve.startsWith("blob:")){tn();return}(0,be.Sv)(Oe||"educoder",ve,Oe)},tn=()=>{ht&&(0,de.fc)({id:ht==null?void 0:ht.id,watch_type:1,course_id:ht==null?void 0:ht.course_id}),(0,be.Nd)(Oe||"educoder",decodeURIComponent(ve))};return ge.createElement("div",{style:re({},qe||{}),className:`${gt&&Se.bgBlack} ${Ae?Se.wrp:"hide"}`},Je&&ge.createElement("div",{className:Se.close,ref:jt},!!at&&ge.createElement(xe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>jt.current},ge.createElement("span",{onClick:()=>{mt(),at()}},ge.createElement("i",{className:"icon-yulanpizhu"}))),!Mt&&ge.createElement(xe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>jt.current},ge.createElement("span",{onClick:tn},ge.createElement("i",{className:"icon-quxiaozhiding"}))),ge.createElement(xe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>jt.current},ge.createElement("span",{className:"",onClick:mt},ge.createElement("i",{className:"icon-guanbi1"})))),ge.createElement("div",{className:`${Se[Ze]} ${Ze} ${Se.monaco} ${Ae==="txt"?"show":"hide"}`},Ae==="txt"&&ge.createElement(ge.Fragment,null,ge.createElement(Ce.ZP,re({},Ie)))),Ae==="audio"&&ge.createElement("audio",{src:`${(ve==null?void 0:ve.indexOf("http://"))>-1||(ve==null?void 0:ve.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${ve}`,autoPlay:!0}),Ae==="video"&&ge.createElement(ge.Fragment,null,(ve==null?void 0:ve.indexOf("http"))>-1?ge.createElement("video",{controls:!0,src:`${ve}`,autoPlay:!0}):ge.createElement("video",{controls:!0,src:`data:video/mp4;base64,${ve}`,autoPlay:!0})),Ae==="office"&&yt&&ge.createElement("iframe",{src:`${xt}/office.html?key=${yt.key}&url=${btoa(yt.url)}&callbackUrl=${zt+(yt.callbackUrl||"")}&fileType=${yt.fileType}&title=${yt.title||""}&model=${me}&officeServer=${pe.Z.ONLYOFFICE}&disabledDownload=${!!Mt}`}),Ae==="html"&&ge.createElement("iframe",{src:ve+"&disposition=inline"}),Ae==="pdf"&&ge.createElement("iframe",{src:`${xt}/js/pdfview/index.html?filename=${Oe||"educoder.pdf"}&url=${encodeURIComponent(ve)}&disabledDownload=${!!Mt}`}),Ae==="image"&&ge.createElement("img",{src:`${(ve==null?void 0:ve.indexOf("http://"))>-1||(ve==null?void 0:ve.indexOf("https://"))>-1?"":"data:image/png;base64,"}${ve}`}),(Ae==="other"||Ae==="download")&&ge.createElement(ge.Fragment,null,_t?ge.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ge.createElement(Be.ZP,{icon:ge.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Yt,disabled:Mt},"\u4E0B\u8F7D")}):ge.createElement(Be.ZP,{type:"primary",size:"middle",onClick:Yt,disabled:Mt},ge.createElement(Le.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},79074:function(xn,un,Re){"use strict";Re.d(un,{z:function(){return Ae},Z:function(){return Oe}});var ke=Re(59301),Se=Re(53122),Be=Re(49405),Le=Re(64018),Ce=Re(79710),xe=Re(12242),be=Re(59895),ye=Re(15342),we=Re(1012),pe=Re(6311),de=Re(59301),fe=({html:Ie})=>{const Ze=(0,ke.useRef)(null),qe=(0,ke.useRef)(null),Je=`.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 36px !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,ke.useEffect)(()=>{const mt=Ze.current.attachShadow({mode:"open"});qe.current=document.createElement("div"),qe.current.className="markdown-body",qe.current.innerHTML=Ie,mt.appendChild(qe.current);const gt=document.createElement("style");return gt.textContent=Je,mt.appendChild(gt),()=>{mt.innerHTML=""}},[]),(0,ke.useEffect)(()=>{qe.current&&(qe.current.innerHTML=Ie)},[Ie]),de.createElement("div",{ref:Ze})},ue=Object.defineProperty,ee=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,re=(Ie,Ze,qe)=>Ze in Ie?ue(Ie,Ze,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Ie[Ze]=qe,ae=(Ie,Ze)=>{for(var qe in Ze||(Ze={}))z.call(Ze,qe)&&re(Ie,qe,Ze[qe]);if(ee)for(var qe of ee(Ze))oe.call(Ze,qe)&&re(Ie,qe,Ze[qe]);return Ie};const le="@\u2581\u2581@",me="@\u2581@",ve=/<pre[^>]*>/g;function Pe(Ie){let Ze=document.createElement("div");return Ze.innerHTML=Ie,Ze.childNodes.length===0?"":Ze.childNodes[0].nodeValue}const Ae=(Ie,Ze)=>{Ie=Ie||"";const qe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Je=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,mt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,gt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ze?Ie.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(qe,(Mt,at,_t,ht,Dt,ut,ot)=>{const ct=at||ht||ut,yt=_t||Dt||ot||"?";return xe.Z.API_SERVER+"/api/attachments/"+ct+yt+"&t="+(0,be.Jn)(ct,Date.now())+(Mt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ie=Ie.replace(gt,(Mt,at,_t,ht,Dt,ut,ot)=>{const ct=at||ht||ut,yt=_t||Dt||ot||"?";return xe.Z.API_SERVER+"/attachments/download/"+ct+yt+"&t="+(0,be.Jn)(ct,Date.now())+(Mt.indexOf(")")>-1?")":"&")}).replace(qe,(Mt,at,_t,ht,Dt,ut,ot)=>{const ct=at||ht||ut,yt=_t||Dt||ot||"?";return xe.Z.API_SERVER+"/api/attachments/"+ct+yt+"&t="+(0,be.Jn)(ct,Date.now())+(Mt.indexOf(")")>-1?")":"&")}).replace(Je,(Mt,at,_t,ht,Dt)=>{const ut=at||ht,ot=_t||Dt||"";return'"'+xe.Z.API_SERVER+"/api/attachments/"+ut+ot+ut+ot+"&t="+(0,be.Jn)(ut,Date.now())}).replace(mt,(Mt,at,_t,ht,Dt)=>{const ut=at||ht,ot=_t||Dt||"";return"("+xe.Z.API_SERVER+"/files/uploads/"+ut+ot+ut+ot+"&t="+(0,be.Jn)(ut,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,`
|
|
|
`),Ie)};var Oe=({value:Ie="",className:Ze,showTextOnly:qe,showLines:Je,style:mt={},stylesPrev:gt={},highlightKeywords:Mt,showProgramFill:at,isProgramFill:_t,disabledFill:ht=!1,programFillValue:Dt,onFillChange:ut=yt=>{},onFillBlur:ot=()=>{},onFillFocus:ct=()=>{}})=>{let yt=String(Ie);const[wt,xt]=(0,ke.useState)(""),[zt,Ut]=(0,ke.useState)("office"),[cn,jt]=(0,ke.useState)([]),mn=(0,ke.useRef)("a"+(0,we.Z)()),Ft={},Yt=(We,Ve,pt)=>{const Lt=document.createElement(We===me?"input":"textarea");Lt.style.width="100%",Lt.style.height=We===me?"40px":"151px",Lt.rows=5,Lt.spellcheck=!1,Lt.name="edu-program-fill",Lt.placeholder="\u8BF7\u8F93\u5165",Lt.dataset.id=Ve;const on=Object.keys(Ft).length;return Ft[on]=Lt,`<span class="edu-program-fill-wrap ${We===me?"":"show"}" style="width:${We===me?"400px":"100%"}" title=${pt||""}><span>${Lt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function tn(We){return We=We.replace(/!\[.*?\]\(.*?\)/g,""),We=We.replace(/\[.*?\]\(.*?\)/g,""),We=We.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),We=We.replace(/<embed.*?>/g,""),We=We.replace(/<img.*?>/g,""),We=We.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),We=We.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),We=We.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),We=We.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),We}const lt=We=>We.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ve,pt){let Lt=pt.replace(/(\n|\r)/g,"").split("}"),on=[];return Lt.map(Xt=>{Xt!=""&&on.push(`.${mn.current} ${Xt}`)}),`<style>${on.join("}")}</style>`}),Ue=(0,ke.useMemo)(()=>{try{const Lt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,on=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Xt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Rt=/\(\/attachments\/download\//g;yt=yt.replace(Rt,"("+xe.Z.API_SERVER+"/attachments/download/").replace(Lt,"("+xe.Z.API_SERVER+"/api/attachments/").replace(on,'"'+xe.Z.API_SERVER+"/api/attachments/").replace(Xt,'"'+xe.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(Lt){}if(at){let Lt=-1;return yt=yt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(on,Xt,Rt){var fn;return++Lt,Yt(on,Lt,(fn=Dt==null?void 0:Dt[Lt])==null?void 0:fn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${lt(yt||"")}</pre>`}let We=lt(yt);We=(0,Be.ZP)(We);const Ve=(0,Be.ez)();yt.match(/\[TOC\]/)&&(We=We.replace("<p>[TOC]</p>",(0,Be.Qv)()),(0,Be.Iy)()),We=We.replace(/(__special_katext_id_\d+__)/g,(Lt,on)=>{const{type:Xt,expression:Rt}=Ve[on];return(0,ye.renderToString)(Pe(Rt)||"",{displayMode:Xt==="block",throwOnError:!1,output:"html"})}),We=We.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Be.AL)();const pt=document.createElement("div");if(pt.innerHTML=We,qe)return pt.innerText;if(Mt){const Lt=Mt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return tt(pt,Lt),pt.innerHTML}return setTimeout(()=>ze(),500),pt.innerHTML},[yt,Mt]);(0,ke.useEffect)(()=>{Ke.current&&Ke.current.querySelectorAll(["input","textarea"]).forEach(Ve=>{Ve.oninput=je,Ve.onblur=rt,Ve.onfocus=dt})},[cn]),(0,ke.useEffect)(()=>{var We,Ve,pt,Lt,on;if(Dt!=null&&Dt.length)try{const Xt=Ke.current.querySelectorAll(".edu-program-fill-score"),Rt=Ke.current.querySelectorAll('[name="edu-program-fill"]');for(const[fn,En]of Rt.entries())En.value=((We=Dt==null?void 0:Dt[fn])==null?void 0:We.value)||"",((Ve=Dt==null?void 0:Dt[fn])==null?void 0:Ve.type)==="warning"?En.className="program-fill-warning":((pt=Dt==null?void 0:Dt[fn])==null?void 0:pt.type)==="success"?En.className="program-fill-success":En.className="";for(const[fn,En]of Xt.entries())En.innerHTML=(Lt=Dt==null?void 0:Dt[fn])!=null&&Lt.score?`${(on=Dt==null?void 0:Dt[fn])==null?void 0:on.score}\u5206`:"";jt(Dt)}catch(Xt){console.log(Xt,"error")}},[Dt]);const je=We=>{cn[We.target.dataset.id]=cn[We.target.dataset.id]||{},cn[We.target.dataset.id].value=We.target.value,jt([...cn]),ut(cn,We.target.dataset.id)},rt=We=>{cn[We.target.dataset.id]=cn[We.target.dataset.id]||{},cn[We.target.dataset.id].value=We.target.value,jt([...cn]),ot(cn,We.target.dataset.id)},dt=We=>{cn[We.target.dataset.id]=cn[We.target.dataset.id]||{},cn[We.target.dataset.id].value=We.target.value,jt([...cn]),ct(cn,We.target.dataset.id)};function tt(We,Ve){return We.childNodes.forEach(pt=>{var Lt;if(pt.childNodes.length>0)tt(pt,Ve);else if(pt.nodeName!=="IMG")if(pt.innerHTML)pt.innerHTML=(Lt=pt.innerHTML)==null?void 0:Lt.replace(new RegExp(Ve,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const on=document.createElement("span");on.innerHTML=pt.textContent.replace(new RegExp(Ve,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),pt.replaceWith(on)}})}const Ke=(0,ke.useRef)();Be.jb.WebkitLineClamp=Je,Je&&(mt=ae(ae({},mt),Be.jb));function De(We){let Ve=We.target;if(Ve.tagName.toUpperCase()==="A"){let pt=Ve.getAttribute("href");if(pt.indexOf("office")>-1)We.preventDefault(),xt(pt),Ut("office");else if(pt.indexOf("application/pdf")>-1)We.preventDefault(),xt(pt),Ut("pdf");else if(pt.indexOf("text/html")>-1)We.preventDefault(),xt(pt),Ut("html");else if(pt.startsWith("#")){We.preventDefault();let Lt=document.getElementById(pt.replace("#",""));Lt&&Lt.scrollIntoView(!0)}}}const ze=()=>{var We;const Ve=(We=Ke.current)==null?void 0:We.querySelectorAll("video");Ve==null||Ve.forEach(pt=>{if(pt.oncontextmenu=()=>!1,pt.src.indexOf(".m3u8")>-1&&!pt.canPlayType("application/vnd.apple.mpegurl")){if(Ce.ZP.isSupported()){var Lt=new Ce.ZP;Lt.loadSource(pt.src),Lt.attachMedia(pt)}}})};(0,ke.useEffect)(()=>{if(Ke.current&&Ue&&Ue.match(ve)&&window.PR.prettyPrint(),Ke.current)return Ke.current.addEventListener("click",De),()=>{var We;(We=Ke.current)==null||We.removeEventListener("click",De),(0,Be.AL)(),(0,Be.Iy)()}},[Ue,Ke.current,De]),(0,ke.useEffect)(()=>{var We;const Ve=pt=>{pt.preventDefault(),pt.clipboardData.setData("text",window.getSelection().toString())};return(We=Ke.current)==null||We.addEventListener("copy",Ve),()=>{var pt;(pt=Ke.current)==null||pt.removeEventListener("copy",Ve)}},[Ke.current]);const $e=We=>/<style[\s\S]*?>/i.test(We||"");return ke.createElement(ke.Fragment,null,qe&&ke.createElement("div",{ref:Ke},Ue),!qe&&!$e(Ue)&&ke.createElement("div",{ref:Ke,style:ae({},mt),className:`${Ze||""} ${ht?"disabled-fill":""} markdown-body ${mn.current}`,dangerouslySetInnerHTML:{__html:Ue}}),!qe&&$e(Ue)&&ke.createElement(fe,{html:Ue}),ke.createElement(pe.Z,{close:!0,data:wt,type:wt!=null&&wt.length?zt:"",style:ae({},gt),onClose:()=>xt("")}))}},32984:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return Le}});var ke=Re(71570),Se={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Be=Re(59301),Le=({message:Ce,className:xe,children:be,style:ye={}})=>Be.createElement("div",{className:`custom-spinner ${Se.idsRingWrapper} ${xe}`},Be.createElement("div",{className:Se.ldsRing},Be.createElement("div",null),Be.createElement("div",null),Be.createElement("div",null),Be.createElement("div",null)),Ce?Be.createElement("p",{style:ye},Ce):null,be,Be.createElement(ke.Outlet,null))},98119:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return Le}});var ke=Re(59301),Se=Re(16448),Be=Re(59301),Le=({defaultX:Ce="40%",leftChild:xe,rightChild:be,className:ye,hideResize:we=!1})=>{const[pe,de]=(0,ke.useState)(Ce),ge=(0,ke.useRef)();function fe(){ge.current=!0}(0,ke.useEffect)(()=>{function z(re){ge.current&&(Se.Z.publish("resize-move-bar",re),de(re.pageX))}function oe(){ge.current=!1}return window.addEventListener("mousemove",z),window.addEventListener("mouseup",oe),()=>{window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",oe)}},[]);const ue=typeof pe=="number"&&pe!==.01?`${pe}px`:Ce,ee=`calc(100% - ${we?"0px":"4px"} - ${ue})`;return Be.createElement("div",{className:`split-panel-container ${ye}`},Be.createElement("section",{style:{width:ue,display:pe===.01?"none":""}},xe),Be.createElement("section",{className:"resize-x-bar",onMouseDown:fe},Be.createElement("a",{className:"btn-resize"},Be.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Be.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"})))),Be.createElement("section",{style:{width:ee}},be))}},87700:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return xe}});var ke=Re(59301),Se={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},Be=Re(92310),Le=Re.n(Be),xe=({className:be,style:ye={},leftNode:we,leftTitle:pe="\u81EA\u6D4B\u8F93\u5165",rightNode:de,rightTitle:ge="\u8FD0\u884C\u7ED3\u679C"})=>ke.createElement("div",{className:Le()(Se.result,be),style:ye},ke.createElement("div",{className:Se.left},ke.createElement("div",{className:Se.title},ke.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),ke.createElement("span",null,pe)),ke.createElement("div",{className:Se.leftNode},we)),ke.createElement("div",{className:Se.right},ke.createElement("div",{className:Se.title},ke.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),ke.createElement("span",null,ge)),ke.createElement("div",{className:Se.rightNode},de)))},53641:function(xn,un,Re){"use strict";var ke=Re(59301);const Se=Le=>String(Le).length===1?`0${Le}`:Le,Be=({className:Le="",onChange:Ce,defaultValue:xe=0})=>{const[be,ye]=(0,ke.useState)(xe);(0,ke.useEffect)(()=>{const ge=setTimeout(()=>{ye(be+1e3)},1e3);return Ce(be+1e3),()=>{clearInterval(ge)}},[be]);const we=parseInt(be/(60*6e4))||"00",pe=parseInt(be%(60*6e4)/6e4)||"00",de=parseInt(be%6e4/1e3)||"00";return ke.createElement("div",{className:Le},Se(we),":",Se(pe),":",Se(de))};un.Z=Be},42159:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return ee}});var ke=Re(59301),Se=Re(6767),Be=Re(75727),Le=Re(92841),Ce=Re(79710),xe=Re(69669),be=Re(56102),ye=Re(72890),we={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},pe=(z,oe,re)=>new Promise((ae,le)=>{var me=Ae=>{try{Pe(re.next(Ae))}catch(Oe){le(Oe)}},ve=Ae=>{try{Pe(re.throw(Ae))}catch(Oe){le(Oe)}},Pe=Ae=>Ae.done?ae(Ae.value):Promise.resolve(Ae.value).then(me,ve);Pe((re=re.apply(z,oe)).next())});function de(z){if(isNaN(z))return{minutes:"00",seconds:"00"};const oe=new Date(z*1e3).toISOString().substr(11,8);return{hour:oe.substr(0,2),minutes:oe.substr(3,2),seconds:oe.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function ge(z,oe){return z-oe}function fe(z){z.sort(ge);let oe=0;for(let re=0;re<z.length-1;re++){let ae=Math.abs(z[re+1]-z[re]);ae<21&&(oe+=ae)}return oe}const ue=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var ee=(0,ke.forwardRef)(({allow_skip:z,src:oe,toLog:re,videoId:ae,logWatchHistory:le,courseId:me=null,startTime:ve,handlePause:Pe=()=>{},handlePlay:Ae=()=>{},handlePlayEnded:Oe=()=>{},autoPlay:Ie=!1,onPlayEnded:Ze=()=>{},isShowWaterMark:qe=!0},Je)=>{var mt;oe=oe==null?void 0:oe.replace("http://","https://");const Mt=((mt=oe==null?void 0:oe.split("."))==null?void 0:mt.pop())==="flv",at=(0,ke.useRef)(),_t=(0,ke.useRef)(),ht=(0,ke.useRef)(),Dt=(0,ke.useRef)(),ut=(0,ke.useRef)(),ot=(0,ke.useRef)(),ct=(0,ke.useRef)(),yt=(0,ke.useRef)(),wt=(0,ke.useRef)(),xt=(0,ke.useRef)(),zt=(0,ke.useRef)(),Ut=(0,ke.useRef)(),cn=(0,ke.useRef)(),jt=(0,ke.useRef)(),mn=navigator.userAgent.toLowerCase().match(ue),Ft=mn?mn[0]:"pc",Yt=(0,ke.useRef)(!1),tn=(0,xe.eY)();let lt=0,Ue=0,je=0,rt=null,dt=!1,tt=20,Ke=1,De=!1,ze=!1,$e=[];(0,ke.useImperativeHandle)(Je,()=>({getLastUpdatedTime:()=>at.current.currentTime,getDuration:()=>at.current.duration})),Se.ZP.config({maxCount:1,getContainer:()=>ht.current});const We=(0,ke.useCallback)((fn,En=!1)=>{let Sn={point:at.current.currentTime};rt?(Sn.log_id=rt,Sn.watch_duration=fe($e),Sn.total_duration=Ue):(me?(Sn.video_id=parseInt(ae,10),Sn.course_id=me):Sn.video_id=ae,Sn.duration=lt,Sn.device=Ft),En&&(Sn.ed="1");function dn(){return pe(this,null,function*(){De=!0,rt=yield le==null?void 0:le(Sn),De=!1,fn&&fn()})}dn()},[ae,me]);(0,ke.useEffect)(()=>{at.current&&(Dt.current.style.display="none",ut.current.style.display="block"),Se.ZP.destroy();let fn=null;return Le.Z.isSupported&&Mt&&oe&&(oe==null?void 0:oe.indexOf(".m3u8"))<0?(fn=Le.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:oe,muted:!1}),at.current&&(fn.attachMediaElement(at.current),fn.load())):at.current.setAttribute("src",oe),pt(),()=>{fn&&(fn.unload(),fn.pause(),fn.destroy(),fn=null)}},[at,Mt,oe]);function Ve(){at.current.paused?(Dt.current.style.display="none",ut.current.style.display="block"):(Dt.current.style.display="block",ut.current.style.display="none")}function pt(){zt.current.style.display="none",cn.current.style.display="none",Ut.current.style.display="none",at.current.muted||at.current.volume===0?zt.current.style.display="block":at.current.volume>0&&at.current.volume<=.5?cn.current.style.display="block":Ut.current.style.display="block"}(0,ke.useEffect)(()=>{const fn=document.getElementById("play"),En=document.querySelectorAll(".playback-icons use");function Sn(){Ae(),ve&&!Yt.current&&(at.current.currentTime=ve),Yt.current=!0,$e.push(at.current.currentTime),dt||(dt=!0,re&&We())}function dn(){return pe(this,null,function*(){Ve(),$e.push(at.current.currentTime),re&&We(()=>{rt=null,je=0,dt=!1,De=!1,ze=!1,$e=[],Ue=0,Ke=1},!0),Ze()})}function Zn(){ot.current.value=Math.round(at.current.currentTime),ct.current.value=Math.round(at.current.currentTime)}function vn(){const Ri=de(Math.round(at.current.currentTime));wt.current.innerText=`${Ri.hour>0?Ri.hour+":":""}${Ri.minutes}:${Ri.seconds}`,wt.current.setAttribute("datetime",`${Ri.hour>0?" "+Ri.hour+" ":""}${Ri.minutes}m ${Ri.seconds}s`)}function Wn(){var Ri,Vi,sr,Qe,Ti,ei,Ii;const mr=Math.round((Ri=at.current)==null?void 0:Ri.duration);(sr=(Vi=ot.current)==null?void 0:Vi.setAttribute)==null||sr.call(Vi,"max",mr),(Ti=(Qe=ct.current)==null?void 0:Qe.setAttribute)==null||Ti.call(Qe,"max",mr);const cr=de(mr);yt.current&&(yt.current.innerText=`${cr.hour>0?cr.hour+":":""}${cr.minutes}:${cr.seconds}`,(Ii=(ei=yt.current).setAttribute)==null||Ii.call(ei,"datetime",`${cr.hour>0?" "+cr.hour+" ":""}${cr.minutes}m ${cr.seconds}s`))}function ri(){try{const Ri=Math.round(at.current.duration);ot.current.setAttribute("max",Ri),ct.current.setAttribute("max",Ri);const Vi=de(Ri);yt.current.innerText=`${Vi.hour>0?Vi.hour+":":""}${Vi.minutes}:${Vi.seconds}`,yt.current.setAttribute("datetime",`${Vi.hour>0?" "+Vi.hour+" ":""}${Vi.minutes}m ${Vi.seconds}s`),Zn(),vn();const{width:sr,height:Qe,x:Ti,y:ei}=_t.current.getBoundingClientRect();if(Ti<0||ei<0,!ze){let Ii=at.current.currentTime,mr=Ii-je;Math.abs(mr)<10?(Ue+=Math.abs(mr),je=Ii,De||Ue-Ke*tt>=0&&(Ke++,$e.push(je),re&&We())):(je=Ii,re&&We())}}catch(Ri){console.log("videoplaying:",Ri)}}function Ni(){ze=!0}function Qn(){at.current.playing&&$e.push(at.current.currentTime,je),je=at.current.currentTime,ze=!1}function ki(){lt=at.current.duration,lt<=20&&(tt=lt/3),at.current.addEventListener("play",Sn)}function Hi(Ri){Ri.preventDefault(),(0,ye.vp)()?(at.current.style.width="100%",at.current.style.height="100%"):at.current.style.cssText=""}function Gi(){Pe()}function qi(Ri){if(!z){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const Vi=Ri.target.dataset.seek?Ri.target.dataset.seek:Ri.target.value;at.current.currentTime=Vi,ct.current.value=Vi,ot.current.value=Vi}function Pr(Ri){const Vi=Math.round(Ri.offsetX/Ri.target.clientWidth*parseInt(Ri.target.getAttribute("max"),10));ot.current.setAttribute("data-seek",Vi);const sr=de(Vi);xt.current.textContent=`${sr.hour>0?sr.hour+":":""}${sr.minutes}:${sr.seconds}`;const Qe=at.current.getBoundingClientRect();xt.current.style.left=`${Ri.pageX-Qe.left}px`}function gr(Ri){switch(Ri.code){case"Space":Ri.preventDefault(),Xt();break;case"ArrowRight":if(Ri.preventDefault(),!z){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(at.current.currentTime>=at.current.duration)break;at.current.currentTime=parseInt(at.current.currentTime)+5,Zn();break;case"ArrowLeft":if(Ri.preventDefault(),!z){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(at.current.currentTime===0)break;at.current.currentTime=parseInt(at.current.currentTime)-5,Zn();break;case"ArrowUp":Ri.preventDefault(),at.current.volume<1&&(at.current.volume=(parseInt(at.current.volume*10)+1)/10);break;case"ArrowDown":Ri.preventDefault(),at.current.volume>0&&(at.current.volume=(parseInt(at.current.volume*10)-1)/10);break}}return ht.current.addEventListener((0,ye.gH)(),Hi),at.current.addEventListener("canplay",ki),at.current.addEventListener("ended",dn),at.current.addEventListener("seeking",Ni),at.current.addEventListener("seeked",Qn),at.current.addEventListener("loadedmetadata",Wn),ot.current.addEventListener("mousemove",Pr),ot.current.addEventListener("input",qi),at.current.addEventListener("timeupdate",ri),at.current.addEventListener("pause",Gi),at.current.addEventListener("volumechange",pt),document.addEventListener("keydown",gr),()=>{var Ri,Vi,sr,Qe,Ti,ei,Ii,mr,cr,ir,po,Vn;(Ri=at.current)==null||Ri.removeEventListener("canplay",ki),(Vi=at.current)==null||Vi.removeEventListener("play",Sn),(sr=at.current)==null||sr.removeEventListener("ended",dn),(Qe=at.current)==null||Qe.removeEventListener("seeking",Ni),(Ti=at.current)==null||Ti.removeEventListener("seeked",Qn),(ei=ot.current)==null||ei.removeEventListener("mousemove",Pr),(Ii=ot.current)==null||Ii.removeEventListener("input",qi),(mr=at.current)==null||mr.removeEventListener("timeupdate",ri),(cr=at.current)==null||cr.removeEventListener("pause",Gi),(ir=at.current)==null||ir.removeEventListener("loadedmetadata",Wn),(po=at.current)==null||po.removeEventListener("volumechange",pt),document.removeEventListener("keydown",gr),(Vn=at.current)!=null&&Vn.playing&&($e.push(je,at.current.currentTime),re&&We())}},[at,oe]),(0,ke.useEffect)(()=>{if(at.current.onended=()=>{Oe(at)},at.current.oncontextmenu=()=>!1,(oe==null?void 0:oe.indexOf(".m3u8"))>-1){if(at.current.canPlayType("application/vnd.apple.mpegurl"))at.current.src=oe;else if(Ce.ZP.isSupported()){var fn=new Ce.ZP;fn.loadSource(oe),fn.attachMedia(at.current)}}},[oe]);const[Lt,on]=(0,ke.useState)(1),Xt=()=>{at.current.paused||at.current.ended?at.current.play():at.current.pause(),Ve()};function Rt(){at.current.muted=!at.current.muted,at.current.muted?(jt.current.setAttribute("data-volume",volume.value),jt.current.value=0):jt.current.value=jt.current.dataset.volume}return ke.createElement("div",{style:{position:"relative"},ref:ht},ke.createElement("div",{ref:_t,className:`${we.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${we.animate__loop}`},qe&&tn?tn.login:" "),ke.createElement("div",{className:we.container},ke.createElement("div",{className:we["video-container"],id:"video-container"},ke.createElement("div",{className:we["playback-animation"],id:"playback-animation"},ke.createElement("svg",{className:we["playback-icons"]},ke.createElement("use",{className:"hidden",href:"#play-icon"}),ke.createElement("use",{href:"#pause"}))),ke.createElement("video",{className:we.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:at,autoPlay:Ie}),ke.createElement("div",{className:`${we["video-controls"]} `,id:"video-controls"},ke.createElement("div",{className:we["bottom-controls"]},ke.createElement("div",{className:we["left-controls"]},ke.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Xt},ke.createElement("svg",{className:we["playback-icons"]},ke.createElement("use",{ref:ut,href:"#play-icon"}),ke.createElement("use",{ref:Dt,style:{display:"none"},href:"#pause"}))),ke.createElement("div",{className:we.time},ke.createElement("time",{id:"time-elapsed",ref:wt},"00:00"),ke.createElement("span",null," / "),ke.createElement("time",{id:"duration",ref:yt},"00:00"))),ke.createElement("div",{className:we["right-controls"]},z&&ke.createElement(Be.Z,{placement:"top",overlayClassName:we.rateOverlay,getPopupContainer:fn=>fn.parentNode,menu:{items:[{key:"1",label:ke.createElement("span",{onClick:()=>{on(1),at.current.playbackRate=1}},"1.0x")},{key:"2",label:ke.createElement("span",{onClick:()=>{on(1.5),at.current.playbackRate=1.5}},"1.5x")},{key:"3",label:ke.createElement("span",{onClick:()=>{on(2),at.current.playbackRate=2}},"2.0x")}]}},ke.createElement("div",{className:`${we.controlText} mr5`},"\u500D\u901F")),ke.createElement(be.CopyToClipboard,{text:oe,onCopy:()=>Se.ZP.success("\u590D\u5236\u6210\u529F")},ke.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},ke.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),ke.createElement("div",{className:we["volume-controls"]},ke.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:we["volume-button"],id:"volume-button",onClick:Rt},ke.createElement("i",{ref:zt,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),ke.createElement("i",{ref:cn,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),ke.createElement("i",{ref:Ut,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),ke.createElement("input",{className:we.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:jt,style:{display:"none"},onClick:pt})),ke.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:we["fullscreen-button"],onClick:()=>{(0,ye.vp)()?(0,ye.BU)():(0,ye.Dj)(ht.current)}},ke.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),ke.createElement("div",{className:we["video-progress"]},ke.createElement("progress",{ref:ct,value:"0",min:"0"}),ke.createElement("input",{className:we.seek,ref:ot,value:"0",min:"0",type:"range",step:"1"}),ke.createElement("div",{className:we["seek-tooltip"],ref:xt,id:"seek-tooltip"},"00:00"))))),ke.createElement("svg",{style:{display:"none"}},ke.createElement("defs",null,ke.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},ke.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),ke.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},ke.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),ke.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},ke.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),ke.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},ke.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),ke.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},ke.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),ke.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},ke.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),ke.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},ke.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),ke.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},ke.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},67776:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return Le}});var ke=Re(59301),Se=Re(16448),Be=Re(90083),Le=()=>{const[Ce,xe]=(0,ke.useState)(""),[be,ye]=(0,ke.useState)(0);let[we,pe]=(0,ke.useState)(),[de,ge]=(0,ke.useState)();const[fe,ue]=(0,ke.useState)(!1),ee=(0,ke.useRef)("");(0,ke.useEffect)(()=>Se.Z.subscribe("preview-image",Ie=>{xe(Ie),console.log(Pe.current),document.body.style.overflow="hidden"}),[]),(0,ke.useEffect)(()=>(document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}),[]),(0,ke.useEffect)(()=>{ee.current=Ce},[Ce]);function z(Oe){Oe.keyCode==27&&ee.current&&oe()}function oe(){document.body.style.overflow="auto",pe(void 0),ge(void 0),ye(0),xe("")}function re(){ye(be+90)}function ae(){we=Pe.current.width*1.1,de=Pe.current.height*1.1,ge(de),pe(we)}function le(){we=Pe.current.width/1.1,de=Pe.current.height/1.1,ge(de),pe(we)}const me=(0,ke.useRef)(),ve=(0,ke.useRef)(),Pe=(0,ke.useRef)(),Ae=Oe=>{(Oe.nativeEvent.target===me.current||Oe.nativeEvent.target===ve.current)&&oe()};return ke.createElement(ke.Fragment,null,Ce?ke.createElement("div",null,ke.createElement("div",{className:"preview-wrp-group",ref:ve},ke.createElement(Be.Z,{className:"image-preview",src:Ce,style:{display:"none"},preview:{visible:!0,src:Ce,onVisibleChange:Oe=>{xe("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},77531:function(xn,un,Re){"use strict";Re.d(un,{h:function(){return me}});var ke=Re(59301),Se=Re(82326),Be=Re(28284),Le=Re(99571),Ce=Re(89780),xe=Re.n(Ce),be=Re(88540),ye=Re(42271),we=Object.defineProperty,pe=Object.defineProperties,de=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,ee=(ve,Pe,Ae)=>Pe in ve?we(ve,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):ve[Pe]=Ae,z=(ve,Pe)=>{for(var Ae in Pe||(Pe={}))fe.call(Pe,Ae)&&ee(ve,Ae,Pe[Ae]);if(ge)for(var Ae of ge(Pe))ue.call(Pe,Ae)&&ee(ve,Ae,Pe[Ae]);return ve},oe=(ve,Pe)=>pe(ve,de(Pe));const re=Se.default.Option,ae={labelCol:{span:4},wrapperCol:{span:20}},le={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"]};un.Z=({callback:ve,onCancel:Pe})=>{const[Ae,Oe]=(0,ke.useState)("python");function Ie(qe){Oe(le[qe][1])}function Ze(qe){ve(qe)}return ke.createElement(Be.default,oe(z({},ae),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ze,style:{width:500}}),ke.createElement(Be.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ke.createElement(Se.default,{getPopupContainer:qe=>qe.parentNode,onChange:Ie},Object.keys(le).map(qe=>ke.createElement(re,{key:qe,value:qe},le[qe][0])))),ke.createElement(Be.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ke.createElement(me,{mode:Ae})),ke.createElement("div",{className:"flex-container flex-end"},ke.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ke.createElement(Le.ZP,{type:"ghost",onClick:Pe},"\u53D6\u6D88")))};function me({value:ve,onChange:Pe,mode:Ae,options:Oe={}}){const Ie=(0,ke.useRef)(),[Ze,qe]=(0,ke.useState)();return(0,ke.useEffect)(()=>{if(Ze){let Je=function(mt){const gt=mt.getValue();Pe&&Pe(gt)};return Ze.on("change",Je),()=>{Ze.off("change",Je)}}},[Ze,Pe]),(0,ke.useEffect)(()=>{Ze&&Ze.setOption("mode",Ae)},[Ze,Ae]),(0,ke.useEffect)(()=>{Ze&&(ve!==Ze.getValue()||ve==="")&&setTimeout(()=>{Ze.setValue(ve||"")},300)},[Ze,ve]),(0,ke.useEffect)(()=>{if(Ie.current&&!Ze){const Je=xe().fromTextArea(Ie.current,z({mode:Ae,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Oe));qe(Je)}},[Ie.current,Ze]),ke.createElement("div",{className:"my-codemirror-container"},ke.createElement("textarea",{ref:Ie}))}},19565:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return Vn}});var ke=Re(59301),Se=Re(89780),Be=Re.n(Se),Le=Re(76374),Ce=Re(88540),xe=Re(6313),be=Re(25717),ye=Re(99498),we=Re(25419),pe=Re(67549),de=Re(79074),ge=({value:He="",className:Xe,showTextOnly:nt,showLines:bt,style:Nt={}})=>{const sn=(0,ke.useMemo)(()=>"",[He]);return ke.createElement(ke.Fragment,null,ke.createElement("div",{dangerouslySetInnerHTML:{__html:sn}}))},fe=Re(59301),ue=Object.defineProperty,ee=Object.defineProperties,z=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,le=(He,Xe,nt)=>Xe in He?ue(He,Xe,{enumerable:!0,configurable:!0,writable:!0,value:nt}):He[Xe]=nt,me=(He,Xe)=>{for(var nt in Xe||(Xe={}))re.call(Xe,nt)&&le(He,nt,Xe[nt]);if(oe)for(var nt of oe(Xe))ae.call(Xe,nt)&&le(He,nt,Xe[nt]);return He},ve=(He,Xe)=>ee(He,z(Xe));let Pe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ae({onActionCallback:He,title:Xe,icon:nt,actionName:bt,className:Nt="",children:sn}){function Zt(){He(bt)}return fe.createElement("a",{title:Xe,className:Nt,onClick:Zt},fe.createElement("i",{className:`${nt}`}),sn)}var Oe=({watch:He,showNullButton:Xe,showNullProgramButton:nt,onActionCallback:bt,fullScreen:Nt,insertTemp:sn,hidetoolBar:Zt,extraUse:_n})=>{const Kt=[...Pe,{title:`${He?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${He?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return fe.createElement("ul",{className:"markdown-toolbar-container"},!Zt&&Kt.map((qt,Hn)=>fe.createElement("li",{key:Hn},qt.actionName?fe.createElement(Ae,ve(me({},qt),{onActionCallback:bt})):fe.createElement("span",{className:"v-line"}))),Xe?fe.createElement("li",null,fe.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:bt},fe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,nt?fe.createElement(fe.Fragment,null,fe.createElement("li",null,fe.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:bt},fe.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),fe.createElement("li",null,fe.createElement(Ae,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:bt},fe.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,sn&&fe.createElement("li",null,fe.createElement(Ae,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${sn}`,onActionCallback:bt},fe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_n&&fe.createElement("li",null,_n),fe.createElement("li",{className:"btn-full-screen"},fe.createElement(Ae,{icon:`${Nt?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Nt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:bt})))},Ie=Re(52272),Ze=Re(28284),qe=Re(37568),Je=Re(99571),mt=Object.defineProperty,gt=Object.defineProperties,Mt=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,Dt=(He,Xe,nt)=>Xe in He?mt(He,Xe,{enumerable:!0,configurable:!0,writable:!0,value:nt}):He[Xe]=nt,ut=(He,Xe)=>{for(var nt in Xe||(Xe={}))_t.call(Xe,nt)&&Dt(He,nt,Xe[nt]);if(at)for(var nt of at(Xe))ht.call(Xe,nt)&&Dt(He,nt,Xe[nt]);return He},ot=(He,Xe)=>gt(He,Mt(Xe));const ct={labelCol:{span:4},wrapperCol:{span:20}};var yt=({callback:He,onCancel:Xe})=>{function nt(bt){He(bt)}return ke.createElement(Ze.default,ot(ut({},ct),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:nt,style:{width:500}}),ke.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ke.createElement(qe.default,null)),ke.createElement(Ze.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ke.createElement(qe.default,null)),ke.createElement("div",{className:"flex-container flex-end"},ke.createElement(Je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ke.createElement(Je.ZP,{type:"ghost",onClick:Xe},"\u53D6\u6D88")))},wt=Re(77531),xt=Re(24141),zt=Re(62957),Ut=Re(77019),cn=Re(25138),jt=Re(59301),mn=({callback:He,onCancel:Xe})=>{const nt=document.createElement("canvas"),bt=nt.getContext("2d");nt.width=1e3,nt.height=800,bt.fillStyle="#ffffff",bt.fillRect(0,0,nt.width,nt.height);const Nt=nt.toDataURL("image/png");return jt.createElement(zt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},jt.createElement(Ut.Z,{style:{height:"100vh"}},jt.createElement(cn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Nt,visible:!0,title:String(Date.now())},onOk:sn=>{He({src:sn.url})},onClose:Xe})))},Ft=Re(12378);function Yt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Yt,go.CommandHandler),Yt.prototype.canAlignSelection=function(){var He=this.diagram;return!(He===null||He.isReadOnly||He.isModelReadOnly||He.selection.count<2)},Yt.prototype.alignLeft=function(){var He=this.diagram;He.startTransaction("aligning left");var Xe=1/0;He.selection.each(function(nt){nt instanceof go.Link||(Xe=Math.min(nt.position.x,Xe))}),He.selection.each(function(nt){nt instanceof go.Link||nt.move(new go.Point(Xe,nt.position.y))}),He.commitTransaction("aligning left")},Yt.prototype.alignRight=function(){var He=this.diagram;He.startTransaction("aligning right");var Xe=-1/0;He.selection.each(function(nt){if(!(nt instanceof go.Link)){var bt=nt.actualBounds.x+nt.actualBounds.width;Xe=Math.max(bt,Xe)}}),He.selection.each(function(nt){nt instanceof go.Link||nt.move(new go.Point(Xe-nt.actualBounds.width,nt.position.y))}),He.commitTransaction("aligning right")},Yt.prototype.alignTop=function(){var He=this.diagram;He.startTransaction("alignTop");var Xe=1/0;He.selection.each(function(nt){nt instanceof go.Link||(Xe=Math.min(nt.position.y,Xe))}),He.selection.each(function(nt){nt instanceof go.Link||nt.move(new go.Point(nt.position.x,Xe))}),He.commitTransaction("alignTop")},Yt.prototype.alignBottom=function(){var He=this.diagram;He.startTransaction("aligning bottom");var Xe=-1/0;He.selection.each(function(nt){if(!(nt instanceof go.Link)){var bt=nt.actualBounds.y+nt.actualBounds.height;Xe=Math.max(bt,Xe)}}),He.selection.each(function(nt){nt instanceof go.Link||nt.move(new go.Point(nt.actualBounds.x,Xe-nt.actualBounds.height))}),He.commitTransaction("aligning bottom")},Yt.prototype.alignCenterX=function(){var He=this.diagram,Xe=He.selection.first();if(Xe){He.startTransaction("aligning Center X");var nt=Xe.actualBounds.x+Xe.actualBounds.width/2;He.selection.each(function(bt){bt instanceof go.Link||bt.move(new go.Point(nt-bt.actualBounds.width/2,bt.actualBounds.y))}),He.commitTransaction("aligning Center X")}},Yt.prototype.alignCenterY=function(){var He=this.diagram,Xe=He.selection.first();if(Xe){He.startTransaction("aligning Center Y");var nt=Xe.actualBounds.y+Xe.actualBounds.height/2;He.selection.each(function(bt){bt instanceof go.Link||bt.move(new go.Point(bt.actualBounds.x,nt-bt.actualBounds.height/2))}),He.commitTransaction("aligning Center Y")}},Yt.prototype.alignColumn=function(He){var Xe=this.diagram;Xe.startTransaction("align Column"),He===void 0&&(He=0),He=parseFloat(He);var nt=new Array;Xe.selection.each(function(_n){_n instanceof go.Link||nt.push(_n)});for(var bt=0;bt<nt.length-1;bt++){var Nt=nt[bt],sn=Nt.actualBounds.y+Nt.actualBounds.height+He,Zt=nt[bt+1];Zt.move(new go.Point(Nt.actualBounds.x,sn))}Xe.commitTransaction("align Column")},Yt.prototype.alignRow=function(He){He===void 0&&(He=0),He=parseFloat(He);var Xe=this.diagram;Xe.startTransaction("align Row");var nt=new Array;Xe.selection.each(function(_n){_n instanceof go.Link||nt.push(_n)});for(var bt=0;bt<nt.length-1;bt++){var Nt=nt[bt],sn=Nt.actualBounds.x+Nt.actualBounds.width+He,Zt=nt[bt+1];Zt.move(new go.Point(sn,Nt.actualBounds.y))}Xe.commitTransaction("align Row")},Yt.prototype.canRotate=function(He){var Xe=this.diagram;return!(Xe===null||Xe.isReadOnly||Xe.isModelReadOnly||Xe.selection.count<1)},Yt.prototype.rotate=function(He){He===void 0&&(He=90);var Xe=this.diagram;Xe.startTransaction("rotate "+He.toString());var Xe=this.diagram;Xe.selection.each(function(nt){nt instanceof go.Link||nt instanceof go.Group||(nt.angle+=He)}),Xe.commitTransaction("rotate "+He.toString())},Yt.prototype.pullToFront=function(){var He=this.diagram;He.startTransaction("pullToFront");var Xe=new go.Map;He.selection.each(function(nt){Xe.set(nt.layer,0)}),Xe.iteratorKeys.each(function(nt){var bt=0;nt.parts.each(function(Nt){if(!Nt.isSelected){var sn=Nt.zOrder;isNaN(sn)?Nt.zOrder=0:bt=Math.max(bt,sn)}}),Xe.set(nt,bt)}),He.selection.each(function(nt){Yt._assignZOrder(nt,Xe.get(nt.layer)+1)}),He.commitTransaction("pullToFront")},Yt.prototype.pushToBack=function(){var He=this.diagram;He.startTransaction("pushToBack");var Xe=new go.Map;He.selection.each(function(nt){Xe.set(nt.layer,0)}),Xe.iteratorKeys.each(function(nt){var bt=0;nt.parts.each(function(Nt){if(!Nt.isSelected){var sn=Nt.zOrder;isNaN(sn)?Nt.zOrder=0:bt=Math.min(bt,sn)}}),Xe.set(nt,bt)}),He.selection.each(function(nt){Yt._assignZOrder(nt,Xe.get(nt.layer)-1-Yt._findGroupDepth(nt))}),He.commitTransaction("pushToBack")},Yt._assignZOrder=function(He,Xe,nt){nt===void 0&&(nt=He),He.layer===nt.layer&&(He.zOrder=Xe),He instanceof go.Group&&He.memberParts.each(function(bt){Yt._assignZOrder(bt,Xe+1,nt)})},Yt._findGroupDepth=function(He){if(He instanceof go.Group){var Xe=0;return He.memberParts.each(function(nt){Xe=Math.max(Xe,Yt._findGroupDepth(nt))}),Xe+1}else return 0},Yt.prototype.doKeyDown=function(){var He=this.diagram;if(He!==null){var Xe=He.lastInput;if(Xe.key==="Up"||Xe.key==="Down"||Xe.key==="Left"||Xe.key==="Right"){var nt=this.arrowKeyBehavior;if(nt==="none")return;if(nt==="select"){this._arrowKeySelect();return}else if(nt==="move"){this._arrowKeyMove();return}else if(nt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Yt.prototype._getAllParts=function(){var He=new Array;return this.diagram.nodes.each(function(Xe){He.push(Xe)}),this.diagram.parts.each(function(Xe){He.push(Xe)}),He},Yt.prototype._arrowKeyMove=function(){var He=this.diagram,Xe=He.lastInput,nt=0,bt=0;if(Xe.control||Xe.meta)nt=1,bt=1;else if(He.grid!==null){var Nt=He.grid.gridCellSize;bt=Nt.width,nt=Nt.height}He.startTransaction("arrowKeyMove"),He.selection.each(function(sn){Xe.key==="Up"?sn.move(new go.Point(sn.actualBounds.x,sn.actualBounds.y-nt)):Xe.key==="Down"?sn.move(new go.Point(sn.actualBounds.x,sn.actualBounds.y+nt)):Xe.key==="Left"?sn.move(new go.Point(sn.actualBounds.x-bt,sn.actualBounds.y)):Xe.key==="Right"&&sn.move(new go.Point(sn.actualBounds.x+bt,sn.actualBounds.y))}),He.commitTransaction("arrowKeyMove")},Yt.prototype._arrowKeySelect=function(){var He=this.diagram,Xe=He.lastInput,nt=null;Xe.key==="Up"?nt=this._findNearestPartTowards(270):Xe.key==="Down"?nt=this._findNearestPartTowards(90):Xe.key==="Left"?nt=this._findNearestPartTowards(180):Xe.key==="Right"&&(nt=this._findNearestPartTowards(0)),nt!==null&&(Xe.shift?nt.isSelected=!0:Xe.control||Xe.meta?nt.isSelected=!nt.isSelected:He.select(nt))},Yt.prototype._findNearestPartTowards=function(He){var Xe=this.diagram.selection.first();if(Xe===null)return null;for(var nt=Xe.actualBounds.center,bt=this._getAllParts(),Nt=1/0,sn=Xe,Zt=0;Zt<bt.length;Zt++){var _n=bt[Zt];if(_n!==Xe&&_n.canSelect()){var Kt=_n.actualBounds.center,qt=nt.directionPoint(Kt),Hn=this._angleCloseness(qt,He);if(Hn<=45){var kt=nt.distanceSquaredPoint(Kt);kt*=1+Math.sin(Hn*Math.PI/180),kt<Nt&&(Nt=kt,sn=_n)}}}return sn},Yt.prototype._angleCloseness=function(He,Xe){return Math.min(Math.abs(Xe-He),Math.min(Math.abs(Xe+360-He),Math.abs(Xe-360-He)))},Yt.prototype._arrowKeyTree=function(){var He=this.diagram,Xe=He.selection.first();if(Xe instanceof go.Node){var nt=He.lastInput;if(nt.key==="Right"){if(!Xe.isTreeLeaf)if(!Xe.isTreeExpanded)He.commandHandler.canExpandTree(Xe)&&He.commandHandler.expandTree(Xe);else{var bt=this._sortTreeChildrenByY(Xe).first();bt!==null&&He.select(bt)}}else if(nt.key==="Left")if(!Xe.isTreeLeaf&&Xe.isTreeExpanded)He.commandHandler.canCollapseTree(Xe)&&He.commandHandler.collapseTree(Xe);else{var Nt=Xe.findTreeParentNode();Nt!==null&&He.select(Nt)}else if(nt.key==="Up"){var Nt=Xe.findTreeParentNode();if(Nt!==null){var sn=this._sortTreeChildrenByY(Nt),Zt=sn.indexOf(Xe);if(Zt>0){for(var _n=sn.elt(Zt-1);_n!==null&&_n.isTreeExpanded&&!_n.isTreeLeaf;){var Kt=this._sortTreeChildrenByY(_n);_n=Kt.last()}_n!==null&&He.select(_n)}else He.select(Nt)}}else if(nt.key==="Down")if(Xe.isTreeExpanded&&!Xe.isTreeLeaf){var bt=this._sortTreeChildrenByY(Xe).first();bt!==null&&He.select(bt)}else for(;Xe!==null;){var Nt=Xe.findTreeParentNode();if(Nt===null)break;var sn=this._sortTreeChildrenByY(Nt),Zt=sn.indexOf(Xe);if(Zt<sn.length-1){He.select(sn.elt(Zt+1));break}else Xe=Nt}var qt=He.selection.first();qt!==null&&He.scrollToRect(qt.actualBounds)}},Yt.prototype._sortTreeChildrenByY=function(He){var Xe=new go.List().addAll(He.findTreeChildrenNodes());return Xe.sort(function(nt,bt){var Nt=nt.location,sn=bt.location;return Nt.y<sn.y?-1:Nt.y>sn.y?1:Nt.x<sn.x?-1:Nt.x>sn.x?1:0}),Xe},Yt.prototype.copyToClipboard=function(He){go.CommandHandler.prototype.copyToClipboard.call(this,He),this._lastPasteOffset.set(this.pasteOffset)},Yt.prototype.pasteFromClipboard=function(){var He=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(He,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),He},Object.defineProperty(Yt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(He){if(He!=="move"&&He!=="select"&&He!=="scroll"&&He!=="tree"&&He!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+He);this._arrowKeyBehavior=He}}),Object.defineProperty(Yt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(He){if(!(He instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+He);this._pasteOffset.set(He)}});var tn=Yt,lt=Re(71584),Ue=Re(5269),je=Re(24092),rt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},dt=Re(69669),tt=Re(59301),Ke=(He,Xe,nt)=>new Promise((bt,Nt)=>{var sn=Kt=>{try{_n(nt.next(Kt))}catch(qt){Nt(qt)}},Zt=Kt=>{try{_n(nt.throw(Kt))}catch(qt){Nt(qt)}},_n=Kt=>Kt.done?bt(Kt.value):Promise.resolve(Kt.value).then(sn,Zt);_n((nt=nt.apply(He,Xe)).next())});function De({onCancel:He,callback:Xe}){let nt=(0,ke.useRef)(),bt=(0,ke.useRef)(),Nt=(0,ke.useRef)(),sn=(0,ke.useRef)(!1);const Zt=(0,ke.useRef)(!1),[_n,Kt]=(0,ke.useState)(0);function qt(){const kt=Ft.bx.make,ln={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"};nt.current=new Ft.S0(bt.current,{padding:20,grid:kt(Ft.s_,"Grid",kt(Ft.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),kt(Ft.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:$n=>{var yi=$n.diagram.commandHandler.addTopLevelParts($n.diagram.selection,!0);yi||$n.diagram.currentTool.doCancel()},commandHandler:kt(tn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:$n=>{var yi=$n.subject;yi.location=yi.location.copy().snapToGridPoint($n.diagram.grid.gridOrigin,$n.diagram.grid.gridCellSize),setTimeout(()=>{$n.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:$n=>{var yi=$n.subject;setTimeout(()=>{$n.diagram.commandHandler.editTextBlock()})},LinkRelinked:$n=>{var yi=$n.parameter.part;yi.invalidateConnectedLinks();var Mi=$n.subject;$n.diagram.toolManager.linkingTool.isForwards?Mi.toNode.invalidateConnectedLinks():Mi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),nt.current.nodeTemplate=kt(Ft.NB,"Auto",{locationSpot:Ft.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ft.$u(120,60),minSize:new Ft.$u(40,40),resizable:!0,resizeCellSize:new Ft.$u(10,10),rotatable:!0},new Ft.KX("location","loc",Ft.E9.parse).makeTwoWay(Ft.E9.stringify),new Ft.KX("desiredSize","size",Ft.$u.parse).makeTwoWay(Ft.$u.stringify),kt(Ft.bn,{name:"SHAPE",fill:ln.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ft.z6.AllSides,toSpot:Ft.z6.AllSides},new Ft.KX("figure"),new Ft.KX("fill"),new Ft.KX("stroke","borderColor"),new Ft.KX("strokeWidth","thickness"),new Ft.KX("strokeDashArray","dash")),kt(Ft.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),kt(Ft.al,{margin:1,textAlign:"center",overflow:Ft.al.OverflowEllipsis,editable:!0},new Ft.KX("text").makeTwoWay(),new Ft.KX("stroke","color"))),nt.current.nodeTemplate.toolTip=kt("ToolTip",kt(Ft.s_,"Vertical",{maxSize:new Ft.$u(200,NaN)},kt(Ft.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ft.KX("text")),kt(Ft.al,{font:"10pt sans-serif",textAlign:"center"},new Ft.KX("text","details"))));function An($n,yi){var Mi=(mi,Li)=>{mi.handled=!0,mi.diagram.model.commit(dr=>{var ar=Li.part.adornedPart,vr=new Ft.E9().setRectSpot(ar.actualBounds,$n);vr.subtract(ar.location),vr.scale(2,2),vr.x+=Math.sign(vr.x)*130,vr.y+=Math.sign(vr.y)*130,vr.add(ar.location),vr.snapToGridPoint(mi.diagram.grid.gridOrigin,mi.diagram.grid.gridCellSize);var Cr=dr.copyNodeData(ar.data);dr.setGroupKeyForNodeData(Cr,dr.getGroupKeyForNodeData(ar.data)),dr.addNodeData(Cr);var Ln={from:ar.key,to:dr.getKeyForNodeData(Cr)};dr.addLinkData(Ln);var Yr=mi.diagram.findNodeForData(Cr);Yr.location=vr,mi.diagram.select(Yr),setTimeout(()=>{mi.diagram.commandHandler.editTextBlock()},20)})};return kt(Ft.bn,{figure:yi,alignment:$n,alignmentFocus:$n.opposite(),width:$n.equals(Ft.z6.Top)||$n.equals(Ft.z6.Bottom)?25:18,height:$n.equals(Ft.z6.Top)||$n.equals(Ft.z6.Bottom)?18:25,fill:"orange",stroke:ln.white,strokeWidth:4,mouseEnter:(mi,Li)=>Li.fill="dodgerblue",mouseLeave:(mi,Li)=>Li.fill="orange",isActionable:!0,click:Mi,contextClick:Mi})}function jn($n){return kt(Ft.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:(yi,Mi)=>Mi.fill="dodgerblue",mouseLeave:(yi,Mi)=>Mi.fill="orange",click:(yi,Mi)=>{yi.diagram.commandHandler.showContextMenu(Mi.part.adornedPart)}},$n||{})}nt.current.nodeTemplate.selectionAdornmentTemplate=kt(Ft.uz,"Spot",kt(Ft.Vm,{padding:10}),An(Ft.z6.Top,"TriangleUp"),An(Ft.z6.Left,"TriangleLeft"),An(Ft.z6.Right,"TriangleRight"),An(Ft.z6.Bottom,"TriangleDown"),jn({alignment:new Ft.z6(.75,0)}));function Qt($n,yi){return(Mi,mi)=>{Mi.handled=!0,Mi.diagram.model.commit(Li=>{Li.set(mi.part.adornedPart.data,$n,yi)})}}function rn($n,yi){return yi||(yi="color"),kt(Ft.bn,{width:16,height:16,stroke:"lightgray",fill:$n,margin:1,background:"transparent",mouseEnter:(Mi,mi)=>mi.stroke="dodgerblue",mouseLeave:(Mi,mi)=>mi.stroke="lightgray",click:Qt(yi,$n),contextClick:Qt(yi,$n)})}function Pn(){return[kt("ContextMenuButton",kt(Ft.s_,"Horizontal",rn(ln.white,"fill"),rn(ln.beige,"fill"),rn(ln.extralightblue,"fill"),rn(ln.extralightred,"fill"))),kt("ContextMenuButton",kt(Ft.s_,"Horizontal",rn(ln.lightgray,"fill"),rn(ln.lightgreen,"fill"),rn(ln.lightblue,"fill"),rn(ln.lightred,"fill")))]}function Dn(){return[kt("ContextMenuButton",kt(Ft.s_,"Horizontal",rn(ln.black),rn(ln.green),rn(ln.blue),rn(ln.red))),kt("ContextMenuButton",kt(Ft.s_,"Horizontal",rn(ln.white),rn(ln.magenta),rn(ln.purple),rn(ln.orange)))]}function oi($n,yi){return yi||(yi="thickness"),kt(Ft.bn,"LineH",{width:16,height:16,strokeWidth:$n,margin:1,background:"transparent",mouseEnter:(Mi,mi)=>mi.background="dodgerblue",mouseLeave:(Mi,mi)=>mi.background="transparent",click:Qt(yi,$n),contextClick:Qt(yi,$n)})}function ai($n,yi){return yi||(yi="dash"),kt(Ft.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:$n,margin:1,background:"transparent",mouseEnter:(Mi,mi)=>mi.background="dodgerblue",mouseLeave:(Mi,mi)=>mi.background="transparent",click:Qt(yi,$n),contextClick:Qt(yi,$n)})}function Gn(){return[kt("ContextMenuButton",kt(Ft.s_,"Horizontal",oi(1),oi(2),oi(3),oi(4))),kt("ContextMenuButton",kt(Ft.s_,"Horizontal",ai(null),ai([2,4]),ai([4,4])))]}function Bn($n,yi){return yi||(yi="figure"),kt(Ft.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:$n,margin:1,background:"transparent",mouseEnter:(Mi,mi)=>mi.fill="dodgerblue",mouseLeave:(Mi,mi)=>mi.fill="lightgray",click:Qt(yi,$n),contextClick:Qt(yi,$n)})}nt.current.nodeTemplate.contextMenu=kt("ContextMenu",kt("ContextMenuButton",kt(Ft.s_,"Horizontal",Bn("Rectangle"),Bn("RoundedRectangle"),Bn("Ellipse"),Bn("Diamond"))),kt("ContextMenuButton",kt(Ft.s_,"Horizontal",Bn("Parallelogram2"),Bn("ManualOperation"),Bn("Procedure"),Bn("Cylinder1"))),kt("ContextMenuButton",kt(Ft.s_,"Horizontal",Bn("Terminator"),Bn("CreateRequest"),Bn("Document"),Bn("TriangleDown"))),Pn(),Dn(),Gn()),nt.current.groupTemplate=kt(Ft.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ft.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:($n,yi)=>{var Mi=yi.addMembers(yi.diagram.selection,!0);Mi||yi.diagram.currentTool.doCancel()},avoidable:!1},new Ft.KX("location","loc",Ft.E9.parse).makeTwoWay(Ft.E9.stringify),kt(Ft.s_,"Auto",{name:"BODY"},kt(Ft.bn,{parameter1:10,fill:ln.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ft.z6.AllSides,toSpot:Ft.z6.AllSides},new Ft.KX("fill"),new Ft.KX("stroke","color"),new Ft.KX("strokeWidth","thickness"),new Ft.KX("strokeDashArray","dash")),kt(Ft.Vm,{background:"transparent",margin:20})),kt(Ft.al,{alignment:Ft.z6.Top,alignmentFocus:Ft.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ft.KX("text"),new Ft.KX("stroke","color"))),nt.current.groupTemplate.selectionAdornmentTemplate=kt(Ft.uz,"Spot",kt(Ft.s_,"Auto",kt(Ft.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),kt(Ft.Vm,{margin:1.5})),jn({alignment:Ft.z6.TopRight,alignmentFocus:Ft.z6.BottomRight})),nt.current.groupTemplate.contextMenu=kt("ContextMenu",Pn(),Dn(),Gn()),nt.current.linkTemplate=kt(Ft.rU,{layerName:"Foreground",routing:Ft.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ft.KX("fromSpot","fromSpot",Ft.z6.parse),new Ft.KX("toSpot","toSpot",Ft.z6.parse),new Ft.KX("fromShortLength","dir",$n=>$n>=1?10:0),new Ft.KX("toShortLength","dir",$n=>$n>=1?10:0),new Ft.KX("points").makeTwoWay(),kt(Ft.bn,{strokeWidth:2},new Ft.KX("stroke","color"),new Ft.KX("strokeWidth","thickness"),new Ft.KX("strokeDashArray","dash")),kt(Ft.bn,{segmentIndex:0,segmentOffset:new Ft.E9(15,0),segmentOrientation:Ft.rU.OrientAlong,alignmentFocus:Ft.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ft.KX("fill","color"),new Ft.KX("visible","dir",$n=>$n===1)),kt(Ft.bn,{segmentIndex:-1,segmentOffset:new Ft.E9(-10,6),segmentOrientation:Ft.rU.OrientPlus90,alignmentFocus:Ft.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ft.KX("fill","color"),new Ft.KX("visible","dir",$n=>$n>=1),new Ft.KX("width","thickness",$n=>7+3*$n),new Ft.KX("height","thickness",$n=>7+3*$n),new Ft.KX("segmentOffset","thickness",$n=>new Ft.E9(-15,4+1.5*$n))),kt(Ft.bn,{segmentIndex:0,segmentOffset:new Ft.E9(15,-6),segmentOrientation:Ft.rU.OrientMinus90,alignmentFocus:Ft.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ft.KX("fill","color"),new Ft.KX("visible","dir",$n=>$n===2),new Ft.KX("width","thickness",$n=>7+3*$n),new Ft.KX("height","thickness",$n=>7+3*$n),new Ft.KX("segmentOffset","thickness",$n=>new Ft.E9(-15,4+1.5*$n))),kt(Ft.al,{alignmentFocus:new Ft.z6(0,1,-4,0),editable:!0},new Ft.KX("text").makeTwoWay(),new Ft.KX("stroke","color"))),nt.current.linkTemplate.selectionAdornmentTemplate=kt(Ft.uz,kt(Ft.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:bi(2)},new Ft.KX("pathPattern","thickness",bi)),jn({alignmentFocus:new Ft.z6(0,0,-6,-4)}));function bi($n){return kt(Ft.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+($n+4).toString()+" H3"})}function Ei($n){var yi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return $n===0?yi="M0 0 M16 16 M0 8 L16 8":$n===2&&(yi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),kt(Ft.bn,{geometryString:yi,margin:2,background:"transparent",mouseEnter:(Mi,mi)=>mi.background="dodgerblue",mouseLeave:(Mi,mi)=>mi.background="transparent",click:Qt("dir",$n),contextClick:Qt("dir",$n)})}function Di($n){var yi=(Mi,mi)=>{Mi.handled=!0,Mi.diagram.model.commit(Li=>{var dr=mi.part.adornedPart;Li.set(dr.data,$n?"toSpot":"fromSpot",Ft.z6.stringify(Ft.z6.AllSides)),($n?dr.toNode:dr.fromNode).invalidateConnectedLinks()})};return kt(Ft.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Mi,mi)=>mi.background="dodgerblue",mouseLeave:(Mi,mi)=>mi.background="transparent",click:yi,contextClick:yi})}function yn($n,yi){var Mi=0,mi=Ft.z6.RightSide;$n.equals(Ft.z6.Top)?(Mi=270,mi=Ft.z6.TopSide):$n.equals(Ft.z6.Left)?(Mi=180,mi=Ft.z6.LeftSide):$n.equals(Ft.z6.Bottom)&&(Mi=90,mi=Ft.z6.BottomSide),yi||(Mi-=180);var Li=(dr,ar)=>{dr.handled=!0,dr.diagram.model.commit(vr=>{var Cr=ar.part.adornedPart;vr.set(Cr.data,yi?"toSpot":"fromSpot",Ft.z6.stringify(mi)),(yi?Cr.toNode:Cr.fromNode).invalidateConnectedLinks()})};return kt(Ft.bn,{alignment:$n,alignmentFocus:$n.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Mi,background:"transparent",mouseEnter:(dr,ar)=>ar.background="dodgerblue",mouseLeave:(dr,ar)=>ar.background="transparent",click:Li,contextClick:Li})}nt.current.linkTemplate.contextMenu=kt("ContextMenu",Dn(),Gn(),kt("ContextMenuButton",kt(Ft.s_,"Horizontal",Ei(0),Ei(1),Ei(2))),kt("ContextMenuButton",kt(Ft.s_,"Horizontal",kt(Ft.s_,"Spot",Di(!1),yn(Ft.z6.Top,!1),yn(Ft.z6.Left,!1),yn(Ft.z6.Right,!1),yn(Ft.z6.Bottom,!1)),kt(Ft.s_,"Spot",{margin:new Ft.Zt(0,0,0,2)},Di(!0),yn(Ft.z6.Top,!0),yn(Ft.z6.Left,!0),yn(Ft.z6.Right,!0),yn(Ft.z6.Bottom,!0)))));const Tr=`{ "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 ur=["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 wr($n){return console.log("shapeName:",$n),ur.indexOf($n)>=0}var pn=new Ft.YI(Nt.current,{maxSelectionCount:1,linkTemplate:kt(Ft.rU,{locationSpot:Ft.z6.Center,selectionAdornmentTemplate:kt(Ft.uz,"Link",{locationSpot:Ft.z6.Center},kt(Ft.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),kt(Ft.bn,{toArrow:"Standard",stroke:null}))},{routing:Ft.rU.AvoidsNodes,curve:Ft.rU.JumpOver,corner:5,toShortLength:4},new Ft.KX("points"),kt(Ft.bn,{isPanelMain:!0,strokeWidth:2}),kt(Ft.bn,{toArrow:"Standard",stroke:null})),model:new Ft.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ft.bn.getFigureGenerators().toArray().map($n=>({text:"\u672A\u547D\u540D",size:"100 100",figure:$n.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return nt.current.addDiagramListener("TextEdited",function($n){var yi;const Mi=$n.subject.part;var mi=(yi=document.activeElement)==null?void 0:yi.value;typeof mi=="string"&&mi.trim()===""&&nt.current.model.commit(function(Li){Li.set(Mi.data,"text","\u672A\u547D\u540D"),nt.current.commandHandler.stopCommand()},"increment")}),pn.nodeTemplate=kt(Ft.NB,"Auto",{locationSpot:Ft.z6.Center},new Ft.KX("location","location",Ft.E9.parse).makeTwoWay(Ft.E9.stringify),kt(Ft.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 Ft.KX("stroke").makeTwoWay(),new Ft.KX("fill").makeTwoWay(),new Ft.KX("figure")),kt(Ft.al,{margin:new Ft.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ft.$u(16,16),maxSize:new Ft.$u(10,NaN),textAlign:"center",editable:!0},new Ft.KX("key").makeTwoWay())),setTimeout(()=>{nt.current.grid=kt(Ft.s_,"Grid",kt(Ft.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),kt(Ft.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),nt.current.grid.visible=!0,nt.current.grid.gridCellStroke="darkgray",nt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=nt.current,nt.current}const Hn=()=>Ke(this,null,function*(){var kt,ln=nt.current.makeImage();const An=yield(0,je.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:ln.src,file_data:JSON.stringify({login:(kt=(0,dt.eY)())==null?void 0:kt.login,data:JSON.parse(nt.current.model.toJson())})}});Xe({src:An.url})});return(0,ke.useEffect)(()=>(setTimeout(()=>{qt()},500),Kt(_n+1),()=>{nt.current=null}),[]),tt.createElement("div",{ref:Zt,className:"body-overflow-initial"},tt.createElement(zt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!_n,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:tt.createElement(Ut.Z,null,tt.createElement(Ue.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),tt.createElement(Ue.Z,{onClick:()=>{var kt,ln,An=nt.current.selection.first();if(sn.current=!sn.current,document.activeElement&&An){let jn=(ln=(kt=document.activeElement)==null?void 0:kt.value)==null?void 0:ln.trim();typeof jn=="string"&&nt.current.model.commit(function(Qt){Qt.set(An.data,"text",jn||"\u672A\u547D\u540D"),nt.current.commandHandler.stopCommand()},"increment")}Kt(_n+1)}},tt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:He},tt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:sn.current?"none":"block"},className:rt.flowChartWrp},tt.createElement("div",{style:{display:"flex",height:"100%"}},tt.createElement("div",{style:{width:"300px",height:"100%"}},tt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),tt.createElement("div",{style:{height:"calc(100% - 50px)"},className:rt.myPaletteDiv,ref:Nt})),tt.createElement("div",{style:{flex:1,position:"relative"}},tt.createElement("div",{ref:bt,style:{height:"80vh"}}))),tt.createElement("div",{className:"tr"},tt.createElement(Je.ZP,{size:"large",onClick:Hn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var ze=De,$e=Re(47889),We=Re(71051);const Ve=$e.ZP.Group,pt={margin:"0 8px"};var Lt=({callback:He,onCancel:Xe})=>{function nt(bt){He(bt)}return ke.createElement(Ze.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:nt},ke.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ke.createElement("span",{style:pt},"\u5355\u5143\u683C\u6570\uFF1A"),ke.createElement("span",{style:pt},"\u884C\u6570"),ke.createElement(Ze.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ke.createElement(We.Z,null)),ke.createElement("span",{style:pt},"\u5217\u6570"),ke.createElement(Ze.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ke.createElement(We.Z,null))),ke.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ke.createElement("span",{style:pt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ke.createElement(Ze.default.Item,{name:"align"},ke.createElement(Ve,null,ke.createElement($e.ZP,{value:"default"},ke.createElement("i",{className:"fa fa-align-justify"})),ke.createElement($e.ZP,{value:"left"},ke.createElement("i",{className:"fa fa-align-left"})),ke.createElement($e.ZP,{value:"center"},ke.createElement("i",{className:"fa fa-align-center"})),ke.createElement($e.ZP,{value:"right"},ke.createElement("i",{className:"fa fa-align-right"}))))),ke.createElement("div",{className:"flex-container flex-end"},ke.createElement(Je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ke.createElement(Je.ZP,{type:"ghost",onClick:Xe},"\u53D6\u6D88")))},on=Re(71411),Xt=Re(91e3),Rt=Re.n(Xt),En=(0,ke.forwardRef)(({use3d:He,width:Xe,height:nt,callback:bt,showSaveButton:Nt},sn)=>{const Zt=(0,ke.useRef)(),_n=(0,ke.useRef)(),[Kt,qt]=(0,ke.useState)(!1),Hn=(0,ke.useRef)({id:Zt,appName:"graphing",width:Xe||1e3,height:nt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ke.useEffect)(()=>{_n.current=new(Rt())(Hn.current,!0),window.onload=function(){_n.current.inject("applet_container")}},[]);const kt=()=>{var ln=window.ggbApplet.getPNGBase64(1,!0,72);return bt&&bt(ln),ln};return(0,ke.useEffect)(()=>{Hn.current.appName=Kt?"3D":"graphing",_n.current.inject("applet_container")},[Kt]),(0,ke.useEffect)(()=>{qt(He)},[He]),(0,ke.useImperativeHandle)(sn,()=>({getImgData:kt})),ke.createElement(ke.Fragment,null,ke.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Zt}),ke.createElement(Ut.Z,{align:"middle"},ke.createElement(Ue.Z,{flex:1},ke.createElement(on.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Kt,onChange:ln=>qt(ln)})),ke.createElement(Ue.Z,null,ke.createElement(Je.ZP,{size:"large",onClick:kt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Sn=Re(88831),dn=Re(6767);const Zn="link",vn="upload-image",Wn="add-flowchart",ri="draw-image",Ni="add-flowchart",Qn="code-block",ki="add-table",Hi="------------",Gi={default:Hi,left:`:${Hi}`,center:`:${Hi}:`,right:`${Hi}:`};var qi=Re(23206);function Pr(){}let gr=0;const Ri=1e4,Vi="\u2581",sr="@\u2581\u2581@",Qe="@\u2581@",Ti=`
|
|
|
**\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`,ei=["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 Ii(He){return/^\d+$/.test(He)?`${He}px`:He}const cr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ir={[cr+"-B"]:"bold",[cr+"-I"]:"italic"},po={[Zn]:"\u6DFB\u52A0\u94FE\u63A5",[Qn]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[vn]:"\u6DFB\u52A0\u56FE\u7247",[ri]:"\u6DFB\u52A0\u753B\u56FE",[Wn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ki]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Vn=({defaultValue:He="",onChange:Xe,width:nt="100%",height:bt=400,miniToolbar:Nt=!1,isFocus:sn=!1,watch:Zt,insertTemp:_n,mode:Kt="markdown",id:qt="markdown-editor-id",showResizeBar:Hn=!1,noStorage:kt=!1,showNullButton:ln=!1,showNullProgramButton:An=!1,hidetoolBar:jn=!1,fullScreen:Qt=!1,onBlur:rn,onCMBeforeChange:Pn,onFullScreen:Dn,className:oi="",disablePaste:ai=!1,disabled:Gn=!1,disabledFill:Bn=!1,placeholder:bi="",values:Ei="",extraUse:Di})=>{const[yn,Tr]=(0,ke.useState)(null),[ur,wr]=(0,ke.useState)(He),[pn,$n]=(0,ke.useState)(Zt),[yi,Mi]=(0,ke.useState)(Qt),[mi,Li]=(0,ke.useState)(""),[dr,ar]=(0,ke.useState)(0),[vr,Cr]=(0,ke.useState)(bt),[Ln,Yr]=(0,ke.useState)(!1),[Mn,Ai]=(0,ke.useState)(0),[zi,Xi]=(0,ke.useState)(0),lo=(0,ke.useRef)(),oo=(0,ke.useRef)(),qr=(0,ke.useRef)(),uo=(0,ke.useRef)();(0,ke.useEffect)(()=>{const Si=window.scrollY||window.pageYOffset;wr(Ei),yn==null||yn.setValue(Ei),window.scrollTo(0,Si)},[Ei]),(0,ke.useEffect)(()=>{Dn==null||Dn(yi)},[yi]),(0,ke.useEffect)(()=>{if(lo.current){let Si=function(Cn,pi){var Ui;if(ai){pi.preventDefault();return}const xr=pi.clipboardData;if(xr){const pr=xr.types.toString(),Er=xr.items;if(pr==="Files"||xr.types.indexOf("Files")>-1){if(pi.preventDefault(),Kt=="stex")return;try{let Ar=Er[1];((Ui=Er[0])==null?void 0:Ui.kind)==="file"&&(Ar=Er[0]);const Lr=Ar.getAsFile(),co=Lr.name.split(".").pop();(0,xt.I)(Lr,so=>{var es,nn,Fr;so.id?((es=Lr==null?void 0:Lr.type)==null?void 0:es.indexOf("image"))>-1?di.replaceSelection(`<img width="100%" src="/api/attachments/${so.id}?type=${so.content_type})" alt="" />`):((nn=Lr==null?void 0:Lr.type)==null?void 0:nn.indexOf("video"))>-1?di.replaceSelection(`<video width="100%" controls src="/api/attachments/${so.id}"></video>`):((Fr=Lr==null?void 0:Lr.type)==null?void 0:Fr.indexOf("pdf"))>-1?di.replaceSelection(`<a href="/api/attachments/${so.id}?type=${Lr.type}&disposition=inline" target="_blank">${Lr.name}</a>`):ei.includes(co)?di.replaceSelection(`<a href="/api/attachments/${so.id}?type=office&disposition=inline" target="_blank">${Lr.name}</a>`):di.replaceSelection(`[${Lr.name}](/api/attachments/${so.id}?type=${so.content_type})`):(so==null?void 0:so.status)===401&&(document.location.href="/user/login")})}catch(Ar){dn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const di=Be().fromTextArea(lo.current,{mode:Kt,lineNumbers:!Nt,lineWrapping:!0,value:He,autoCloseTags:!0,autoCloseBrackets:!0});return di.on("keyup",function(Cn,pi){pi.keyCode===8&&(Cn.getValue()==""?di.setOption("placeholder",bi):di.setOption("placeholder",null))}),di.on("keydown",function(Cn,pi){if(pi.keyCode===8){var Ui=kn(Cn);Ui&&pi.preventDefault()}}),sn&&di.focus(),di.on("paste",Si),Gn&&di.on("beforeChange",function(Cn,pi){(pi.origin==="paste"||pi.origin==="+input")&&pi.cancel()}),Tr(di),()=>{di.off("paste",Si)}}},[]);const an=(0,ke.useCallback)(()=>{if(oo.current)try{}catch(Si){console.log(Si,"---- to set md editor body height")}},[vr,oo,yi]);(0,ke.useEffect)(()=>{function Si(){let di=new Le.Z(Cn=>{for(let pi of Cn)(pi.target.offsetHeight>0||pi.target.offsetWidth>0)&&(an(),yn.setSize("100%","100%"),yn.refresh())});return di.observe(lo.current.parentElement),di}if(yn){const di=Si();return()=>{var Cn,pi;(Cn=lo.current)!=null&&Cn.parentElement&&di.unobserve((pi=lo.current)==null?void 0:pi.parentElement)}}},[yn,an]),(0,ke.useEffect)(()=>{if(yn){let Si=[];for(const[di,Cn]of Object.entries(ir)){let pi={[di]:()=>{hn(Cn)}};Si.push(pi),yn.addKeyMap(pi)}return()=>{for(let di of Si)yn.removeKeyMap(di)}}},[yn]),(0,ke.useEffect)(()=>{Qt!==yi&&Mi(Qt)},[Qt]),(0,qi.Z)(()=>{if(!kt&&dr>0){let Si=new Date().getTime(),di=window.sessionStorage.getItem(qt);Si>=dr+Ri&&(!di||di!==ur)&&(window.sessionStorage.setItem(qt,ur),Yr(!0))}},Ri),(0,ke.useEffect)(()=>{$n(Zt)},[yn,Zt]),(0,ke.useEffect)(()=>{yn&&sn&&yn.focus()},[yn,sn]),(0,ke.useEffect)(()=>{if(pn&&yn){let Si=function(Cn){let pi=Cn.target;if(uo.current){let Ui=pi.scrollTop/pi.scrollHeight;uo.current.scrollTop=uo.current.scrollHeight*Ui}};const di=yn.getScrollerElement();return di.addEventListener("scroll",Si),()=>{di.removeEventListener("scroll",Si)}}},[yn,pn]),(0,ke.useEffect)(()=>{if(yn&&Pn){let Si=function(di,Cn){Pn(di,Cn)};return yn.on("beforeChange",Si),()=>{yn.off("beforeChange",Si)}}},[yn,Pn]),(0,ke.useEffect)(()=>{if(yn&&rn){let Si=function(){rn(yn.getValue())};return yn.on("blur",Si),()=>{yn.off("blur",Si)}}},[yn,rn]);function kn(Si,di){var Cn=Si.getDoc(),pi=Cn.getCursor(),Ui=Cn.getLine(pi.line),xr=Ui.charAt(pi.ch-1),pr=Ui.lastIndexOf("@\u2581@",pi.ch),Er=Ui.lastIndexOf("@\u2581\u2581@",pi.ch),Ar=pr>Er?pr:Er,Lr=pr>Er?3:4;if(sr.indexOf(xr)===-1)return null;if(console.log("change1:",di,Si,Ui,pi,Ar,pr,Er,xr),Ar>=0&&pi.ch-Ar<5){var co=Ar+Lr;return Cn.replaceRange("",{line:pi.line,ch:Ar},{line:pi.line,ch:co}),{line:pi.line,ch:co}}return null}(0,ke.useEffect)(()=>{if(yn){let Si=function(di,Cn){const pi=di.getValue();wr(pi),ar(new Date().getTime()),di.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Xe&&(An?Xe(pi,Jn(pi)):Xe(pi))};return yn.on("change",Si),()=>{yn.off("change",Si)}}},[yn,Xe]),(0,ke.useEffect)(()=>{if(yn)if(He==null)yn.setValue(""),wr("");else{const Si=window.scrollY||window.pageYOffset;He!==yn.getValue()&&(yn.setValue(He),wr(He),yn.setCursor(Gn?1:yn.lineCount(),0),window.scrollTo(0,Si))}},[yn,He]);const hn=(0,ke.useCallback)(Si=>{const di=yn.getCursor(),Cn=yn.getSelection();let pi=Cn.split(`
|
|
|
`);switch(Si){case"bold":return yn.replaceSelection("**"+Cn+"**"),Cn===""&&yn.setCursor(di.line,di.ch+2),yn.focus();case"italic":return yn.replaceSelection("*"+Cn+"*"),Cn===""&&yn.setCursor(di.line,di.ch+1),yn.focus();case"code":return yn.replaceSelection("`"+Cn+"`"),Cn===""&&yn.setCursor(di.line,di.ch+1),yn.focus();case"inline-latex":return Li("inline-latex"),yn.focus();case"latex":return yn.replaceSelection("```latex\n"+Cn+"\n```"),yn.setCursor(di.line+1,Cn.length+1),yn.focus();case"line-break":return yn.replaceSelection(`<br/>
|
|
|
`),yn.focus();case"list-ul":return Cn===""?yn.replaceSelection("- "+Cn):yn.replaceSelection(pi.map(Ui=>Ui===""?"":`- ${Ui}`).join(`
|
|
|
`)),yn.focus();case"list-ol":return Cn===""?yn.replaceSelection("1. "+Cn):yn.replaceSelection(pi.map((Ui,xr)=>Ui===""?"":`${xr+1}. ${Ui}`).join(`
|
|
|
`)),yn.focus();case"add-null-ch":return Cn===""&&yn.setCursor(di.line,di.ch),yn.replaceSelection(Vi),yn.focus();case"add-signal":return Cn===""&&yn.setCursor(di.line,di.ch),yn.replaceSelection(Qe),yn.focus();case"add-multiple":return Cn===""&&yn.setCursor(di.line,di.ch),yn.replaceSelection(sr),yn.focus();case"inster-template-1":return Cn===""&&yn.setCursor(di.line,di.ch),yn.replaceSelection(Ti),yn.focus();case"eraser":return yn.setValue(""),yn.focus();case"trigger-watch":return $n(!pn),yn.focus();case"trigger-full-screen":return Mi(!yi),yn.focus();case Zn:Li(Zn);return;case Qn:Li(Qn);return;case vn:Li(vn);return;case ri:Li(ri);return;case"maths-latex":Li("maths-latex");return;case Wn:Li(Wn);return;case ki:Li(ki);return;default:throw new Error}},[yn,pn,yi]),ft=(0,ke.useCallback)((Si,di)=>{var Cn,pi,Ui,xr,pr,Er;switch(Li(""),mi){case Zn:const{title:es,link:nn}=Si;return yn.replaceSelection(`[${es}](${nn})`),yn.focus();case Qn:const{language:Fr,content:Vr}=Si;return yn.replaceSelection(["```"+Fr,Vr,"```"].join(`
|
|
|
`)),yn.focus();case"maths-latex":for(var Ar=atob(Si),Lr=new Uint8Array(Ar.length),co=0;co<Ar.length;co++)Lr[co]=Ar.charCodeAt(co);var so=new Blob([Lr],{type:"image/png"});(0,xt.I)(so,us=>{us.id?yn.replaceSelection(``):(us==null?void 0:us.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":yn.replaceSelection("`$$"+Si+"$$`");break;case vn:case ri:case Ni:const{src:rr,alt:Mr}=Si,tr=di,Oo=(Ui=(pi=(Cn=tr==null?void 0:tr.name)==null?void 0:Cn.split("."))==null?void 0:pi.pop)==null?void 0:Ui.call(pi);return((xr=tr==null?void 0:tr.type)==null?void 0:xr.indexOf("image"))>-1||!(tr!=null&&tr.type)?tr!=null&&tr.align||tr!=null&&tr.width?yn.replaceSelection(`<p style="text-align:${tr.align||"initial"}"><img width="${tr.width?tr.width+"%":"initial"}" src="${rr}" alt="${Mr||""}" /></p>`):yn.replaceSelection(`<img width="100%" src="${rr}" alt="${Mr||""}" />`):((pr=tr==null?void 0:tr.type)==null?void 0:pr.indexOf("video"))>-1?yn.replaceSelection(`<video width="100%" controls src="${rr}"></video>`):((Er=tr==null?void 0:tr.type)==null?void 0:Er.indexOf("pdf"))>-1?yn.replaceSelection(`<a href="${rr}?type=${tr.type}&disposition=inline" target="_blank">${tr.name}</a>`):ei.includes(Oo)?yn.replaceSelection(`<a href="${rr}?type=office&disposition=inline" target="_blank">${tr.name}</a>`):yn.replaceSelection(`[${tr.name}](${rr})`),yn.focus();case ki:const{row:fo,col:Br,align:Qr}=Si;let $s=`
|
|
|
`;for(let us=0;us<fo;us++){let ha=[],ea=[];for(let Qi=0;Qi<Br;Qi++)us===1&&ea.push(Gi[Qr]),ha.push(" ");us===1&&($s+=`| ${ea.join(" | ")} |
|
|
|
`),$s+=`| ${ha.join(Br===1?"":" | ")} |
|
|
|
`}return yn.replaceSelection($s+`
|
|
|
`),yn.focus();default:throw new Error}},[yn,mi]),Yn=(0,ke.useMemo)(()=>{switch(mi){case Zn:return ke.createElement(yt,{callback:ft,onCancel:Un});case Qn:return ke.createElement(wt.Z,{callback:ft,onCancel:Un});case vn:return ke.createElement(xt.Z,{callback:ft,onCancel:Un});case Wn:return ke.createElement(ze,{callback:ft,onCancel:Un});case ki:return ke.createElement(Lt,{callback:ft,onCancel:Un});case"maths-latex":return ke.createElement(En,{showSaveButton:!0,callback:ft});case"inline-latex":return ke.createElement(Sn.Z,{showSaveButton:!0,callback:ft});default:return null}},[mi]);function Un(){Li("")}(0,ke.useEffect)(()=>{if(qr.current){let Si=function(pr){Ui=!0,xr=pr.pageY},di=function(){Ui=!1},Cn=function(pr){if(Ui){let Er=pr.pageY-xr;Er<0&&(Er=0),Er>300&&(Er=300);let Ar=bt+Er+"px";Cr(Ar)}},pi=qr.current,Ui=!1,xr=0;return pi.addEventListener("mousedown",Si),document.addEventListener("mousemove",Cn),document.addEventListener("mouseup",di),()=>{pi.removeEventListener("mousedown",Si),document.removeEventListener("mousemove",Cn),document.removeEventListener("mouseup",di)}}},[yn,qr]),(0,ke.useEffect)(()=>{Cr(bt)},[bt]);const ni=Ii(nt),li=Ii(vr),vi={width:ni,height:li},On=(0,ke.useMemo)(()=>{if(dr){let Si=new Date(dr),di=Si.getHours(),Cn=Si.getMinutes(),pi=Si.getSeconds();return di=di<10?"0"+di:di,Cn=Cn<10?"0"+Cn:Cn,pi=pi<10?"0"+pi:pi,`${di}:${Cn}:${pi}`}return 0},[dr]),Jn=Si=>{const di=[];if(An){let Cn=-1;Si=Si.replace(/(@▁▁@|@▁@)/g,function(pi,Ui,xr){di.push({multiLine:pi!==Qe})})}return di};function qn(){window.sessionStorage.removeItem(qt),Yr(!1),ar(0)}function ti(){Yr(!1),ar(0),yn.setValue(window.sessionStorage.getItem(qt))}(0,ke.useEffect)(()=>{po[mi]&&mi!==ri&&mi!==Wn&&setTimeout(()=>{const Si=document.getElementsByClassName("markdown-popup-form")[0],di=window.innerWidth/2-Si.offsetWidth/2,Cn=window.innerHeight/2-Si.offsetHeight/2;Ai(di),Xi(Cn)},0)},[mi]);const ii=Si=>{Si.preventDefault();const di=Si.clientX-Mn,Cn=Si.clientY-zi;document.body.onmousemove=pi=>{let Ui=pi.clientX-di,xr=pi.clientY-Cn;const pr=document.getElementsByClassName("markdown-popup-form")[0],Er=window.innerWidth-pr.offsetWidth,Ar=window.innerHeight-pr.offsetHeight;Ui=Math.max(0,Math.min(Ui,Er)),xr=Math.max(0,Math.min(xr,Ar)),Fi(pi.clientX,pi.clientY,di,Cn)&&(Ai(Ui),Xi(xr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Fi=(Si,di,Cn,pi)=>{const Ui=document.body.clientHeight,xr=document.body.clientWidth;return Si<20&&Cn>Si||Si>xr-20&&Cn<Si||di<20&&pi>di||di>Ui-20&&pi<di?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ke.createElement(ke.Fragment,null,ke.createElement("div",{className:"markdown-editor-wrapper",ref:oo},ke.createElement("div",{className:`markdown-editor-container ${oi} ${pn?"on-preview":""} ${Nt?"mini":""} ${yi?"full-screen":""}`,style:vi},ke.createElement(Oe,{insertTemp:_n,watch:pn,fullScreen:yi,showNullButton:ln,showNullProgramButton:An,onActionCallback:hn,hidetoolBar:jn,extraUse:Di}),ke.createElement("div",{className:"markdown-editor-body"},ke.createElement("div",{className:"codemirror-container"},ke.createElement("textarea",{ref:lo,placeholder:bi})),pn?ke.createElement("div",{ref:uo,className:"preview-container"},Kt==="stex"&&ke.createElement(ge,{value:ur}),Kt!=="stex"&&ke.createElement(de.Z,{disabledFill:Bn,showProgramFill:An,value:ur})):null))),Hn?ke.createElement("a",{ref:qr,className:"editor-resize"}):null,mi===ri&&ke.createElement(mn,{callback:ft,onCancel:Un}),mi===Wn&&ke.createElement(ze,{callback:ft,onCancel:Un}),ke.createElement(Ie.Z,null,po[mi]&&mi!==ri&&mi!==Wn?ke.createElement(zt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Mn,top:zi},title:ke.createElement("div",{style:{cursor:"move"},onMouseDown:ii},po[mi]),open:!0,onCancel:Un,footer:null,destroyOnClose:!0,width:mi===Wn?"1200px":null,height:mi===Wn?"80vh":null,className:"markdown-popup-form"},Yn):null))}},24141:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return Pe},I:function(){return Oe}});var ke=Re(28284),Se=Re(6767),Be=Re(37568),Le=Re(77736),Ce=Re(71051),xe=Re(47889),be=Re(99571),ye=Re(55322),we=Re(59301),pe=Re(59301),de=Object.defineProperty,ge=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(Ie,Ze,qe)=>Ze in Ie?de(Ie,Ze,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Ie[Ze]=qe,re=(Ie,Ze)=>{for(var qe in Ze||(Ze={}))ee.call(Ze,qe)&&oe(Ie,qe,Ze[qe]);if(ue)for(var qe of ue(Ze))z.call(Ze,qe)&&oe(Ie,qe,Ze[qe]);return Ie},ae=(Ie,Ze)=>ge(Ie,fe(Ze));const{useForm:le}=ke.default,me={width:280,marginRight:10},ve={labelCol:{span:5},wrapperCol:{span:19}};var Pe=({callback:Ie,onCancel:Ze})=>{const[qe]=le();let Je=(0,we.useRef)();function mt(at){Je.current.width=qe.getFieldValue("width"),Je.current.align=qe.getFieldValue("align"),Ie(at,Je.current)}function gt(at,_t){if(at.status===-1){Se.ZP.error(at.message);return}qe.setFieldsValue({src:`/api/attachments/${at.id}`,type:_t.type})}function Mt(at){let _t=at.target.files[0];Je.current=_t,Oe(_t,gt)}return pe.createElement(ke.default,ae(re({form:qe},ve),{className:"upload-image-panel",onFinish:mt,style:{width:470,overflow:"hidden"}}),pe.createElement(ke.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},pe.createElement("div",{className:"flex-container"},pe.createElement(ke.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},pe.createElement(Be.default,{style:me})),pe.createElement(Ae,{onFileChange:Mt}))),pe.createElement(ke.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},pe.createElement(Be.default,{style:{width:264}})),pe.createElement(ke.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},pe.createElement(Le.Z,null,pe.createElement(ke.default.Item,{name:"width",style:{margin:0}},pe.createElement(Ce.Z,{style:{width:264}})),pe.createElement("span",{className:"ml8"},"%"))),pe.createElement(ke.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},pe.createElement(xe.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"}]})),pe.createElement("aside",null,pe.createElement(ke.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},pe.createElement(be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pe.createElement(be.ZP,{type:"default",onClick:Ze},"\u53D6\u6D88"))))};function Ae({onFileChange:Ie}){return pe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",pe.createElement("input",{type:"file",onChange:Ie}))}function Oe(Ie,Ze){if(!Ie)throw new String("\u6CA1\u6709\u6587\u4EF6");let qe=new FormData;qe.append("editormd-image-file",Ie),qe.append("file_param_name","editormd-image-file"),qe.append("byxhr","true");var Je=new window.XMLHttpRequest;Je.withCredentials=!0,Je.addEventListener("load",function(mt){Ze(JSON.parse(mt.target.responseText),Ie)},!1),Je.addEventListener("error",function(mt){console.error(mt)},!1),Je.open("POST",`${ye.KI}/api/attachments.json`),Je.send(qe)}},52272:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return Be}});var ke=Re(59301),Se=Re(4676);class Be extends ke.Component{constructor(Ce){super(Ce);const xe=window.document;this.node=xe.createElement("div"),xe.body.appendChild(this.node)}render(){const{children:Ce}=this.props;return(0,Se.createPortal)(Ce,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},89081:function(xn,un,Re){"use strict";Re.d(un,{SV:function(){return Ke},ZP:function(){return tt}});var ke=Re(59301),Se=Re(76374);const Be={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"]},Le={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"]},Ce={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(`
|
|
|
`)}]},xe={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(`
|
|
|
`)}]},be={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 ye=Re(53184),we=Re.n(ye),pe=Object.defineProperty,de=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,z=(De,ze,$e)=>ze in De?pe(De,ze,{enumerable:!0,configurable:!0,writable:!0,value:$e}):De[ze]=$e,oe=(De,ze)=>{for(var $e in ze||(ze={}))ue.call(ze,$e)&&z(De,$e,ze[$e]);if(fe)for(var $e of fe(ze))ee.call(ze,$e)&&z(De,$e,ze[$e]);return De},re=(De,ze)=>de(De,ge(ze)),ae=(De,ze,$e)=>new Promise((We,Ve)=>{var pt=Xt=>{try{on($e.next(Xt))}catch(Rt){Ve(Rt)}},Lt=Xt=>{try{on($e.throw(Xt))}catch(Rt){Ve(Rt)}},on=Xt=>Xt.done?We(Xt.value):Promise.resolve(Xt.value).then(pt,Lt);on(($e=$e.apply(De,ze)).next())});const le={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"]}},me=(De,ze)=>ze.map($e=>({label:$e,kind:De.languages.CompletionItemKind.Keyword,insertText:$e})),ve=De=>Object.keys(le.tables).map(ze=>({label:ze,kind:De.languages.CompletionItemKind.Variable,insertText:ze})),Pe=(De,ze)=>{const $e=le.tables[De];return $e?$e.map(We=>({label:We,kind:ze.languages.CompletionItemKind.Field,insertText:We})):[]};function Ae(De,ze,$e,We,Ve){let pt=ze.getWordUntilPosition($e),Lt={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:pt.startColumn,endColumn:pt.endColumn},on=We.map(Xt=>({label:Xt,kind:De.languages.CompletionItemKind.Keyword,insertText:Xt,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Lt}));return Ve.map(Xt=>{on.push(re(oe({},Xt),{range:Lt}))}),on}var Oe=De=>{le.languages.map(Ve=>(De.languages.registerDocumentFormattingEditProvider(Ve,{provideDocumentFormattingEdits(pt,Lt,on){return ae(this,null,function*(){const Xt=we()(pt.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:pt.getFullModelRange(),text:Xt}]})}}),Ve));const ze=Ce.quickKey.map(Ve=>({label:Ve.label,kind:De.languages.CompletionItemKind.Method,insertText:Ve.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet})),$e=xe.quickKey.map(Ve=>({label:Ve.label,kind:De.languages.CompletionItemKind.Method,insertText:Ve.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet})),We=Le.quickKey.map(Ve=>({label:Ve.label,kind:De.languages.CompletionItemKind.Method,insertText:Ve.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet}));De.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ve,pt){var Lt=Ve.getWordUntilPosition(pt),on={startLineNumber:pt.lineNumber,endLineNumber:pt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn},Xt=Ve.getLineContent(pt.lineNumber).substring(Lt.startColumn-2,Lt.endColumn);return{suggestions:[...Ce.keywords.map(Rt=>({label:Rt,kind:De.languages.CompletionItemKind.Function,documentation:Rt,insertText:Rt,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:on})),...Ce.quickKey.map(Rt=>({label:Rt.label,kind:De.languages.CompletionItemKind.Function,documentation:Rt.content,insertText:Xt.startsWith("#")?Rt.content.replace(/#/,""):Rt.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:on}))]}}}),De.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ve,pt){var Lt=Ve.getWordUntilPosition(pt),on={startLineNumber:pt.lineNumber,endLineNumber:pt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn};return{suggestions:[...Be.keywords.map(Xt=>({label:Xt,kind:De.languages.CompletionItemKind.Function,documentation:Xt,insertText:Xt,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:on}))]}}}),De.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ve,pt){var Lt=Ve.getWordUntilPosition(pt),on={startLineNumber:pt.lineNumber,endLineNumber:pt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn},Xt=Ve.getLineContent(pt.lineNumber).substring(Lt.startColumn-2,Lt.endColumn);return{suggestions:[...Le.keywords.map(Rt=>({label:Rt,kind:De.languages.CompletionItemKind.Function,documentation:Rt,insertText:Rt,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:on})),...Le.quickKey.map(Rt=>({label:Rt.label,kind:De.languages.CompletionItemKind.Function,documentation:Rt.content,insertText:Xt.startsWith("#")?Rt.content.replace(/#/,""):Rt.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:on}))]}}}),De.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ve,pt){var Lt=Ve.getWordUntilPosition(pt),on={startLineNumber:pt.lineNumber,endLineNumber:pt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn},Xt=Ve.getLineContent(pt.lineNumber).substring(Lt.startColumn-2,Lt.endColumn);return{suggestions:[...be.keywords.map(Rt=>({label:Rt,kind:De.languages.CompletionItemKind.Function,documentation:Rt,insertText:Rt,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:on})),...be.quickKey.map(Rt=>({label:Rt.label,kind:De.languages.CompletionItemKind.Function,documentation:Rt.content,insertText:Xt.startsWith("#")?Rt.content.replace(/#/,""):Rt.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:on}))]}}}),De.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ve,pt){var Lt=Ve.getWordUntilPosition(pt),on={startLineNumber:pt.lineNumber,endLineNumber:pt.lineNumber,startColumn:Lt.startColumn,endColumn:Lt.endColumn},Xt=Ve.getLineContent(pt.lineNumber).substring(Lt.startColumn-2,Lt.endColumn);return{suggestions:[...xe.keywords.map(Rt=>({label:Rt,kind:De.languages.CompletionItemKind.Function,documentation:Rt,insertText:Rt,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:on})),...xe.quickKey.map(Rt=>({label:Rt.label,kind:De.languages.CompletionItemKind.Function,documentation:Rt.content,insertText:Xt.startsWith("#")?Rt.content.replace(/#/,""):Rt.content,insertTextRules:De.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:on}))]}}})};const Ie="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ze=Object.defineProperty,qe=(De,ze,$e)=>ze in De?Ze(De,ze,{enumerable:!0,configurable:!0,writable:!0,value:$e}):De[ze]=$e,Je=(De,ze,$e)=>qe(De,typeof ze!="symbol"?ze+"":ze,$e);const mt=class mx{constructor(ze,$e,We){this.placeholder=ze,this.editor=$e,this.monaco=We,$e.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)}};Je(mt,"ID","editor.widget.placeholderHint");var Mt=mt,at=Re(96236),_t=Re(6767),ht=Re(25399),Dt=Re(89392),ut=Re(16448),ot=Re(56102),ct=Object.defineProperty,yt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,cn=(De,ze,$e)=>ze in De?ct(De,ze,{enumerable:!0,configurable:!0,writable:!0,value:$e}):De[ze]=$e,jt=(De,ze)=>{for(var $e in ze||(ze={}))zt.call(ze,$e)&&cn(De,$e,ze[$e]);if(xt)for(var $e of xt(ze))Ut.call(ze,$e)&&cn(De,$e,ze[$e]);return De},mn=(De,ze)=>yt(De,wt(ze)),Ft=(De,ze)=>{var $e={};for(var We in De)zt.call(De,We)&&ze.indexOf(We)<0&&($e[We]=De[We]);if(De!=null&&xt)for(var We of xt(De))ze.indexOf(We)<0&&Ut.call(De,We)&&($e[We]=De[We]);return $e},Yt=(De,ze,$e)=>new Promise((We,Ve)=>{var pt=Xt=>{try{on($e.next(Xt))}catch(Rt){Ve(Rt)}},Lt=Xt=>{try{on($e.throw(Xt))}catch(Rt){Ve(Rt)}},on=Xt=>Xt.done?We(Xt.value):Promise.resolve(Xt.value).then(pt,Lt);on(($e=$e.apply(De,ze)).next())});function tn(De){return/^\d+$/.test(De)?`${De}px`:De}function lt(){}let Ue=!1;const je={"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 rt(De=[]){let ze=De;if(Array.isArray(De)){for(let $e=0;$e<De.length;$e++){let We=je[De[$e]];if(We)return We}return ze[0]}return je[ze]||ze}let dt=null;var tt=De=>{var ze=De,{width:$e="100%",height:We="100%",value:Ve,language:pt="javascript",style:Lt={},options:on={},overrideServices:Xt={},theme:Rt="vs-dark",onEditBlur:fn,isCopy:En=!1,onSave:Sn,autoHeight:dn=!1,forbidCopy:Zn=!1,onChange:vn=lt,editorDidMount:Wn=lt,onFocus:ri=lt,onBreakPoint:Ni=lt,breakPointValue:Qn=[],filename:ki="educoder.txt",errorLine:Hi,errorContent:Gi="",highlightLine:qi,openBreakPoint:Pr=!1,placeholder:gr="",showMiniMap:Ri=!0}=ze,Vi=Ft(ze,["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 sr=(0,ke.useRef)(),Qe=(0,ke.useRef)({}),Ti=(0,ke.useRef)(),ei=(0,ke.useRef)(),Ii=(0,ke.useRef)([]),mr=(0,ke.useRef)(!1),cr=(0,ke.useRef)(),ir=(0,ke.useRef)(),po=(0,ke.useRef)(!1),[Vn,He]=(0,ke.useState)(!1);function Xe(){let rn;return sr.current&&(rn=new Se.Z(Pn=>{for(let Dn of Pn)(Dn.target.offsetHeight>0||Dn.target.offsetWidth>0)&&Qe.current.instance.layout()}),rn.observe(sr.current)),rn}function nt(){_t.ZP.warning({content:decodeURIComponent(Ie),key:"monaco-editor-tip"})}const bt=()=>{let rn=Qe.current.instance;if(Ve!=null&&rn&&Vn){const Pn=rn.getModel();Pn&&Ve!==Pn.getValue()&&(Ue=!0,Pn.setValue(Ve),rn.layout(),Ue=!1)}};(0,ke.useEffect)(()=>{const rn=ut.Z.subscribe("formatDocument",Pn=>{var Dn;let oi=Qe.current.instance;(Dn=oi==null?void 0:oi.getAction)==null||Dn.call(oi,"editor.action.formatDocument").run()});return window.updateMonacoValue=Pn=>{vn(Pn)},rn},[]),(0,ke.useEffect)(()=>{var rn;let Pn=Qe.current.instance;ei.current&&clearTimeout(ei.current),ei.current=setTimeout(()=>{bt()},500),Ve&&(Ve!=null&&Ve.length)&&((rn=Pn==null?void 0:Pn.updateOptions)==null||rn.call(Pn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ve.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ve,Vn,Qe.current]),(0,ke.useEffect)(()=>{if(Hi&&Qe.current&&Qe.current.instance){let Pn=Qe.current.instance;Pn.changeViewZones(function(Dn){var oi=document.createElement("div");oi.style.padding="10px 20px",oi.style.width="calc(100% - 20px)",oi.className="my-error-line-wrp",oi.innerHTML=Gi,Dn.addZone({afterLineNumber:Hi||11,heightInLines:3,domNode:oi})});var rn={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}};Pn.addOverlayWidget(rn),Pn.revealPositionInCenter({lineNumber:20,column:1})}},[Hi,Qe.current,Vn]);const Nt=(rn="",Pn)=>{if(!rn||rn.trim()==="")return!0;const oi=Qe.current.instance.getModel().getLineTokens(Pn);let ai=!1;for(let Gn=0;Gn<2;Gn++)oi.getStandardTokenType(Gn)===1&&(ai=!0);return ai};(0,ke.useEffect)(()=>{var rn;const Pn=(rn=Qe.current)==null?void 0:rn.instance;if(Pn&&Vn&&Zn){const Dn=Pn.onDidBlurEditorWidget(()=>{po.current=!1}),oi=Pn.onDidFocusEditorText(()=>{po.current=!0});return()=>{Dn.dispose(),oi.dispose()}}},[Qe.current,Vn,Zn]),(0,ke.useEffect)(()=>{var rn;if((rn=Qe.current)!=null&&rn.instance&&Vn&&Pr){let Pn=Qe.current.instance,Dn=Pn.getModel();if(!Dn)return;(()=>{var pn;let $n=[],yi=[];const Mi=Dn.getAllDecorations();for(let Li of Mi)Li.options.className==="highlighted-line"&&($n.push((pn=Li==null?void 0:Li.range)==null?void 0:pn.startLineNumber),yi.push(Li==null?void 0:Li.id));if(qi===$n[0])return;Dn.deltaDecorations(yi,[]);const mi=Dn.getLineCount();qi&&qi<=mi&&(Pn.deltaDecorations([],[{range:new dt.Range(qi,1,qi,Dn.getLineMaxColumn(qi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Pn.revealLineInCenter(qi))})();const ai=(pn=!1)=>{var $n;let yi=[],Mi=[];const mi=Dn.getAllDecorations();for(let Li of mi)Li.options.linesDecorationsClassName==="breakpoints-select"&&(yi.push(($n=Li==null?void 0:Li.range)==null?void 0:$n.startLineNumber),Mi.push(Li==null?void 0:Li.id));if(pn)return{lines:yi,ids:Mi};Ni(yi)},Gn=pn=>Yt(void 0,null,function*(){let $n={range:new dt.Range(pn,1,pn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Dn.deltaDecorations([],[$n]),ai()}),Bn=pn=>Yt(void 0,null,function*(){let $n=[];const yi=Pn.getLineDecorations(pn);for(let Mi of yi)Mi.options.linesDecorationsClassName==="breakpoints-select"&&$n.push(Mi.id);yield Dn.deltaDecorations($n,[]),ai()}),bi=pn=>{let $n=Pn.getLineDecorations(pn);for(let yi of $n)if(yi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Dt.isEqual)(Qn,ai(!0).lines)){Dn.deltaDecorations(ai(!0).ids,[]);const pn=Qn.map($n=>({range:new dt.Range($n,1,$n,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Dn.deltaDecorations([],pn)}const Ei=Pn.onDidChangeModelContent(pn=>{let $n=Pn.getPosition();if($n){let yi=$n.lineNumber;clearTimeout(ir.current),ir.current=setTimeout(()=>{Nt(Dn.getLineContent(yi),yi)?Bn(yi):bi(yi)?(Bn(yi),Gn(yi)):ai()},100)}}),Di=Pn.onMouseDown(pn=>{var $n,yi,Mi;if(pn.target.detail&&((Mi=(yi=($n=pn.target)==null?void 0:$n.element)==null?void 0:yi.className)!=null&&Mi.includes("line-numbers"))){let mi=pn.target.position.lineNumber;if(Nt(Dn.getLineContent(mi),mi))return;bi(mi)?Bn(mi):Gn(mi)}}),yn=pn=>{let $n={range:new dt.Range(pn,1,pn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ii.current=Pn.deltaDecorations(Ii.current,[$n])},Tr=()=>{Ii.current=Pn.deltaDecorations(Ii.current,[])},ur=Pn.onMouseMove(pn=>{var $n,yi,Mi;if(Tr(),pn.target.detail&&((Mi=(yi=($n=pn.target)==null?void 0:$n.element)==null?void 0:yi.className)!=null&&Mi.includes("line-numbers"))){let mi=pn.target.position.lineNumber;if(Nt(Dn.getLineContent(mi),mi))return;yn(mi)}}),wr=Pn.onMouseLeave(()=>{Tr()});return()=>{Ei.dispose(),Di.dispose(),ur.dispose(),wr.dispose()}}},[Qe.current,Vn,Qn,qi,Pr,pt]),(0,ke.useEffect)(()=>{var rn;(rn=Qe.current)!=null&&rn.instance&&Pr&&Qe.current.instance.setPosition({lineNumber:0,column:0})},[qi]);function sn(){let rn=Qe.current.instance;if(rn){const Pn=rn.getSelection(),Dn=Qe.current.pastePos||{},oi=new dt.Range(Dn.startLineNumber||Pn.endLineNumber,Dn.startColumn||Pn.endColumn,Dn.endLineNumber||Pn.endLineNumber,Dn.endColumn||Pn.endColumn);setTimeout(()=>{rn.executeEdits("",[{range:oi,text:""}])},300)}}function Zt(rn){(window.navigator.platform.match("Mac")?rn.metaKey:rn.ctrlKey)&&rn.keyCode==83&&(rn.preventDefault(),Sn())}const _n=()=>{if(dn&&Qe.current.instance){const rn=Qe.current.instance.getContentHeight();jn(rn<We?We:rn)}else jn(We)};function Kt(rn){var Pn=document.createEvent("MouseEvents");Pn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),rn.dispatchEvent(Pn)}const qt=rn=>{if(!po.current)return;const{keyCode:Pn,ctrlKey:Dn,metaKey:oi,target:ai,type:Gn}=rn;return(Gn==="paste"||(Pn===67||Pn===86)&&(oi||Dn))&&ai.nodeName==="TEXTAREA"&&(nt(),rn.preventDefault()),!1};function Hn(rn,Pn){var Dn=window.URL||window.webkitURL||window,oi=new Blob([Pn]),ai=document.createElementNS("http://www.w3.org/1999/xhtml","a");ai.href=Dn.createObjectURL(oi),ai.download=rn,Kt(ai)}(0,ke.useEffect)(()=>{_n()},[_n]),(0,ke.useEffect)(()=>{sr.current&&!Vn&&Promise.all([Re.e(8909),Re.e(7960)]).then(Re.bind(Re,71448)).then(rn=>{try{dt=rn,Qe.current.instance=dt.editor.create(sr.current,{value:Ve,language:rt(pt),theme:Rt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ri||!1}},Xt);const Pn=Qe.current.instance;let ai=[...at.BH._menuItems].find(Ei=>Ei[0]._debugName=="EditorContext")[1],Gn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Bn=(Ei,Di)=>{var yn,Tr;let ur=Ei._first;do Di.includes((Tr=(yn=ur.element)==null?void 0:yn.command)==null?void 0:Tr.id)&&Ei._remove(ur);while(ur=ur.next)};if(Wn(Pn,dt),setTimeout(()=>{_n(),Qe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Hn(ki||"educoder.txt",Pn.getValue())}})},500),Qe.current.subscription=Pn.onDidChangeModelContent(Ei=>{mr.current?clearTimeout(cr.current):(_n(),vn(Pn.getValue(),Ei)),cr.current=setTimeout(()=>{mr.current=!1},500)}),window.Monaco||Oe(dt,rt(pt)),Zn&&(Bn(ai,Gn),sr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",qt),window.removeEventListener("paste",qt),window.addEventListener("keydown",qt),window.addEventListener("paste",qt)),window.Monaco=dt,fn&&Pn.onDidBlurEditorWidget(()=>{fn(Pn.getValue())}),ri&&Pn.onDidFocusEditorText(()=>{ri(Pn.getValue())}),Zn)try{Pn.onDidPaste(Ei=>{const Di=Pn.getSelection(),yn=Qe.current.pastePos||{},Tr=new dt.Range(yn.startLineNumber||Di.endLineNumber,yn.startColumn||Di.endColumn,yn.endLineNumber||Di.endLineNumber,yn.endColumn||Di.endColumn);Pn.executeEdits("",[{range:Ei.range,text:""}])})}catch(Ei){}let bi=Xe();return gr&&typeof gr=="string"&&new Mt(gr,Pn,dt),He(!0),()=>{const Ei=Qe.current.instance;Ei.dispose();const Di=Ei.getModel();Di&&Di.dispose(),Qe.current.subscription&&Qe.current.subscription.dispose(),bi.unobserve(sr.current)}}catch(Pn){}})},[]),(0,ke.useEffect)(()=>{if(Qe.current.instance&&Vn)return document.addEventListener("keydown",Zt,!1),()=>{document.removeEventListener("keydown",Zt)}},[Sn,Vn]),(0,ke.useEffect)(()=>{let rn=Qe.current.instance;if(rn&&Vn){let Pn=rt(pt);dt.editor.setModelLanguage(rn.getModel(),Pn)}},[pt,Vn]),(0,ke.useEffect)(()=>{Qe.current.instance&&Vn&&dt.editor.setTheme(Rt)},[Rt,Vn]),(0,ke.useEffect)(()=>{let rn=Qe.current.instance;Ti.current=on,rn&&Vn&&(rn.updateOptions(jt({},on)),setTimeout(()=>{rn.getModel().updateOptions(jt({},on))},200))},[JSON.stringify(on),Vn]),(0,ke.useEffect)(()=>{let rn=Qe.current.instance;rn&&Vn&&rn.layout()},[$e,We,Vn]);const[kt,ln]=(0,ke.useState)(tn($e)),[An,jn]=(0,ke.useState)(tn(We)),Qt=mn(jt({},Lt),{width:kt,height:An,position:"relative"});return ke.createElement("div",{className:"my-monaco-editor",ref:sr,style:Qt},En&&ke.createElement(ot.CopyToClipboard,{text:Ve,onCopy:()=>_t.ZP.success("\u590D\u5236\u6210\u529F")},ke.createElement(ht.Z,{title:"\u590D\u5236\u4EE3\u7801"},ke.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ke.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ke({width:De="100%",height:ze="100%",original:$e,modified:We,language:Ve,options:pt={}}){const Lt=(0,ke.useRef)(),[on,Xt]=(0,ke.useState)(null);function Rt(dn){let Zn;return Lt.current&&(Zn=new Se.Z(vn=>{for(let Wn of vn)(Wn.target.offsetHeight>0||Wn.target.offsetWidth>0)&&dn.layout()}),Zn.observe(Lt.current)),Zn}(0,ke.useEffect)(()=>(Lt.current&&Promise.all([Re.e(8909),Re.e(9404)]).then(Re.bind(Re,2550)).then(dn=>{dt=dn;const Zn=dt.editor.createDiffEditor(Lt.current,mn(jt({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},pt),{wordWrap:!0}));Xt(Zn);let vn=Rt(Zn);return()=>{Zn.dispose();const Wn=Zn.getModel();Wn&&Wn.dispose(),vn.unobserve(Lt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ke.useEffect)(()=>{on&&on.setModel({original:dt.editor.createModel($e,Ve),modified:dt.editor.createModel(We,Ve)})},[$e,We,Ve,on]);const fn=tn(De),En=tn(ze),Sn={width:fn,height:En};return ke.createElement("div",{className:"my-diff-editor",ref:Lt,style:Sn})}},7188:function(xn,un,Re){"use strict";var ke=Re(31066),Se=Re(82326),Be=Re(71411),Le=Re(59301);const Ce=Se.default.Option;un.Z=({isTheoretical:xe,onFontSizeChange:be,cmFontSize:ye,cmCodeMode:we,autoFormat:pe,onCodeModeChange:de,onTabToSpace:ge,onAutoFormat:fe,formatDocument:ue,className:ee="",tabToSpace:z,children:oe,code_editor:re,challenge:ae})=>{const le={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return Le.createElement("div",{className:`tpi-code-setting ${ee}`},Le.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Le.createElement("section",null,Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Le.createElement(Se.default,{bordered:!1,size:"small",value:we,onChange:de},Le.createElement(Ce,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Le.createElement(Ce,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!xe&&Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Le.createElement(Se.default,{bordered:!1,size:"small",value:ye,onChange:be},Le.createElement(Ce,{value:12},"12px"),Le.createElement(Ce,{value:14},"14px"),Le.createElement(Ce,{value:16},"16px"),Le.createElement(Ce,{value:18},"18px"),Le.createElement(Ce,{value:20},"20px"),Le.createElement(Ce,{value:22},"22px"))),Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"Tab\u8F6C\u6362"),Le.createElement(Be.Z,{checked:z,onChange:ge})),Le.createElement("div",{className:"file-item",onClick:ue},Le.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!xe&&Le.createElement(Le.Fragment,null,Le.createElement("h3",null,"\u5FEB\u6377\u952E"),Le.createElement("section",null,Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Le.createElement("span",null,"Ctrl + S")),Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Le.createElement("span",null,"F1 / Alt + F1")),Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Le.createElement("span",null,"Ctrl + ]/[")),Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Le.createElement("span",null,"Ctrl + Shift + \\")),Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Le.createElement("span",null,"Home")),Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Le.createElement("span",null,"End"))),oe),!xe&&Le.createElement(Le.Fragment,null,Le.createElement("h3",null,"\u5FEB\u6377\u952E"),Le.createElement("section",null,Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Le.createElement("span",null,le[ae==null?void 0:ae.difficulty])),Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Le.createElement("span",null,re==null?void 0:re.name)),Le.createElement("div",{className:"file-item"},Le.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Le.createElement("span",null,re!=null&&re.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},23206:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return Se}});var ke=Re(59301);function Se(Be,Le){const Ce=(0,ke.useRef)();(0,ke.useEffect)(()=>{Ce.current=Be}),(0,ke.useEffect)(()=>{function xe(){Ce.current()}if(Le!==null){let be=setInterval(xe,Le);return()=>clearInterval(be)}},[Le])}},56431:function(xn,un,Re){"use strict";Re.d(un,{Im:function(){return Ze},ZP:function(){return at},gZ:function(){return gt}});var ke=Re(59301),Se=Re(37568),Be=Re(99571),Le=Re(84105),Ce=Re(87395),xe=Re(85195),be=Re(24334),ye=Re(32984),we=Re(79074),pe=Re(59895),de=Re(87700),ge=Re(34376),fe=Re(92310),ue=Re.n(fe),ee=Re(59301),z=Object.defineProperty,oe=Object.defineProperties,re=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,ve=(_t,ht,Dt)=>ht in _t?z(_t,ht,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):_t[ht]=Dt,Pe=(_t,ht)=>{for(var Dt in ht||(ht={}))le.call(ht,Dt)&&ve(_t,Dt,ht[Dt]);if(ae)for(var Dt of ae(ht))me.call(ht,Dt)&&ve(_t,Dt,ht[Dt]);return _t},Ae=(_t,ht)=>oe(_t,re(ht));const{TextArea:Oe}=Se.default,Ie={visible:!1,tabIndex:"0"},Ze={[xe.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[xe.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[xe.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var qe=(_t=>(_t[_t.SET_VISIBLE=0]="SET_VISIBLE",_t[_t.SET_TABINDEX=1]="SET_TABINDEX",_t))(qe||{});function Je(_t,ht){switch(ht.type){case 0:return Ae(Pe({},_t),{visible:ht.payload});case 1:return Ae(Pe({},_t),{tabIndex:ht.payload});default:throw new Error}}function mt({value:_t,className:ht}){const[Dt,ut]=(0,ke.useState)(!1),ot=(0,ke.useRef)(),ct=(0,ke.useRef)();return(0,ke.useEffect)(()=>{Dt&&(ct.current.reset(),ct.current.write((0,pe.pp)(_t||"")))},[_t,Dt]),(0,ke.useEffect)(()=>{var yt,wt,xt,zt;if(ot.current){ct.current=new ge.Terminal({fontSize:14,disableStdin:!0}),ct.current.open(ot.current);const Ut=ot.current.offsetWidth-14,cn=((zt=(xt=(wt=(yt=ct.current)==null?void 0:yt._core)==null?void 0:wt._renderService)==null?void 0:xt.dimensions)==null?void 0:zt.actualCellWidth)||9.5,jt=Math.ceil(Ut/cn);ct.current.resize(jt,8),ut(!0)}},[]),ee.createElement("div",{ref:ot,className:ue()("XtermText-valueRef",ht)})}function gt(_t){const{status:ht,error_msg:Dt,output:ut,input:ot,expected_output:ct,is_file:yt,input_file_url:wt,output_file_url:xt,expected_output_file_url:zt}=_t;let Ut=null;const cn={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(ht){case xe.h.NOMATCH:Ut=ee.createElement(ee.Fragment,null,ee.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!yt&&ee.createElement(mt,{className:"mb10",value:ot}),yt&&ee.createElement("div",{style:cn},ee.createElement("a",{onClick:()=>(0,pe.LR)(wt,ot)},ot)),ee.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!yt&&ee.createElement(mt,{className:"mb10",value:ut&&be.Base64.decode(ut)||""}),yt&&ee.createElement("div",{style:cn},ee.createElement("a",{onClick:()=>(0,pe.LR)(xt,ut)},ut)),ee.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!yt&&ee.createElement(mt,{className:"mb10",value:ct&&be.Base64.decode(ct)||""}),yt&&ee.createElement("div",{style:cn},ee.createElement("a",{onClick:()=>(0,pe.LR)(zt,ct)},ct)));break;case xe.h.EXECUTEFAILURE:Ut=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yt&&ee.createElement(we.Z,{value:ot,style:cn}),yt&&ee.createElement("div",{style:cn},ee.createElement("a",{onClick:()=>(0,pe.LR)(wt,ot)},ot)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Dt)));break;case xe.h.COMPILEFAILURE:Ut=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!yt&&ee.createElement(we.Z,{value:ot,style:cn}),yt&&ee.createElement("div",{style:cn},ee.createElement("a",{onClick:()=>(0,pe.LR)(wt,ot)},ot)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Dt)));break;case xe.h.PODFAILURE:Ut=ee.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case xe.h.TIMEOUT:Ut=ee.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ee.createElement(ee.Fragment,null," ",Ut," ")}function Mt(_t){const{status:ht,error_msg:Dt,execute_time:ut,output:ot,input:ct,expected_output:yt,is_file:wt,input_file_url:xt,output_file_url:zt,expected_output_file_url:Ut}=_t;let cn=null;switch(ht){case xe.h.OK:cn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",ut,"\u79D2"),ee.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),ee.createElement("pre",null,be.Base64.decode(ot)));break;case xe.h.NOMATCH:cn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u8F93\u5165\uFF1A",ee.createElement("pre",null,ct)),ee.createElement("p",null,"\u8F93\u51FA\uFF1A",ot&&be.Base64.decode(ot)),ee.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",yt&&be.Base64.decode(yt)));break;case xe.h.EXECUTEFAILURE:cn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ee.createElement("pre",null,ct)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Dt)));break;case xe.h.COMPILEFAILURE:cn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ee.createElement("pre",null,ct)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Dt)));break;case xe.h.PODFAILURE:cn=ee.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case xe.h.TIMEOUT:cn=ee.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ee.createElement(ee.Fragment,null," ",cn," ")}var at=({id:_t,is_file:ht,input:Dt,debuging:ut,submitting:ot,executingMessage:ct,debugResult:yt,onChangeInput:wt,onDebugCode:xt,onSubmitCode:zt})=>{const[Ut,cn]=(0,ke.useReducer)(Je,Ie),{visible:jt,tabIndex:mn}=Ut;(0,ke.useEffect)(()=>{cn({type:0,payload:!1})},[_t]);function Ft(Ue){let je=Ue.target.id;cn({type:1,payload:je})}function Yt(){cn({type:0,payload:!jt})}const tn=(0,ke.useMemo)(()=>{if(yt){const{status:Ue}=yt;return ee.createElement(ee.Fragment,null,Mt(yt))}return null},[yt]);function lt(){cn({type:0,payload:!0}),cn({type:1,payload:"1"}),xt()}return ee.createElement("div",{className:"test-case-panel"},ee.createElement("div",{className:`test-case-panel-body ${jt?"active":""}`},ee.createElement("ul",{className:"s-navs"},ee.createElement("li",null,ee.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),ee.createElement(de.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:ee.createElement(Oe,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:ht?"":Dt,onChange:wt}),rightNode:ut?ee.createElement(ye.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):yt?tn:ee.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),ee.createElement("a",{className:`btn-collapse ${jt?"up":""}`,onClick:Yt},jt?ee.createElement(Le.Z,null):ee.createElement(Ce.Z,null)),ee.createElement("footer",{className:"footer"},ee.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),ee.createElement("div",{className:"flex-container"},ee.createElement(Be.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),ee.createElement(Be.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),ee.createElement(Be.ZP,{className:"btn-green",type:"ghost",loading:ut,onClick:lt},"\u8C03\u8BD5\u4EE3\u7801"),ee.createElement(Be.ZP,{type:"primary",className:"custom-ant-disabled",loading:ot,disabled:ot,onClick:()=>{cn({type:0,payload:!1}),zt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},11585:function(xn,un,Re){"use strict";Re.r(un),Re.d(un,{default:function(){return yp}});var ke=Re(59301),Se=Re(10906),Be=Re(76618),Le=Re(71570),Ce=Re(11938),xe=Re(6767),be=Re(62957),ye=Re(29787),we=Re(82326),pe=Re(51258),de=Re(98119),ge=Re(12242),fe=Re(87169),ue=Re(30641),ee=Re(89081),z=Re(52272),oe=Re(78408),re=Re(7188),ae=Re(59301),le=Object.defineProperty,me=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Ie=(Ot,Vt,Jt)=>Vt in Ot?le(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Ze=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))Ae.call(Vt,Jt)&&Ie(Ot,Jt,Vt[Jt]);if(Pe)for(var Jt of Pe(Vt))Oe.call(Vt,Jt)&&Ie(Ot,Jt,Vt[Jt]);return Ot},qe=(Ot,Vt)=>me(Ot,ve(Vt));const Je={theme:(0,oe.G)("cmCodeMode","vs-dark"),fontSize:(0,oe.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,oe.G)("cmTabToSpace",!0)};var mt=(Ot=>(Ot[Ot.set_font_size=0]="set_font_size",Ot[Ot.set_theme=1]="set_theme",Ot[Ot.on_tab_to_space=2]="on_tab_to_space",Ot[Ot.set_show_editor_setting=3]="set_show_editor_setting",Ot))(mt||{});function gt(Ot,Vt){switch(Vt.type){case 3:return qe(Ze({},Ot),{showEditorSetting:Vt.payload});case 1:return qe(Ze({},Ot),{theme:Vt.payload});case 0:return qe(Ze({},Ot),{fontSize:Vt.payload});case 2:return qe(Ze({},Ot),{tabToSpace:Vt.payload});default:throw new Error}}var Mt=({isLoading:Ot,value:Vt,onChange:Jt,language:Wi,onUpdateCode:_i,ActionBarRender:hi=xi=>ae.createElement(at,{onShowCodeSetting:xi})})=>{const[xi,ui]=(0,ke.useReducer)(gt,Je),{theme:Pi,fontSize:$i,showEditorSetting:bo,tabToSpace:Sr}=xi,Go=(0,ke.useRef)(),Ki=(0,ke.useRef)(),Mo={onFontSizeChange:Ko=>{ui({type:0,payload:Ko}),(0,oe.t)("cmFontSize",Ko)},tabToSpace:Sr,cmFontSize:$i,className:"oj",cmCodeMode:Pi,onTabToSpace:Ko=>{ui({type:2,payload:Ko}),(0,oe.t)("cmTabToSpace",Ko)},onCodeModeChange:Ko=>{ui({type:1,payload:Ko}),(0,oe.t)("cmCodeMode",Ko)}};function Xr(){ui({type:3,payload:!1})}function rs(){ui({type:3,payload:!0})}const ho={value:Vt,language:Wi,theme:Pi,height:"calc(100% - 56px)",options:{fontSize:$i,insertSpaces:Sr},onChange:Ko=>{Jt(Ko),Ki.current=Ko,clearTimeout(Go.current),Go.current=setTimeout(()=>{_i(Ki.current)},1e4)},onEditBlur:Ko=>{Ki.current&&_i(Ki.current)}};return ae.createElement(ke.Fragment,null,ae.createElement("div",{className:"code-panel-container"},hi(rs),!Ot&&ae.createElement(ee.ZP,Ze({},ho))),ae.createElement(z.Z,null,ae.createElement(ue.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:bo,onClose:Xr},ae.createElement(re.Z,Ze({},Mo)))))};function at({onShowCodeSetting:Ot}){return ae.createElement("div",{className:"action-bar"},ae.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),ae.createElement("a",{onClick:Ot},ae.createElement("i",{className:"iconfont icon-shezhi"})))}var _t=Re(24334),ht=Re(36610),Dt=Re(56431),ut=Re(37568),ot=Re(28284),ct=Re(99571);const{TextArea:yt}=ut.default,wt=5e3;var xt=({callback:Ot,onCancel:Vt,notes:Jt})=>{function Wi(_i){Ot(_i)}return ke.createElement(ot.default,{className:"note-form-panel",onFinish:Wi,initialValues:{notes:Jt}},ke.createElement(ot.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:wt,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${wt}`}]},ke.createElement(yt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),ke.createElement(ot.default.Item,{style:{textAlign:"right"}},ke.createElement(ct.ZP,{type:"ghost",onClick:Vt,style:{marginRight:10}}," \u53D6\u6D88 "),ke.createElement(ct.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},zt={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},Ut={pagination:"pagination___npPu7",info:"info___aRH6C"},cn=Re(54172),jt=Re(13747),mn=Re(58617),Ft=Re(81953),Yt=Re(85195),tn=Re(59895),lt=Re(61186),Ue=Re.n(lt);const{Column:je}=cn.default;var rt=({submitResult:Ot,submitting:Vt,submitRecords:Jt,page:Wi,onPageChange:_i,topicId:hi})=>{const{status:xi,id:ui,input:Pi,output:$i,expected_output:bo,is_file:Sr,input_file_url:Go,output_file_url:Ki,expected_output_file_url:Mo,error_msg:Xr}=Ot||{},{records:rs,records_count:ho}=Jt||{},Ko=(0,Le.useParams)();function Po(){Sr?navigator.clipboard.writeText(_t.Base64.decode(Xr)).then(()=>{xe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(_t.Base64.decode($i)).then(()=>{xe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return ke.createElement(ye.Z,{spinning:Vt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:ke.createElement(mn.Z,{style:{fontSize:24},spin:!0})},ui?ke.createElement(ke.Fragment,null,ke.createElement("ul",{className:Ut.info},ke.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",ke.createElement("span",{className:xi===Yt.h.OK?"c-green":"c-red"},Dt.Im[xi])),ke.createElement("li",{className:Ut.error},ke.createElement("a",{onClick:Po},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",ke.createElement(Ft.Z,null)," ")),ke.createElement("li",null,ke.createElement(Le.Link,{to:`/problems/${hi}/record-detail/${ui}?backId=${Ko==null?void 0:Ko.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),xi!==Yt.h.OK?ke.createElement(ke.Fragment,null,ke.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),ke.createElement("pre",null,!Sr&&Pi,Sr&&ke.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,tn.LR)(Go,Pi)},Pi)),ke.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),ke.createElement("pre",null,(xi===4||xi===5)&&_t.Base64.decode(Xr),xi!=4&&xi!=5&&(Sr?ke.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,tn.LR)(Ki,$i)},$i):_t.Base64.decode($i))),ke.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),ke.createElement("pre",null,!Sr&&_t.Base64.decode(bo),Sr&&ke.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,tn.LR)(Mo,bo)},bo))):null):null,(rs==null?void 0:rs.length)>0?ke.createElement(cn.default,{dataSource:rs,rowKey:"id",pagination:!1},ke.createElement(je,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Ur,Yo)=>ke.createElement("span",null," ",Ue()(Ur).format("YYYY-MM-DD HH:mm:ss"))}),ke.createElement(je,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(Ur,Yo)=>{var Zi;return ke.createElement(Le.Link,{className:Ur===0?"c-green":"c-red",to:`/problems/${hi}/record-detail/${Yo.id}?backId=${Ko==null?void 0:Ko.save_identifier}`},(Zi=Dt.Im[Ur])==null?void 0:Zi.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),ke.createElement(je,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),ke.createElement(je,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),ke.createElement(je,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,ho>15?ke.createElement(jt.Z,{className:Ut.pagination,current:Wi,pageSize:15,total:ho,onChange:_i}):null)},dt=Re(12635),tt=Re(96599),Ke=Re(77736),De={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},ze=Re(79074),$e=Re(59301);const We={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var Ve=({hack:Ot,onTriggerPraise:Vt,toDiscuss:Jt})=>{const{language:Wi,difficulty:_i,time_limit:hi,username:xi,user_path:ui,user_praise:Pi,comments_count:$i,praises_count:bo,description:Sr,pass_count:Go,submit_count:Ki}=Ot,Mo=(0,Le.useLocation)();console.log(Ot.language,"language");const Xr=We[_i];return $e.createElement($e.Fragment,null,$e.createElement("ul",{className:De.info},$e.createElement("li",null,"\u96BE\u5EA6\uFF1A",$e.createElement(tt.default,{color:Xr==null?void 0:Xr.color},Xr==null?void 0:Xr.name)),$e.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",$e.createElement("b",null,hi,"\u79D2"))),$e.createElement(ze.Z,{value:Sr,className:De.desc}),$e.createElement("ul",{className:De["commit-info"]},$e.createElement("li",null,$e.createElement(Ke.Z,{size:4},$e.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",$e.createElement("b",null,Go))),$e.createElement("li",null,$e.createElement(Ke.Z,{size:4},$e.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",$e.createElement("b",null,Ki))," "),$e.createElement("li",{style:{flex:"1 0 0"}}),$e.createElement("li",null,$e.createElement(Ke.Z,{size:4},$e.createElement("i",{className:"iconfont icon-huifu1",onClick:Jt})," ",$e.createElement("b",null,$i))," ")))},pt=Re(16448),Lt=Object.defineProperty,on=Object.getOwnPropertySymbols,Xt=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,fn=(Ot,Vt,Jt)=>Vt in Ot?Lt(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,En=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))Xt.call(Vt,Jt)&&fn(Ot,Jt,Vt[Jt]);if(on)for(var Jt of on(Vt))Rt.call(Vt,Jt)&&fn(Ot,Jt,Vt[Jt]);return Ot};const Sn=Ot=>React.createElement("svg",En({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u5C55\u5F00\u9898\u76EE"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"100%",id:"show_svg__a"},React.createElement("stop",{stopColor:"#EEF7FF",offset:"0%"}),React.createElement("stop",{stopColor:"#C1E2FF",offset:"100%"}))),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"url(#show_svg__a)",width:40,height:40,rx:8}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M16.057 20.784H8.238A1.22 1.22 0 0 0 7 21.974v6.811a1.22 1.22 0 0 0 1.238 1.19h7.819a1.213 1.213 0 0 0 1.238-1.19v-6.811a1.213 1.213 0 0 0-.376-.847 1.203 1.203 0 0 0-.862-.332v-.01Zm-1.25 6.769H9.423V23.12h5.384v4.433Z",fill:"#4CACFF"}),React.createElement("path",{d:"M16.057 10.005a1.22 1.22 0 0 1 1.238 1.189v6.812a1.213 1.213 0 0 1-.376.846c-.232.222-.542.34-.862.332H8.238A1.213 1.213 0 0 1 7 18.005v-6.811a1.22 1.22 0 0 1 1.238-1.19Zm-1.239 2.41H9.434v4.401h5.384v-4.4Z",fill:"#94CDFF"}),React.createElement("path",{d:"M20.418 12.632h11.189a1.213 1.213 0 0 0 1.238-1.179 1.224 1.224 0 0 0-.371-.857 1.214 1.214 0 0 0-.867-.343H20.418a1.203 1.203 0 0 0-.866.336c-.233.223-.367.53-.372.854.005.323.14.63.372.854.232.223.544.344.866.335ZM31.575 16.027h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 21.595h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 27.163h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557Z",fill:"#1890FF"}))));var dn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Zn=Re(24092);function vn(Ot){return(0,Zn.U2)("comments.json",Ot)}function Wn(Ot){return(0,Zn.v_)(`/discusses/${Ot}/plus.json`,{container_type:"Discuss",type:1})}function ri(Ot){return(0,Zn.v_)("comments/reply.json",Ot)}function Ni(Ot){return(0,Zn.v_)("comments.json",Ot)}function Qn(Ot){return(0,Zn.v_)(`comments/${Ot==null?void 0:Ot.id}/hidden.json`,Ot)}function ki(Ot){return(0,Zn.IV)(`comments/${Ot==null?void 0:Ot.id}.json`)}var Hi=Re(45382),Gi=Re(69669);function qi({author:Ot}){return ke.createElement("a",{href:`/users/${Ot.login}`,target:"_blank"},ke.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ge.Z.IMG_SERVER}/images/${Ot.image_url}`,width:"50"}))}function Pr({data:Ot,index:Vt,parentDiscussIndex:Jt,user:Wi,onSetActionType:_i}){const{author:hi,can_delete:xi,content:ui,id:Pi,time:$i}=Ot;function bo(){_i({id:Pi,index:Vt,type:"delete-discuss",parentDiscussIndex:Jt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Sr=Wi.admin||xi||hi.user_id===Wi.user_id;return ke.createElement("div",{className:"discuss-item-container second-discuss "},ke.createElement(qi,{author:hi}),ke.createElement("section",null,ke.createElement("div",{className:"discuss-info"},ke.createElement("a",{href:`/users/${hi.login}`,target:"_blank"},hi.name),ke.createElement("span",{className:"grey"},$i),ke.createElement("div",{className:"btn-group",style:{marginBottom:0}},Sr?ke.createElement("a",{onClick:bo,title:"\u5220\u9664"},ke.createElement("i",{className:"iconfont icon-shanchu"})):null)),ke.createElement(ze.Z,{className:"discuss-content",value:ui})))}var gr=({user:Ot,data:Vt,index:Jt,onPlusDiscuss:Wi,onSetActionType:_i,activeDiscussIndex:hi,onReplyDiscuss:xi,onSetActiveDiscussIndex:ui})=>{const{content:Pi,children:$i,hidden:bo,id:Sr,praise_count:Go,time:Ki,user_praise:Mo,can_delete:Xr,author:rs}=Vt;console.log(Xr&&(!$i||$i.length==0),"children22");function ho(){ui(Sr)}function Ko(){Wi(Sr,!Mo,Jt)}function Po(){_i({id:Sr,index:Jt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Ur(){_i({id:Sr,index:Jt,params:{hidden:bo?"0":"1"},type:"hidden-discuss",message:bo?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Yo=Ot.admin||Ot.user_id===rs.user_id;return ke.createElement("div",{className:"discuss-item-container",key:Sr},ke.createElement(qi,{author:rs}),ke.createElement("section",null,ke.createElement("div",{className:"discuss-info"},ke.createElement("a",{href:`/users/${rs.login}`,target:"_blank"}," ",rs.name," "),ke.createElement("span",{className:"grey"},Ki)),ke.createElement(ze.Z,{className:"discuss-content",value:Pi}),$i&&$i.length>0?ke.createElement("div",{className:"reply-discuss-container"},$i.map((Zi,ts)=>ke.createElement(Pr,{key:Zi.id,data:Zi,index:ts,user:Ot,onSetActionType:_i,parentDiscussIndex:Jt}))):null,ke.createElement("div",{className:"btn-group"},(0,Gi.Ny)()?ke.createElement("a",{onClick:Ur,title:bo?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},ke.createElement("i",{className:bo?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Xr&&(!$i||$i.length==0)?ke.createElement("a",{onClick:Po,title:"\u5220\u9664"},ke.createElement("i",{className:"iconfont icon-shanchu"})):null,ke.createElement("a",{onClick:ho,title:"\u56DE\u590D"}," ",ke.createElement("i",{className:"iconfont icon-huifu1"})," "),ke.createElement("a",{onClick:Ko,className:Mo?"c-orange":""},ke.createElement("i",{className:Mo?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),ke.createElement("span",null,Go||""))),ke.createElement(Hi.Z,{id:Sr,activeDiscussIndex:hi,onReplyDiscuss:xi})))},Ri=Re(67776),Vi=Re(19565),sr=(Ot,Vt,Jt)=>new Promise((Wi,_i)=>{var hi=Pi=>{try{ui(Jt.next(Pi))}catch($i){_i($i)}},xi=Pi=>{try{ui(Jt.throw(Pi))}catch($i){_i($i)}},ui=Pi=>Pi.done?Wi(Pi.value):Promise.resolve(Pi.value).then(hi,xi);ui((Jt=Jt.apply(Ot,Vt)).next())}),Qe=({user_praise:Ot,praise_count:Vt,praisePlus:Jt,onCreateDiscuss:Wi,discuss_count:_i})=>{const[hi,xi]=(0,ke.useState)(!1),[ui,Pi]=(0,ke.useState)("");function $i(Ki){Pi(Ki)}function bo(){xi(!0)}function Sr(){xi(!1)}function Go(){return sr(this,null,function*(){Wi(ui),Pi(""),xi(!1)})}return ke.createElement("div",{className:`dis-input-editor-container ${hi?"active":""} `},ke.createElement("div",{className:hi?"text-area hide":"text-area"},ke.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:bo}),ke.createElement("a",{style:{alignItems:"center"}}," ",ke.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",_i," "),ke.createElement("a",{className:"c-light-black",onClick:Jt,style:{alignItems:"center"},title:Ot?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},ke.createElement("i",{className:`mr3 ${Ot?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),Vt?ke.createElement("span",null,Vt):"")),hi?ke.createElement("div",{className:"input-mask",onClick:Sr}):null,ke.createElement("div",{className:hi?"md-container":"md-container hide"},ke.createElement(Vi.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:ui,height:240,onChange:$i}),ke.createElement("div",{className:"tip-container",onClick:Sr},ke.createElement("a",{className:"btn-send",onClick:Go}," \u53D1\u9001 "))))},Ti=Object.defineProperty,ei=Object.defineProperties,Ii=Object.getOwnPropertyDescriptors,mr=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,po=(Ot,Vt,Jt)=>Vt in Ot?Ti(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Vn=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))cr.call(Vt,Jt)&&po(Ot,Jt,Vt[Jt]);if(mr)for(var Jt of mr(Vt))ir.call(Vt,Jt)&&po(Ot,Jt,Vt[Jt]);return Ot},He=(Ot,Vt)=>ei(Ot,Ii(Vt)),Xe=(Ot,Vt,Jt)=>new Promise((Wi,_i)=>{var hi=Pi=>{try{ui(Jt.next(Pi))}catch($i){_i($i)}},xi=Pi=>{try{ui(Jt.throw(Pi))}catch($i){_i($i)}},ui=Pi=>Pi.done?Wi(Pi.value):Promise.resolve(Pi.value).then(hi,xi);ui((Jt=Jt.apply(Ot,Vt)).next())});const nt={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var bt=(Ot=>(Ot[Ot.GET_DISCUSSES=0]="GET_DISCUSSES",Ot[Ot.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",Ot[Ot.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",Ot[Ot.PLUS_DISCUSS=3]="PLUS_DISCUSS",Ot[Ot.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",Ot[Ot.SET_PAGE=5]="SET_PAGE",Ot[Ot.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",Ot))(bt||{});function Nt(Ot,Vt){switch(Vt.type){case 6:return He(Vn({},Ot),{loading:!0});case 0:return Vn(Vn({},Ot),Vt.payload);case 1:return Vn(Vn({},Ot),Vt.payload);case 4:return Vn(Vn({},Ot),Vt.payload);case 3:return Vn(Vn({},Ot),Vt.payload);case 5:return Vn(Vn({},Ot),Vt.payload);case 2:return Vn(Vn({},Ot),Vt.payload);default:throw new Error}}var sn=({user:Ot,identifier:Vt,hack:Jt,onTriggerPraise:Wi,setDiscussTotal:_i})=>{const[hi,xi]=(0,ke.useReducer)(Nt,nt),{loading:ui,page:Pi,data:$i,count:bo,actionType:Sr,activeDiscussIndex:Go}=hi;console.log("---",hi);const Ki=(0,ke.useCallback)(()=>Xe(void 0,null,function*(){xi({type:6});const Zi=yield vn({container_type:"Practice",container_identifier:Vt,limit:10,page:Pi}),{comments:ts,disscuss_count:vo}=Zi;xi({type:0,payload:{data:ts,count:vo,loading:!1}}),_i(vo)}),[Pi,Vt]);(0,ke.useEffect)(()=>{Ki()},[Vt,Pi]);function Mo(Zi){xi({type:5,payload:{page:Zi}})}function Xr(Zi){xi({type:4,payload:{actionType:Zi}})}function rs(Zi){xi(Go===Zi?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:Zi}})}function ho(Zi,ts,vo){return Xe(this,null,function*(){try{const Do=yield Wn(Zi);$i[vo].user_praise=ts,$i[vo].praise_count=Do.praise_count,xi({type:3,payload:{data:[...$i]}})}catch(Do){console.log(Do)}})}function Ko(){return Xe(this,null,function*(){const{id:Zi,params:ts,type:vo,index:Do,parentDiscussIndex:Ks}=Sr;vo==="hidden-discuss"&&(console.log(ts,"params"),yield Qn(Vn({id:Zi,container_type:"Practice",container_identifier:Vt},ts)),Ks?$i[Ks].children[Do].hidden=ts.hidden==1:$i[Do].hidden=ts.hidden==1,xi({type:4,payload:{actionType:null,data:[...$i]}})),vo==="delete-discuss"&&(yield ki({id:Zi,container_type:"Practice",container_identifier:Vt}),xi({type:4,payload:{actionType:null}}),yield Ki())})}function Po(){xi({type:4,payload:{actionType:null}})}function Ur(Zi,ts){return Xe(this,null,function*(){try{yield ri({container_type:"Practice",container_identifier:Vt,comments:{content:ts,parent_id:Zi}}),Ki()}catch(vo){console.log(vo)}})}function Yo(Zi){return Xe(this,null,function*(){xi({type:6}),yield Ni({comments:{content:Zi},container_type:"Practice",container_identifier:Vt}),Ki()})}return ke.createElement(ke.Fragment,null,ke.createElement("div",{className:"discuss-panel"},$i.length===0?ke.createElement(dt.Z,null):ke.createElement(ye.Z,{spinning:ui},$i.map((Zi,ts)=>ke.createElement(gr,{onReplyDiscuss:Ur,onPlusDiscuss:ho,onSetActiveDiscussIndex:rs,onSetActionType:Xr,data:Zi,index:ts,user:Ot,activeDiscussIndex:Go}))),bo>10?ke.createElement("div",{className:"pagination-container mt10 mb10"},ke.createElement(jt.Z,{showQuickJumper:!0,onChange:Mo,current:Pi,total:bo,showTotal:Zi=>ke.createElement("span",{style:{color:"#656F87"}},"\u5171",ke.createElement("span",{className:"c-light-primary"},Zi),"\u6761\u6570\u636E")})):null),ke.createElement(Qe,{user_praise:Jt.user_praise,praise_count:Jt.praises_count,praisePlus:Wi,discuss_count:Jt.comments_count,onCreateDiscuss:Yo}),ke.createElement(z.Z,null,ke.createElement(be.default,{centered:!0,title:"\u63D0\u793A",open:!!Sr,onOk:Ko,onCancel:Po},ke.createElement("p",null,Sr?Sr.message:"")),ke.createElement(Ri.Z,null)))},Zt={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},_n={flex_box_center:"flex_box_center___EahWI",flex_space_between:"flex_space_between___zopS4",flex_box_vertical_center:"flex_box_vertical_center___w03mz",flex_box_center_end:"flex_box_center_end___lr0Fp",flex_box_column:"flex_box_column___KFHVi",active:"active___BczOO",line:"line___VC_Ry",list:"list___n9ABd",left:"left___LVHqw",mask:"mask___fP13z",right:"right___iLe52",name:"name___Oz_7h",title:"title___2Sess",a:"a___t7rIW",b:"b___Kb_45",des:"des___CjMBM",tag:"tag___V0PVb"},Kt=Object.defineProperty,qt=Object.getOwnPropertySymbols,Hn=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,ln=(Ot,Vt,Jt)=>Vt in Ot?Kt(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,An=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))Hn.call(Vt,Jt)&&ln(Ot,Jt,Vt[Jt]);if(qt)for(var Jt of qt(Vt))kt.call(Vt,Jt)&&ln(Ot,Jt,Vt[Jt]);return Ot};const jn=Ot=>React.createElement("svg",An({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u89C2\u770B"),React.createElement("path",{d:"M11 0a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h10ZM4.4 2.4a.4.4 0 0 0-.4.4v4.4a.4.4 0 0 0 .64.32l2.72-2.04a.6.6 0 0 0 0-.96L4.64 2.48a.4.4 0 0 0-.24-.08Z",fill:"#FFF",fillRule:"evenodd"}));var Qt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",rn=Object.defineProperty,Pn=Object.getOwnPropertySymbols,Dn=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,ai=(Ot,Vt,Jt)=>Vt in Ot?rn(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Gn=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))Dn.call(Vt,Jt)&&ai(Ot,Jt,Vt[Jt]);if(Pn)for(var Jt of Pn(Vt))oi.call(Vt,Jt)&&ai(Ot,Jt,Vt[Jt]);return Ot};const Bn=Ot=>React.createElement("svg",Gn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var bi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Ei=Object.defineProperty,Di=Object.getOwnPropertySymbols,yn=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable,ur=(Ot,Vt,Jt)=>Vt in Ot?Ei(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,wr=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))yn.call(Vt,Jt)&&ur(Ot,Jt,Vt[Jt]);if(Di)for(var Jt of Di(Vt))Tr.call(Vt,Jt)&&ur(Ot,Jt,Vt[Jt]);return Ot};const pn=Ot=>React.createElement("svg",wr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var $n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",yi=Object.defineProperty,Mi=Object.getOwnPropertySymbols,mi=Object.prototype.hasOwnProperty,Li=Object.prototype.propertyIsEnumerable,dr=(Ot,Vt,Jt)=>Vt in Ot?yi(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,ar=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))mi.call(Vt,Jt)&&dr(Ot,Jt,Vt[Jt]);if(Mi)for(var Jt of Mi(Vt))Li.call(Vt,Jt)&&dr(Ot,Jt,Vt[Jt]);return Ot};const vr=Ot=>React.createElement("svg",ar({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var Cr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Ln=Object.defineProperty,Yr=Object.getOwnPropertySymbols,Mn=Object.prototype.hasOwnProperty,Ai=Object.prototype.propertyIsEnumerable,zi=(Ot,Vt,Jt)=>Vt in Ot?Ln(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Xi=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))Mn.call(Vt,Jt)&&zi(Ot,Jt,Vt[Jt]);if(Yr)for(var Jt of Yr(Vt))Ai.call(Vt,Jt)&&zi(Ot,Jt,Vt[Jt]);return Ot};const lo=Ot=>React.createElement("svg",Xi({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var oo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",uo=({style:Ot={},onClick:Vt,onAssist:Jt,onHide:Wi,data:_i,active:hi,showLine:xi})=>ke.createElement(ke.Fragment,null,ke.createElement("div",{className:hi===(_i==null?void 0:_i.id)?`${_n.list} ${_n.active}`:_n.list,style:Ot,onClick:()=>Vt(_i)},(_i==null?void 0:_i.video)&&ke.createElement("div",{className:_n.left},ke.createElement("img",{src:_i==null?void 0:_i.video_cover}),ke.createElement("div",null,ke.createElement("img",{src:Qt}),ke.createElement("span",null,_i==null?void 0:_i.video_duration)),ke.createElement("div",{className:_n.mask})),ke.createElement("div",{className:_n.right},ke.createElement("div",{className:_n.name},ke.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+(_i==null?void 0:_i.image_url),width:30,height:30}),ke.createElement("div",{title:_i==null?void 0:_i.name,className:_n.title},_i==null?void 0:_i.name),(_i==null?void 0:_i.is_authority)&&ke.createElement("div",{className:_n.b},"\u5B98\u65B9"),(_i==null?void 0:_i.is_excellent)&&ke.createElement("div",{className:_n.a},"\u7CBE\u9009")),ke.createElement("div",{className:_n.des},ke.createElement(ze.Z,{showLines:2,showTextOnly:!0,value:(_i==null?void 0:_i.content)||"\u6682\u65E0\u5185\u5BB9"})),ke.createElement("div",{className:_n.tag},ke.createElement("span",{className:"current",onClick:ui=>{ui.stopPropagation(),Jt(_i)}},ke.createElement("img",{src:_i!=null&&_i.user_liker?$n:bi}),ke.createElement("span",{style:{color:_i!=null&&_i.user_liker?"#0152d9":"#656f87"}},_i==null?void 0:_i.praises_count)),ke.createElement("span",null,ke.createElement("img",{src:Cr}),ke.createElement("span",null,_i==null?void 0:_i.discusses_count)),ke.createElement("span",null,ke.createElement("img",{src:oo}),ke.createElement("span",null,_i==null?void 0:_i.viewed_count)),(0,Gi.Ny)()&&ke.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:ui=>{ui.stopPropagation(),Wi(_i)}},_i!=null&&_i.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),xi&&ke.createElement("div",{className:_n.line})),an={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},kn=Re(25399),hn=Re(85470),ft=Object.defineProperty,Yn=Object.getOwnPropertySymbols,Un=Object.prototype.hasOwnProperty,ni=Object.prototype.propertyIsEnumerable,li=(Ot,Vt,Jt)=>Vt in Ot?ft(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,vi=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))Un.call(Vt,Jt)&&li(Ot,Jt,Vt[Jt]);if(Yn)for(var Jt of Yn(Vt))ni.call(Vt,Jt)&&li(Ot,Jt,Vt[Jt]);return Ot};const On=Ot=>React.createElement("svg",vi({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u4E0A\u4F20\u89C6\u9891"),React.createElement("path",{d:"M1.6 0C1.175 0 .768.17.468.474A1.63 1.63 0 0 0 0 1.622v3.243h3.237L7.378 0H1.6Zm7.876 0L5.338 4.865h5.9L15.371 0H9.476Zm7.998 0-4.137 4.865h5.896L23.372 0h-5.898Zm8 0-4.138 4.865h6.66V1.622a1.629 1.629 0 0 0-.467-1.148A1.585 1.585 0 0 0 26.397 0h-.924ZM0 6.487v17.837c0 .43.167.844.468 1.148.3.305.707.475 1.132.474h18.61a6.515 6.515 0 0 1 1.652-6.218 6.31 6.31 0 0 1 6.134-1.675V6.487H0Zm11.998 5.675 6.4 4.056-6.4 4.055v-8.11Zm14.399 6.487c-3.092.002-5.597 2.544-5.595 5.678.001 3.134 2.508 5.674 5.6 5.673C29.494 30 32 27.458 32 24.324c0-1.506-.59-2.95-1.641-4.014a5.561 5.561 0 0 0-3.962-1.661Zm0 2.027c.22.003.428.1.574.266.663.6 1.327 1.352 1.99 2.002a.8.8 0 0 1 0 1.14.788.788 0 0 1-1.125 0l-.638-.646v3.724a.814.814 0 0 1-.392.724.79.79 0 0 1-.815 0 .814.814 0 0 1-.392-.724v-3.724l-.637.646a.79.79 0 0 1-.773.215.803.803 0 0 1-.567-.575.816.816 0 0 1 .212-.783c.651-.664 1.333-1.388 1.99-2.002a.778.778 0 0 1 .575-.266l-.002.003Z",fill:"#0152d9",fillRule:"nonzero"}));var Jn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",qn=Object.defineProperty,ti=Object.getOwnPropertySymbols,ii=Object.prototype.hasOwnProperty,Fi=Object.prototype.propertyIsEnumerable,Si=(Ot,Vt,Jt)=>Vt in Ot?qn(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,di=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))ii.call(Vt,Jt)&&Si(Ot,Jt,Vt[Jt]);if(ti)for(var Jt of ti(Vt))Fi.call(Vt,Jt)&&Si(Ot,Jt,Vt[Jt]);return Ot};const Cn=Ot=>React.createElement("svg",di({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u4E0A\u4F20\u6210\u529F"),React.createElement("path",{d:"M15 0c8.285 0 15 6.717 15 15 0 8.285-6.715 15-15 15-8.283 0-15-6.715-15-15C0 6.717 6.717 0 15 0Zm10.041 7.5v.01a47.934 47.934 0 0 0-11.232 9.386l-4.372-3.3v-.002L7.5 15.08l7.553 7.42A44.625 44.625 0 0 1 25.5 8.55l-.459-1.05Z",fill:"#44D7B6",fillRule:"nonzero"}));var pi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Ui=Object.defineProperty,xr=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable,Ar=(Ot,Vt,Jt)=>Vt in Ot?Ui(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Lr=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))pr.call(Vt,Jt)&&Ar(Ot,Jt,Vt[Jt]);if(xr)for(var Jt of xr(Vt))Er.call(Vt,Jt)&&Ar(Ot,Jt,Vt[Jt]);return Ot};const co=Ot=>React.createElement("svg",Lr({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},Ot),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var so="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",es=Object.defineProperty,nn=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,rr=(Ot,Vt,Jt)=>Vt in Ot?es(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Mr=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))Fr.call(Vt,Jt)&&rr(Ot,Jt,Vt[Jt]);if(nn)for(var Jt of nn(Vt))Vr.call(Vt,Jt)&&rr(Ot,Jt,Vt[Jt]);return Ot},tr=(Ot,Vt,Jt)=>new Promise((Wi,_i)=>{var hi=Pi=>{try{ui(Jt.next(Pi))}catch($i){_i($i)}},xi=Pi=>{try{ui(Jt.throw(Pi))}catch($i){_i($i)}},ui=Pi=>Pi.done?Wi(Pi.value):Promise.resolve(Pi.value).then(hi,xi);ui((Jt=Jt.apply(Ot,Vt)).next())});const Oo=(Ot,Vt)=>{var Jt,Wi,_i;const{uploadInfo:hi={}}=Vt.payload;switch(Vt.type){case"addVideo":return{videoList:[...Ot.videoList,{name:hi.file.name,size:hi.file.size,type:hi.file.type,fileHash:hi.fileHash,state:hi.state,video_id:hi.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:Ot.videoList.filter(xi=>xi.name!==Vt.payload.name)};case"replaceVideo":return{videoList:Vt.payload};case"removeAll":return[];case"updateProgress":return{videoList:Ot.videoList.map(xi=>xi.name===Vt.payload.uploadInfo.file.name?Mr(Mr({},xi),{loaded:Vt.payload.progressPercent,video_id:hi.videoId,fileHash:hi.fileHash}):xi)};case"updateTitle":return{videoList:(Jt=Ot.videoList)==null?void 0:Jt.map(xi=>xi.name===Vt.payload.item.name?Mr(Mr({},xi),{title:Vt.payload.title}):xi)};case"updateImg":return{videoList:(Wi=Ot.videoList)==null?void 0:Wi.map(xi=>xi.name===Vt.payload.item.name?Mr(Mr({},xi),{attachment_id:Vt.payload.attachment_id}):xi)};case"updateImg":return{videoList:(_i=Ot.videoList)==null?void 0:_i.map(xi=>xi.name===Vt.payload.item.name?Mr(Mr({},xi),{attachment_id:Vt.payload.attachment_id}):xi)};default:return[]}};var Br=({onClose:Ot,onOk:Vt,identifier:Jt,active:Wi})=>{var _i,hi;const[xi]=ot.default.useForm(),[ui,Pi]=(0,ke.useState)({}),[$i,bo]=(0,ke.useState)(!1),[Sr,Go]=(0,ke.useState)(!1),[Ki,Mo]=(0,ke.useReducer)(Oo,{videoList:[]}),Xr=(0,Gi.eY)(),rs=(0,Le.useParams)(),ho=(0,ke.useRef)();(0,ke.useEffect)(()=>{Wi&&Ko()},[Wi]);const Ko=()=>tr(void 0,null,function*(){var Jr,Uo,Zr,Aa,Ys,il,Lu,ro,Mu,So;const Qo=yield(0,pe.M3)(Jt,{active:Wi});if((Qo==null?void 0:Qo.status)===0){const Rs={name:(Jr=Qo==null?void 0:Qo.data)==null?void 0:Jr.name,content:(Uo=Qo==null?void 0:Qo.data)==null?void 0:Uo.content};xi.setFieldsValue(Rs),Pi(Rs),(Aa=(Zr=Qo==null?void 0:Qo.data)==null?void 0:Zr.videos)!=null&&Aa[0]&&Mo({type:"replaceVideo",payload:[{video_id:(Lu=(il=(Ys=Qo==null?void 0:Qo.data)==null?void 0:Ys.videos)==null?void 0:il[0])==null?void 0:Lu.video_id,name:(So=(Mu=(ro=Qo==null?void 0:Qo.data)==null?void 0:ro.videos)==null?void 0:Mu[0])==null?void 0:So.title,loaded:100}]})}}),Po=(Jr,Uo)=>{Pi(Mr({},Uo))},Ur=Jr=>tr(void 0,null,function*(){const Uo={videos:Ki.videoList,articles:Jr};Go(!0);let Zr;Wi?(Uo.active=Wi,Zr=yield(0,pe.gu)(Jt,Uo)):Zr=yield(0,pe.bx)(Jt,Uo),(Zr==null?void 0:Zr.status)===0&&(console.log(Wi||(Zr==null?void 0:Zr.id),44),Vt(Wi||(Zr==null?void 0:Zr.id))),Go(!1)}),Yo=()=>{const Jr=document.getElementById("fileUpload");Jr.value=""},Zi=Jr=>{var Uo='{"Vod":{}}';if(bo(!0),ho.current){ho.current.addFile(Jr,null,null,null,Uo);return}(0,hn.o)(Xr==null?void 0:Xr.login,"",{create:!ho,addFileSuccess:Zr=>{Mo({type:"addVideo",payload:{uploadInfo:Zr}})},onUploadProgress:(Zr,Aa,Ys)=>{const il=Math.ceil(Ys*100);Mo({type:"updateProgress",payload:{uploadInfo:Zr,progressPercent:il}}),Yo()},onUploadFailed:Zr=>{xe.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:Zr=>{bo(!1)},onUploadSucceed:Zr=>{bo(!1)},onUploadError:Zr=>{bo(!1)},gotUploader:Zr=>{Zr.addFile(Jr,null,null,null,Uo),ho.current=Zr}})},ts=Jr=>{var Uo;const Aa=Jr.target.files[0];if(!Aa){Yo();return}let Ys=Aa.name.toLowerCase();if(Ys&&Ys.indexOf(".avi")==-1&&Ys.indexOf(".flv")==-1&&Ys.indexOf(".f4v")==-1&&Ys.indexOf(".m4v")==-1&&Ys.indexOf(".mov")==-1&&Ys.indexOf(".mp4")==-1&&Ys.indexOf(".rmvb")==-1&&Ys.indexOf(".swf")==-1&&Ys.indexOf(".webm")==-1&&Ys.indexOf(".wmv")==-1){xe.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Yo();return}if(Aa.size>1024*1024*1024){xe.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),Yo();return}if((Uo=Ki.videoList)!=null&&Uo.find(il=>il.name===Aa.name)){xe.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),Yo();return}Zi(Aa)},vo=(Jr,Uo)=>{be.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:ke.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",Uo?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{Yo(),Mo({type:"removeVideo",payload:{name:Jr}})}})},Do=()=>ke.createElement("label",{htmlFor:"fileUpload",className:an.main},ke.createElement("img",{src:Jn,alt:""}),ke.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Ks=Jr=>ke.createElement("div",{className:an.mainLoading},ke.createElement("div",{className:an.proWarp},ke.createElement("div",{className:an.pro},ke.createElement("div",{style:{width:Jr}})),ke.createElement("span",null,Jr||0,"%")),ke.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),ke.createElement("div",{className:an.tip},ke.createElement(kn.Z,{getPopupContainer:Uo=>Uo.parentNode,title:ke.createElement("div",null,ke.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",ke.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),ke.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),ke.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},ke.createElement("img",{src:so,alt:""})))),fr=Jr=>ke.createElement("div",{className:an.mainSucceed},ke.createElement("img",{src:pi,alt:""}),ke.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),ke.createElement("div",{className:an.tip},ke.createElement(kn.Z,{getPopupContainer:Uo=>Uo.parentNode,title:ke.createElement("div",null,ke.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",ke.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),ke.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),ke.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},ke.createElement("img",{src:so,alt:""}))),ke.createElement("div",{className:an.del,onClick:()=>vo(Jr.name,Jr.loaded==100)},ke.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),Fo=()=>{var Jr;return ke.createElement(ke.Fragment,null,(Jr=Ki.videoList)==null?void 0:Jr.map((Uo,Zr)=>ke.createElement(ke.Fragment,{key:Zr},Uo.loaded==100?fr(Uo):Ks(Uo.loaded))))},Co=()=>{be.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:Ot})},Or=(_i=Ki.videoList)==null?void 0:_i.length;return ke.createElement("div",{className:an.listForm},ke.createElement("header",null,Wi?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),ke.createElement("section",{className:an.scroll,id:"sss"},ke.createElement("div",{className:an.formWrap}," ",ke.createElement(ot.default,{form:xi,scrollToFirstError:!0,layout:"vertical",onValuesChange:Po,onFinish:Ur},ke.createElement(ot.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},ke.createElement(ut.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((hi=ui.name)==null?void 0:hi.length)||0}/60`})),ke.createElement(ot.default.Item,{name:"content",label:"\u5185\u5BB9:"},ke.createElement(Vi.Z,{defaultValue:ui.content||"",watch:!0})))),ke.createElement("div",{className:an.upload},Or?Fo():Do(),ke.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:ts,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),ke.createElement("div",{className:an.btns},ke.createElement(ct.ZP,{onClick:Co,type:"primary",ghost:!0},"\u5173\u95ED"),ke.createElement(ct.ZP,{loading:Sr,disabled:$i,onClick:()=>xi.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Qr={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},$s=Re(458),us=Object.defineProperty,ha=Object.getOwnPropertySymbols,ea=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,To=(Ot,Vt,Jt)=>Vt in Ot?us(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,as=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))ea.call(Vt,Jt)&&To(Ot,Jt,Vt[Jt]);if(ha)for(var Jt of ha(Vt))Qi.call(Vt,Jt)&&To(Ot,Jt,Vt[Jt]);return Ot};const Os=Ot=>React.createElement("svg",as({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},Ot),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var Hr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",zr=Object.defineProperty,zn=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,Gr=Object.prototype.propertyIsEnumerable,Zo=(Ot,Vt,Jt)=>Vt in Ot?zr(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,aa=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))or.call(Vt,Jt)&&Zo(Ot,Jt,Vt[Jt]);if(zn)for(var Jt of zn(Vt))Gr.call(Vt,Jt)&&Zo(Ot,Jt,Vt[Jt]);return Ot};const Vs=Ot=>React.createElement("svg",aa({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},Ot),React.createElement("defs",null,React.createElement("path",{id:"gf_svg__a",d:"m8 0 1.857 1.073h2.146l1.071 1.854L14.931 4v2.144L16 8l-1.069 1.857V12l-1.858 1.072-1.071 1.856H9.857L8 16l-1.855-1.073H4l-1.072-1.856L1.072 12V9.857L0 8l1.072-1.856V4l1.857-1.073 1.072-1.854h2.145L8 0Zm2.91 6.385H4.796V12h1.246v-.451h4.026v.435h1.247V9.196H6.043v-.515h4.866V6.385Zm-.84 3.681v.613H6.042v-.613h4.026ZM9.705 7.24v.588H6.043v-.588h3.663ZM8.615 4l-1.48.137c.055.133.12.284.192.453l.076.175H4v1.426h1.195v-.483h5.61v.483H12V4.765H8.883c-.078-.23-.148-.43-.21-.602L8.616 4Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"gf_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#gf_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#gf_svg__a"}),React.createElement("circle",{cx:.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"}),React.createElement("circle",{cx:-.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"})));var _r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",Es=Object.defineProperty,xs=Object.getOwnPropertySymbols,fs=Object.prototype.hasOwnProperty,jo=Object.prototype.propertyIsEnumerable,ta=(Ot,Vt,Jt)=>Vt in Ot?Es(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Pa=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))fs.call(Vt,Jt)&&ta(Ot,Jt,Vt[Jt]);if(xs)for(var Jt of xs(Vt))jo.call(Vt,Jt)&&ta(Ot,Jt,Vt[Jt]);return Ot};const Xo=Ot=>React.createElement("svg",Pa({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},Ot),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var Sa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Wa={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},xu=Re(77019),hs=Re(5269),tl={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},zu=(Ot,Vt,Jt)=>new Promise((Wi,_i)=>{var hi=Pi=>{try{ui(Jt.next(Pi))}catch($i){_i($i)}},xi=Pi=>{try{ui(Jt.throw(Pi))}catch($i){_i($i)}},ui=Pi=>Pi.done?Wi(Pi.value):Promise.resolve(Pi.value).then(hi,xi);ui((Jt=Jt.apply(Ot,Vt)).next())});const wu=({id:Ot,cb:Vt})=>{const[Jt,Wi]=(0,ke.useState)("");return ke.createElement("aside",{className:"mt10"},ke.createElement(Vi.Z,{defaultValue:Jt,id:"writeForumsReviewId",onChange:_i=>{Wi(_i)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ke.createElement(xu.Z,null,ke.createElement(hs.Z,{flex:"1"}),ke.createElement(hs.Z,null,ke.createElement(ct.ZP,{type:"primary",size:"middle",onClick:()=>zu(void 0,null,function*(){Jt===""?xe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Vt(Ot,Jt)})},"\u53D1\u9001"))))},Tl=({data:Ot})=>{var Vt;return ke.createElement("div",{className:tl.thirdlyLevelDiscuss},ke.createElement("span",{className:"c-grey-333"},ke.createElement("span",{className:"font 14 c-light-primary"},(Vt=Ot==null?void 0:Ot.author)==null?void 0:Vt.name),"@",ke.createElement("span",{className:"font 14 c-light-primary"},Ot==null?void 0:Ot.parent_name),":"),ke.createElement(ze.Z,{value:Ot==null?void 0:Ot.content}))},nl=({data:Ot,onReplyDiscuss:Vt,thirdlyReply:Jt,setThirdlyReply:Wi})=>{var _i,hi,xi,ui;const Pi=(0,Gi.eY)();return console.log(Pi,"user"),ke.createElement("div",{className:tl.list},ke.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+((_i=Ot==null?void 0:Ot.author)==null?void 0:_i.image_url)}),ke.createElement("div",{className:tl.wrap},ke.createElement("div",{className:"font14",style:{marginBottom:6}},ke.createElement("span",{className:"c-grey-333"},(hi=Ot==null?void 0:Ot.author)==null?void 0:hi.name),(Pi==null?void 0:Pi.login)!==((xi=Ot==null?void 0:Ot.author)==null?void 0:xi.login)&&ke.createElement("span",{onClick:()=>Wi(Ot==null?void 0:Ot.id),className:"c-grey-999 current",style:{float:"right"}},ke.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),ke.createElement("span",null,"\u56DE\u590D"))),ke.createElement(ze.Z,{value:Ot==null?void 0:Ot.content}),(ui=Ot==null?void 0:Ot.children)==null?void 0:ui.map($i=>ke.createElement(Tl,{key:$i.id,data:$i})),Jt===(Ot==null?void 0:Ot.id)&&ke.createElement("div",null,ke.createElement(wu,{id:Ot==null?void 0:Ot.id,cb:Vt}),ke.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>Wi(null),className:"c-light-primary current"},ke.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),ke.createElement("div",{className:tl.line})))};var eh=({data:Ot,onReplyDiscuss:Vt,secondReply:Jt,setSecondReply:Wi,thirdlyReply:_i,setThirdlyReply:hi,onPlusDiscuss:xi})=>{var ui,Pi,$i,bo;const[Sr,Go]=(0,ke.useState)(!1);return console.log(Ot,"data"),ke.createElement("div",{className:tl.discussItem},ke.createElement("div",{className:tl.list},ke.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+((ui=Ot==null?void 0:Ot.author)==null?void 0:ui.image_url)}),ke.createElement("div",{className:tl.wrap},ke.createElement("div",{className:"font14",style:{marginBottom:6}},ke.createElement("span",{className:"c-grey-333 mr30"},(Pi=Ot==null?void 0:Ot.author)==null?void 0:Pi.name),ke.createElement("span",{className:"c-grey-999"},Ot==null?void 0:Ot.time)),ke.createElement(ze.Z,{value:Ot==null?void 0:Ot.content}),ke.createElement("div",{className:tl.btns},ke.createElement("div",{onClick:()=>xi(Ot==null?void 0:Ot.id),className:Ot!=null&&Ot.user_praise?"c-light-primary":"c-grey-999"},ke.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),ke.createElement("span",null,Ot==null?void 0:Ot.praise_count)),ke.createElement("div",{onClick:()=>{var Ki;((Ki=Ot==null?void 0:Ot.children)==null?void 0:Ki.length)!==0&&(Wi(null),Go(!Sr))},style:{color:Sr?"#0152d9":"#999999"}},ke.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),ke.createElement("span",null,Sr?"\u6536\u8D77\u8BC4\u8BBA":($i=Ot==null?void 0:Ot.children)==null?void 0:$i.length)),ke.createElement("div",{onClick:()=>{Go(!1),Wi(Jt===(Ot==null?void 0:Ot.id)?null:Ot==null?void 0:Ot.id)},style:{color:Jt===(Ot==null?void 0:Ot.id)?"#0152d9":"#999999"}},ke.createElement("i",{className:"iconfont icon-huifu3 mr3"}),ke.createElement("span",null,Jt===(Ot==null?void 0:Ot.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Jt===(Ot==null?void 0:Ot.id)&&ke.createElement(wu,{id:Ot==null?void 0:Ot.id,cb:(Ki,Mo)=>{Vt(Ki,Mo),Go(!0)}}),Sr&&ke.createElement("div",{className:tl.secondLevelDiscuss},(bo=Ot==null?void 0:Ot.children)==null?void 0:bo.map(Ki=>ke.createElement(nl,{thirdlyReply:_i,setThirdlyReply:hi,key:Ki.id,data:Ki,onReplyDiscuss:Vt}))))))},Hl=(Ot,Vt,Jt)=>new Promise((Wi,_i)=>{var hi=Pi=>{try{ui(Jt.next(Pi))}catch($i){_i($i)}},xi=Pi=>{try{ui(Jt.throw(Pi))}catch($i){_i($i)}},ui=Pi=>Pi.done?Wi(Pi.value):Promise.resolve(Pi.value).then(hi,xi);ui((Jt=Jt.apply(Ot,Vt)).next())}),Uu=({identifier:Ot,active:Vt,onOk:Jt})=>{const[Wi,_i]=(0,ke.useState)(""),[hi,xi]=(0,ke.useState)(1),[ui,Pi]=(0,ke.useState)([]),[$i,bo]=(0,ke.useState)(0),[Sr,Go]=(0,ke.useState)(null),[Ki,Mo]=(0,ke.useState)(null);(0,ke.useEffect)(()=>{Xr(1),xi(1)},[Vt]);const Xr=Ur=>Hl(void 0,null,function*(){const Yo=yield vn({container_type:"QuestionSolutionArticle",container_identifier:Vt,limit:5,page:Ur});Yo!=null&&Yo.comments&&(Pi((Yo==null?void 0:Yo.comments)||[]),xi(Ur),bo(Yo==null?void 0:Yo.disscuss_count))}),rs=()=>Hl(void 0,null,function*(){if(Wi===""){xe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const Ur=yield Ni({comments:{content:Wi},container_type:"QuestionSolutionArticle",container_identifier:Vt});Ur!=null&&Ur.discuss&&(_i(""),Xr(hi),Jt())}),ho=(Ur,Yo,Zi)=>Hl(void 0,null,function*(){const ts=yield ri({container_type:"QuestionSolutionArticle",container_identifier:Vt,comments:{content:Yo,parent_id:Ur}});Go(null),Mo(null),Xr(hi)}),Ko=Ur=>Hl(void 0,null,function*(){const Yo=yield Wn(Ur);Xr(hi)}),Po=Ur=>{xi(Ur),Xr(Ur)};return ke.createElement("div",{className:Wa.discuss},ke.createElement("aside",{className:Wa.reply,style:{borderWidth:$i?1:0}},ke.createElement(Vi.Z,{defaultValue:Wi,id:"writeForumsReviewId",onChange:Ur=>{_i(Ur)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ke.createElement(xu.Z,null,ke.createElement(hs.Z,{flex:"1"}),ke.createElement(hs.Z,null,ke.createElement(ct.ZP,{type:"primary",size:"middle",onClick:()=>rs()},"\u53D1\u9001")))),ui==null?void 0:ui.map(Ur=>ke.createElement(eh,{secondReply:Sr,setSecondReply:Go,thirdlyReply:Ki,setThirdlyReply:Mo,key:Ur.id,data:Ur,onReplyDiscuss:ho,onPlusDiscuss:Ko})),ke.createElement(jt.Z,{className:Wa.pagination,showTotal:Ur=>ke.createElement("span",{style:{color:"#656F87"}},"\u5171",ke.createElement("span",{className:"c-light-primary"},Ur),"\u6761\u6570\u636E"),current:hi,onChange:Po,total:$i,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},th=Re(42159),_u=Object.defineProperty,ou=Object.getOwnPropertySymbols,ga=Object.prototype.hasOwnProperty,ma=Object.prototype.propertyIsEnumerable,As=(Ot,Vt,Jt)=>Vt in Ot?_u(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,zs=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))ga.call(Vt,Jt)&&As(Ot,Jt,Vt[Jt]);if(ou)for(var Jt of ou(Vt))ma.call(Vt,Jt)&&As(Ot,Jt,Vt[Jt]);return Ot},zo=(Ot,Vt,Jt)=>new Promise((Wi,_i)=>{var hi=Pi=>{try{ui(Jt.next(Pi))}catch($i){_i($i)}},xi=Pi=>{try{ui(Jt.throw(Pi))}catch($i){_i($i)}},ui=Pi=>Pi.done?Wi(Pi.value):Promise.resolve(Pi.value).then(hi,xi);ui((Jt=Jt.apply(Ot,Vt)).next())}),yo=({active:Ot,identifier:Vt,onAssist:Jt,onEdit:Wi,onArticlesSkip:_i,onClose:hi,onOk:xi,onDelete:ui,detailsIndex:Pi,btnShowStatus:$i})=>{var bo,Sr,Go,Ki,Mo,Xr,rs,ho,Ko,Po;const[Ur,Yo]=(0,ke.useState)(!0),[Zi,ts]=(0,ke.useState)({});(0,ke.useEffect)(()=>{Ot&&vo()},[Ot,Pi]);const vo=(Co=!0)=>zo(void 0,null,function*(){Co&&Yo(!0);const Or=yield(0,pe.wO)(Vt,{active:Ot});(Or==null?void 0:Or.status)===0&&ts((Or==null?void 0:Or.data)||{}),Yo(!1)}),Do=Co=>zo(void 0,null,function*(){const Or=yield(0,pe.qe)(Vt,zs({active:Ot},Co));(Or==null?void 0:Or.status)===0&&(vo(!1),xi())}),Ks=Co=>zo(void 0,null,function*(){(yield(0,pe.Rg)(Vt,{active:Co==null?void 0:Co.id})).status===0&&(vo(!1),xi())}),fr=Co=>{be.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>ui(Co)})},Fo=()=>{vo(!1),xi()};return ke.createElement("div",{className:Qr.listDetails},ke.createElement($s.Z,{className:"pt20 pl20 pr20",loading:Ur,active:!0,paragraph:{rows:5}},ke.createElement("div",{className:Qr.head},ke.createElement("div",{className:Qr.name},ke.createElement("div",{title:Zi==null?void 0:Zi.name,className:Qr.title},Zi==null?void 0:Zi.name),(Zi==null?void 0:Zi.is_authority)&&ke.createElement("div",{className:Qr.b},"\u5B98\u65B9"),(Zi==null?void 0:Zi.is_excellent)&&ke.createElement("div",{className:Qr.a},"\u7CBE\u9009")),ke.createElement("div",{className:Qr.tag},ke.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+(Zi==null?void 0:Zi.image_url)}),ke.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Zi==null?void 0:Zi.username),ke.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ue()(Zi==null?void 0:Zi.created_at).format("YYYY-MM-DD")),ke.createElement("span",null,ke.createElement("img",{src:bi}),ke.createElement("span",null,Zi==null?void 0:Zi.praises_count)),ke.createElement("span",null,ke.createElement("img",{src:Cr}),ke.createElement("span",null,Zi==null?void 0:Zi.discusses_count)),ke.createElement("span",null,ke.createElement("img",{src:oo}),ke.createElement("span",null,Zi==null?void 0:Zi.viewed_count)),ke.createElement("div",{className:Qr.btn},((0,Gi.Ny)()||(Zi==null?void 0:Zi.is_self))&&ke.createElement(ke.Fragment,null,ke.createElement(ct.ZP,{onClick:()=>fr(Zi),type:"primary",ghost:!0},"\u5220\u9664"),ke.createElement(ct.ZP,{onClick:()=>Wi(Zi),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,Gi.Ny)()&&ke.createElement(ct.ZP,{onClick:()=>Do({is_authority:!(Zi!=null&&Zi.is_authority)}),type:"primary"},ke.createElement("img",{src:_r}),Zi!=null&&Zi.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,Gi.Ny)()&&ke.createElement(ct.ZP,{onClick:()=>Do({is_excellent:!(Zi!=null&&Zi.is_excellent)}),type:"primary"},ke.createElement("img",{src:Hr}),Zi!=null&&Zi.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),ke.createElement("div",{className:Qr.scroll},((Sr=(bo=Zi==null?void 0:Zi.videos)==null?void 0:bo[0])==null?void 0:Sr.id)&&ke.createElement("div",{className:Qr.video},ke.createElement(ye.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Ki=(Go=Zi==null?void 0:Zi.videos)==null?void 0:Go[0])!=null&&Ki.transcoded)},ke.createElement(th.Z,{poster:(Xr=(Mo=Zi==null?void 0:Zi.videos)==null?void 0:Mo[0])==null?void 0:Xr.cover_url,src:((ho=(rs=Zi==null?void 0:Zi.videos)==null?void 0:rs[0])==null?void 0:ho.play_url)||"",videoId:(Po=(Ko=Zi==null?void 0:Zi.videos)==null?void 0:Ko[0])==null?void 0:Po.id,logWatchHistory:()=>{}}))),ke.createElement(ze.Z,{className:Qr.html,value:(Zi==null?void 0:Zi.content)||""}),ke.createElement("div",{onClick:()=>Ks(Zi),className:Qr.g},ke.createElement("img",{className:"mr10",src:(Zi!=null&&Zi.user_liker,Sa)}),ke.createElement("span",null,Zi==null?void 0:Zi.praises_count)),ke.createElement(Uu,{onOk:Fo,active:Ot,identifier:Vt})),ke.createElement("div",{className:Qr.btns},ke.createElement(ct.ZP,{onClick:()=>hi(),type:"primary",ghost:!0},"\u5173\u95ED"),$i[0]&&ke.createElement(ct.ZP,{onClick:Co=>_i(Co,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),$i[1]&&ke.createElement(ct.ZP,{onClick:Co=>_i(Co,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},Us=Object.defineProperty,Ls=Object.getOwnPropertySymbols,Ns=Object.prototype.hasOwnProperty,ji=Object.prototype.propertyIsEnumerable,Za=(Ot,Vt,Jt)=>Vt in Ot?Us(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Wt=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))Ns.call(Vt,Jt)&&Za(Ot,Jt,Vt[Jt]);if(Ls)for(var Jt of Ls(Vt))ji.call(Vt,Jt)&&Za(Ot,Jt,Vt[Jt]);return Ot};const Rn=Ot=>React.createElement("svg",Wt({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},Ot),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var Gl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",Hu=Re(59477),Hs=Re(89489),cl=Object.defineProperty,su=Object.defineProperties,Gu=Object.getOwnPropertyDescriptors,bu=Object.getOwnPropertySymbols,ps=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,va=(Ot,Vt,Jt)=>Vt in Ot?cl(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Is=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))ps.call(Vt,Jt)&&va(Ot,Jt,Vt[Jt]);if(bu)for(var Jt of bu(Vt))Rr.call(Vt,Jt)&&va(Ot,Jt,Vt[Jt]);return Ot},gs=(Ot,Vt)=>su(Ot,Gu(Vt)),$r=(Ot,Vt,Jt)=>new Promise((Wi,_i)=>{var hi=Pi=>{try{ui(Jt.next(Pi))}catch($i){_i($i)}},xi=Pi=>{try{ui(Jt.throw(Pi))}catch($i){_i($i)}},ui=Pi=>Pi.done?Wi(Pi.value):Promise.resolve(Pi.value).then(hi,xi);ui((Jt=Jt.apply(Ot,Vt)).next())}),Ta=({identifier:Ot,tabStatus:Vt,setFilterListTotal:Jt,setListStatus:Wi})=>{const _i={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[hi,xi]=(0,ke.useState)(Is({},_i));const[ui,Pi]=(0,ke.useState)(!1),[$i,bo]=(0,ke.useState)(0),[Sr,Go]=(0,ke.useState)(1),[Ki,Mo]=(0,ke.useState)(null),[Xr,rs]=(0,ke.useState)([]),[ho,Ko]=(0,ke.useState)([!0,!0]),[Po,Ur]=(0,ke.useState)(0),Yo=(0,ke.useRef)(null);(0,ke.useEffect)(()=>{Jr()},[Vt]),(0,ke.useEffect)(()=>{Zi()},[Ki]),(0,ke.useEffect)(()=>{vo(Is({},_i)),Jr()},[Ot]),(0,ke.useEffect)(()=>(window.addEventListener("resize",ts),Wi(Po),()=>{window.removeEventListener("resize",ts)}),[Po]);const Zi=()=>$r(void 0,null,function*(){if(!Ki){Ko([!0,!0]);return}const So=[!0,!0],Qo=Xr==null?void 0:Xr.findIndex(Rs=>Rs.id===Ki);Qo===0&&hi.page===1&&(So[0]=!1),(hi.page-1)*hi.limit+(Qo+1)===hi.total&&(So[1]=!1),Ko(So)}),ts=()=>{var So;if(Po){const Qo=window.innerWidth-((So=Yo.current)==null?void 0:So.clientWidth);bo(Qo)}},vo=So=>$r(void 0,null,function*(){var Qo,Rs,ku;Pi(!0);const Na=yield(0,pe.WH)(Ot,So);return(Na==null?void 0:Na.status)===0&&(rs(((Qo=Na==null?void 0:Na.data)==null?void 0:Qo.articles)||[]),xi(gs(Is({},So),{total:(Rs=Na==null?void 0:Na.data)==null?void 0:Rs.articles_count})),Jt((ku=Na==null?void 0:Na.data)==null?void 0:ku.articles_count)),Pi(!1),Na}),Do=()=>{(hi==null?void 0:hi.sort_direction)===null?hi.sort_direction="asc":(hi==null?void 0:hi.sort_direction)==="asc"?hi.sort_direction="desc":(hi==null?void 0:hi.sort_direction)==="desc"&&(hi.sort_direction=null),hi.page=1,Jr(),xi(Is({},hi)),vo(hi)},Ks=()=>{hi.page=1,hi.search=hi==null?void 0:hi.save_search,Jr(),xi(Is({},hi)),vo(hi)},fr=()=>{var So;const Qo=document.getElementsByClassName("btn-resize");Qo[0].style.visibility="hidden";const Rs=window.innerWidth-((So=Yo.current)==null?void 0:So.clientWidth);bo(Rs)},Fo=()=>{fr(),Ur(1)},Co=So=>{fr(),Mo(So==null?void 0:So.id),Ur(3)},Or=So=>{fr(),Mo(So==null?void 0:So.id),Ur(2)},Jr=()=>{const So=document.getElementsByClassName("btn-resize");So[0].style.visibility="visible",bo(0),Ur(0),Mo(null)},Uo=So=>{Ur(3),Mo(So),hi.page=1,xi(Is({},hi)),vo(hi)},Zr=So=>{Ur(3),Mo(So),xi(Is({},hi)),vo(hi)},Aa=So=>{xi(Is({},hi)),vo(hi)},Ys=So=>$r(void 0,null,function*(){(yield(0,pe.Rg)(Ot,{active:So==null?void 0:So.id})).status===0&&(vo(hi),Go(Sr+1))}),il=So=>$r(void 0,null,function*(){(yield(0,pe.rL)(Ot,{active:So==null?void 0:So.id})).status===0&&(vo(hi),Go(Sr+1))}),Lu=So=>$r(void 0,null,function*(){(yield(0,pe.de)(Ot,{active:So==null?void 0:So.id})).status===0&&(Jr(),vo(hi))}),ro=So=>{hi.page=So,xi(Is({},hi)),vo(hi)},Mu=(So,Qo)=>$r(void 0,null,function*(){var Rs,ku,Na,$c;const dl=Xr==null?void 0:Xr.findIndex(ia=>ia.id===Ki);if(console.log(dl,Qo,22),Qo==="prev"){if(dl===void 0){xe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(dl===0){if(hi.page===1){xe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(hi.page!==1){hi.page=hi.page-1,xi(Is({},hi));const ia=yield vo(hi);if((ia==null?void 0:ia.status)===0){const Kl=(Na=ia==null?void 0:ia.data)==null?void 0:Na.articles[((ku=(Rs=ia==null?void 0:ia.data)==null?void 0:Rs.articles)==null?void 0:ku.length)-1];Mo(Kl==null?void 0:Kl.id),console.log(So.target,555)}}}else{const ia=Xr[dl-1];Mo(ia==null?void 0:ia.id)}}if(Qo==="next"){if(dl===void 0){xe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((hi.page-1)*hi.limit+(dl+1)===hi.total){xe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(dl+1===hi.limit){hi.page=hi.page+1,xi(Is({},hi));const ia=yield vo(hi);if((ia==null?void 0:ia.status)===0){const Kl=($c=ia==null?void 0:ia.data)==null?void 0:$c.articles[0];Mo(Kl==null?void 0:Kl.id)}}else{const ia=Xr[dl+1];Mo(ia==null?void 0:ia.id)}}});return ke.createElement("div",{className:Zt.wrap,ref:Yo},ke.createElement("div",{className:Zt.head},ke.createElement("div",{className:Zt.sort,onClick:Do},ke.createElement("span",null,"\u6700\u65B0"),ke.createElement("aside",null,ke.createElement(Hu.Z,{style:{color:(hi==null?void 0:hi.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),ke.createElement(Hs.Z,{style:{color:(hi==null?void 0:hi.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),ke.createElement(ut.default.Search,{value:hi.save_search,className:Zt["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:So=>{hi.save_search=So.target.value,xi(Is({},hi))},onSearch:Ks}),ke.createElement("div",{onClick:Fo,className:Zt.btn},ke.createElement("img",{src:Gl}),"\u5199\u9898\u89E3")),ke.createElement("div",{className:Zt.listWarp},ke.createElement(ye.Z,{spinning:ui,className:"mt20"},Xr==null?void 0:Xr.map((So,Qo)=>{let Rs=!0;return Qo+1===Xr.length&&Qo!==0&&(Rs=!1),ke.createElement(uo,{active:Ki,key:So.id,data:So,showLine:Rs,onClick:Co,onAssist:Ys,onHide:il})}),(Xr==null?void 0:Xr.length)===0&&ke.createElement(dt.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),ke.createElement(jt.Z,{className:Zt.pagination,showTotal:So=>ke.createElement("span",{style:{color:"#656F87"}},"\u5171",ke.createElement("span",{className:"c-light-primary"},So),"\u6761\u6570\u636E"),total:hi.total,showSizeChanger:!1,current:hi==null?void 0:hi.page,onChange:ro,hideOnSinglePage:!0,showQuickJumper:!0}),Po>0&&ke.createElement("div",{className:Zt.fixedRight,style:{width:$i}},Po===1&&ke.createElement(Br,{identifier:Ot,onClose:Jr,onOk:Uo}),Po===2&&ke.createElement(Br,{active:Ki,identifier:Ot,onClose:Jr,onOk:Zr}),Po===3&&ke.createElement(yo,{btnShowStatus:ho,onArticlesSkip:Mu,detailsIndex:Sr,active:Ki,identifier:Ot,onClose:Jr,onOk:Aa,onEdit:Or,onAssist:Ys,onDelete:Lu})))},Jo={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},Va=Object.defineProperty,na=Object.defineProperties,Pu=Object.getOwnPropertyDescriptors,Io=Object.getOwnPropertySymbols,ca=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,ns=(Ot,Vt,Jt)=>Vt in Ot?Va(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,qo=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))ca.call(Vt,Jt)&&ns(Ot,Jt,Vt[Jt]);if(Io)for(var Jt of Io(Vt))Ro.call(Vt,Jt)&&ns(Ot,Jt,Vt[Jt]);return Ot},cs=(Ot,Vt)=>na(Ot,Pu(Vt)),Ao=(Ot,Vt,Jt)=>new Promise((Wi,_i)=>{var hi=Pi=>{try{ui(Jt.next(Pi))}catch($i){_i($i)}},xi=Pi=>{try{ui(Jt.throw(Pi))}catch($i){_i($i)}},ui=Pi=>Pi.done?Wi(Pi.value):Promise.resolve(Pi.value).then(hi,xi);ui((Jt=Jt.apply(Ot,Vt)).next())}),Nr=({visible:Ot,onVisible:Vt,value:Jt,onChange:Wi,setIndex:_i})=>{var hi;const xi={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[ui,Pi]=(0,ke.useState)(xi);const[$i,bo]=(0,ke.useState)([]),[Sr,Go]=(0,ke.useState)([]),[Ki,Mo]=(0,ke.useState)(!1),Xr=(0,ke.useRef)([]),rs=(0,ke.useRef)(null),ho=(0,Le.useParams)();(0,ke.useEffect)(()=>(ho!=null&&ho.id&&(rs.current=setInterval(()=>{Ko(30)},3e4)),()=>{clearInterval(rs.current)}),[]);const Ko=fr=>Ao(void 0,null,function*(){const Fo=yield(0,pe.uc)(ho==null?void 0:ho.id,{practice_time:fr})});(0,ke.useEffect)(()=>{vo(ui),Zi()},[]),(0,ke.useEffect)(()=>(window.addEventListener("click",Ur),()=>{window.removeEventListener("click",Ur)}),[ho==null?void 0:ho.save_identifier,Ot]),(0,ke.useEffect)(()=>{const fr=Xr.current.findIndex(Uo=>Uo.identifier===(ho==null?void 0:ho.save_identifier)),Fo=Xr.current[fr-1],Co=Xr.current[fr+1],Or=document.getElementById("oj-prev"),Jr=document.getElementById("oj-next");Fo?Or.style.display="block":Or.style.display="none",Co?Jr.style.display="block":Jr.style.display="none"},[ho==null?void 0:ho.save_identifier,Xr.current]);const Po=(fr,Fo)=>{if(fr.id===Fo)return fr;for(let Co=0,Or=fr;Or=Or.parentNode;Co++){if(Or.id===Fo)return Or;if(Or==document.documentElement)return!1}},Ur=fr=>Ao(void 0,null,function*(){!Po(fr.target,"oj-drawer")&&Ot&&Vt(!1);const Fo=Xr.current.findIndex(Jr=>Jr.identifier===(ho==null?void 0:ho.save_identifier)),Co=Xr.current[Fo-1],Or=Xr.current[Fo+1];if(fr.target.id==="oj-prev"){if(!Co||Fo===-1){xe.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}fr.target.style.pointerEvents="none",fr.target.style.cursor="not-allowed",yield Do(Co==null?void 0:Co.identifier),_i("0"),setTimeout(()=>{fr.target.style.pointerEvents="auto",fr.target.style.cursor="pointer"},400)}if(fr.target.id==="oj-next"||fr.target.id==="oj-modal-next"){if(!Or||Fo===-1){xe.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}fr.target.style.pointerEvents="none",fr.target.style.cursor="not-allowed",yield Do(Or==null?void 0:Or.identifier),_i("0"),setTimeout(()=>{fr.target.style.pointerEvents="auto",fr.target.style.cursor="pointer"},400)}});(0,ke.useEffect)(()=>{Wi(ho==null?void 0:ho.save_identifier);const fr=Sr.findIndex(Fo=>Fo.some(Co=>Co.identifier===(ho==null?void 0:ho.save_identifier)));Pi(fr===-1?cs(qo({},ui),{page:1}):cs(qo({},ui),{page:fr+1}))},[ho==null?void 0:ho.save_identifier,Sr]);const Yo=fr=>{ui.page=1,ui.tag_discipline_id=fr,Pi(qo({},ui)),vo(ui)},Zi=()=>Ao(void 0,null,function*(){const fr=yield(0,Zn.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});bo(fr.tag_disciplines||[])}),ts=fr=>{ui.page=1,ui.difficulty=typeof fr=="number"?fr:null,Pi(qo({},ui)),vo(ui)},vo=fr=>Ao(void 0,null,function*(){var Fo,Co;Mo(!0);const Or=yield(0,pe.KC)(fr);if(Or!=null&&Or.practices_list){for(var Jr=(Fo=Or==null?void 0:Or.practices_list)==null?void 0:Fo.length,Uo=[],Zr=0;Zr<Jr;Zr+=ui==null?void 0:ui.per_page)Uo.push((Co=Or==null?void 0:Or.practices_list)==null?void 0:Co.slice(Zr,Zr+(ui==null?void 0:ui.per_page)));Pi(cs(qo({},ui),{total:Or==null?void 0:Or.practices_count})),Xr.current=(Or==null?void 0:Or.practices_list)||[],Go(Uo)}Mo(!1)}),Do=(fr,Fo)=>Ao(void 0,null,function*(){const Co=yield(0,Zn.ZP)(`/api/practices/${fr}/start`,{method:"get"});(Co==null?void 0:Co.status)===0&&Le.history.push(`/problems/${Co==null?void 0:Co.identifier}/oj/${fr}`)}),Ks=fr=>{ui.page=fr,Pi(qo({},ui))};return ke.createElement("div",{className:Jo.wrap,id:"oj-drawer",style:{left:Ot?0:-700}},ke.createElement("div",{className:Jo.head},ke.createElement("div",{className:Jo.title},"\u9898\u76EE\u5217\u8868"),ke.createElement(ut.default.Search,{value:ui==null?void 0:ui.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:fr=>{ui.save_search=fr.target.value,Pi(qo({},ui))},onSearch:()=>{ui.page=1,ui.search=ui.save_search,Pi(qo({},ui)),vo(ui)}}),ke.createElement(we.default,{value:ui==null?void 0:ui.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:fr=>fr.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:Yo},$i.map(fr=>ke.createElement(we.default.Option,{key:fr.id,value:fr.id},fr.name))),ke.createElement(we.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:fr=>fr.parentNode,value:ui==null?void 0:ui.difficulty,onChange:ts},ke.createElement(we.default.Option,{value:1},"\u7B80\u5355"),ke.createElement(we.default.Option,{value:2},"\u9002\u4E2D"),ke.createElement(we.default.Option,{value:3},"\u56F0\u96BE"))),ke.createElement("div",{className:Jo.content},ke.createElement(ye.Z,{spinning:Ki},(hi=Sr==null?void 0:Sr[ui.page-1])==null?void 0:hi.map(fr=>ke.createElement("div",{key:fr.identifier,className:Jo.list,onClick:Fo=>Do(fr.identifier,Fo)},ke.createElement("i",{style:{visibility:Jt===fr.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),ke.createElement("span",{style:{fontWeight:Jt===fr.identifier?"bold":400,color:Jt===fr.identifier?"#ffffff":"#bac4cd"},title:fr==null?void 0:fr.name},fr.name),(fr==null?void 0:fr.difficulty)===1&&ke.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(fr==null?void 0:fr.difficulty)===2&&ke.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(fr==null?void 0:fr.difficulty)===3&&ke.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),ke.createElement("div",{className:Jo.footer},ke.createElement(jt.Z,{showTotal:fr=>ke.createElement("span",{style:{color:"#656F87"}},"\u5171",ke.createElement("span",{className:"c-light-primary"},fr),"\u6761\u6570\u636E"),total:ui.total,pageSize:ui==null?void 0:ui.per_page,current:ui==null?void 0:ui.page,showSizeChanger:!1,onChange:Ks,showQuickJumper:!0,hideOnSinglePage:!0})))},vc=({hack:Ot,onTriggerPraise:Vt,topicId:Jt,page:Wi,onPageChange:_i,user:hi,submitRecords:xi,submitting:ui,submitResult:Pi})=>{const[$i]=(0,Le.useSearchParams)(),bo=(0,Le.useLocation)(),[Sr,Go]=(0,ke.useState)($i.get("tab")||"0"),[Ki,Mo]=(0,ke.useState)(0),[Xr,rs]=(0,ke.useState)(0),[ho,Ko]=(0,ke.useState)(0),[Po,Ur]=(0,ke.useState)(),[Yo,Zi]=(0,ke.useState)(!1);function ts(Do){const Ks=Do.target.id;if(Sr==="3"&&Ks!==Sr&&(Xr===1||Xr===2)){be.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{Go(Ks)}});return}Go(Ks)}(0,ke.useEffect)(()=>pt.Z.subscribe("to-commit-info",()=>{Go("1")}),[]);function vo(){Go("2")}return ke.createElement("div",{className:zt["left-panel"]},ke.createElement("ul",{className:`${zt["s-navs"]} ${zt["bg-white"]} ${zt.b1}`},ke.createElement("li",{className:"mr40 current"},ke.createElement("img",{onClick:()=>Zi(!0),src:dn})),ke.createElement("li",{className:zt["oj-mr"]},ke.createElement("a",{className:Sr==="0"?zt.active:"",id:"0",onClick:ts},"\u4EFB\u52A1\u63CF\u8FF0")),ke.createElement("li",{className:zt["oj-mr"]},ke.createElement("a",{className:Sr==="3"?zt.active:"",id:"3",onClick:ts},"\u9898\u89E3",ho?`(${ho})`:"")),ke.createElement("li",{className:zt["oj-mr"]},ke.createElement("a",{className:Sr==="2"?zt.active:"",id:"2",onClick:ts},"\u8BC4\u8BBA",Ki?`(${Ki})`:"")),ke.createElement("li",null,ke.createElement("a",{className:Sr==="1"?zt.active:"",id:"1",onClick:ts},"\u63D0\u4EA4\u8BB0\u5F55"))),ke.createElement("div",{className:`${zt["tab-panel-body"]} ${Sr==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},ke.createElement(Ve,{hack:Ot,onTriggerPraise:Vt,toDiscuss:vo})),ke.createElement("div",{className:`${zt["tab-panel-body"]} ${Sr==="1"?"":"hide"}`},xi!=null&&xi.records_count?ke.createElement(rt,{page:Wi,onPageChange:_i,topicId:Jt,submitting:ui,submitRecords:xi,submitResult:Pi}):ke.createElement(dt.Z,null)),ke.createElement("div",{className:`${zt["tab-panel-body"]} ${Sr==="2"?"":"hide"}`,style:{padding:0}},ke.createElement(sn,{setDiscussTotal:Mo,user:hi,identifier:Ot.identifier,hack:Ot,onTriggerPraise:Vt})),ke.createElement("div",{className:`${zt["tab-panel-body"]} ${Sr==="3"?"":"hide"}`,style:{padding:0}},ke.createElement(Ta,{setListStatus:rs,setFilterListTotal:Ko,tabStatus:Sr,identifier:Ot.identifier})),ke.createElement(Nr,{visible:Yo,setIndex:Go,onVisible:Do=>Zi(Do),value:Po,onChange:Do=>Ur(Do)}))},_o=Re(53641),Gh=Re(62522),Cu=Re(70374),ih=Re(42886),Wh=Re(89392),Ph=Re.n(Wh),Wl=Re(56102),Kr=Re(59301),Ho=Object.defineProperty,xl=Object.defineProperties,Ch=Object.getOwnPropertyDescriptors,wl=Object.getOwnPropertySymbols,Eh=Object.prototype.hasOwnProperty,Zl=Object.prototype.propertyIsEnumerable,mo=(Ot,Vt,Jt)=>Vt in Ot?Ho(Ot,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Ot[Vt]=Jt,Dr=(Ot,Vt)=>{for(var Jt in Vt||(Vt={}))Eh.call(Vt,Jt)&&mo(Ot,Jt,Vt[Jt]);if(wl)for(var Jt of wl(Vt))Zl.call(Vt,Jt)&&mo(Ot,Jt,Vt[Jt]);return Ot},No=(Ot,Vt)=>xl(Ot,Ch(Vt)),ya=(Ot,Vt)=>{var Jt={};for(var Wi in Ot)Eh.call(Ot,Wi)&&Vt.indexOf(Wi)<0&&(Jt[Wi]=Ot[Wi]);if(Ot!=null&&wl)for(var Wi of wl(Ot))Vt.indexOf(Wi)<0&&Zl.call(Ot,Wi)&&(Jt[Wi]=Ot[Wi]);return Jt},ls=(Ot,Vt,Jt)=>new Promise((Wi,_i)=>{var hi=Pi=>{try{ui(Jt.next(Pi))}catch($i){_i($i)}},xi=Pi=>{try{ui(Jt.throw(Pi))}catch($i){_i($i)}},ui=Pi=>Pi.done?Wi(Pi.value):Promise.resolve(Pi.value).then(hi,xi);ui((Jt=Jt.apply(Ot,Vt)).next())});const{Countdown:Wu}=Ce.default,au={Java:"java",C:"c",Python:"py","C++":"c"};var Eu=(Ot=>(Ot[Ot.SET_LOADING=0]="SET_LOADING",Ot[Ot.GET_DATA=1]="GET_DATA",Ot[Ot.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",Ot[Ot.SET_DATA=3]="SET_DATA",Ot[Ot.SET_DEBUGING=4]="SET_DEBUGING",Ot[Ot.SET_SUBMITING=5]="SET_SUBMITING",Ot[Ot.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",Ot[Ot.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",Ot[Ot.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",Ot[Ot.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",Ot[Ot.SET_PAGE=10]="SET_PAGE",Ot[Ot.GET_LANGUAGE=11]="GET_LANGUAGE",Ot[Ot.GET_DRAWER=12]="GET_DRAWER",Ot))(Eu||{});function Ka(){return new Date().getTime()}const Vl={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function vp(Ot,Vt){switch(Vt.type){case 1:return Dr(Dr({},Ot),Vt.payload);case 3:return No(Dr({},Ot),{data:Vt.payload});case 0:return No(Dr({},Ot),{loading:Vt.payload});case 11:return No(Dr({},Ot),{languageList:Vt.payload});case 12:return No(Dr({},Ot),{drawerData:Vt.payload});case 9:return No(Dr({},Ot),{showNote:Vt.payload});case 4:return No(Dr({},Ot),{debuging:Vt.payload});case 5:return No(Dr({},Ot),{submitting:Vt.payload});case 2:return No(Dr({},Ot),{submitRecords:Vt.payload});case 10:return No(Dr({},Ot),{submitRecordPage:Vt.payload});case 6:return No(Dr({},Ot),{executingMessage:Vt.payload});case 7:return Dr(Dr({},Ot),Vt.payload);case 8:return Dr(Dr({},Ot),Vt.payload);default:throw new Error}}var yp=({children:Ot})=>{var Vt,Jt,Wi,_i;const[hi,xi]=(0,ke.useReducer)(vp,Vl),{id:ui}=(0,Le.useParams)(),Pi=(0,Le.useLocation)(),[$i]=(0,Le.useSearchParams)(),{languageValue:bo,languageList:Sr,loading:Go,data:Ki,debugResult:Mo,submitResult:Xr,submitRecords:rs,submitRecordPage:ho,showNote:Ko,debuging:Po,submitting:Ur,executingMessage:Yo}=hi,[Zi,ts]=(0,ke.useState)("#FFF"),[vo,Do]=(0,ke.useState)(null),[Ks,fr]=(0,ke.useState)({}),[Fo,Co]=(0,ke.useState)(!1),Or=(0,ke.useRef)(null),Jr=(0,ke.useRef)(null),Uo=Ki==null?void 0:Ki.user,Zr=Ki==null?void 0:Ki.hack;(0,ke.useEffect)(()=>((0,Le.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Le.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Le.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Le.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,ke.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,ke.useEffect)(()=>{var xo;if(Fo){const Ds=document.getElementById("oj-next"),la=document.getElementById("oj-modal-next");((xo=Ds==null?void 0:Ds.style)==null?void 0:xo.display)==="none"?la.style.display="none":la.style.display="block"}},[Fo]),(0,ke.useEffect)(()=>{function xo(){return ls(this,null,function*(){var Ds,la,Gs;const Ss=yield(0,pe.fu)(ui);if(Ss.status===401)document.location.href="/user/login";else{Ss.hack=Ss.practice,Ss.hack.code=_t.Base64.decode((Ds=Ss==null?void 0:Ss.hack)==null?void 0:Ds.code);const Yl=`${Uo==null?void 0:Uo.login}-language`;localStorage.getItem(Yl)&&(Ss.hack.language=localStorage.getItem(Yl)),Jr.current=Ph().cloneDeep(Ss),Jr.current.language=(la=Ss==null?void 0:Ss.hack)==null?void 0:la.language,xi({type:1,payload:{loading:!1,data:Ss}}),xi({type:8,payload:{languageValue:(Gs=Ss==null?void 0:Ss.hack)==null?void 0:Gs.language}})}})}ui&&xo()},[ui]),(0,ke.useEffect)(()=>{xi({type:8,payload:{debugResult:void 0}}),il(),Co(!1)},[ui]),(0,ke.useEffect)(()=>{clearTimeout(Or.current)},[ui]),(0,ke.useEffect)(()=>{Ys()},[ui,ho]);const Aa=()=>{window.parent.postMessage("backExercise","*")};function Ys(){return ls(this,null,function*(){try{const xo=yield(0,pe.zO)(ui,{limit:15,page:ho});xi({type:2,payload:xo})}catch(xo){console.log(xo)}})}function il(){return ls(this,null,function*(){try{const xo=yield(0,pe.dd)(ui);xi({type:11,payload:xo==null?void 0:xo.data})}catch(xo){console.log(xo)}})}function Lu(xo){xi({type:10,payload:xo})}function ro(xo){return ls(this,null,function*(){var Ds,la,Gs;const Ss=((Gs=(la=(Ds=window==null?void 0:window.location)==null?void 0:Ds.pathname)==null?void 0:la.split("/"))==null?void 0:Gs[2])||ui;return yield(0,pe.n4)(Ss,xo||{code:_t.Base64.encode(Zr.code),language:bo})})}function Mu(){return ls(this,null,function*(){var xo;if(!Zr.code||((xo=Zr.code)==null?void 0:xo.trim())===""){xe.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}if(!Ur){xi({type:5,payload:!0});try{if(pt.Z.publish("to-commit-info"),(yield ro()).status===0){let rh=function(){return ls(this,null,function*(){const{status:Lh,data:oh}=yield(0,pe.rX)(ui,"submit"),lu=Ka()-_l>(Ss*Yl+3)*1e3;if(Lh!==0&&!lu&&setTimeout(rh,1e3),lu){be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),xi({type:5,payload:!1});return}if(Lh===0){oh.status===2&&be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const mf=yield(0,pe.zO)(ui,{limit:15,page:ho});xi({type:8,payload:No(Dr({},hi),{submitResult:oh,submitting:!1,submitRecords:mf})}),(oh==null?void 0:oh.status)===0&&Co(!0)}})},la={};if((yield(0,pe.bM)(ui,la)).status===-1&&$i.get("exercisesId")){window.parent.location.href=`/classrooms/${$i.get("coursesId")}/exercise/${$i.get("exercisesId")}/detail`;return}const{time_limit:Ss,test_case_size:Yl}=Zr,_l=Ka();rh()}}catch(Ds){xi({type:5,payload:!1})}}})}function So(){return ls(this,null,function*(){var xo;if(!Zr.code||((xo=Zr.code)==null?void 0:xo.trim())===""){xe.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}hi.debuging=!0,xi({type:4,payload:!0});try{if((yield ro()).status===0){let _l=function(){return ls(this,null,function*(){const{status:rh,message:Lh,data:oh}=yield(0,pe.rX)(ui,"debug"),lu=Ka()-Yl>(la+3)*1e3;if(rh!==0&&!lu&&(xi({type:6,payload:Lh}),setTimeout(_l,1e3)),lu){be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),xi({type:4,payload:!1});return}rh===0&&(xi({type:4,payload:!1}),oh.status===2&&be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),xi({type:7,payload:No(Dr({},hi),{debugResult:oh,debuging:!1})}))})};const{time_limit:la}=Zr;let Gs={input:encodeURIComponent(Ki.test_case.input)};if((yield(0,pe.MU)(ui,Gs)).status===-1&&$i.get("exercisesId")){window.parent.location.href=`/classrooms/${$i.get("coursesId")}/exercise/${$i.get("exercisesId")}/detail`;return}const Yl=Ka();_l()}else xi({type:4,payload:!1})}catch(Ds){console.log(Ds)}finally{}})}function Qo(xo){var Ds;clearTimeout(Or.current),Or.current=setTimeout(()=>{var la;ro({code:_t.Base64.encode(xo),language:(la=Jr==null?void 0:Jr.current)==null?void 0:la.language})},2e3),xi({type:3,payload:No(Dr({},Jr==null?void 0:Jr.current),{hack:No(Dr({},(Ds=Jr==null?void 0:Jr.current)==null?void 0:Ds.hack),{code:xo})})})}function Rs(xo){let Ds=xo.target.value;xi({type:3,payload:No(Dr({},Ki),{test_case:{input:Ds}})})}const ku=xo=>ls(void 0,null,function*(){var Ds;if(xi({type:0,payload:!0}),(yield ro()).status===0){xi({type:8,payload:{languageValue:xo}}),Jr.current.language=xo;const Gs=`${Uo==null?void 0:Uo.login}-language`;localStorage.setItem(Gs,xo);const Ss=yield(0,pe.dd)(ui);if(Ss.status===0){const Yl=(Ds=Ss==null?void 0:Ss.data)==null?void 0:Ds.find(_l=>_l.language===xo);Qo(_t.Base64.decode(Yl.code))}}setTimeout(()=>{xi({type:0,payload:!1})},300)});function Na(){return ls(this,null,function*(){try{const xo=yield(0,pe.H7)(ui,{language:bo});xo.status===401?Le.history.replace("/login",{from:Pi.pathname}):(Qo(_t.Base64.decode(xo.code)),il())}catch(xo){console.log(xo)}})}function $c(){be.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Kr.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",Kr.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return ls(this,null,function*(){const xo=yield(0,pe.fi)(ui,{language:bo});xo.status===401?Le.history.replace("/login",{from:Pi.pathname}):Qo(_t.Base64.decode(xo.code))})}})}function dl(){xi({type:9,payload:!0})}function ia(){xi({type:9,payload:!1})}function Kl(xo){return ls(this,null,function*(){yield(0,pe.MK)(ui,xo),xi({type:1,payload:{showNote:!1,data:No(Dr({},Ki),{hack:No(Dr({},Zr),{notes:xo.notes})})}})})}const yc={input:(Vt=Ki==null?void 0:Ki.test_case)==null?void 0:Vt.input,is_file:(Jt=Ki==null?void 0:Ki.test_case)==null?void 0:Jt.is_file,language:((Wi=Jr.current)==null?void 0:Wi.language)||(Zr==null?void 0:Zr.language),code:Zr==null?void 0:Zr.code,title:"main."+au[Zr==null?void 0:Zr.language],modify_code:Zr==null?void 0:Zr.modify_code,notes:Zr==null?void 0:Zr.notes,debugResult:Mo,debuging:Po,submitting:Ur,executingMessage:Yo,id:ui,languageValue:bo,languageList:Sr,onChangeLanguage:ku,onCancelNote:ia,onAddNote:Kl,showNote:Ko,onShowNote:dl,onSubmitCode:Mu,onChangeCode:Qo,onChangeInput:Rs,onDebugCode:So,onResetCode:Na,onSyncCode:$c,onUpdateCode:ro};function Sc(){return ls(this,null,function*(){const{praise_count:xo}=yield(0,pe.vl)(Zr.id,{container_type:"Hack",type:1});let Ds=No(Dr({},Ki),{hack:No(Dr({},Zr),{praises_count:xo,user_praise:!Zr.user_praise})});xi({type:3,payload:Ds})})}const Td={topicId:ui,submitResult:Xr,submitRecords:rs,submitting:Ur,page:ho,onPageChange:Lu,hack:Zr,user:Ki==null?void 0:Ki.user,onTriggerPraise:Sc};return console.log(Ki,Jr==null?void 0:Jr.current,"data--------"),Kr.createElement(Kr.Fragment,null,Kr.createElement(ye.Z,{className:"oj-custom-large-spin",size:"large",spinning:Go},Ki?Kr.createElement("div",{className:"oj-custom-warp"},Kr.createElement("header",{className:ht.Z.header,style:{minWidth:1200}},Kr.createElement("div",null,Kr.createElement("img",{src:`${ge.Z.IMG_SERVER}/images/${Uo.image_url}`,alt:"user",width:30}),Kr.createElement("span",null,Uo.name)),Kr.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},Kr.createElement("div",null,Zr.name),Kr.createElement(_o.Z,{onChange:xo=>{},className:"font12 c-grey-999"})),Kr.createElement(Wl.CopyToClipboard,{text:`${(_i=window.location)==null?void 0:_i.origin}/problems/${Zr.identifier}/share`,onCopy:()=>xe.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},Kr.createElement("span",{className:ht.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",Kr.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),Zr.edit_privilege?Kr.createElement(Le.Link,{className:ht.Z.btn_back,to:`/problems/${Zr.identifier}/ojedit`,style:{marginRight:10}}," ",Kr.createElement(Se.Z,null)," \u7F16\u8F91"):null,Kr.createElement(Le.Link,{className:ht.Z.btn_back,onClick:()=>{},to:"/problems"}," ",Kr.createElement(Be.Z,null),"\u9000\u51FA")),Kr.createElement(de.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:Kr.createElement(vc,Dr({},Td)),rightChild:Kr.createElement(gf,Dr({},yc))})):null),Kr.createElement(be.default,{centered:!0,closable:!1,width:680,footer:null,open:Fo,className:"oj-modal"},Kr.createElement("section",{className:"oj-modal-content"},Kr.createElement("div",{className:"oj-modal-head"},Kr.createElement("img",{src:Gh,alt:""}),Kr.createElement("i",{onClick:()=>Co(!1),className:"iconfont icon-guanbi1"})),Kr.createElement("aside",null,Kr.createElement("img",{className:"mr30",src:ih.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",Kr.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Xr==null?void 0:Xr.execute_time,"s"),"\u4F18\u4E8E",Kr.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Xr==null?void 0:Xr.time_better_than)||100,"%"),"\u7684\u7528\u6237"),Kr.createElement("aside",{className:"mb50"},Kr.createElement("img",{src:Cu.Z,className:"mr30"}),Kr.createElement("span",{className:"oj-modal-tt"},Kr.createElement("span",null,Kr.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),Kr.createElement("span",{className:"c-light-primary"},Xr==null?void 0:Xr.execute_memory,"mb")),Kr.createElement("span",null,Kr.createElement("span",null))),"\u4F18\u4E8E",Kr.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Xr==null?void 0:Xr.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),Kr.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Sp({languageValue:Ot,languageList:Vt,onChangeLanguage:Jt,title:Wi,modify_code:_i,onSyncCode:hi,onShowCodeSetting:xi,onResetCode:ui}){const Pi=(0,Le.useLocation)(),$i=()=>{be.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:Kr.createElement(fe.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:ui})};return Kr.createElement("div",{className:"action-bar"},Kr.createElement(we.default,{className:"oj-select",value:Ot,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Jt},Vt==null?void 0:Vt.map(bo=>Kr.createElement(we.default.Option,{key:bo.language,value:bo.language},bo.language))),Kr.createElement("span",null),Kr.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:$i},Kr.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),Kr.createElement("a",{onClick:xi},Kr.createElement("i",{className:"iconfont icon-shezhi"})))}function gf(Ot){var Vt=Ot,{id:Jt,input:Wi,is_file:_i,showNote:hi,onShowNote:xi,notes:ui,onCancelNote:Pi,onAddNote:$i,debugResult:bo,language:Sr,debuging:Go,submitting:Ki,executingMessage:Mo,code:Xr,onSubmitCode:rs,onDebugCode:ho,onChangeCode:Ko,onChangeInput:Po,onUpdateCode:Ur}=Vt,Yo=ya(Vt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function Zi(vo){return Kr.createElement(Sp,No(Dr({},Yo),{onShowCodeSetting:vo}))}const ts={id:Jt,input:Wi,debugResult:bo,debuging:Go,is_file:_i,submitting:Ki,executingMessage:Mo,onDebugCode:ho,onChangeCode:Ko,onSubmitCode:rs,onChangeInput:Po};return Kr.createElement("div",{className:"right-panel"},Kr.createElement(Mt,{onUpdateCode:()=>{},language:Sr,value:Xr,onChange:Ko,ActionBarRender:Zi}),Kr.createElement("div",{className:`note-form-area ${hi?"active":""}`},Kr.createElement(xt,{onCancel:Pi,notes:ui,callback:$i})),Kr.createElement(Dt.ZP,Dr({},ts)))}},85195:function(xn,un,Re){"use strict";Re.d(un,{h:function(){return ke}});var ke=(Se=>(Se[Se.NOMATCH=-1]="NOMATCH",Se[Se.OK=0]="OK",Se[Se.TIMEOUT=2]="TIMEOUT",Se[Se.PODFAILURE=3]="PODFAILURE",Se[Se.COMPILEFAILURE=4]="COMPILEFAILURE",Se[Se.EXECUTEFAILURE=5]="EXECUTEFAILURE",Se[Se.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Se))(ke||{})},51258:function(xn,un,Re){"use strict";Re.d(un,{H7:function(){return we},KC:function(){return ue},M3:function(){return re},MK:function(){return ye},MU:function(){return Le},Rg:function(){return me},WH:function(){return ee},X6:function(){return xe},bM:function(){return Be},bx:function(){return z},dd:function(){return ge},de:function(){return Pe},fi:function(){return pe},fu:function(){return Se},gu:function(){return oe},n4:function(){return de},qe:function(){return le},rL:function(){return ve},rX:function(){return be},uc:function(){return Ae},vl:function(){return fe},wO:function(){return ae},zO:function(){return Ce}});var ke=Re(24092);function Se(Oe){return(0,ke.U2)(`mypractices/${Oe}.json`,{hidePopLogin:!0})}function Be(Oe,Ie){return(0,ke.v_)(`mypractices/${Oe}/code_submit.json`,Ie)}function Le(Oe,Ie){return(0,ke.v_)(`mypractices/${Oe}/code_debug.json`,Ie)}function Ce(Oe,Ie){return Ie.language&&(Ie.language=encodeURIComponent(Ie.language)),(0,ke.U2)(`mypractices/${Oe}/submit_records.json`,Ie)}function xe(Oe){return(0,ke.U2)("mypractices/record_detail.json",{id:Oe})}function be(Oe,Ie){return(0,ke.U2)(`mypractices/${Oe}/result.json`,{mode:Ie})}function ye(Oe,Ie){return(0,ke.v_)(`mypractices/${Oe}/add_notes.json`,Ie)}function we(Oe,Ie){return(0,ke.v_)(`mypractices/${Oe}/restore_initial_code.json`,Ie)}function pe(Oe,Ie){return(0,ke.v_)(`mypractices/${Oe}/sync_code.json`,Ie)}function de(Oe,Ie){return(0,ke.v_)(`mypractices/${Oe}/update_code.json`,Ie)}function ge(Oe){return(0,ke.v_)(`mypractices/${Oe}/initial_codes.json`)}function fe(Oe,Ie){return(0,ke.v_)(`discusses/${Oe}/plus.json`,Ie)}function ue(Oe){return(0,ke.U2)("practices/practices_list.json",Oe)}function ee(Oe,Ie){return(0,ke.U2)(`practices/${Oe}/question_solution_articles`,Ie)}function z(Oe,Ie){return(0,ke.v_)(`practices/${Oe}/question_solution_articles`,Ie)}function oe(Oe,Ie){return(0,ke.gz)(`practices/${Oe}/question_solution_articles/${Ie==null?void 0:Ie.active}`,Ie)}function re(Oe,Ie){return(0,ke.U2)(`practices/${Oe}/question_solution_articles/${Ie==null?void 0:Ie.active}/edit`,Ie)}function ae(Oe,Ie){return(0,ke.U2)(`practices/${Oe}/question_solution_articles/${Ie==null?void 0:Ie.active}`,Ie)}function le(Oe,Ie){return(0,ke.v_)(`practices/${Oe}/question_solution_articles/${Ie==null?void 0:Ie.active}/set_authority_or_excellent`,Ie)}function me(Oe,Ie){return(0,ke.v_)(`practices/${Oe}/question_solution_articles/${Ie==null?void 0:Ie.active}/praise_or_treads`,Ie)}function ve(Oe,Ie){return(0,ke.v_)(`practices/${Oe}/question_solution_articles/${Ie==null?void 0:Ie.active}/hide`)}function Pe(Oe,Ie){return(0,ke.IV)(`practices/${Oe}/question_solution_articles/${Ie==null?void 0:Ie.active}`,Ie)}function Ae(Oe,Ie){return(0,ke.v_)(`mypractices/${Oe}/update_practice_time_sum`,Ie)}},45382:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return fe}});var ke=Re(59301),Se=Re(6767),Be=Re(25399),Le=Re(29787),Ce=Re(77019),xe=Re(5269),be=Re(13747),ye=Re(99571),we=Re(19565),pe=Re(24092),de=Re(79074),ge=(ee,z,oe)=>new Promise((re,ae)=>{var le=Pe=>{try{ve(oe.next(Pe))}catch(Ae){ae(Ae)}},me=Pe=>{try{ve(oe.throw(Pe))}catch(Ae){ae(Ae)}},ve=Pe=>Pe.done?re(Pe.value):Promise.resolve(Pe.value).then(le,me);ve((oe=oe.apply(ee,z)).next())}),fe=({id:ee,activeDiscussIndex:z,onReplyDiscuss:oe,adminOrOperator:re})=>{const[ae,le]=(0,ke.useState)(""),[me,ve]=(0,ke.useState)(!1);function Pe(Oe){le(Oe)}function Ae(){if(!ae){Se.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}oe(ee,ae),le("")}return(0,ke.useEffect)(()=>{z!=ee&&ve(!1)},[z]),ke.createElement("div",{key:ee,className:"discuss-item-editor",style:{display:z===ee?"block":"none",width:"100%"}},ke.createElement(we.Z,{miniToolbar:!0,startInit:z===ee,defaultValue:ae,id:ee,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:Pe,extraUse:re&&ke.createElement(Be.Z,{color:"#fff",open:me,destroyTooltipOnHide:!0,title:ue({id:ee,isOpen:me,activeDiscussIndex:z,onChange:Pe,setIsOpen:ve}),overlayStyle:{maxWidth:600}},ke.createElement("a",{title:me?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>ve(!me)},ke.createElement("i",{className:"iconfont icon-dianzan11"})))}),ke.createElement("a",{onClick:Ae,className:"btn-send"},"\u53D1\u9001"))};const ue=ee=>{const[z,oe]=(0,ke.useState)(!1),[re,ae]=(0,ke.useState)([]),[le,me]=(0,ke.useState)(1);(0,ke.useEffect)(()=>{ee!=null&&ee.isOpen?ve():(me(1),ae([]))},[ee==null?void 0:ee.isOpen]);const ve=()=>ge(void 0,null,function*(){oe(!0);const Pe=yield(0,pe.ZP)(`/api/discusses/${ee==null?void 0:ee.id}/recommend_answer.json`,{method:"get"});(Pe==null?void 0:Pe.status)==0&&ae(Pe==null?void 0:Pe.answer),oe(!1)});return ke.createElement(Le.Z,{spinning:z},ke.createElement("div",{style:{color:"#000"}},ke.createElement(de.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(re==null?void 0:re[le-1])||""}),ke.createElement(Ce.Z,{justify:"end",align:"middle"},ke.createElement(xe.Z,null,ke.createElement(be.Z,{simple:!0,current:le,pageSize:1,total:(re==null?void 0:re.length)||0,onChange:Pe=>{me(Pe)}})),ke.createElement(xe.Z,null,ke.createElement(ye.ZP,{onClick:()=>ge(void 0,null,function*(){ee==null||ee.onChange(re==null?void 0:re[le-1]),ee==null||ee.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},85470:function(xn,un,Re){"use strict";Re.d(un,{o:function(){return we}});var ke=Re(24092),Se=Re(93125),Be=Re.n(Se);let Le="",Ce,xe="";function be(pe){ye(pe)}function ye(pe){Ce=new(Be()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(de){console.log("addFileSuccess: "+de.file.name),pe.addFileSuccess&&pe.addFileSuccess(de),Ce.startUpload()},onUploadstarted:function(de){const ge=de.file.name;if(de.videoId){var ue=`/api/users/${Le}/video_auths.json`;(0,ke.ZP)(ue,{method:"put",body:{video_id:de.videoId,title:ge,file_name:ge,virtual_classroom_id:xe}}).then(ee=>{if(ee.status==-1){pe.onUploadError&&pe.onUploadError(de);return}const z=ee.data;var oe=z.UploadAuth,re=z.UploadAddress,ae=z.VideoId;Ce.setUploadAuthAndAddress(de,oe,re)}).catch(ee=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(ee)})}else{var fe=`/api/users/${Le}/video_auths.json`;const ee="";(0,ke.ZP)(fe,{method:"Post",body:{title:ee+ge,file_name:ee+ge,virtual_classroom_id:xe}}).then(z=>{if(z){const le=z.data;var oe=le.UploadAuth,re=le.UploadAddress,ae=le.VideoId;Ce.setUploadAuthAndAddress(de,oe,re,ae)}}).catch(z=>{Ce.deleteFile(Ce._curIndex),Ce.nextUpload(),console.log(z)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(de){pe.onUploadSucceed&&pe.onUploadSucceed(de),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(de,ge,fe){pe.onUploadFailed&&pe.onUploadFailed(de),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(de,ge,fe){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(de,ge,fe){pe.onUploadProgress&&pe.onUploadProgress(de,ge,fe);var ue=Math.ceil(fe*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(de){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var ge=`/api/users/${Le}/video_auths.json`;(0,ke.ZP)(ge,{method:"put",body:{video_id:de.videoId}}).then(fe=>{var ee=fe.data.UploadAuth;Ce.resumeUploadWithAuth(ee)}).catch(fe=>{console.log(fe)})},onUploadEnd:function(de){pe.onUploadEnd&&pe.onUploadEnd(de),console.log("onUploadEnd: uploaded all the files")}}),pe.gotUploader&&pe.gotUploader(Ce)}function we(pe,de,ge){pe&&(Le=pe),de&&(xe=de),be(ge)}},72890:function(xn,un,Re){"use strict";Re.d(un,{BU:function(){return Se},Dj:function(){return ke},gH:function(){return Be},vp:function(){return Le}});function ke(Ce){try{Ce.mozRequestFullScreen?Ce.mozRequestFullScreen():Ce.webkitRequestFullScreen&&Ce.webkitRequestFullScreen()}catch(xe){console.log(xe,":e")}}function Se(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const Be=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function Le(){var Ce=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,xe=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",Ce),window.isFullScreen?window.isFullScreen:Ce!=null}},49405:function(xn,un,Re){"use strict";Re.d(un,{AL:function(){return me},Iy:function(){return de},Qv:function(){return ue},ez:function(){return le},jb:function(){return ge}});var ke=Re(32834),Se=Re.n(ke),Be=Re(11690),Le=Re.n(Be);let Ce=1;function xe(Ie,Ze){const qe=Ie.match(/^(\s+)(?:```)/);if(qe===null)return Ze;const Je=qe[1];return Ze.split(`
|
|
|
`).map(mt=>{const gt=mt.match(/^\s+/);if(gt===null)return mt;const[Mt]=gt;return Mt.length>=Je.length?mt.slice(Je.length):mt}).join(`
|
|
|
`)}let be=[],ye=["<ul>"];const we=new(Se()).Renderer,pe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function de(){be.length=0,ye=["<ul>"]}const ge={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function fe(Ie,Ze,qe,Je){if(Ze>=Ie.length||Ie[Ze].level<=qe)return Ze;var mt=Ie[Ze];Je.push("<li><a href='#"+Ce+mt.anchor+"'>"+mt.text+"</a>"),Ze++;var gt=[];return Ze=fe(Ie,Ze,mt.level,gt),gt.length>0&&(Je.push("<ul>"),gt.forEach(function(Mt){Je.push(Mt)}),Je.push("</ul>")),Je.push("</li>"),Ze=fe(Ie,Ze,qe,Je),Ze}function ue(){return fe(be,0,0,ye),ye.push("</ul>"),ye.join("")}const ee={heading(Ie){const Ze=pe.exec(Ie);if(Ce+=1,Ze)return{type:"heading",raw:Ze[0],depth:Ze[1].length,text:Ze[2]}},fences(Ie){const Ze=this.rules.block.fences.exec(Ie);if(Ze){const qe=Ze[0];let Je=xe(qe,Ze[3]||"");const mt=Ze[2]?Ze[2].trim():Ze[2];if(["latex","katex","math"].indexOf(mt)>=0){const gt=re(),Mt=Je;Je=gt,ae[gt]={type:"block",expression:Mt}}return{type:"code",raw:qe,lang:mt,text:Je}}}},z=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let oe=0;const re=()=>`__special_katext_id_${oe++}__`;let ae={};function le(){return ae}function me(){oe=0,ae={}}function ve(Ie){return Ie=Ie.replace(z,(Ze,qe)=>{const Je=re();return ae[Je]={type:"inline",expression:qe},Je}),Ie}const Pe=we.listitem;we.listitem=function(Ie){return Pe(ve(Ie))};const Ae=we.paragraph;we.paragraph=function(Ie){return Ae(ve(Ie))};const Oe=we.tablecell;we.tablecell=function(Ie,Ze){return Oe(ve(Ie),Ze)},we.code=function(Ie,Ze,qe){const Je=(Ze||"").match(/\S*/)[0];return Je?["latex","katex","math"].indexOf(Je)>=0?`<p class='editormd-tex'>${Ie}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ze}">${qe?Ie:(0,Be.escape)(Ie,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(qe?Ie:(0,Be.escape)(Ie,!0))+"</code></pre>"},we.heading=function(Ie,Ze,qe){let Je=this.options.headerPrefix+qe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return be.push({anchor:Je,level:Ze,text:Ie}),"<h"+Ze+' id="'+Ce+Je+'">'+Ie+"</h"+Ze+">"},Se().setOptions({silent:!0,gfm:!0,pedantic:!1}),Se().use({tokenizer:ee,renderer:we}),un.ZP=Se()},78408:function(xn,un,Re){"use strict";Re.d(un,{G:function(){return Ce},t:function(){return Le}});var ke=Re(7062),Se=Re.n(ke);const Be=null;function Le(xe,be){let ye=Se().get("__ec");ye||(ye={}),ye[xe]=be,Se().set("__ec",ye)}function Ce(xe,be){let ye=Se().get("__ec");return ye?ye[xe]===void 0?be:ye[xe]:be}},92841:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return po}});class ke{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(He,Xe){return He.__proto__=Xe,He},Object.assign=Object.assign||function(He){if(He==null)throw new TypeError("Cannot convert undefined or null to object");let Xe=Object(He);for(let nt=1;nt<arguments.length;nt++){let bt=arguments[nt];if(bt!=null)for(let Nt in bt)bt.hasOwnProperty(Nt)&&(Xe[Nt]=bt[Nt])}return Xe},typeof self.Promise!="function"&&Re(3867).polyfill()}}ke.install();var Se=ke,Be=Re(86204),Le=Re.n(Be);class Ce{static e(He,Xe){(!He||Ce.FORCE_GLOBAL_TAG)&&(He=Ce.GLOBAL_TAG);let nt=`[${He}] > ${Xe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","error",nt),Ce.ENABLE_ERROR&&(console.error?console.error(nt):console.warn?console.warn(nt):console.log(nt))}static i(He,Xe){(!He||Ce.FORCE_GLOBAL_TAG)&&(He=Ce.GLOBAL_TAG);let nt=`[${He}] > ${Xe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","info",nt),Ce.ENABLE_INFO&&(console.info?console.info(nt):console.log(nt))}static w(He,Xe){(!He||Ce.FORCE_GLOBAL_TAG)&&(He=Ce.GLOBAL_TAG);let nt=`[${He}] > ${Xe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","warn",nt),Ce.ENABLE_WARN&&(console.warn?console.warn(nt):console.log(nt))}static d(He,Xe){(!He||Ce.FORCE_GLOBAL_TAG)&&(He=Ce.GLOBAL_TAG);let nt=`[${He}] > ${Xe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","debug",nt),Ce.ENABLE_DEBUG&&(console.debug?console.debug(nt):console.log(nt))}static v(He,Xe){(!He||Ce.FORCE_GLOBAL_TAG)&&(He=Ce.GLOBAL_TAG);let nt=`[${He}] > ${Xe}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","verbose",nt),Ce.ENABLE_VERBOSE&&console.log(nt)}}Ce.GLOBAL_TAG="flv.js",Ce.FORCE_GLOBAL_TAG=!1,Ce.ENABLE_ERROR=!0,Ce.ENABLE_INFO=!0,Ce.ENABLE_WARN=!0,Ce.ENABLE_DEBUG=!0,Ce.ENABLE_VERBOSE=!0,Ce.ENABLE_CALLBACK=!1,Ce.emitter=new(Le());var xe=Ce;class be{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(He){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=He,this._totalBytes+=He):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=He,this._totalBytes+=He):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=He,this._totalBytes+=He,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let He=(this._now()-this._lastCheckpoint)/1e3;return He==0&&(He=1),this._intervalBytes/He/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let He=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/He/1024}}var ye=be;class we{constructor(He){this._message=He}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class pe extends we{constructor(He){super(He)}get name(){return"IllegalStateException"}}class de extends we{constructor(He){super(He)}get name(){return"InvalidArgumentException"}}class ge extends we{constructor(He){super(He)}get name(){return"NotImplementedException"}}const fe={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},ue={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class ee{constructor(He){this._type=He||"undefined",this._status=fe.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=fe.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===fe.kConnecting||this._status===fe.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(He){this._onContentLengthKnown=He}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(He){this._onURLRedirect=He}get onDataArrival(){return this._onDataArrival}set onDataArrival(He){this._onDataArrival=He}get onError(){return this._onError}set onError(He){this._onError=He}get onComplete(){return this._onComplete}set onComplete(He){this._onComplete=He}open(He,Xe){throw new ge("Unimplemented abstract function!")}abort(){throw new ge("Unimplemented abstract function!")}}let z={};function oe(){let Vn=self.navigator.userAgent.toLowerCase(),He=/(edge)\/([\w.]+)/.exec(Vn)||/(opr)[\/]([\w.]+)/.exec(Vn)||/(chrome)[ \/]([\w.]+)/.exec(Vn)||/(iemobile)[\/]([\w.]+)/.exec(Vn)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Vn)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Vn)||/(webkit)[ \/]([\w.]+)/.exec(Vn)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Vn)||/(msie) ([\w.]+)/.exec(Vn)||Vn.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Vn)||Vn.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Vn)||[],Xe=/(ipad)/.exec(Vn)||/(ipod)/.exec(Vn)||/(windows phone)/.exec(Vn)||/(iphone)/.exec(Vn)||/(kindle)/.exec(Vn)||/(android)/.exec(Vn)||/(windows)/.exec(Vn)||/(mac)/.exec(Vn)||/(linux)/.exec(Vn)||/(cros)/.exec(Vn)||[],nt={browser:He[5]||He[3]||He[1]||"",version:He[2]||He[4]||"0",majorVersion:He[4]||He[2]||"0",platform:Xe[0]||""},bt={};if(nt.browser){bt[nt.browser]=!0;let Nt=nt.majorVersion.split(".");bt.version={major:parseInt(nt.majorVersion,10),string:nt.version},Nt.length>1&&(bt.version.minor=parseInt(Nt[1],10)),Nt.length>2&&(bt.version.build=parseInt(Nt[2],10))}if(nt.platform&&(bt[nt.platform]=!0),(bt.chrome||bt.opr||bt.safari)&&(bt.webkit=!0),bt.rv||bt.iemobile){bt.rv&&delete bt.rv;let Nt="msie";nt.browser=Nt,bt[Nt]=!0}if(bt.edge){delete bt.edge;let Nt="msedge";nt.browser=Nt,bt[Nt]=!0}if(bt.opr){let Nt="opera";nt.browser=Nt,bt[Nt]=!0}if(bt.safari&&bt.android){let Nt="android";nt.browser=Nt,bt[Nt]=!0}bt.name=nt.browser,bt.platform=nt.platform;for(let Nt in z)z.hasOwnProperty(Nt)&&delete z[Nt];Object.assign(z,bt)}oe();var re=z;class ae extends ee{static isSupported(){try{let He=re.msedge&&re.version.minor>=15048,Xe=re.msedge?He:!0;return self.fetch&&self.ReadableStream&&Xe}catch(He){return!1}}constructor(He,Xe){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=He,this._config=Xe,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(He,Xe){this._dataSource=He,this._range=Xe;let nt=He.url;this._config.reuseRedirectedURL&&He.redirectedURL!=null&&(nt=He.redirectedURL);let bt=this._seekHandler.getConfig(nt,Xe),Nt=new self.Headers;if(typeof bt.headers=="object"){let Zt=bt.headers;for(let _n in Zt)Zt.hasOwnProperty(_n)&&Nt.append(_n,Zt[_n])}let sn={method:"GET",headers:Nt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let Zt in this._config.headers)Nt.append(Zt,this._config.headers[Zt]);He.cors===!1&&(sn.mode="same-origin"),He.withCredentials&&(sn.credentials="include"),He.referrerPolicy&&(sn.referrerPolicy=He.referrerPolicy),this._status=fe.kConnecting,self.fetch(bt.url,sn).then(Zt=>{if(this._requestAbort){this._requestAbort=!1,this._status=fe.kIdle;return}if(Zt.ok&&Zt.status>=200&&Zt.status<=299){if(Zt.url!==bt.url&&this._onURLRedirect){let Kt=this._seekHandler.removeURLParameters(Zt.url);this._onURLRedirect(Kt)}let _n=Zt.headers.get("Content-Length");return _n!=null&&(this._contentLength=parseInt(_n),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,Zt.body.getReader())}else if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Zt.status,msg:Zt.statusText});else throw new we("FetchStreamLoader: Http code invalid, "+Zt.status+" "+Zt.statusText)}).catch(Zt=>{if(this._status=fe.kError,this._onError)this._onError(ue.EXCEPTION,{code:-1,msg:Zt.message});else throw Zt})}abort(){this._requestAbort=!0}_pump(He){return He.read().then(Xe=>{if(Xe.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=fe.kError;let nt=ue.EARLY_EOF,bt={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(nt,bt);else throw new we(bt.msg)}else this._status=fe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1);else{if(this._requestAbort===!0)return this._requestAbort=!1,this._status=fe.kComplete,He.cancel();this._status=fe.kBuffering;let nt=Xe.value.buffer,bt=this._range.from+this._receivedLength;this._receivedLength+=nt.byteLength,this._onDataArrival&&this._onDataArrival(nt,bt,this._receivedLength),this._pump(He)}}).catch(Xe=>{if(Xe.code===11&&re.msedge)return;this._status=fe.kError;let nt=0,bt=null;if((Xe.code===19||Xe.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(nt=ue.EARLY_EOF,bt={code:Xe.code,msg:"Fetch stream meet Early-EOF"}):(nt=ue.EXCEPTION,bt={code:Xe.code,msg:Xe.message}),this._onError)this._onError(nt,bt);else throw new we(bt.msg)})}}var le=ae;class me extends ee{static isSupported(){try{let He=new XMLHttpRequest;return He.open("GET","https://example.com",!0),He.responseType="moz-chunked-arraybuffer",He.responseType==="moz-chunked-arraybuffer"}catch(He){return xe.w("MozChunkedLoader",He.message),!1}}constructor(He,Xe){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=He,this._config=Xe,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(He,Xe){this._dataSource=He,this._range=Xe;let nt=He.url;this._config.reuseRedirectedURL&&He.redirectedURL!=null&&(nt=He.redirectedURL);let bt=this._seekHandler.getConfig(nt,Xe);this._requestURL=bt.url;let Nt=this._xhr=new XMLHttpRequest;if(Nt.open("GET",bt.url,!0),Nt.responseType="moz-chunked-arraybuffer",Nt.onreadystatechange=this._onReadyStateChange.bind(this),Nt.onprogress=this._onProgress.bind(this),Nt.onloadend=this._onLoadEnd.bind(this),Nt.onerror=this._onXhrError.bind(this),He.withCredentials&&(Nt.withCredentials=!0),typeof bt.headers=="object"){let sn=bt.headers;for(let Zt in sn)sn.hasOwnProperty(Zt)&&Nt.setRequestHeader(Zt,sn[Zt])}if(typeof this._config.headers=="object"){let sn=this._config.headers;for(let Zt in sn)sn.hasOwnProperty(Zt)&&Nt.setRequestHeader(Zt,sn[Zt])}this._status=fe.kConnecting,Nt.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=fe.kComplete}_onReadyStateChange(He){let Xe=He.target;if(Xe.readyState===2){if(Xe.responseURL!=null&&Xe.responseURL!==this._requestURL&&this._onURLRedirect){let nt=this._seekHandler.removeURLParameters(Xe.responseURL);this._onURLRedirect(nt)}if(Xe.status!==0&&(Xe.status<200||Xe.status>299))if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Xe.status,msg:Xe.statusText});else throw new we("MozChunkedLoader: Http code invalid, "+Xe.status+" "+Xe.statusText);else this._status=fe.kBuffering}}_onProgress(He){if(this._status===fe.kError)return;this._contentLength===null&&He.total!==null&&He.total!==0&&(this._contentLength=He.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let Xe=He.target.response,nt=this._range.from+this._receivedLength;this._receivedLength+=Xe.byteLength,this._onDataArrival&&this._onDataArrival(Xe,nt,this._receivedLength)}_onLoadEnd(He){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===fe.kError)return;this._status=fe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(He){this._status=fe.kError;let Xe=0,nt=null;if(this._contentLength&&He.loaded<this._contentLength?(Xe=ue.EARLY_EOF,nt={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(Xe=ue.EXCEPTION,nt={code:-1,msg:He.constructor.name+" "+He.type}),this._onError)this._onError(Xe,nt);else throw new we(nt.msg)}}var ve=me;class Pe extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let He=new XMLHttpRequest;return He.open("GET","https://example.com",!0),He.responseType="ms-stream",He.responseType==="ms-stream"}catch(He){return Log.w("MSStreamLoader",He.message),!1}}constructor(He,Xe){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=He,this._config=Xe,this._needStash=!0,this._xhr=null,this._reader=null,this._totalRange=null,this._currentRange=null,this._currentRequestURL=null,this._currentRedirectedURL=null,this._contentLength=null,this._receivedLength=0,this._bufferLimit=16*1024*1024,this._lastTimeBufferSize=0,this._isReconnecting=!1}destroy(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),super.destroy()}open(He,Xe){this._internalOpen(He,Xe,!1)}_internalOpen(He,Xe,nt){this._dataSource=He,nt?this._currentRange=Xe:this._totalRange=Xe;let bt=He.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?bt=this._currentRedirectedURL:He.redirectedURL!=null&&(bt=He.redirectedURL));let Nt=this._seekHandler.getConfig(bt,Xe);this._currentRequestURL=Nt.url;let sn=this._reader=new self.MSStreamReader;sn.onprogress=this._msrOnProgress.bind(this),sn.onload=this._msrOnLoad.bind(this),sn.onerror=this._msrOnError.bind(this);let Zt=this._xhr=new XMLHttpRequest;if(Zt.open("GET",Nt.url,!0),Zt.responseType="ms-stream",Zt.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Zt.onerror=this._xhrOnError.bind(this),He.withCredentials&&(Zt.withCredentials=!0),typeof Nt.headers=="object"){let _n=Nt.headers;for(let Kt in _n)_n.hasOwnProperty(Kt)&&Zt.setRequestHeader(Kt,_n[Kt])}if(typeof this._config.headers=="object"){let _n=this._config.headers;for(let Kt in _n)_n.hasOwnProperty(Kt)&&Zt.setRequestHeader(Kt,_n[Kt])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,Zt.send()}abort(){this._internalAbort(),this._status=LoaderStatus.kComplete}_internalAbort(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}_xhrOnReadyStateChange(He){let Xe=He.target;if(Xe.readyState===2)if(Xe.status>=200&&Xe.status<=299){if(this._status=LoaderStatus.kBuffering,Xe.responseURL!=null){let bt=this._seekHandler.removeURLParameters(Xe.responseURL);Xe.responseURL!==this._currentRequestURL&&bt!==this._currentRedirectedURL&&(this._currentRedirectedURL=bt,this._onURLRedirect&&this._onURLRedirect(bt))}let nt=Xe.getResponseHeader("Content-Length");if(nt!=null&&this._contentLength==null){let bt=parseInt(nt);bt>0&&(this._contentLength=bt,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:Xe.status,msg:Xe.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+Xe.status+" "+Xe.statusText);else if(Xe.readyState===3&&Xe.status>=200&&Xe.status<=299){this._status=LoaderStatus.kBuffering;let nt=Xe.response;this._reader.readAsArrayBuffer(nt)}}_xhrOnError(He){this._status=LoaderStatus.kError;let Xe=LoaderErrors.EXCEPTION,nt={code:-1,msg:He.constructor.name+" "+He.type};if(this._onError)this._onError(Xe,nt);else throw new RuntimeException(nt.msg)}_msrOnProgress(He){let nt=He.target.result;if(nt==null){this._doReconnectIfNeeded();return}let bt=nt.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=nt.byteLength;let Nt=this._totalRange.from+this._receivedLength;this._receivedLength+=bt.byteLength,this._onDataArrival&&this._onDataArrival(bt,Nt,this._receivedLength),nt.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${Nt+bt.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let He={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,He,!0)}}_msrOnLoad(He){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(He){this._status=LoaderStatus.kError;let Xe=0,nt=null;if(this._contentLength&&this._receivedLength<this._contentLength?(Xe=LoaderErrors.EARLY_EOF,nt={code:-1,msg:"MSStream meet Early-Eof"}):(Xe=LoaderErrors.EARLY_EOF,nt={code:-1,msg:He.constructor.name+" "+He.type}),this._onError)this._onError(Xe,nt);else throw new RuntimeException(nt.msg)}}var Ae=null;class Oe extends ee{static isSupported(){try{let He=new XMLHttpRequest;return He.open("GET","https://example.com",!0),He.responseType="arraybuffer",He.responseType==="arraybuffer"}catch(He){return xe.w("RangeLoader",He.message),!1}}constructor(He,Xe){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=He,this._config=Xe,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new ye,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(He,Xe){this._dataSource=He,this._range=Xe,this._status=fe.kConnecting;let nt=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(nt=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!nt?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let He=this._currentChunkSizeKB*1024,Xe=this._range.from+this._receivedLength,nt=Xe+He;this._contentLength!=null&&nt-this._range.from>=this._contentLength&&(nt=this._range.from+this._contentLength-1),this._currentRequestRange={from:Xe,to:nt},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(He,Xe){this._lastTimeLoaded=0;let nt=He.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?nt=this._currentRedirectedURL:He.redirectedURL!=null&&(nt=He.redirectedURL));let bt=this._seekHandler.getConfig(nt,Xe);this._currentRequestURL=bt.url;let Nt=this._xhr=new XMLHttpRequest;if(Nt.open("GET",bt.url,!0),Nt.responseType="arraybuffer",Nt.onreadystatechange=this._onReadyStateChange.bind(this),Nt.onprogress=this._onProgress.bind(this),Nt.onload=this._onLoad.bind(this),Nt.onerror=this._onXhrError.bind(this),He.withCredentials&&(Nt.withCredentials=!0),typeof bt.headers=="object"){let sn=bt.headers;for(let Zt in sn)sn.hasOwnProperty(Zt)&&Nt.setRequestHeader(Zt,sn[Zt])}if(typeof this._config.headers=="object"){let sn=this._config.headers;for(let Zt in sn)sn.hasOwnProperty(Zt)&&Nt.setRequestHeader(Zt,sn[Zt])}Nt.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=fe.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(He){let Xe=He.target;if(Xe.readyState===2){if(Xe.responseURL!=null){let nt=this._seekHandler.removeURLParameters(Xe.responseURL);Xe.responseURL!==this._currentRequestURL&&nt!==this._currentRedirectedURL&&(this._currentRedirectedURL=nt,this._onURLRedirect&&this._onURLRedirect(nt))}if(Xe.status>=200&&Xe.status<=299){if(this._waitForTotalLength)return;this._status=fe.kBuffering}else if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Xe.status,msg:Xe.statusText});else throw new we("RangeLoader: Http code invalid, "+Xe.status+" "+Xe.statusText)}}_onProgress(He){if(this._status===fe.kError)return;if(this._contentLength===null){let nt=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,nt=!0;let bt=He.total;this._internalAbort(),bt!=null&bt!==0&&(this._totalLength=bt)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,nt){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let Xe=He.loaded-this._lastTimeLoaded;this._lastTimeLoaded=He.loaded,this._speedSampler.addBytes(Xe)}_normalizeSpeed(He){let Xe=this._chunkSizeKBList,nt=Xe.length-1,bt=0,Nt=0,sn=nt;if(He<Xe[0])return Xe[0];for(;Nt<=sn;){if(bt=Nt+Math.floor((sn-Nt)/2),bt===nt||He>=Xe[bt]&&He<Xe[bt+1])return Xe[bt];Xe[bt]<He?Nt=bt+1:sn=bt-1}}_onLoad(He){if(this._status===fe.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let Xe=this._speedSampler.lastSecondKBps;if(Xe===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(Xe=this._speedSampler.currentKBps)),Xe!==0){let sn=this._normalizeSpeed(Xe);this._currentSpeedNormalized!==sn&&(this._currentSpeedNormalized=sn,this._currentChunkSizeKB=sn)}let nt=He.target.response,bt=this._range.from+this._receivedLength;this._receivedLength+=nt.byteLength;let Nt=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():Nt=!0,this._onDataArrival&&this._onDataArrival(nt,bt,this._receivedLength),Nt&&(this._status=fe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(He){this._status=fe.kError;let Xe=0,nt=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(Xe=ue.EARLY_EOF,nt={code:-1,msg:"RangeLoader meet Early-Eof"}):(Xe=ue.EXCEPTION,nt={code:-1,msg:He.constructor.name+" "+He.type}),this._onError)this._onError(Xe,nt);else throw new we(nt.msg)}}var Ie=Oe;class Ze extends ee{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(He){return!1}}constructor(){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(He){try{let Xe=this._ws=new self.WebSocket(He.url);Xe.binaryType="arraybuffer",Xe.onopen=this._onWebSocketOpen.bind(this),Xe.onclose=this._onWebSocketClose.bind(this),Xe.onmessage=this._onWebSocketMessage.bind(this),Xe.onerror=this._onWebSocketError.bind(this),this._status=fe.kConnecting}catch(Xe){this._status=fe.kError;let nt={code:Xe.code,msg:Xe.message};if(this._onError)this._onError(ue.EXCEPTION,nt);else throw new we(nt.msg)}}abort(){let He=this._ws;He&&(He.readyState===0||He.readyState===1)&&(this._requestAbort=!0,He.close()),this._ws=null,this._status=fe.kComplete}_onWebSocketOpen(He){this._status=fe.kBuffering}_onWebSocketClose(He){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=fe.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(He){if(He.data instanceof ArrayBuffer)this._dispatchArrayBuffer(He.data);else if(He.data instanceof Blob){let Xe=new FileReader;Xe.onload=()=>{this._dispatchArrayBuffer(Xe.result)},Xe.readAsArrayBuffer(He.data)}else{this._status=fe.kError;let Xe={code:-1,msg:"Unsupported WebSocket message type: "+He.data.constructor.name};if(this._onError)this._onError(ue.EXCEPTION,Xe);else throw new we(Xe.msg)}}_dispatchArrayBuffer(He){let Xe=He,nt=this._receivedLength;this._receivedLength+=Xe.byteLength,this._onDataArrival&&this._onDataArrival(Xe,nt,this._receivedLength)}_onWebSocketError(He){this._status=fe.kError;let Xe={code:He.code,msg:He.message};if(this._onError)this._onError(ue.EXCEPTION,Xe);else throw new we(Xe.msg)}}var qe=Ze;class Je{constructor(He){this._zeroStart=He||!1}getConfig(He,Xe){let nt={};if(Xe.from!==0||Xe.to!==-1){let bt;Xe.to!==-1?bt=`bytes=${Xe.from.toString()}-${Xe.to.toString()}`:bt=`bytes=${Xe.from.toString()}-`,nt.Range=bt}else this._zeroStart&&(nt.Range="bytes=0-");return{url:He,headers:nt}}removeURLParameters(He){return He}}var mt=Je;class gt{constructor(He,Xe){this._startName=He,this._endName=Xe}getConfig(He,Xe){let nt=He;if(Xe.from!==0||Xe.to!==-1){let bt=!0;nt.indexOf("?")===-1&&(nt+="?",bt=!1),bt&&(nt+="&"),nt+=`${this._startName}=${Xe.from.toString()}`,Xe.to!==-1&&(nt+=`&${this._endName}=${Xe.to.toString()}`)}return{url:nt,headers:{}}}removeURLParameters(He){let Xe=He.split("?")[0],nt,bt=He.indexOf("?");bt!==-1&&(nt=He.substring(bt+1));let Nt="";if(nt!=null&&nt.length>0){let sn=nt.split("&");for(let Zt=0;Zt<sn.length;Zt++){let _n=sn[Zt].split("="),Kt=Zt>0;_n[0]!==this._startName&&_n[0]!==this._endName&&(Kt&&(Nt+="&"),Nt+=sn[Zt])}}return Nt.length===0?Xe:Xe+"?"+Nt}}var Mt=gt;class at{constructor(He,Xe,nt){this.TAG="IOController",this._config=Xe,this._extraData=nt,this._stashInitialSize=1024*384,Xe.stashInitialSize!=null&&Xe.stashInitialSize>0&&(this._stashInitialSize=Xe.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,Xe.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=He,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(He.url),this._refTotalLength=He.filesize?He.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new ye,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(He){this._extraData=He}get onDataArrival(){return this._onDataArrival}set onDataArrival(He){this._onDataArrival=He}get onSeeked(){return this._onSeeked}set onSeeked(He){this._onSeeked=He}get onError(){return this._onError}set onError(He){this._onError=He}get onComplete(){return this._onComplete}set onComplete(He){this._onComplete=He}get onRedirect(){return this._onRedirect}set onRedirect(He){this._onRedirect=He}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(He){this._onRecoveredEarlyEof=He}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===Ie?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let He=this._config;if(He.seekType==="range")this._seekHandler=new mt(this._config.rangeLoadZeroStart);else if(He.seekType==="param"){let Xe=He.seekParamStart||"bstart",nt=He.seekParamEnd||"bend";this._seekHandler=new Mt(Xe,nt)}else if(He.seekType==="custom"){if(typeof He.customSeekHandler!="function")throw new de("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new He.customSeekHandler}else throw new de(`Invalid seekType in config: ${He.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=qe;else if(le.isSupported())this._loaderClass=le;else if(ve.isSupported())this._loaderClass=ve;else if(Ie.isSupported())this._loaderClass=Ie;else throw new we("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(He){this._currentRange={from:0,to:-1},He&&(this._currentRange.from=He),this._speedSampler.reset(),He||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let He=this._resumeFrom;this._resumeFrom=0,this._internalSeek(He,!0)}}seek(He){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(He,!0)}_internalSeek(He,Xe){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Xe),this._loader.destroy(),this._loader=null;let nt={from:He,to:-1};this._currentRange={from:nt.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,nt),this._onSeeked&&this._onSeeked()}updateUrl(He){if(!He||typeof He!="string"||He.length===0)throw new de("Url must be a non-empty string!");this._dataSource.url=He}_expandBuffer(He){let Xe=this._stashSize;for(;Xe+1024*1024*1<He;)Xe*=2;if(Xe+=1024*1024*1,Xe===this._bufferSize)return;let nt=new ArrayBuffer(Xe);if(this._stashUsed>0){let bt=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(nt,0,Xe).set(bt,0)}this._stashBuffer=nt,this._bufferSize=Xe}_normalizeSpeed(He){let Xe=this._speedNormalizeList,nt=Xe.length-1,bt=0,Nt=0,sn=nt;if(He<Xe[0])return Xe[0];for(;Nt<=sn;){if(bt=Nt+Math.floor((sn-Nt)/2),bt===nt||He>=Xe[bt]&&He<Xe[bt+1])return Xe[bt];Xe[bt]<He?Nt=bt+1:sn=bt-1}}_adjustStashSize(He){let Xe=0;this._config.isLive||He<512?Xe=He:He>=512&&He<=1024?Xe=Math.floor(He*1.5):Xe=He*2,Xe>8192&&(Xe=8192);let nt=Xe*1024+1024*1024*1;this._bufferSize<nt&&this._expandBuffer(nt),this._stashSize=Xe*1024}_dispatchChunks(He,Xe){return this._currentRange.to=Xe+He.byteLength-1,this._onDataArrival(He,Xe)}_onURLRedirect(He){this._redirectedURL=He,this._onRedirect&&this._onRedirect(He)}_onContentLengthKnown(He){He&&this._fullRequestFlag&&(this._totalLength=He,this._fullRequestFlag=!1)}_onLoaderChunkArrival(He,Xe,nt){if(!this._onDataArrival)throw new pe("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(He.byteLength);let bt=this._speedSampler.lastSecondKBps;if(bt!==0){let Nt=this._normalizeSpeed(bt);this._speedNormalized!==Nt&&(this._speedNormalized=Nt,this._adjustStashSize(Nt))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Xe),this._stashUsed+He.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(He),this._stashUsed),this._stashUsed+=He.byteLength;else{let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let sn=this._stashBuffer.slice(0,this._stashUsed),Zt=this._dispatchChunks(sn,this._stashByteStart);if(Zt<sn.byteLength){if(Zt>0){let _n=new Uint8Array(sn,Zt);Nt.set(_n,0),this._stashUsed=_n.byteLength,this._stashByteStart+=Zt}}else this._stashUsed=0,this._stashByteStart+=Zt;this._stashUsed+He.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+He.byteLength),Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Nt.set(new Uint8Array(He),this._stashUsed),this._stashUsed+=He.byteLength}else{let sn=this._dispatchChunks(He,Xe);if(sn<He.byteLength){let Zt=He.byteLength-sn;Zt>this._bufferSize&&(this._expandBuffer(Zt),Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Nt.set(new Uint8Array(He,sn),0),this._stashUsed+=Zt,this._stashByteStart=Xe+sn}}}else if(this._stashUsed===0){let Nt=this._dispatchChunks(He,Xe);if(Nt<He.byteLength){let sn=He.byteLength-Nt;sn>this._bufferSize&&this._expandBuffer(sn),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(He,Nt),0),this._stashUsed+=sn,this._stashByteStart=Xe+Nt}}else{this._stashUsed+He.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+He.byteLength);let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Nt.set(new Uint8Array(He),this._stashUsed),this._stashUsed+=He.byteLength;let sn=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(sn<this._stashUsed&&sn>0){let Zt=new Uint8Array(this._stashBuffer,sn);Nt.set(Zt,0)}this._stashUsed-=sn,this._stashByteStart+=sn}}_flushStashBuffer(He){if(this._stashUsed>0){let Xe=this._stashBuffer.slice(0,this._stashUsed),nt=this._dispatchChunks(Xe,this._stashByteStart),bt=Xe.byteLength-nt;if(nt<Xe.byteLength)if(He)xe.w(this.TAG,`${bt} bytes unconsumed data remain when flush buffer, dropped`);else{if(nt>0){let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize),sn=new Uint8Array(Xe,nt);Nt.set(sn,0),this._stashUsed=sn.byteLength,this._stashByteStart+=nt}return 0}return this._stashUsed=0,this._stashByteStart=0,bt}return 0}_onLoaderComplete(He,Xe){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(He,Xe){switch(xe.e(this.TAG,`Loader error, code = ${Xe.code}, msg = ${Xe.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,He=ue.UNRECOVERABLE_EARLY_EOF),He){case ue.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let nt=this._currentRange.to+1;nt<this._totalLength&&(xe.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(nt,!1));return}He=ue.UNRECOVERABLE_EARLY_EOF;break}case ue.UNRECOVERABLE_EARLY_EOF:case ue.CONNECTING_TIMEOUT:case ue.HTTP_STATUS_CODE_INVALID:case ue.EXCEPTION:break}if(this._onError)this._onError(He,Xe);else throw new we("IOException: "+Xe.msg)}}var _t=at;const ht={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function Dt(){return Object.assign({},ht)}class ut{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let He=new _t({},Dt()),Xe=He.loaderType;return He.destroy(),Xe=="fetch-stream-loader"||Xe=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let He=new _t({},Dt()),Xe=He.loaderType;return He.destroy(),Xe}static supportNativeMediaPlayback(He){ut.videoElement==null&&(ut.videoElement=window.document.createElement("video"));let Xe=ut.videoElement.canPlayType(He);return Xe==="probably"||Xe=="maybe"}static getFeatureList(){let He={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return He.mseFlvPlayback=ut.supportMSEH264Playback(),He.networkStreamIO=ut.supportNetworkStreamIO(),He.networkLoaderName=ut.getNetworkLoaderTypeName(),He.mseLiveFlvPlayback=He.mseFlvPlayback&&He.networkStreamIO,He.nativeMP4H264Playback=ut.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),He.nativeWebmVP8Playback=ut.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),He.nativeWebmVP9Playback=ut.supportNativeMediaPlayback('video/webm; codecs="vp9"'),He}}var ot=ut,yt={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};class wt{static get forceGlobalTag(){return xe.FORCE_GLOBAL_TAG}static set forceGlobalTag(He){xe.FORCE_GLOBAL_TAG=He,wt._notifyChange()}static get globalTag(){return xe.GLOBAL_TAG}static set globalTag(He){xe.GLOBAL_TAG=He,wt._notifyChange()}static get enableAll(){return xe.ENABLE_VERBOSE&&xe.ENABLE_DEBUG&&xe.ENABLE_INFO&&xe.ENABLE_WARN&&xe.ENABLE_ERROR}static set enableAll(He){xe.ENABLE_VERBOSE=He,xe.ENABLE_DEBUG=He,xe.ENABLE_INFO=He,xe.ENABLE_WARN=He,xe.ENABLE_ERROR=He,wt._notifyChange()}static get enableDebug(){return xe.ENABLE_DEBUG}static set enableDebug(He){xe.ENABLE_DEBUG=He,wt._notifyChange()}static get enableVerbose(){return xe.ENABLE_VERBOSE}static set enableVerbose(He){xe.ENABLE_VERBOSE=He,wt._notifyChange()}static get enableInfo(){return xe.ENABLE_INFO}static set enableInfo(He){xe.ENABLE_INFO=He,wt._notifyChange()}static get enableWarn(){return xe.ENABLE_WARN}static set enableWarn(He){xe.ENABLE_WARN=He,wt._notifyChange()}static get enableError(){return xe.ENABLE_ERROR}static set enableError(He){xe.ENABLE_ERROR=He,wt._notifyChange()}static getConfig(){return{globalTag:xe.GLOBAL_TAG,forceGlobalTag:xe.FORCE_GLOBAL_TAG,enableVerbose:xe.ENABLE_VERBOSE,enableDebug:xe.ENABLE_DEBUG,enableInfo:xe.ENABLE_INFO,enableWarn:xe.ENABLE_WARN,enableError:xe.ENABLE_ERROR,enableCallback:xe.ENABLE_CALLBACK}}static applyConfig(He){xe.GLOBAL_TAG=He.globalTag,xe.FORCE_GLOBAL_TAG=He.forceGlobalTag,xe.ENABLE_VERBOSE=He.enableVerbose,xe.ENABLE_DEBUG=He.enableDebug,xe.ENABLE_INFO=He.enableInfo,xe.ENABLE_WARN=He.enableWarn,xe.ENABLE_ERROR=He.enableError,xe.ENABLE_CALLBACK=He.enableCallback}static _notifyChange(){let He=wt.emitter;if(He.listenerCount("change")>0){let Xe=wt.getConfig();He.emit("change",Xe)}}static registerListener(He){wt.emitter.addListener("change",He)}static removeListener(He){wt.emitter.removeListener("change",He)}static addLogListener(He){xe.emitter.addListener("log",He),xe.emitter.listenerCount("log")>0&&(xe.ENABLE_CALLBACK=!0,wt._notifyChange())}static removeLogListener(He){xe.emitter.removeListener("log",He),xe.emitter.listenerCount("log")===0&&(xe.ENABLE_CALLBACK=!1,wt._notifyChange())}}wt.emitter=new(Le());var xt=wt;class zt{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let He=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,Xe=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&He&&Xe}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(He){if(this.keyframesIndex==null)return null;let Xe=this.keyframesIndex,nt=this._search(Xe.times,He);return{index:nt,milliseconds:Xe.times[nt],fileposition:Xe.filepositions[nt]}}_search(He,Xe){let nt=0,bt=He.length-1,Nt=0,sn=0,Zt=bt;for(Xe<He[0]&&(nt=0,sn=Zt+1);sn<=Zt;)if(Nt=sn+Math.floor((Zt-sn)/2),Nt===bt||Xe>=He[Nt]&&Xe<He[Nt+1]){nt=Nt;break}else He[Nt]<Xe?sn=Nt+1:Zt=Nt-1;return nt}}var Ut=zt;function cn(Vn,He,Xe){let nt=Vn;if(He+Xe<nt.length){for(;Xe--;)if((nt[++He]&192)!==128)return!1;return!0}else return!1}function jt(Vn){let He=[],Xe=Vn,nt=0,bt=Vn.length;for(;nt<bt;){if(Xe[nt]<128){He.push(String.fromCharCode(Xe[nt])),++nt;continue}else if(!(Xe[nt]<192)){if(Xe[nt]<224){if(cn(Xe,nt,1)){let Nt=(Xe[nt]&31)<<6|Xe[nt+1]&63;if(Nt>=128){He.push(String.fromCharCode(Nt&65535)),nt+=2;continue}}}else if(Xe[nt]<240){if(cn(Xe,nt,2)){let Nt=(Xe[nt]&15)<<12|(Xe[nt+1]&63)<<6|Xe[nt+2]&63;if(Nt>=2048&&(Nt&63488)!==55296){He.push(String.fromCharCode(Nt&65535)),nt+=3;continue}}}else if(Xe[nt]<248&&cn(Xe,nt,3)){let Nt=(Xe[nt]&7)<<18|(Xe[nt+1]&63)<<12|(Xe[nt+2]&63)<<6|Xe[nt+3]&63;if(Nt>65536&&Nt<1114112){Nt-=65536,He.push(String.fromCharCode(Nt>>>10|55296)),He.push(String.fromCharCode(Nt&1023|56320)),nt+=4;continue}}}He.push("\uFFFD"),++nt}return He.join("")}var mn=jt;let Ft=function(){let Vn=new ArrayBuffer(2);return new DataView(Vn).setInt16(0,256,!0),new Int16Array(Vn)[0]===256}();class Yt{static parseScriptData(He,Xe,nt){let bt={};try{let Nt=Yt.parseValue(He,Xe,nt),sn=Yt.parseValue(He,Xe+Nt.size,nt-Nt.size);bt[Nt.data]=sn.data}catch(Nt){xe.e("AMF",Nt.toString())}return bt}static parseObject(He,Xe,nt){if(nt<3)throw new pe("Data not enough when parse ScriptDataObject");let bt=Yt.parseString(He,Xe,nt),Nt=Yt.parseValue(He,Xe+bt.size,nt-bt.size),sn=Nt.objectEnd;return{data:{name:bt.data,value:Nt.data},size:bt.size+Nt.size,objectEnd:sn}}static parseVariable(He,Xe,nt){return Yt.parseObject(He,Xe,nt)}static parseString(He,Xe,nt){if(nt<2)throw new pe("Data not enough when parse String");let Nt=new DataView(He,Xe,nt).getUint16(0,!Ft),sn;return Nt>0?sn=mn(new Uint8Array(He,Xe+2,Nt)):sn="",{data:sn,size:2+Nt}}static parseLongString(He,Xe,nt){if(nt<4)throw new pe("Data not enough when parse LongString");let Nt=new DataView(He,Xe,nt).getUint32(0,!Ft),sn;return Nt>0?sn=mn(new Uint8Array(He,Xe+4,Nt)):sn="",{data:sn,size:4+Nt}}static parseDate(He,Xe,nt){if(nt<10)throw new pe("Data size invalid when parse Date");let bt=new DataView(He,Xe,nt),Nt=bt.getFloat64(0,!Ft),sn=bt.getInt16(8,!Ft);return Nt+=sn*60*1e3,{data:new Date(Nt),size:10}}static parseValue(He,Xe,nt){if(nt<1)throw new pe("Data not enough when parse Value");let bt=new DataView(He,Xe,nt),Nt=1,sn=bt.getUint8(0),Zt,_n=!1;try{switch(sn){case 0:Zt=bt.getFloat64(1,!Ft),Nt+=8;break;case 1:{Zt=!!bt.getUint8(1),Nt+=1;break}case 2:{let Kt=Yt.parseString(He,Xe+1,nt-1);Zt=Kt.data,Nt+=Kt.size;break}case 3:{Zt={};let Kt=0;for((bt.getUint32(nt-4,!Ft)&16777215)===9&&(Kt=3);Nt<nt-4;){let qt=Yt.parseObject(He,Xe+Nt,nt-Nt-Kt);if(qt.objectEnd)break;Zt[qt.data.name]=qt.data.value,Nt+=qt.size}Nt<=nt-3&&(bt.getUint32(Nt-1,!Ft)&16777215)===9&&(Nt+=3);break}case 8:{Zt={},Nt+=4;let Kt=0;for((bt.getUint32(nt-4,!Ft)&16777215)===9&&(Kt=3);Nt<nt-8;){let qt=Yt.parseVariable(He,Xe+Nt,nt-Nt-Kt);if(qt.objectEnd)break;Zt[qt.data.name]=qt.data.value,Nt+=qt.size}Nt<=nt-3&&(bt.getUint32(Nt-1,!Ft)&16777215)===9&&(Nt+=3);break}case 9:Zt=void 0,Nt=1,_n=!0;break;case 10:{Zt=[];let Kt=bt.getUint32(1,!Ft);Nt+=4;for(let qt=0;qt<Kt;qt++){let Hn=Yt.parseValue(He,Xe+Nt,nt-Nt);Zt.push(Hn.data),Nt+=Hn.size}break}case 11:{let Kt=Yt.parseDate(He,Xe+1,nt-1);Zt=Kt.data,Nt+=Kt.size;break}case 12:{let Kt=Yt.parseString(He,Xe+1,nt-1);Zt=Kt.data,Nt+=Kt.size;break}default:Nt=nt,xe.w("AMF","Unsupported AMF value type "+sn)}}catch(Kt){xe.e("AMF",Kt.toString())}return{data:Zt,size:Nt,objectEnd:_n}}}var tn=Yt;class lt{constructor(He){this.TAG="ExpGolomb",this._buffer=He,this._buffer_index=0,this._total_bytes=He.byteLength,this._total_bits=He.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let He=this._total_bytes-this._buffer_index;if(He<=0)throw new pe("ExpGolomb: _fillCurrentWord() but no bytes available");let Xe=Math.min(4,He),nt=new Uint8Array(4);nt.set(this._buffer.subarray(this._buffer_index,this._buffer_index+Xe)),this._current_word=new DataView(nt.buffer).getUint32(0,!1),this._buffer_index+=Xe,this._current_word_bits_left=Xe*8}readBits(He){if(He>32)throw new de("ExpGolomb: readBits() bits exceeded max 32bits!");if(He<=this._current_word_bits_left){let sn=this._current_word>>>32-He;return this._current_word<<=He,this._current_word_bits_left-=He,sn}let Xe=this._current_word_bits_left?this._current_word:0;Xe=Xe>>>32-this._current_word_bits_left;let nt=He-this._current_word_bits_left;this._fillCurrentWord();let bt=Math.min(nt,this._current_word_bits_left),Nt=this._current_word>>>32-bt;return this._current_word<<=bt,this._current_word_bits_left-=bt,Xe=Xe<<bt|Nt,Xe}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let He;for(He=0;He<this._current_word_bits_left;He++)if(this._current_word&2147483648>>>He)return this._current_word<<=He,this._current_word_bits_left-=He,He;return this._fillCurrentWord(),He+this._skipLeadingZero()}readUEG(){let He=this._skipLeadingZero();return this.readBits(He+1)-1}readSEG(){let He=this.readUEG();return He&1?He+1>>>1:-1*(He>>>1)}}var Ue=lt;class je{static _ebsp2rbsp(He){let Xe=He,nt=Xe.byteLength,bt=new Uint8Array(nt),Nt=0;for(let sn=0;sn<nt;sn++)sn>=2&&Xe[sn]===3&&Xe[sn-1]===0&&Xe[sn-2]===0||(bt[Nt]=Xe[sn],Nt++);return new Uint8Array(bt.buffer,0,Nt)}static parseSPS(He){let Xe=je._ebsp2rbsp(He),nt=new Ue(Xe);nt.readByte();let bt=nt.readByte();nt.readByte();let Nt=nt.readByte();nt.readUEG();let sn=je.getProfileString(bt),Zt=je.getLevelString(Nt),_n=1,Kt=420,qt=[0,420,422,444],Hn=8;if((bt===100||bt===110||bt===122||bt===244||bt===44||bt===83||bt===86||bt===118||bt===128||bt===138||bt===144)&&(_n=nt.readUEG(),_n===3&&nt.readBits(1),_n<=3&&(Kt=qt[_n]),Hn=nt.readUEG()+8,nt.readUEG(),nt.readBits(1),nt.readBool())){let mi=_n!==3?8:12;for(let Li=0;Li<mi;Li++)nt.readBool()&&(Li<6?je._skipScalingList(nt,16):je._skipScalingList(nt,64))}nt.readUEG();let kt=nt.readUEG();if(kt===0)nt.readUEG();else if(kt===1){nt.readBits(1),nt.readSEG(),nt.readSEG();let mi=nt.readUEG();for(let Li=0;Li<mi;Li++)nt.readSEG()}let ln=nt.readUEG();nt.readBits(1);let An=nt.readUEG(),jn=nt.readUEG(),Qt=nt.readBits(1);Qt===0&&nt.readBits(1),nt.readBits(1);let rn=0,Pn=0,Dn=0,oi=0;nt.readBool()&&(rn=nt.readUEG(),Pn=nt.readUEG(),Dn=nt.readUEG(),oi=nt.readUEG());let Gn=1,Bn=1,bi=0,Ei=!0,Di=0,yn=0;if(nt.readBool()){if(nt.readBool()){let mi=nt.readByte(),Li=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],dr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];mi>0&&mi<16?(Gn=Li[mi-1],Bn=dr[mi-1]):mi===255&&(Gn=nt.readByte()<<8|nt.readByte(),Bn=nt.readByte()<<8|nt.readByte())}if(nt.readBool()&&nt.readBool(),nt.readBool()&&(nt.readBits(4),nt.readBool()&&nt.readBits(24)),nt.readBool()&&(nt.readUEG(),nt.readUEG()),nt.readBool()){let mi=nt.readBits(32),Li=nt.readBits(32);Ei=nt.readBool(),Di=Li,yn=mi*2,bi=Di/yn}}let ur=1;(Gn!==1||Bn!==1)&&(ur=Gn/Bn);let wr=0,pn=0;if(_n===0)wr=1,pn=2-Qt;else{let mi=_n===3?1:2,Li=_n===1?2:1;wr=mi,pn=Li*(2-Qt)}let $n=(An+1)*16,yi=(2-Qt)*((jn+1)*16);$n-=(rn+Pn)*wr,yi-=(Dn+oi)*pn;let Mi=Math.ceil($n*ur);return nt.destroy(),nt=null,{profile_string:sn,level_string:Zt,bit_depth:Hn,ref_frames:ln,chroma_format:Kt,chroma_format_string:je.getChromaFormatString(Kt),frame_rate:{fixed:Ei,fps:bi,fps_den:yn,fps_num:Di},sar_ratio:{width:Gn,height:Bn},codec_size:{width:$n,height:yi},present_size:{width:Mi,height:yi}}}static _skipScalingList(He,Xe){let nt=8,bt=8,Nt=0;for(let sn=0;sn<Xe;sn++)bt!==0&&(Nt=He.readSEG(),bt=(nt+Nt+256)%256),nt=bt===0?nt:bt}static getProfileString(He){switch(He){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(He){return(He/10).toFixed(1)}static getChromaFormatString(He){switch(He){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var rt=je,tt={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function Ke(Vn){return Vn>>>8&255|(Vn&255)<<8}function De(Vn){return(Vn&4278190080)>>>24|(Vn&16711680)>>>8|(Vn&65280)<<8|(Vn&255)<<24}function ze(Vn,He){return Vn[He]<<24|Vn[He+1]<<16|Vn[He+2]<<8|Vn[He+3]}class $e{constructor(He,Xe){this.TAG="FLVDemuxer",this._config=Xe,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=He.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=He.hasAudioTrack,this._hasVideo=He.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Ut,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let nt=new ArrayBuffer(2);return new DataView(nt).setInt16(0,256,!0),new Int16Array(nt)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(He){let Xe=new Uint8Array(He),nt={match:!1};if(Xe[0]!==70||Xe[1]!==76||Xe[2]!==86||Xe[3]!==1)return nt;let bt=(Xe[4]&4)>>>2!==0,Nt=(Xe[4]&1)!==0,sn=ze(Xe,5);return sn<9?nt:{match:!0,consumed:sn,dataOffset:sn,hasAudioTrack:bt,hasVideoTrack:Nt}}bindDataSource(He){return He.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(He){this._onTrackMetadata=He}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(He){this._onMediaInfo=He}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(He){this._onMetaDataArrived=He}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(He){this._onScriptDataArrived=He}get onError(){return this._onError}set onError(He){this._onError=He}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(He){this._onDataAvailable=He}get timestampBase(){return this._timestampBase}set timestampBase(He){this._timestampBase=He}get overridedDuration(){return this._duration}set overridedDuration(He){this._durationOverrided=!0,this._duration=He,this._mediaInfo.duration=He}set overridedHasAudio(He){this._hasAudioFlagOverrided=!0,this._hasAudio=He,this._mediaInfo.hasAudio=He}set overridedHasVideo(He){this._hasVideoFlagOverrided=!0,this._hasVideo=He,this._mediaInfo.hasVideo=He}resetMediaInfo(){this._mediaInfo=new Ut}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(He,Xe){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new pe("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let nt=0,bt=this._littleEndian;if(Xe===0)if(He.byteLength>13)nt=$e.probe(He).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,Xe+nt!==this._dataOffset&&xe.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(He,nt).getUint32(0,!bt)!==0&&xe.w(this.TAG,"PrevTagSize0 !== 0 !!!"),nt+=4);nt<He.byteLength;){this._dispatch=!0;let Nt=new DataView(He,nt);if(nt+11+4>He.byteLength)break;let sn=Nt.getUint8(0),Zt=Nt.getUint32(0,!bt)&16777215;if(nt+11+Zt+4>He.byteLength)break;if(sn!==8&&sn!==9&&sn!==18){xe.w(this.TAG,`Unsupported tag type ${sn}, skipped`),nt+=11+Zt+4;continue}let _n=Nt.getUint8(4),Kt=Nt.getUint8(5),qt=Nt.getUint8(6),Hn=Nt.getUint8(7),kt=qt|Kt<<8|_n<<16|Hn<<24;(Nt.getUint32(7,!bt)&16777215)!==0&&xe.w(this.TAG,"Meet tag which has StreamID != 0!");let An=nt+11;switch(sn){case 8:this._parseAudioData(He,An,Zt,kt);break;case 9:this._parseVideoData(He,An,Zt,kt,Xe+nt);break;case 18:this._parseScriptData(He,An,Zt);break}let jn=Nt.getUint32(11+Zt,!bt);jn!==11+Zt&&xe.w(this.TAG,`Invalid PrevTagSize ${jn}`),nt+=11+Zt+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),nt}_parseScriptData(He,Xe,nt){let bt=tn.parseScriptData(He,Xe,nt);if(bt.hasOwnProperty("onMetaData")){if(bt.onMetaData==null||typeof bt.onMetaData!="object"){xe.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&xe.w(this.TAG,"Found another onMetaData tag!"),this._metadata=bt;let Nt=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Nt)),typeof Nt.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=Nt.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof Nt.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=Nt.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof Nt.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Nt.audiodatarate),typeof Nt.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Nt.videodatarate),typeof Nt.width=="number"&&(this._mediaInfo.width=Nt.width),typeof Nt.height=="number"&&(this._mediaInfo.height=Nt.height),typeof Nt.duration=="number"){if(!this._durationOverrided){let sn=Math.floor(Nt.duration*this._timescale);this._duration=sn,this._mediaInfo.duration=sn}}else this._mediaInfo.duration=0;if(typeof Nt.framerate=="number"){let sn=Math.floor(Nt.framerate*1e3);if(sn>0){let Zt=sn/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Zt,this._referenceFrameRate.fps_num=sn,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Zt}}if(typeof Nt.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let sn=Nt.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(sn),Nt.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Nt,xe.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(bt).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},bt))}_parseKeyframesIndex(He){let Xe=[],nt=[];for(let bt=1;bt<He.times.length;bt++){let Nt=this._timestampBase+Math.floor(He.times[bt]*1e3);Xe.push(Nt),nt.push(He.filepositions[bt])}return{times:Xe,filepositions:nt}}_parseAudioData(He,Xe,nt,bt){if(nt<=1){xe.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let Nt=this._littleEndian,Zt=new DataView(He,Xe,nt).getUint8(0),_n=Zt>>>4;if(_n!==2&&_n!==10){this._onError(tt.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+_n);return}let Kt=0,qt=(Zt&12)>>>2;if(qt>=0&&qt<=4)Kt=this._flvSoundRateTable[qt];else{this._onError(tt.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+qt);return}let Hn=(Zt&2)>>>1,kt=Zt&1,ln=this._audioMetadata,An=this._audioTrack;if(ln||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),ln=this._audioMetadata={},ln.type="audio",ln.id=An.id,ln.timescale=this._timescale,ln.duration=this._duration,ln.audioSampleRate=Kt,ln.channelCount=kt===0?1:2),_n===10){let jn=this._parseAACAudioData(He,Xe+1,nt-1);if(jn==null)return;if(jn.packetType===0){ln.config&&xe.w(this.TAG,"Found another AudioSpecificConfig!");let Qt=jn.data;ln.audioSampleRate=Qt.samplingRate,ln.channelCount=Qt.channelCount,ln.codec=Qt.codec,ln.originalCodec=Qt.originalCodec,ln.config=Qt.config,ln.refSampleDuration=1024/ln.audioSampleRate*ln.timescale,xe.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",ln);let rn=this._mediaInfo;rn.audioCodec=ln.originalCodec,rn.audioSampleRate=ln.audioSampleRate,rn.audioChannelCount=ln.channelCount,rn.hasVideo?rn.videoCodec!=null&&(rn.mimeType='video/x-flv; codecs="'+rn.videoCodec+","+rn.audioCodec+'"'):rn.mimeType='video/x-flv; codecs="'+rn.audioCodec+'"',rn.isComplete()&&this._onMediaInfo(rn)}else if(jn.packetType===1){let Qt=this._timestampBase+bt,rn={unit:jn.data,length:jn.data.byteLength,dts:Qt,pts:Qt};An.samples.push(rn),An.length+=jn.data.length}else xe.e(this.TAG,`Flv: Unsupported AAC data type ${jn.packetType}`)}else if(_n===2){if(!ln.codec){let Pn=this._parseMP3AudioData(He,Xe+1,nt-1,!0);if(Pn==null)return;ln.audioSampleRate=Pn.samplingRate,ln.channelCount=Pn.channelCount,ln.codec=Pn.codec,ln.originalCodec=Pn.originalCodec,ln.refSampleDuration=1152/ln.audioSampleRate*ln.timescale,xe.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",ln);let Dn=this._mediaInfo;Dn.audioCodec=ln.codec,Dn.audioSampleRate=ln.audioSampleRate,Dn.audioChannelCount=ln.channelCount,Dn.audioDataRate=Pn.bitRate,Dn.hasVideo?Dn.videoCodec!=null&&(Dn.mimeType='video/x-flv; codecs="'+Dn.videoCodec+","+Dn.audioCodec+'"'):Dn.mimeType='video/x-flv; codecs="'+Dn.audioCodec+'"',Dn.isComplete()&&this._onMediaInfo(Dn)}let jn=this._parseMP3AudioData(He,Xe+1,nt-1,!1);if(jn==null)return;let Qt=this._timestampBase+bt,rn={unit:jn,length:jn.byteLength,dts:Qt,pts:Qt};An.samples.push(rn),An.length+=jn.length}}_parseAACAudioData(He,Xe,nt){if(nt<=1){xe.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let bt={},Nt=new Uint8Array(He,Xe,nt);return bt.packetType=Nt[0],Nt[0]===0?bt.data=this._parseAACAudioSpecificConfig(He,Xe+1,nt-1):bt.data=Nt.subarray(1),bt}_parseAACAudioSpecificConfig(He,Xe,nt){let bt=new Uint8Array(He,Xe,nt),Nt=null,sn=0,Zt=0,_n=null,Kt=0,qt=null;if(sn=Zt=bt[0]>>>3,Kt=(bt[0]&7)<<1|bt[1]>>>7,Kt<0||Kt>=this._mpegSamplingRates.length){this._onError(tt.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Hn=this._mpegSamplingRates[Kt],kt=(bt[1]&120)>>>3;if(kt<0||kt>=8){this._onError(tt.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}sn===5&&(qt=(bt[1]&7)<<1|bt[2]>>>7,_n=(bt[2]&124)>>>2);let ln=self.navigator.userAgent.toLowerCase();return ln.indexOf("firefox")!==-1?Kt>=6?(sn=5,Nt=new Array(4),qt=Kt-3):(sn=2,Nt=new Array(2),qt=Kt):ln.indexOf("android")!==-1?(sn=2,Nt=new Array(2),qt=Kt):(sn=5,qt=Kt,Nt=new Array(4),Kt>=6?qt=Kt-3:kt===1&&(sn=2,Nt=new Array(2),qt=Kt)),Nt[0]=sn<<3,Nt[0]|=(Kt&15)>>>1,Nt[1]=(Kt&15)<<7,Nt[1]|=(kt&15)<<3,sn===5&&(Nt[1]|=(qt&15)>>>1,Nt[2]=(qt&1)<<7,Nt[2]|=8,Nt[3]=0),{config:Nt,samplingRate:Hn,channelCount:kt,codec:"mp4a.40."+sn,originalCodec:"mp4a.40."+Zt}}_parseMP3AudioData(He,Xe,nt,bt){if(nt<4){xe.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let Nt=this._littleEndian,sn=new Uint8Array(He,Xe,nt),Zt=null;if(bt){if(sn[0]!==255)return;let _n=sn[1]>>>3&3,Kt=(sn[1]&6)>>1,qt=(sn[2]&240)>>>4,Hn=(sn[2]&12)>>>2,ln=(sn[3]>>>6&3)!==3?2:1,An=0,jn=0,Qt=34,rn="mp3";switch(_n){case 0:An=this._mpegAudioV25SampleRateTable[Hn];break;case 2:An=this._mpegAudioV20SampleRateTable[Hn];break;case 3:An=this._mpegAudioV10SampleRateTable[Hn];break}switch(Kt){case 1:Qt=34,qt<this._mpegAudioL3BitRateTable.length&&(jn=this._mpegAudioL3BitRateTable[qt]);break;case 2:Qt=33,qt<this._mpegAudioL2BitRateTable.length&&(jn=this._mpegAudioL2BitRateTable[qt]);break;case 3:Qt=32,qt<this._mpegAudioL1BitRateTable.length&&(jn=this._mpegAudioL1BitRateTable[qt]);break}Zt={bitRate:jn,samplingRate:An,channelCount:ln,codec:rn,originalCodec:rn}}else Zt=sn;return Zt}_parseVideoData(He,Xe,nt,bt,Nt){if(nt<=1){xe.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let sn=new Uint8Array(He,Xe,nt)[0],Zt=(sn&240)>>>4,_n=sn&15;if(_n!==7){this._onError(tt.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${_n}`);return}this._parseAVCVideoPacket(He,Xe+1,nt-1,bt,Nt,Zt)}_parseAVCVideoPacket(He,Xe,nt,bt,Nt,sn){if(nt<4){xe.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let Zt=this._littleEndian,_n=new DataView(He,Xe,nt),Kt=_n.getUint8(0),Hn=(_n.getUint32(0,!Zt)&16777215)<<8>>8;if(Kt===0)this._parseAVCDecoderConfigurationRecord(He,Xe+4,nt-4);else if(Kt===1)this._parseAVCVideoData(He,Xe+4,nt-4,bt,Nt,sn,Hn);else if(Kt!==2){this._onError(tt.FORMAT_ERROR,`Flv: Invalid video packet type ${Kt}`);return}}_parseAVCDecoderConfigurationRecord(He,Xe,nt){if(nt<7){xe.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let bt=this._videoMetadata,Nt=this._videoTrack,sn=this._littleEndian,Zt=new DataView(He,Xe,nt);bt?typeof bt.avcc!="undefined"&&xe.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),bt=this._videoMetadata={},bt.type="video",bt.id=Nt.id,bt.timescale=this._timescale,bt.duration=this._duration);let _n=Zt.getUint8(0),Kt=Zt.getUint8(1),qt=Zt.getUint8(2),Hn=Zt.getUint8(3);if(_n!==1||Kt===0){this._onError(tt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Zt.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(tt.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let kt=Zt.getUint8(5)&31;if(kt===0){this._onError(tt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else kt>1&&xe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${kt}`);let ln=6;for(let jn=0;jn<kt;jn++){let Qt=Zt.getUint16(ln,!sn);if(ln+=2,Qt===0)continue;let rn=new Uint8Array(He,Xe+ln,Qt);ln+=Qt;let Pn=rt.parseSPS(rn);if(jn!==0)continue;bt.codecWidth=Pn.codec_size.width,bt.codecHeight=Pn.codec_size.height,bt.presentWidth=Pn.present_size.width,bt.presentHeight=Pn.present_size.height,bt.profile=Pn.profile_string,bt.level=Pn.level_string,bt.bitDepth=Pn.bit_depth,bt.chromaFormat=Pn.chroma_format,bt.sarRatio=Pn.sar_ratio,bt.frameRate=Pn.frame_rate,(Pn.frame_rate.fixed===!1||Pn.frame_rate.fps_num===0||Pn.frame_rate.fps_den===0)&&(bt.frameRate=this._referenceFrameRate);let Dn=bt.frameRate.fps_den,oi=bt.frameRate.fps_num;bt.refSampleDuration=bt.timescale*(Dn/oi);let ai=rn.subarray(1,4),Gn="avc1.";for(let bi=0;bi<3;bi++){let Ei=ai[bi].toString(16);Ei.length<2&&(Ei="0"+Ei),Gn+=Ei}bt.codec=Gn;let Bn=this._mediaInfo;Bn.width=bt.codecWidth,Bn.height=bt.codecHeight,Bn.fps=bt.frameRate.fps,Bn.profile=bt.profile,Bn.level=bt.level,Bn.refFrames=Pn.ref_frames,Bn.chromaFormat=Pn.chroma_format_string,Bn.sarNum=bt.sarRatio.width,Bn.sarDen=bt.sarRatio.height,Bn.videoCodec=Gn,Bn.hasAudio?Bn.audioCodec!=null&&(Bn.mimeType='video/x-flv; codecs="'+Bn.videoCodec+","+Bn.audioCodec+'"'):Bn.mimeType='video/x-flv; codecs="'+Bn.videoCodec+'"',Bn.isComplete()&&this._onMediaInfo(Bn)}let An=Zt.getUint8(ln);if(An===0){this._onError(tt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else An>1&&xe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${An}`);ln++;for(let jn=0;jn<An;jn++){let Qt=Zt.getUint16(ln,!sn);ln+=2,Qt!==0&&(ln+=Qt)}bt.avcc=new Uint8Array(nt),bt.avcc.set(new Uint8Array(He,Xe,nt),0),xe.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",bt)}_parseAVCVideoData(He,Xe,nt,bt,Nt,sn,Zt){let _n=this._littleEndian,Kt=new DataView(He,Xe,nt),qt=[],Hn=0,kt=0;const ln=this._naluLengthSize;let An=this._timestampBase+bt,jn=sn===1;for(;kt<nt;){if(kt+4>=nt){xe.w(this.TAG,`Malformed Nalu near timestamp ${An}, offset = ${kt}, dataSize = ${nt}`);break}let Qt=Kt.getUint32(kt,!_n);if(ln===3&&(Qt>>>=8),Qt>nt-ln){xe.w(this.TAG,`Malformed Nalus near timestamp ${An}, NaluSize > DataSize!`);return}let rn=Kt.getUint8(kt+ln)&31;rn===5&&(jn=!0);let Pn=new Uint8Array(He,Xe+kt,ln+Qt),Dn={type:rn,data:Pn};qt.push(Dn),Hn+=Pn.byteLength,kt+=ln+Qt}if(qt.length){let Qt=this._videoTrack,rn={units:qt,length:Hn,isKeyframe:jn,dts:An,cts:Zt,pts:An+Zt};jn&&(rn.fileposition=Nt),Qt.samples.push(rn),Qt.length+=Hn}}}var We=$e;class Ve{static init(){Ve.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let Xe in Ve.types)Ve.types.hasOwnProperty(Xe)&&(Ve.types[Xe]=[Xe.charCodeAt(0),Xe.charCodeAt(1),Xe.charCodeAt(2),Xe.charCodeAt(3)]);let He=Ve.constants={};He.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),He.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),He.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),He.STSC=He.STCO=He.STTS,He.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),He.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),He.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),He.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),He.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),He.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(He){let Xe=8,nt=null,bt=Array.prototype.slice.call(arguments,1),Nt=bt.length;for(let Zt=0;Zt<Nt;Zt++)Xe+=bt[Zt].byteLength;nt=new Uint8Array(Xe),nt[0]=Xe>>>24&255,nt[1]=Xe>>>16&255,nt[2]=Xe>>>8&255,nt[3]=Xe&255,nt.set(He,4);let sn=8;for(let Zt=0;Zt<Nt;Zt++)nt.set(bt[Zt],sn),sn+=bt[Zt].byteLength;return nt}static generateInitSegment(He){let Xe=Ve.box(Ve.types.ftyp,Ve.constants.FTYP),nt=Ve.moov(He),bt=new Uint8Array(Xe.byteLength+nt.byteLength);return bt.set(Xe,0),bt.set(nt,Xe.byteLength),bt}static moov(He){let Xe=Ve.mvhd(He.timescale,He.duration),nt=Ve.trak(He),bt=Ve.mvex(He);return Ve.box(Ve.types.moov,Xe,nt,bt)}static mvhd(He,Xe){return Ve.box(Ve.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,He>>>24&255,He>>>16&255,He>>>8&255,He&255,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(He){return Ve.box(Ve.types.trak,Ve.tkhd(He),Ve.mdia(He))}static tkhd(He){let Xe=He.id,nt=He.duration,bt=He.presentWidth,Nt=He.presentHeight;return Ve.box(Ve.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe&255,0,0,0,0,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,bt>>>8&255,bt&255,0,0,Nt>>>8&255,Nt&255,0,0]))}static mdia(He){return Ve.box(Ve.types.mdia,Ve.mdhd(He),Ve.hdlr(He),Ve.minf(He))}static mdhd(He){let Xe=He.timescale,nt=He.duration;return Ve.box(Ve.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe&255,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255,85,196,0,0]))}static hdlr(He){let Xe=null;return He.type==="audio"?Xe=Ve.constants.HDLR_AUDIO:Xe=Ve.constants.HDLR_VIDEO,Ve.box(Ve.types.hdlr,Xe)}static minf(He){let Xe=null;return He.type==="audio"?Xe=Ve.box(Ve.types.smhd,Ve.constants.SMHD):Xe=Ve.box(Ve.types.vmhd,Ve.constants.VMHD),Ve.box(Ve.types.minf,Xe,Ve.dinf(),Ve.stbl(He))}static dinf(){return Ve.box(Ve.types.dinf,Ve.box(Ve.types.dref,Ve.constants.DREF))}static stbl(He){return Ve.box(Ve.types.stbl,Ve.stsd(He),Ve.box(Ve.types.stts,Ve.constants.STTS),Ve.box(Ve.types.stsc,Ve.constants.STSC),Ve.box(Ve.types.stsz,Ve.constants.STSZ),Ve.box(Ve.types.stco,Ve.constants.STCO))}static stsd(He){return He.type==="audio"?He.codec==="mp3"?Ve.box(Ve.types.stsd,Ve.constants.STSD_PREFIX,Ve.mp3(He)):Ve.box(Ve.types.stsd,Ve.constants.STSD_PREFIX,Ve.mp4a(He)):Ve.box(Ve.types.stsd,Ve.constants.STSD_PREFIX,Ve.avc1(He))}static mp3(He){let Xe=He.channelCount,nt=He.audioSampleRate,bt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Xe,0,16,0,0,0,0,nt>>>8&255,nt&255,0,0]);return Ve.box(Ve.types[".mp3"],bt)}static mp4a(He){let Xe=He.channelCount,nt=He.audioSampleRate,bt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Xe,0,16,0,0,0,0,nt>>>8&255,nt&255,0,0]);return Ve.box(Ve.types.mp4a,bt,Ve.esds(He))}static esds(He){let Xe=He.config||[],nt=Xe.length,bt=new Uint8Array([0,0,0,0,3,23+nt,0,1,0,4,15+nt,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([nt]).concat(Xe).concat([6,1,2]));return Ve.box(Ve.types.esds,bt)}static avc1(He){let Xe=He.avcc,nt=He.codecWidth,bt=He.codecHeight,Nt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,nt>>>8&255,nt&255,bt>>>8&255,bt&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Ve.box(Ve.types.avc1,Nt,Ve.box(Ve.types.avcC,Xe))}static mvex(He){return Ve.box(Ve.types.mvex,Ve.trex(He))}static trex(He){let Xe=He.id,nt=new Uint8Array([0,0,0,0,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Ve.box(Ve.types.trex,nt)}static moof(He,Xe){return Ve.box(Ve.types.moof,Ve.mfhd(He.sequenceNumber),Ve.traf(He,Xe))}static mfhd(He){let Xe=new Uint8Array([0,0,0,0,He>>>24&255,He>>>16&255,He>>>8&255,He&255]);return Ve.box(Ve.types.mfhd,Xe)}static traf(He,Xe){let nt=He.id,bt=Ve.box(Ve.types.tfhd,new Uint8Array([0,0,0,0,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255])),Nt=Ve.box(Ve.types.tfdt,new Uint8Array([0,0,0,0,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe&255])),sn=Ve.sdtp(He),Zt=Ve.trun(He,sn.byteLength+16+16+8+16+8+8);return Ve.box(Ve.types.traf,bt,Nt,Zt,sn)}static sdtp(He){let Xe=He.samples||[],nt=Xe.length,bt=new Uint8Array(4+nt);for(let Nt=0;Nt<nt;Nt++){let sn=Xe[Nt].flags;bt[Nt+4]=sn.isLeading<<6|sn.dependsOn<<4|sn.isDependedOn<<2|sn.hasRedundancy}return Ve.box(Ve.types.sdtp,bt)}static trun(He,Xe){let nt=He.samples||[],bt=nt.length,Nt=12+16*bt,sn=new Uint8Array(Nt);Xe+=8+Nt,sn.set([0,0,15,1,bt>>>24&255,bt>>>16&255,bt>>>8&255,bt&255,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe&255],0);for(let Zt=0;Zt<bt;Zt++){let _n=nt[Zt].duration,Kt=nt[Zt].size,qt=nt[Zt].flags,Hn=nt[Zt].cts;sn.set([_n>>>24&255,_n>>>16&255,_n>>>8&255,_n&255,Kt>>>24&255,Kt>>>16&255,Kt>>>8&255,Kt&255,qt.isLeading<<2|qt.dependsOn,qt.isDependedOn<<6|qt.hasRedundancy<<4|qt.isNonSync,0,0,Hn>>>24&255,Hn>>>16&255,Hn>>>8&255,Hn&255],12+16*Zt)}return Ve.box(Ve.types.trun,sn)}static mdat(He){return Ve.box(Ve.types.mdat,He)}}Ve.init();var pt=Ve;class Lt{static getSilentFrame(He,Xe){if(He==="mp4a.40.2"){if(Xe===1)return new Uint8Array([0,200,0,128,35,128]);if(Xe===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(Xe===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(Xe===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(Xe===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(Xe===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(Xe===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(Xe===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(Xe===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var on=Lt;class Xt{constructor(He,Xe,nt,bt,Nt){this.dts=He,this.pts=Xe,this.duration=nt,this.originalDts=bt,this.isSyncPoint=Nt,this.fileposition=null}}class Rt{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(He){He.isSyncPoint=!0,this.syncPoints.push(He)}}class fn{constructor(){this._list=[]}clear(){this._list=[]}appendArray(He){let Xe=this._list;He.length!==0&&(Xe.length>0&&He[0].originalDts<Xe[Xe.length-1].originalDts&&this.clear(),Array.prototype.push.apply(Xe,He))}getLastSyncPointBeforeDts(He){if(this._list.length==0)return null;let Xe=this._list,nt=0,bt=Xe.length-1,Nt=0,sn=0,Zt=bt;for(He<Xe[0].dts&&(nt=0,sn=Zt+1);sn<=Zt;)if(Nt=sn+Math.floor((Zt-sn)/2),Nt===bt||He>=Xe[Nt].dts&&He<Xe[Nt+1].dts){nt=Nt;break}else Xe[Nt].dts<He?sn=Nt+1:Zt=Nt-1;return this._list[nt]}}class En{constructor(He){this._type=He,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return this._list.length===0}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(He){let Xe=this._list;if(Xe.length===0)return-2;let nt=Xe.length-1,bt=0,Nt=0,sn=nt,Zt=0;if(He<Xe[0].originalBeginDts)return Zt=-1,Zt;for(;Nt<=sn;)if(bt=Nt+Math.floor((sn-Nt)/2),bt===nt||He>Xe[bt].lastSample.originalDts&&He<Xe[bt+1].originalBeginDts){Zt=bt;break}else Xe[bt].originalBeginDts<He?Nt=bt+1:sn=bt-1;return Zt}_searchNearestSegmentAfter(He){return this._searchNearestSegmentBefore(He)+1}append(He){let Xe=this._list,nt=He,bt=this._lastAppendLocation,Nt=0;bt!==-1&&bt<Xe.length&&nt.originalBeginDts>=Xe[bt].lastSample.originalDts&&(bt===Xe.length-1||bt<Xe.length-1&&nt.originalBeginDts<Xe[bt+1].originalBeginDts)?Nt=bt+1:Xe.length>0&&(Nt=this._searchNearestSegmentBefore(nt.originalBeginDts)+1),this._lastAppendLocation=Nt,this._list.splice(Nt,0,nt)}getLastSegmentBefore(He){let Xe=this._searchNearestSegmentBefore(He);return Xe>=0?this._list[Xe]:null}getLastSampleBefore(He){let Xe=this.getLastSegmentBefore(He);return Xe!=null?Xe.lastSample:null}getLastSyncPointBefore(He){let Xe=this._searchNearestSegmentBefore(He),nt=this._list[Xe].syncPoints;for(;nt.length===0&&Xe>0;)Xe--,nt=this._list[Xe].syncPoints;return nt.length>0?nt[nt.length-1]:null}}class Sn{constructor(He){this.TAG="MP4Remuxer",this._config=He,this._isLive=He.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new En("audio"),this._videoSegmentInfoList=new En("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(re.chrome&&(re.version.major<50||re.version.major===50&&re.version.build<2661)),this._fillSilentAfterSeek=re.msedge||re.msie,this._mp3UseMpegAudio=!re.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(He){return He.onDataAvailable=this.remux.bind(this),He.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(He){this._onInitSegment=He}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(He){this._onMediaSegment=He}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(He){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(He,Xe){if(!this._onMediaSegment)throw new pe("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(He,Xe),this._remuxVideo(Xe),this._remuxAudio(He)}_onTrackMetadataReceived(He,Xe){let nt=null,bt="mp4",Nt=Xe.codec;if(He==="audio")this._audioMeta=Xe,Xe.codec==="mp3"&&this._mp3UseMpegAudio?(bt="mpeg",Nt="",nt=new Uint8Array):nt=pt.generateInitSegment(Xe);else if(He==="video")this._videoMeta=Xe,nt=pt.generateInitSegment(Xe);else return;if(!this._onInitSegment)throw new pe("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(He,{type:He,data:nt.buffer,codec:Nt,container:`${He}/${bt}`,mediaDuration:Xe.duration})}_calculateDtsBase(He,Xe){this._dtsBaseInited||(He.samples&&He.samples.length&&(this._audioDtsBase=He.samples[0].dts),Xe.samples&&Xe.samples.length&&(this._videoDtsBase=Xe.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let He=this._videoStashedLastSample,Xe=this._audioStashedLastSample,nt={type:"video",id:1,sequenceNumber:0,samples:[],length:0};He!=null&&(nt.samples.push(He),nt.length=He.length);let bt={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};Xe!=null&&(bt.samples.push(Xe),bt.length=Xe.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(nt,!0),this._remuxAudio(bt,!0)}_remuxAudio(He,Xe){if(this._audioMeta==null)return;let nt=He,bt=nt.samples,Nt,sn=-1,Zt=-1,_n=-1,Kt=this._audioMeta.refSampleDuration,qt=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Hn=this._dtsBaseInited&&this._audioNextDts===void 0,kt=!1;if(!bt||bt.length===0||bt.length===1&&!Xe)return;let ln=0,An=null,jn=0;qt?(ln=0,jn=nt.length):(ln=8,jn=8+nt.length);let Qt=null;if(bt.length>1&&(Qt=bt.pop(),jn-=Qt.length),this._audioStashedLastSample!=null){let Bn=this._audioStashedLastSample;this._audioStashedLastSample=null,bt.unshift(Bn),jn+=Bn.length}Qt!=null&&(this._audioStashedLastSample=Qt);let rn=bt[0].dts-this._dtsBase;if(this._audioNextDts)Nt=rn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Nt=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(kt=!0);else{let Bn=this._audioSegmentInfoList.getLastSampleBefore(rn);if(Bn!=null){let bi=rn-(Bn.originalDts+Bn.duration);bi<=3&&(bi=0);let Ei=Bn.dts+Bn.duration+bi;Nt=rn-Ei}else Nt=0}if(kt){let Bn=rn-Nt,bi=this._videoSegmentInfoList.getLastSegmentBefore(rn);if(bi!=null&&bi.beginDts<Bn){let Ei=on.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Ei){let Di=bi.beginDts,yn=Bn-bi.beginDts;xe.v(this.TAG,`InsertPrefixSilentAudio: dts: ${Di}, duration: ${yn}`),bt.unshift({unit:Ei,dts:Di,pts:Di}),jn+=Ei.byteLength}}else kt=!1}let Pn=[];for(let Bn=0;Bn<bt.length;Bn++){let bi=bt[Bn],Ei=bi.unit,Di=bi.dts-this._dtsBase,yn=Di-Nt;sn===-1&&(sn=yn);let Tr=0;Bn!==bt.length-1?Tr=bt[Bn+1].dts-this._dtsBase-Nt-yn:Qt!=null?Tr=Qt.dts-this._dtsBase-Nt-yn:Pn.length>=1?Tr=Pn[Pn.length-1].duration:Tr=Math.floor(Kt);let ur=!1,wr=null;if(Tr>Kt*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!re.safari){ur=!0;let pn=Math.abs(Tr-Kt),$n=Math.ceil(pn/Kt),yi=yn+Kt;xe.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${yn+Tr} ms, expected: ${yn+Math.round(Kt)} ms, delta: ${Math.round(pn)} ms, generate: ${$n} frames`);let Mi=on.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Mi==null&&(xe.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),Mi=Ei),wr=[];for(let Li=0;Li<$n;Li++){let dr=Math.round(yi);if(wr.length>0){let vr=wr[wr.length-1];vr.duration=dr-vr.dts}let ar={dts:dr,pts:dr,cts:0,unit:Mi,size:Mi.byteLength,duration:0,originalDts:Di,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};wr.push(ar),jn+=ar.size,yi+=Kt}let mi=wr[wr.length-1];mi.duration=yn+Tr-mi.dts,Tr=Math.round(Kt)}Pn.push({dts:yn,pts:yn,cts:0,unit:bi.unit,size:bi.unit.byteLength,duration:Tr,originalDts:Di,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),ur&&Pn.push.apply(Pn,wr)}qt?An=new Uint8Array(jn):(An=new Uint8Array(jn),An[0]=jn>>>24&255,An[1]=jn>>>16&255,An[2]=jn>>>8&255,An[3]=jn&255,An.set(pt.types.mdat,4));for(let Bn=0;Bn<Pn.length;Bn++){let bi=Pn[Bn].unit;An.set(bi,ln),ln+=bi.byteLength}let Dn=Pn[Pn.length-1];Zt=Dn.dts+Dn.duration,this._audioNextDts=Zt;let oi=new Rt;oi.beginDts=sn,oi.endDts=Zt,oi.beginPts=sn,oi.endPts=Zt,oi.originalBeginDts=Pn[0].originalDts,oi.originalEndDts=Dn.originalDts+Dn.duration,oi.firstSample=new Xt(Pn[0].dts,Pn[0].pts,Pn[0].duration,Pn[0].originalDts,!1),oi.lastSample=new Xt(Dn.dts,Dn.pts,Dn.duration,Dn.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(oi),nt.samples=Pn,nt.sequenceNumber++;let ai=null;qt?ai=new Uint8Array:ai=pt.moof(nt,sn),nt.samples=[],nt.length=0;let Gn={type:"audio",data:this._mergeBoxes(ai,An).buffer,sampleCount:Pn.length,info:oi};qt&&Hn&&(Gn.timestampOffset=sn),this._onMediaSegment("audio",Gn)}_remuxVideo(He,Xe){if(this._videoMeta==null)return;let nt=He,bt=nt.samples,Nt,sn=-1,Zt=-1,_n=-1,Kt=-1;if(!bt||bt.length===0||bt.length===1&&!Xe)return;let qt=8,Hn=null,kt=8+He.length,ln=null;if(bt.length>1&&(ln=bt.pop(),kt-=ln.length),this._videoStashedLastSample!=null){let Dn=this._videoStashedLastSample;this._videoStashedLastSample=null,bt.unshift(Dn),kt+=Dn.length}ln!=null&&(this._videoStashedLastSample=ln);let An=bt[0].dts-this._dtsBase;if(this._videoNextDts)Nt=An-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Nt=0;else{let Dn=this._videoSegmentInfoList.getLastSampleBefore(An);if(Dn!=null){let oi=An-(Dn.originalDts+Dn.duration);oi<=3&&(oi=0);let ai=Dn.dts+Dn.duration+oi;Nt=An-ai}else Nt=0}let jn=new Rt,Qt=[];for(let Dn=0;Dn<bt.length;Dn++){let oi=bt[Dn],ai=oi.dts-this._dtsBase,Gn=oi.isKeyframe,Bn=ai-Nt,bi=oi.cts,Ei=Bn+bi;sn===-1&&(sn=Bn,_n=Ei);let Di=0;if(Dn!==bt.length-1?Di=bt[Dn+1].dts-this._dtsBase-Nt-Bn:ln!=null?Di=ln.dts-this._dtsBase-Nt-Bn:Qt.length>=1?Di=Qt[Qt.length-1].duration:Di=Math.floor(this._videoMeta.refSampleDuration),Gn){let yn=new Xt(Bn,Ei,Di,oi.dts,!0);yn.fileposition=oi.fileposition,jn.appendSyncPoint(yn)}Qt.push({dts:Bn,pts:Ei,cts:bi,units:oi.units,size:oi.length,isKeyframe:Gn,duration:Di,originalDts:ai,flags:{isLeading:0,dependsOn:Gn?2:1,isDependedOn:Gn?1:0,hasRedundancy:0,isNonSync:Gn?0:1}})}Hn=new Uint8Array(kt),Hn[0]=kt>>>24&255,Hn[1]=kt>>>16&255,Hn[2]=kt>>>8&255,Hn[3]=kt&255,Hn.set(pt.types.mdat,4);for(let Dn=0;Dn<Qt.length;Dn++){let oi=Qt[Dn].units;for(;oi.length;){let Gn=oi.shift().data;Hn.set(Gn,qt),qt+=Gn.byteLength}}let rn=Qt[Qt.length-1];if(Zt=rn.dts+rn.duration,Kt=rn.pts+rn.duration,this._videoNextDts=Zt,jn.beginDts=sn,jn.endDts=Zt,jn.beginPts=_n,jn.endPts=Kt,jn.originalBeginDts=Qt[0].originalDts,jn.originalEndDts=rn.originalDts+rn.duration,jn.firstSample=new Xt(Qt[0].dts,Qt[0].pts,Qt[0].duration,Qt[0].originalDts,Qt[0].isKeyframe),jn.lastSample=new Xt(rn.dts,rn.pts,rn.duration,rn.originalDts,rn.isKeyframe),this._isLive||this._videoSegmentInfoList.append(jn),nt.samples=Qt,nt.sequenceNumber++,this._forceFirstIDR){let Dn=Qt[0].flags;Dn.dependsOn=2,Dn.isNonSync=0}let Pn=pt.moof(nt,sn);nt.samples=[],nt.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Pn,Hn).buffer,sampleCount:Qt.length,info:jn})}_mergeBoxes(He,Xe){let nt=new Uint8Array(He.byteLength+Xe.byteLength);return nt.set(He,0),nt.set(Xe,He.byteLength),nt}}var dn=Sn,vn={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};class Wn{constructor(He,Xe){this.TAG="TransmuxingController",this._emitter=new(Le()),this._config=Xe,He.segments||(He.segments=[{duration:He.duration,filesize:He.filesize,url:He.url}]),typeof He.cors!="boolean"&&(He.cors=!0),typeof He.withCredentials!="boolean"&&(He.withCredentials=!1),this._mediaDataSource=He,this._currentSegmentIndex=0;let nt=0;this._mediaDataSource.segments.forEach(bt=>{bt.timestampBase=nt,nt+=bt.duration,bt.cors=He.cors,bt.withCredentials=He.withCredentials,Xe.referrerPolicy&&(bt.referrerPolicy=Xe.referrerPolicy)}),!isNaN(nt)&&this._mediaDataSource.duration!==nt&&(this._mediaDataSource.duration=nt),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(He,Xe){this._emitter.addListener(He,Xe)}off(He,Xe){this._emitter.removeListener(He,Xe)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(He,Xe){this._currentSegmentIndex=He;let nt=this._mediaDataSource.segments[He],bt=this._ioctl=new _t(nt,this._config,He);bt.onError=this._onIOException.bind(this),bt.onSeeked=this._onIOSeeked.bind(this),bt.onComplete=this._onIOComplete.bind(this),bt.onRedirect=this._onIORedirect.bind(this),bt.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),Xe?this._demuxer.bindDataSource(this._ioctl):bt.onDataArrival=this._onInitChunkArrival.bind(this),bt.open(Xe)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(He){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let Xe=this._searchSegmentIndexContains(He);if(Xe===this._currentSegmentIndex){let nt=this._mediaInfo.segments[Xe];if(nt==null)this._pendingSeekTime=He;else{let bt=nt.getNearestKeyframe(He);this._remuxer.seek(bt.milliseconds),this._ioctl.seek(bt.fileposition),this._pendingResolveSeekPoint=bt.milliseconds}}else{let nt=this._mediaInfo.segments[Xe];if(nt==null)this._pendingSeekTime=He,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(Xe);else{let bt=nt.getNearestKeyframe(He);this._internalAbort(),this._remuxer.seek(He),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[Xe].timestampBase,this._loadSegment(Xe,bt.fileposition),this._pendingResolveSeekPoint=bt.milliseconds,this._reportSegmentMediaInfo(Xe)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(He){let Xe=this._mediaDataSource.segments,nt=Xe.length-1;for(let bt=0;bt<Xe.length;bt++)if(He<Xe[bt].timestampBase){nt=bt-1;break}return nt}_onInitChunkArrival(He,Xe){let nt=null,bt=0;if(Xe>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,bt=this._demuxer.parseChunks(He,Xe);else if((nt=We.probe(He)).match){this._demuxer=new We(nt,this._config),this._remuxer||(this._remuxer=new dn(this._config));let Nt=this._mediaDataSource;Nt.duration!=null&&!isNaN(Nt.duration)&&(this._demuxer.overridedDuration=Nt.duration),typeof Nt.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Nt.hasAudio),typeof Nt.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Nt.hasVideo),this._demuxer.timestampBase=Nt.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),bt=this._demuxer.parseChunks(He,Xe)}else nt=null,xe.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(vn.DEMUX_ERROR,tt.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),bt=0;return bt}_onMediaInfo(He){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},He),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Ut.prototype));let Xe=Object.assign({},He);Object.setPrototypeOf(Xe,Ut.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=Xe,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let nt=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(nt)})}_onMetaDataArrived(He){this._emitter.emit(vn.METADATA_ARRIVED,He)}_onScriptDataArrived(He){this._emitter.emit(vn.SCRIPTDATA_ARRIVED,He)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(He){let nt=He+1;nt<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(nt)):(this._remuxer.flushStashedSamples(),this._emitter.emit(vn.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(He){let Xe=this._ioctl.extraData;this._mediaDataSource.segments[Xe].redirectedURL=He}_onIORecoveredEarlyEof(){this._emitter.emit(vn.RECOVERED_EARLY_EOF)}_onIOException(He,Xe){xe.e(this.TAG,`IOException: type = ${He}, code = ${Xe.code}, msg = ${Xe.msg}`),this._emitter.emit(vn.IO_ERROR,He,Xe),this._disableStatisticsReporter()}_onDemuxException(He,Xe){xe.e(this.TAG,`DemuxException: type = ${He}, info = ${Xe}`),this._emitter.emit(vn.DEMUX_ERROR,He,Xe)}_onRemuxerInitSegmentArrival(He,Xe){this._emitter.emit(vn.INIT_SEGMENT,He,Xe)}_onRemuxerMediaSegmentArrival(He,Xe){if(this._pendingSeekTime==null&&(this._emitter.emit(vn.MEDIA_SEGMENT,He,Xe),this._pendingResolveSeekPoint!=null&&He==="video")){let nt=Xe.info.syncPoints,bt=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,re.safari&&nt.length>0&&nt[0].originalDts===bt&&(bt=nt[0].pts),this._emitter.emit(vn.RECOMMEND_SEEKPOINT,bt)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(He){let Xe=this._mediaInfo.segments[He],nt=Object.assign({},Xe);nt.duration=this._mediaInfo.duration,nt.segmentCount=this._mediaInfo.segmentCount,delete nt.segments,delete nt.keyframesIndex,this._emitter.emit(vn.MEDIA_INFO,nt)}_reportStatisticsInfo(){let He={};He.url=this._ioctl.currentURL,He.hasRedirect=this._ioctl.hasRedirect,He.hasRedirect&&(He.redirectedURL=this._ioctl.currentRedirectedURL),He.speed=this._ioctl.currentSpeed,He.loaderType=this._ioctl.loaderType,He.currentSegmentIndex=this._currentSegmentIndex,He.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(vn.STATISTICS_INFO,He)}}var ri=Wn,Qn=function(Vn){let He="TransmuxingWorker",Xe=null,nt=jn.bind(this);Se.install(),Vn.addEventListener("message",function(Qt){switch(Qt.data.cmd){case"init":Xe=new ri(Qt.data.param[0],Qt.data.param[1]),Xe.on(vn.IO_ERROR,kt.bind(this)),Xe.on(vn.DEMUX_ERROR,ln.bind(this)),Xe.on(vn.INIT_SEGMENT,bt.bind(this)),Xe.on(vn.MEDIA_SEGMENT,Nt.bind(this)),Xe.on(vn.LOADING_COMPLETE,sn.bind(this)),Xe.on(vn.RECOVERED_EARLY_EOF,Zt.bind(this)),Xe.on(vn.MEDIA_INFO,_n.bind(this)),Xe.on(vn.METADATA_ARRIVED,Kt.bind(this)),Xe.on(vn.SCRIPTDATA_ARRIVED,qt.bind(this)),Xe.on(vn.STATISTICS_INFO,Hn.bind(this)),Xe.on(vn.RECOMMEND_SEEKPOINT,An.bind(this));break;case"destroy":Xe&&(Xe.destroy(),Xe=null),Vn.postMessage({msg:"destroyed"});break;case"start":Xe.start();break;case"stop":Xe.stop();break;case"seek":Xe.seek(Qt.data.param);break;case"pause":Xe.pause();break;case"resume":Xe.resume();break;case"logging_config":{let rn=Qt.data.param;xt.applyConfig(rn),rn.enableCallback===!0?xt.addLogListener(nt):xt.removeLogListener(nt);break}}});function bt(Qt,rn){let Pn={msg:vn.INIT_SEGMENT,data:{type:Qt,data:rn}};Vn.postMessage(Pn,[rn.data])}function Nt(Qt,rn){let Pn={msg:vn.MEDIA_SEGMENT,data:{type:Qt,data:rn}};Vn.postMessage(Pn,[rn.data])}function sn(){let Qt={msg:vn.LOADING_COMPLETE};Vn.postMessage(Qt)}function Zt(){let Qt={msg:vn.RECOVERED_EARLY_EOF};Vn.postMessage(Qt)}function _n(Qt){let rn={msg:vn.MEDIA_INFO,data:Qt};Vn.postMessage(rn)}function Kt(Qt){let rn={msg:vn.METADATA_ARRIVED,data:Qt};Vn.postMessage(rn)}function qt(Qt){let rn={msg:vn.SCRIPTDATA_ARRIVED,data:Qt};Vn.postMessage(rn)}function Hn(Qt){let rn={msg:vn.STATISTICS_INFO,data:Qt};Vn.postMessage(rn)}function kt(Qt,rn){Vn.postMessage({msg:vn.IO_ERROR,data:{type:Qt,info:rn}})}function ln(Qt,rn){Vn.postMessage({msg:vn.DEMUX_ERROR,data:{type:Qt,info:rn}})}function An(Qt){Vn.postMessage({msg:vn.RECOMMEND_SEEKPOINT,data:Qt})}function jn(Qt,rn){Vn.postMessage({msg:"logcat_callback",data:{type:Qt,logcat:rn}})}};class ki{constructor(He,Xe){if(this.TAG="Transmuxer",this._emitter=new(Le()),Xe.enableWorker&&typeof Worker!="undefined")try{let nt=Re(82059);this._worker=nt(Qn),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[He,Xe]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},xt.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:xt.getConfig()})}catch(nt){xe.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ri(He,Xe)}else this._controller=new ri(He,Xe);if(this._controller){let nt=this._controller;nt.on(vn.IO_ERROR,this._onIOError.bind(this)),nt.on(vn.DEMUX_ERROR,this._onDemuxError.bind(this)),nt.on(vn.INIT_SEGMENT,this._onInitSegment.bind(this)),nt.on(vn.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),nt.on(vn.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),nt.on(vn.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),nt.on(vn.MEDIA_INFO,this._onMediaInfo.bind(this)),nt.on(vn.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),nt.on(vn.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),nt.on(vn.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),nt.on(vn.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),xt.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(He,Xe){this._emitter.addListener(He,Xe)}off(He,Xe){this._emitter.removeListener(He,Xe)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(He){this._worker?this._worker.postMessage({cmd:"seek",param:He}):this._controller.seek(He)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(He,Xe){Promise.resolve().then(()=>{this._emitter.emit(vn.INIT_SEGMENT,He,Xe)})}_onMediaSegment(He,Xe){Promise.resolve().then(()=>{this._emitter.emit(vn.MEDIA_SEGMENT,He,Xe)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(vn.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(vn.RECOVERED_EARLY_EOF)})}_onMediaInfo(He){Promise.resolve().then(()=>{this._emitter.emit(vn.MEDIA_INFO,He)})}_onMetaDataArrived(He){Promise.resolve().then(()=>{this._emitter.emit(vn.METADATA_ARRIVED,He)})}_onScriptDataArrived(He){Promise.resolve().then(()=>{this._emitter.emit(vn.SCRIPTDATA_ARRIVED,He)})}_onStatisticsInfo(He){Promise.resolve().then(()=>{this._emitter.emit(vn.STATISTICS_INFO,He)})}_onIOError(He,Xe){Promise.resolve().then(()=>{this._emitter.emit(vn.IO_ERROR,He,Xe)})}_onDemuxError(He,Xe){Promise.resolve().then(()=>{this._emitter.emit(vn.DEMUX_ERROR,He,Xe)})}_onRecommendSeekpoint(He){Promise.resolve().then(()=>{this._emitter.emit(vn.RECOMMEND_SEEKPOINT,He)})}_onLoggingConfigChanged(He){this._worker&&this._worker.postMessage({cmd:"logging_config",param:He})}_onWorkerMessage(He){let Xe=He.data,nt=Xe.data;if(Xe.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Xe.msg){case vn.INIT_SEGMENT:case vn.MEDIA_SEGMENT:this._emitter.emit(Xe.msg,nt.type,nt.data);break;case vn.LOADING_COMPLETE:case vn.RECOVERED_EARLY_EOF:this._emitter.emit(Xe.msg);break;case vn.MEDIA_INFO:Object.setPrototypeOf(nt,Ut.prototype),this._emitter.emit(Xe.msg,nt);break;case vn.METADATA_ARRIVED:case vn.SCRIPTDATA_ARRIVED:case vn.STATISTICS_INFO:this._emitter.emit(Xe.msg,nt);break;case vn.IO_ERROR:case vn.DEMUX_ERROR:this._emitter.emit(Xe.msg,nt.type,nt.info);break;case vn.RECOMMEND_SEEKPOINT:this._emitter.emit(Xe.msg,nt);break;case"logcat_callback":xe.emitter.emit("log",nt.type,nt.logcat);break;default:break}}}var Hi=ki,qi={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class Pr{constructor(He){this.TAG="MSEController",this._config=He,this._emitter=new(Le()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new fn}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(He,Xe){this._emitter.addListener(He,Xe)}off(He,Xe){this._emitter.removeListener(He,Xe)}attachMediaElement(He){if(this._mediaSource)throw new pe("MediaSource has been attached to an HTMLMediaElement!");let Xe=this._mediaSource=new window.MediaSource;Xe.addEventListener("sourceopen",this.e.onSourceOpen),Xe.addEventListener("sourceended",this.e.onSourceEnded),Xe.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=He,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),He.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let He=this._mediaSource;for(let Xe in this._sourceBuffers){let nt=this._pendingSegments[Xe];nt.splice(0,nt.length),this._pendingSegments[Xe]=null,this._pendingRemoveRanges[Xe]=null,this._lastInitSegments[Xe]=null;let bt=this._sourceBuffers[Xe];if(bt){if(He.readyState!=="closed"){try{He.removeSourceBuffer(bt)}catch(Nt){xe.e(this.TAG,Nt.message)}bt.removeEventListener("error",this.e.onSourceBufferError),bt.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Xe]=null,this._sourceBuffers[Xe]=null}}if(He.readyState==="open")try{He.endOfStream()}catch(Xe){xe.e(this.TAG,Xe.message)}He.removeEventListener("sourceopen",this.e.onSourceOpen),He.removeEventListener("sourceended",this.e.onSourceEnded),He.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(He,Xe){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(He),this._pendingSegments[He.type].push(He);return}let nt=He,bt=`${nt.container}`;nt.codec&&nt.codec.length>0&&(bt+=`;codecs=${nt.codec}`);let Nt=!1;if(xe.v(this.TAG,"Received Initialization Segment, mimeType: "+bt),this._lastInitSegments[nt.type]=nt,bt!==this._mimeTypes[nt.type]){if(this._mimeTypes[nt.type])xe.v(this.TAG,`Notice: ${nt.type} mimeType changed, origin: ${this._mimeTypes[nt.type]}, target: ${bt}`);else{Nt=!0;try{let sn=this._sourceBuffers[nt.type]=this._mediaSource.addSourceBuffer(bt);sn.addEventListener("error",this.e.onSourceBufferError),sn.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(sn){xe.e(this.TAG,sn.message),this._emitter.emit(qi.ERROR,{code:sn.code,msg:sn.message});return}}this._mimeTypes[nt.type]=bt}Xe||this._pendingSegments[nt.type].push(nt),Nt||this._sourceBuffers[nt.type]&&!this._sourceBuffers[nt.type].updating&&this._doAppendSegments(),re.safari&&nt.container==="audio/mpeg"&&nt.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=nt.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(He){let Xe=He;this._pendingSegments[Xe.type].push(Xe),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let nt=this._sourceBuffers[Xe.type];nt&&!nt.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(He){for(let Xe in this._sourceBuffers){if(!this._sourceBuffers[Xe])continue;let nt=this._sourceBuffers[Xe];if(this._mediaSource.readyState==="open")try{nt.abort()}catch(Nt){xe.e(this.TAG,Nt.message)}this._idrList.clear();let bt=this._pendingSegments[Xe];if(bt.splice(0,bt.length),this._mediaSource.readyState!=="closed"){for(let Nt=0;Nt<nt.buffered.length;Nt++){let sn=nt.buffered.start(Nt),Zt=nt.buffered.end(Nt);this._pendingRemoveRanges[Xe].push({start:sn,end:Zt})}if(nt.updating||this._doRemoveRanges(),re.safari){let Nt=this._lastInitSegments[Xe];Nt&&(this._pendingSegments[Xe].push(Nt),nt.updating||this._doAppendSegments())}}}}endOfStream(){let He=this._mediaSource,Xe=this._sourceBuffers;if(!He||He.readyState!=="open"){He&&He.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Xe.video&&Xe.video.updating||Xe.audio&&Xe.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,He.endOfStream())}getNearestKeyframe(He){return this._idrList.getLastSyncPointBeforeDts(He)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let He=this._mediaElement.currentTime;for(let Xe in this._sourceBuffers){let nt=this._sourceBuffers[Xe];if(nt){let bt=nt.buffered;if(bt.length>=1&&He-bt.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let He=this._mediaElement.currentTime;for(let Xe in this._sourceBuffers){let nt=this._sourceBuffers[Xe];if(nt){let bt=nt.buffered,Nt=!1;for(let sn=0;sn<bt.length;sn++){let Zt=bt.start(sn),_n=bt.end(sn);if(Zt<=He&&He<_n+3){if(He-Zt>=this._config.autoCleanupMaxBackwardDuration){Nt=!0;let Kt=He-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Xe].push({start:Zt,end:Kt})}}else _n<He&&(Nt=!0,this._pendingRemoveRanges[Xe].push({start:Zt,end:_n}))}Nt&&!nt.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let He=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||He.video&&He.video.updating||He.audio&&He.audio.updating)return;let Xe=this._mediaSource.duration,nt=this._pendingMediaDuration;nt>0&&(isNaN(Xe)||nt>Xe)&&(xe.v(this.TAG,`Update MediaSource duration from ${Xe} to ${nt}`),this._mediaSource.duration=nt),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let He in this._pendingRemoveRanges){if(!this._sourceBuffers[He]||this._sourceBuffers[He].updating)continue;let Xe=this._sourceBuffers[He],nt=this._pendingRemoveRanges[He];for(;nt.length&&!Xe.updating;){let bt=nt.shift();Xe.remove(bt.start,bt.end)}}}_doAppendSegments(){let He=this._pendingSegments;for(let Xe in He)if(!(!this._sourceBuffers[Xe]||this._sourceBuffers[Xe].updating)&&He[Xe].length>0){let nt=He[Xe].shift();if(nt.timestampOffset){let bt=this._sourceBuffers[Xe].timestampOffset,Nt=nt.timestampOffset/1e3;Math.abs(bt-Nt)>.1&&(xe.v(this.TAG,`Update MPEG audio timestampOffset from ${bt} to ${Nt}`),this._sourceBuffers[Xe].timestampOffset=Nt),delete nt.timestampOffset}if(!nt.data||nt.data.byteLength===0)continue;try{this._sourceBuffers[Xe].appendBuffer(nt.data),this._isBufferFull=!1,Xe==="video"&&nt.hasOwnProperty("info")&&this._idrList.appendArray(nt.info.syncPoints)}catch(bt){this._pendingSegments[Xe].unshift(nt),bt.code===22?(this._isBufferFull||this._emitter.emit(qi.BUFFER_FULL),this._isBufferFull=!0):(xe.e(this.TAG,bt.message),this._emitter.emit(qi.ERROR,{code:bt.code,msg:bt.message}))}}}_onSourceOpen(){if(xe.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let He=this._pendingSourceBufferInit;for(;He.length;){let Xe=He.shift();this.appendInitSegment(Xe,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(qi.SOURCE_OPEN)}_onSourceEnded(){xe.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){xe.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let He=this._pendingSegments;return He.video.length>0||He.audio.length>0}_hasPendingRemoveRanges(){let He=this._pendingRemoveRanges;return He.video.length>0||He.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(qi.UPDATE_END)}_onSourceBufferError(He){xe.e(this.TAG,`SourceBuffer Error: ${He}`)}}var gr=Pr;const Ri={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Vi={NETWORK_EXCEPTION:ue.EXCEPTION,NETWORK_STATUS_CODE_INVALID:ue.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:ue.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:ue.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:tt.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:tt.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:tt.CODEC_UNSUPPORTED};class sr{constructor(He,Xe){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(Le()),this._config=Dt(),typeof Xe=="object"&&Object.assign(this._config,Xe),He.type.toLowerCase()!=="flv")throw new de("FlvPlayer requires an flv MediaDataSource input!");He.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=He,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let nt=re.chrome&&(re.version.major<50||re.version.major===50&&re.version.build<2661);this._alwaysSeekKeyframe=!!(nt||re.msedge||re.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(He,Xe){He===yt.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):He===yt.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(He,Xe)}off(He,Xe){this._emitter.removeListener(He,Xe)}attachMediaElement(He){if(this._mediaElement=He,He.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),He.addEventListener("seeking",this.e.onvSeeking),He.addEventListener("canplay",this.e.onvCanPlay),He.addEventListener("stalled",this.e.onvStalled),He.addEventListener("progress",this.e.onvProgress),this._msectl=new gr(this._config),this._msectl.on(qi.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(qi.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(qi.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(qi.ERROR,Xe=>{this._emitter.emit(yt.ERROR,Ri.MEDIA_ERROR,Vi.MEDIA_MSE_ERROR,Xe)}),this._msectl.attachMediaElement(He),this._pendingSeekTime!=null)try{He.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Xe){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new pe("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new pe("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Hi(this._mediaDataSource,this._config),this._transmuxer.on(vn.INIT_SEGMENT,(He,Xe)=>{this._msectl.appendInitSegment(Xe)}),this._transmuxer.on(vn.MEDIA_SEGMENT,(He,Xe)=>{if(this._msectl.appendMediaSegment(Xe),this._config.lazyLoad&&!this._config.isLive){let nt=this._mediaElement.currentTime;Xe.info.endDts>=(nt+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(xe.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(vn.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(yt.LOADING_COMPLETE)}),this._transmuxer.on(vn.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(yt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(vn.IO_ERROR,(He,Xe)=>{this._emitter.emit(yt.ERROR,Ri.NETWORK_ERROR,He,Xe)}),this._transmuxer.on(vn.DEMUX_ERROR,(He,Xe)=>{this._emitter.emit(yt.ERROR,Ri.MEDIA_ERROR,He,{code:-1,msg:Xe})}),this._transmuxer.on(vn.MEDIA_INFO,He=>{this._mediaInfo=He,this._emitter.emit(yt.MEDIA_INFO,Object.assign({},He))}),this._transmuxer.on(vn.METADATA_ARRIVED,He=>{this._emitter.emit(yt.METADATA_ARRIVED,He)}),this._transmuxer.on(vn.SCRIPTDATA_ARRIVED,He=>{this._emitter.emit(yt.SCRIPTDATA_ARRIVED,He)}),this._transmuxer.on(vn.STATISTICS_INFO,He=>{this._statisticsInfo=this._fillStatisticsInfo(He),this._emitter.emit(yt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(vn.RECOMMEND_SEEKPOINT,He=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=He/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(He){this._mediaElement.volume=He}get muted(){return this._mediaElement.muted}set muted(He){this._mediaElement.muted=He}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(He){this._mediaElement?this._internalSeek(He):this._pendingSeekTime=He}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(He){if(He.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return He;let Xe=!0,nt=0,bt=0;if(this._mediaElement.getVideoPlaybackQuality){let Nt=this._mediaElement.getVideoPlaybackQuality();nt=Nt.totalVideoFrames,bt=Nt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(nt=this._mediaElement.webkitDecodedFrameCount,bt=this._mediaElement.webkitDroppedFrameCount):Xe=!1;return Xe&&(He.decodedFrames=nt,He.droppedFrames=bt),He}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let He=this._mediaElement.buffered,Xe=this._mediaElement.currentTime,nt=0,bt=0;for(let Nt=0;Nt<He.length;Nt++){let sn=He.start(Nt),Zt=He.end(Nt);if(sn<=Xe&&Xe<Zt){nt=sn,bt=Zt;break}}bt>=Xe+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(xe.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){xe.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let He=this._mediaElement.currentTime,Xe=this._mediaElement.buffered,nt=!1;for(let bt=0;bt<Xe.length;bt++){let Nt=Xe.start(bt),sn=Xe.end(bt);if(He>=Nt&&He<sn){He>=sn-this._config.lazyLoadRecoverDuration&&(nt=!0);break}}nt&&(window.clearInterval(this._progressChecker),this._progressChecker=null,nt&&(xe.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(He){let Xe=this._mediaElement.buffered;for(let nt=0;nt<Xe.length;nt++){let bt=Xe.start(nt),Nt=Xe.end(nt);if(He>=bt&&He<Nt)return!0}return!1}_internalSeek(He){let Xe=this._isTimepointBuffered(He),nt=!1,bt=0;if(He<1&&this._mediaElement.buffered.length>0){let Nt=this._mediaElement.buffered.start(0);(Nt<1&&He<Nt||re.safari)&&(nt=!0,bt=re.safari?.1:Nt)}if(nt)this._requestSetTime=!0,this._mediaElement.currentTime=bt;else if(Xe){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=He;else{let Nt=this._msectl.getNearestKeyframe(Math.floor(He*1e3));this._requestSetTime=!0,Nt!=null?this._mediaElement.currentTime=Nt.dts/1e3:this._mediaElement.currentTime=He}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(He),this._transmuxer.seek(Math.floor(He*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=He)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let He=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(He)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(He),this._transmuxer.seek(Math.floor(He*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=He))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(He){let Xe=this._mediaElement;if(He||!this._receivedCanPlay||Xe.readyState<2){let nt=Xe.buffered;nt.length>0&&Xe.currentTime<nt.start(0)&&(xe.w(this.TAG,`Playback seems stuck at ${Xe.currentTime}, seek to ${nt.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=nt.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(He){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(He){let Xe=this._mediaElement.currentTime,nt=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Xe<1&&nt.length>0){let bt=nt.start(0);if(bt<1&&Xe<bt||re.safari){this._requestSetTime=!0,this._mediaElement.currentTime=re.safari?.1:bt;return}}if(this._isTimepointBuffered(Xe)){if(this._alwaysSeekKeyframe){let bt=this._msectl.getNearestKeyframe(Math.floor(Xe*1e3));bt!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=bt.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:Xe,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(He){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(He){this._checkAndResumeStuckPlayback(!0)}_onvProgress(He){this._checkAndResumeStuckPlayback()}}var Qe=sr;class Ti{constructor(He,Xe){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(Le()),this._config=Dt(),typeof Xe=="object"&&Object.assign(this._config,Xe),He.type.toLowerCase()==="flv")throw new de("NativePlayer does't support flv MediaDataSource input!");if(He.hasOwnProperty("segments"))throw new de(`NativePlayer(${He.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=He,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(He,Xe){He===yt.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):He===yt.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(He,Xe)}off(He,Xe){this._emitter.removeListener(He,Xe)}attachMediaElement(He){if(this._mediaElement=He,He.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{He.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Xe){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new pe("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(He){this._mediaElement.volume=He}get muted(){return this._mediaElement.muted}set muted(He){this._mediaElement.muted=He}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(He){this._mediaElement?this._mediaElement.currentTime=He:this._pendingSeekTime=He}get mediaInfo(){let Xe={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(Xe.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(Xe.width=this._mediaElement.videoWidth,Xe.height=this._mediaElement.videoHeight)),Xe}get statisticsInfo(){let He={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return He;let Xe=!0,nt=0,bt=0;if(this._mediaElement.getVideoPlaybackQuality){let Nt=this._mediaElement.getVideoPlaybackQuality();nt=Nt.totalVideoFrames,bt=Nt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(nt=this._mediaElement.webkitDecodedFrameCount,bt=this._mediaElement.webkitDroppedFrameCount):Xe=!1;return Xe&&(He.decodedFrames=nt,He.droppedFrames=bt),He}_onvLoadedMetadata(He){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}}var ei=Ti;Se.install();function Ii(Vn,He){let Xe=Vn;if(Xe==null||typeof Xe!="object")throw new de("MediaDataSource must be an javascript object!");if(!Xe.hasOwnProperty("type"))throw new de("MediaDataSource must has type field to indicate video file type!");switch(Xe.type){case"flv":return new Qe(Xe,He);default:return new ei(Xe,He)}}function mr(){return ot.supportMSEH264Playback()}function cr(){return ot.getFeatureList()}let ir={};ir.createPlayer=Ii,ir.isSupported=mr,ir.getFeatureList=cr,ir.BaseLoader=ee,ir.LoaderStatus=fe,ir.LoaderErrors=ue,ir.Events=yt,ir.ErrorTypes=Ri,ir.ErrorDetails=Vi,ir.FlvPlayer=Qe,ir.NativePlayer=ei,ir.LoggingControl=xt,Object.defineProperty(ir,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var po=ir},93125:function(xn,un,Re){(function(ke){if(1)window.OSS=ke(),xn.exports=ke();else var Se})(function(){var ke;return function(){function Se(Be,Le,Ce){function xe(we,pe){if(!Le[we]){if(!Be[we]){var de=void 0;if(!pe&&de)return require(we,!0);if(be)return be(we,!0);var ge=new Error("Cannot find module '"+we+"'");throw ge.code="MODULE_NOT_FOUND",ge}var fe=Le[we]={exports:{}};Be[we][0].call(fe.exports,function(ue){return xe(Be[we][1][ue]||ue)},fe,fe.exports,Se,Be,Le,Ce)}return Le[we].exports}for(var be=void 0,ye=0;ye<Ce.length;ye++)xe(Ce[ye]);return xe}return Se}()({1:[function(Se,Be,Le){"use strict";var Ce=Se("./browser/client");Ce.Buffer=Se("buffer").Buffer,Ce.co=Se("co"),Ce.urllib=Se("../shims/xhr"),Ce.version=Se("./browser/version").version,Be.exports=Ce},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(Se,Be,Le){(function(Ce,xe){"use strict";function be(ot){return ot&&ot.__esModule?ot:{default:ot}}function ye(ot,ct){return ot[ct]||ot[ct.toLowerCase()]}function we(ot,ct){var yt=Ie.parse(ot);if(!yt.protocol){var wt=ct?"https://":"http://";yt=Ie.parse(wt+ot)}if(yt.protocol!=="http:"&&yt.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return yt}function pe(ot,ct,yt){var wt=yt?"https://":"http://",xt=ct?"-internal.aliyuncs.com":".aliyuncs.com";return ot.substr(0,14)==="vpc100-oss-cn-"&&(xt=".aliyuncs.com"),Ie.parse(wt+ot+xt)}function de(){return document&&document.location&&document.location.protocol==="https:"}function ge(ot,ct){if(!(this instanceof ge))return new ge(ot,ct);ot&&ot.inited?this.options=ot:this.options=ge.initOptions(ot),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=mt,this.agent=this.options.agent||Dt),this.ctx=ct,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var fe=Se("babel-runtime/regenerator"),ue=be(fe),ee=Se("babel-runtime/core-js/object/keys"),z=be(ee),oe=Se("debug")("ali-oss"),re=Se("./../../shims/crypto/crypto.js"),ae=Se("path"),le=Se("copy-to"),me=Se("mime"),ve=Se("xml2js"),Pe=Se("humanize-ms"),Ae=Se("agentkeepalive"),Oe=Se("merge-descriptors"),Ie=Se("url"),Ze=Se("is-type-of"),qe=Se("platform"),Je=Se("utility"),mt=Se("urllib"),gt=Se("./version"),Mt=Se("dateformat"),at=Se("bowser"),_t=Se("../common/signUtils"),ht=Se("../common/utils"),Dt=new Ae;Be.exports=ge,ge.initOptions=function(ot){if(!ot||!ot.accessKeyId||!ot.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var ct=de(),yt={region:"oss-cn-hangzhou",internal:!1,secure:ct,bucket:null,endpoint:null,cname:!1};if((0,z.default)(ot).forEach(function(wt){ot[wt]!==void 0&&(yt[wt]=ot[wt])}),yt.accessKeyId=yt.accessKeyId.trim(),yt.accessKeySecret=yt.accessKeySecret.trim(),yt.timeout&&(yt.timeout=Pe(yt.timeout)),yt.endpoint)yt.endpoint=we(yt.endpoint,yt.secure);else{if(!yt.region)throw new Error("require options.endpoint or options.region");yt.endpoint=pe(yt.region,yt.internal,yt.secure)}return yt.inited=!0,yt};var ut=ge.prototype;Oe(ut,Se("./object")),Oe(ut,Se("./managed_upload")),Oe(ut,Se("../common/multipart")),Oe(ut,Se("../common/thunkpool.js")),ge.Wrapper=Se("./wrapper"),ut.signature=function(ot){return oe("authorization stringToSign: %s",ot),_t.computeSignature(this.options.accessKeySecret,ot)},ut.authorization=function(ot,ct,yt,wt){var xt=_t.buildCanonicalString(ot.toUpperCase(),ct,{headers:wt,parameters:yt});return _t.authorization(this.options.accessKeyId,this.options.accessKeySecret,xt)},ut.createRequest=function(ot){var ct={"x-oss-date":Mt(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(ct["x-oss-security-token"]=this.options.stsToken),le(ot.headers).to(ct),ye(ct,"Content-Type")||(ot.mime===me.default_type&&(ot.mime=""),ot.mime&&ot.mime.indexOf("/")>0?ct["Content-Type"]=ot.mime:ct["Content-Type"]=me.getType(ot.mime||ae.extname(ot.object||""))||"application/octet-stream"),ot.content&&(ct["Content-Md5"]=re.createHash("md5").update(new xe(ot.content,"utf8")).digest("base64"),ct["Content-Length"]||(ct["Content-Length"]=ot.content.length));var yt=this._getResource(ot);ct.authorization=this.authorization(ot.method,yt,ot.subres,ct);var wt=this._getReqUrl(ot);oe("request %s %s, with headers %j, !!stream: %s",ot.method,wt,ct,!!ot.stream);var xt=ot.timeout||this.options.timeout;return{url:wt,params:{agent:this.agent,method:ot.method,content:ot.content,stream:ot.stream,headers:ct,timeout:xt,writeStream:ot.writeStream,customResponse:ot.customResponse,ctx:ot.ctx||this.ctx}}},ut.request=ue.default.mark(function ot(ct){var yt,wt,xt,zt;return ue.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return yt=this.createRequest(ct),wt=void 0,xt=void 0,Ut.prev=3,Ut.next=6,this.urllib.request(yt.url,yt.params);case 6:wt=Ut.sent,oe("response %s %s, got %s, headers: %j",ct.method,yt.url,wt.status,wt.headers),Ut.next=13;break;case 10:Ut.prev=10,Ut.t0=Ut.catch(3),xt=Ut.t0;case 13:if(zt=void 0,!wt||!ct.successStatuses||ct.successStatuses.indexOf(wt.status)!==-1){Ut.next=26;break}return Ut.next=17,this.requestError(wt);case 17:if(zt=Ut.sent,zt.code!=="RequestTimeTooSkewed"){Ut.next=23;break}return this.options.amendTimeSkewed=+new Date(zt.serverTime)-new Date,Ut.next=22,this.request(ct);case 22:return Ut.abrupt("return",Ut.sent);case 23:zt.params=ct,Ut.next=30;break;case 26:if(!xt){Ut.next=30;break}return Ut.next=29,this.requestError(xt);case 29:zt=Ut.sent;case 30:if(!zt){Ut.next=32;break}throw zt;case 32:if(!ct.xmlResponse){Ut.next=36;break}return Ut.next=35,this.parseXML(wt.data);case 35:wt.data=Ut.sent;case 36:return Ut.abrupt("return",wt);case 37:case"end":return Ut.stop()}},ot,this,[[3,10]])}),ut._getResource=function(ot){var ct="/";return ot.bucket&&(ct+=ot.bucket+"/"),ot.object&&(ct+=ot.object),ct},ut._isIP=function(ot){return ht._isIP(ot)},ut._escape=function(ot){return Je.encodeURIComponent(ot).replace(/%2F/g,"/")},ut._getReqUrl=function(ot){var ct={};le(this.options.endpoint).to(ct);var yt=this._isIP(ct.hostname),wt=this.options.cname;!ot.bucket||wt||yt||(ct.host=ot.bucket+"."+ct.host);var xt="/";ot.bucket&&yt&&(xt+=ot.bucket+"/"),ot.object&&(xt+=this._escape(ot.object).replace(/\+/g,"%2B")),ct.pathname=xt;var zt={};if(ot.query&&Oe(zt,ot.query),ot.subres){var Ut={};Ze.string(ot.subres)?Ut[ot.subres]="":Ze.array(ot.subres)?ot.subres.forEach(function(cn){Ut[cn]=""}):Ut=ot.subres,Oe(zt,Ut)}return ct.query=zt,Ie.format(ct)},ut._getUserAgent=function(){var ot=Ce&&Ce.browser?"js":"nodejs",ct="aliyun-sdk-"+ot+"/"+gt.version,yt=qe.description;return!yt&&Ce&&(yt="Node.js "+Ce.version.slice(1)+" on "+Ce.platform+" "+Ce.arch),this._checkUserAgent(ct+" "+yt)},ut._checkUserAgent=function(ot){return ot.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},ut.checkBrowserAndVersion=function(ot,ct){return at.name===ot&&at.version.split(".")[0]===ct},ut.parseXML=function(ot){return function(ct){xe.isBuffer(ot)&&(ot=ot.toString()),ve.parseString(ot,{explicitRoot:!1,explicitArray:!1},ct)}},ut.requestError=ue.default.mark(function ot(ct){var yt,wt,xt,zt;return ue.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(yt=null,ct.data&&ct.data.length){Ut.next=5;break}ct.status===-1||ct.status===-2?(yt=new Error(ct.message),yt.name=ct.name,yt.status=ct.status,yt.code=ct.name):(ct.status===404?(yt=new Error("Object not exists"),yt.name="NoSuchKeyError",yt.status=404,yt.code="NoSuchKey"):ct.status===412?(yt=new Error("Pre condition failed"),yt.name="PreconditionFailedError",yt.status=412,yt.code="PreconditionFailed"):(yt=new Error("Unknow error, status: "+ct.status),yt.name="UnknowError",yt.status=ct.status),yt.requestId=ct.headers["x-oss-request-id"],yt.host=""),Ut.next=30;break;case 5:return wt=String(ct.data),oe("request response error data: %s",wt),xt=void 0,Ut.prev=8,Ut.next=11,this.parseXML(wt)||{};case 11:xt=Ut.sent,Ut.next=21;break;case 14:return Ut.prev=14,Ut.t0=Ut.catch(8),oe(wt),Ut.t0.message+=`
|
|
|
raw xml: `+wt,Ut.t0.status=ct.status,Ut.t0.requestId=ct.headers["x-oss-request-id"],Ut.abrupt("return",Ut.t0);case 21:zt=xt.Message||"unknow request error, status: "+ct.status,xt.Condition&&(zt+=" (condition: "+xt.Condition+")"),yt=new Error(zt),yt.name=xt.Code?xt.Code+"Error":"UnknowError",yt.status=ct.status,yt.code=xt.Code,yt.requestId=xt.RequestId,yt.hostId=xt.HostId,yt.serverTime=xt.ServerTime;case 30:return oe("generate error %j",yt),Ut.abrupt("return",yt);case 32:case"end":return Ut.stop()}},ot,this,[[8,14]])})}).call(this,Se("_process"),Se("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(Se,Be,Le){(function(Ce){"use strict";function xe(le){return le&&le.__esModule?le:{default:le}}function be(le,me){if(!(this instanceof be))return new be(le,me);ae.call(this,me),this.file=le,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var ye=Se("babel-runtime/core-js/array/from"),we=xe(ye),pe=Se("babel-runtime/regenerator"),de=xe(pe),ge=Se("is-type-of"),fe=Se("util"),ue=Se("path"),ee=Se("mime"),z=Se("copy-to"),oe=Le;oe.multipartUpload=de.default.mark(function le(me,ve,Pe){var Ae,Oe,Ie,Ze,qe,Je,mt,gt,Mt;return de.default.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(this.resetCancelFlag(),Pe=Pe||{},!Pe.checkpoint||!Pe.checkpoint.uploadId){at.next=6;break}return at.next=5,this._resumeMultipart(Pe.checkpoint,Pe);case 5:return at.abrupt("return",at.sent);case 6:return Ae=102400,Pe.mime||(ge.file(ve)?Pe.mime=ee.getType(ue.extname(ve.name)):ge.blob(ve)?Pe.mime=ve.type:Pe.mime=ee.getType(ue.extname(ve))),Pe.headers=Pe.headers||{},this._convertMetaToHeaders(Pe.meta,Pe.headers),at.next=12,this._getFileSize(ve);case 12:if(!((Oe=at.sent)<Ae)){at.next=25;break}return Ie=this._createStream(ve,0,Oe),Pe.contentLength=Oe,at.next=18,this.putStream(me,Ie,Pe);case 18:if(Ze=at.sent,!Pe||!Pe.progress){at.next=22;break}return at.next=22,Pe.progress(1);case 22:return qe={res:Ze.res,bucket:this.options.bucket,name:me,etag:Ze.res.headers.etag},(Pe.headers&&Pe.headers["x-oss-callback"]||Pe.callback)&&(qe.data=Ze.data),at.abrupt("return",qe);case 25:if(!(Pe.partSize&&Pe.partSize<Ae)){at.next=27;break}throw new Error("partSize must not be smaller than "+Ae);case 27:return at.next=29,this.initMultipartUpload(me,Pe);case 29:if(Je=at.sent,mt=Je.uploadId,gt=this._getPartSize(Oe,Pe.partSize),Mt={file:ve,name:me,fileSize:Oe,partSize:gt,uploadId:mt,doneParts:[]},!Pe||!Pe.progress){at.next=36;break}return at.next=36,Pe.progress(0,Mt,Je.res);case 36:return at.next=38,this._resumeMultipart(Mt,Pe);case 38:return at.abrupt("return",at.sent);case 39:case"end":return at.stop()}},le,this)}),oe._resumeMultipart=de.default.mark(function le(me,ve){var Pe,Ae,Oe,Ie,Ze,qe,Je,mt,gt,Mt,at,_t,ht,Dt,ut,ot,ct,yt,wt,xt,zt;return de.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(!this.isCancel()){Ut.next=2;break}throw this._makeCancelEvent();case 2:if(Pe=me.file,Ae=me.fileSize,Oe=me.partSize,Ie=me.uploadId,Ze=me.doneParts,qe=me.name,Je=[],Ze.length>0&&z(Ze).to(Je),mt=this._divideParts(Ae,Oe),gt=mt.length,Mt=!1,at=de.default.mark(function cn(jt,mn){var Ft,Yt,tn;return de.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:if(jt.isCancel()){lt.next=21;break}return lt.prev=1,Ft=mt[mn-1],Yt={stream:jt._createStream(Pe,Ft.start,Ft.end),size:Ft.end-Ft.start},lt.next=6,jt._uploadPart(qe,Ie,mn,Yt);case 6:if(tn=lt.sent,jt.isCancel()||Mt){lt.next=13;break}if(me.doneParts.push({number:mn,etag:tn.res.headers.etag}),Je.push({number:mn,etag:tn.res.headers.etag}),!ve||!ve.progress){lt.next=13;break}return lt.next=13,ve.progress(Ze.length/gt,me,tn.res);case 13:lt.next=21;break;case 15:if(lt.prev=15,lt.t0=lt.catch(1),jt.isCancel()){lt.next=21;break}throw jt.cancel(),lt.t0.partNum=mn,lt.t0;case 21:case"end":return lt.stop()}},cn,this,[[1,15]])}),_t=(0,we.default)(new Array(gt),function(cn,jt){return jt+1}),ht=Je.map(function(cn){return cn.number}),Dt=_t.filter(function(cn){return ht.indexOf(cn)<0}),ut=5,ot=ve.parallel||ut,!this.checkBrowserAndVersion("Internet Explorer","10")&&ot!==1){Ut.next=26;break}ct=0;case 16:if(!(ct<Dt.length)){Ut.next=24;break}if(!this.isCancel()){Ut.next=19;break}throw this._makeCancelEvent();case 19:return Ut.next=21,at(this,Dt[ct]);case 21:ct++,Ut.next=16;break;case 24:Ut.next=40;break;case 26:for(yt=[],wt=0;wt<Dt.length;wt++)yt.push(at(this,Dt[wt]));return Ut.next=30,this._thunkPool(yt,ot);case 30:if(xt=Ut.sent,Mt=!0,!(xt&&xt.length>0)){Ut.next=37;break}throw this.resetCancelFlag(),zt=xt[0],zt.message="Failed to upload some parts with error: "+zt.toString()+" part_num: "+zt.partNum,zt;case 37:if(!this.isCancel()){Ut.next=40;break}throw yt=null,this._makeCancelEvent();case 40:return Ut.next=42,this.completeMultipartUpload(qe,Ie,Je,ve);case 42:return Ut.abrupt("return",Ut.sent);case 43:case"end":return Ut.stop()}},le,this)}),ge.file=function(le){return typeof File!="undefined"&&le instanceof File},ge.blob=function(le){return typeof Blob!="undefined"&&le instanceof Blob},oe._getFileSize=de.default.mark(function le(me){var ve;return de.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!ge.buffer(me)){Pe.next=4;break}return Pe.abrupt("return",me.length);case 4:if(!ge.blob(me)&&!ge.file(me)){Pe.next=6;break}return Pe.abrupt("return",me.size);case 6:if(!ge.string(me)){Pe.next=11;break}return Pe.next=9,this._statFile(me);case 9:return ve=Pe.sent,Pe.abrupt("return",ve.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return Pe.stop()}},le,this)});var re=Se("stream"),ae=re.Readable;fe.inherits(be,ae),be.prototype.readFileAndPush=function(le){if(this.fileBuffer)for(var me=!0;me&&this.fileBuffer&&this.start<this.fileBuffer.length;){var ve=this.start,Pe=ve+le;Pe=Pe>this.fileBuffer.length?this.fileBuffer.length:Pe,this.start=Pe,me=this.push(this.fileBuffer.slice(ve,Pe))}},be.prototype._read=function(le){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);le=le||16384;var me=this;this.reader.onload=function(ve){me.fileBuffer=new Ce(new Uint8Array(ve.target.result)),me.file=null,me.readFileAndPush(le)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(le)},oe._createStream=function(le,me,ve){if(ge.blob(le)||ge.file(le))return new be(le.slice(me,ve));throw new Error("_createStream requires File/String.")},oe._getPartSize=function(le,me){return me?Math.max(Math.ceil(le/1e4),me):1048576},oe._divideParts=function(le,me){for(var ve=Math.ceil(le/me),Pe=[],Ae=0;Ae<ve;Ae++){var Oe=me*Ae,Ie=Math.min(Oe+me,le);Pe.push({start:Oe,end:Ie})}return Pe},oe._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,Se("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(Se,Be,Le){"use strict";function Ce(me){return me&&me.__esModule?me:{default:me}}var xe=Se("babel-runtime/core-js/object/keys"),be=Ce(xe),ye=Se("babel-runtime/regenerator"),we=Ce(ye),pe=Se("debug")("ali-oss:object"),de=Se("utility"),ge=Se("fs"),fe=Se("is-type-of"),ue=Se("url"),ee=Se("copy-to"),z=Se("path"),oe=Se("mime"),re=Se("../common/callback"),ae=Se("../common/signUtils"),le=Le;le.append=we.default.mark(function me(ve,Pe,Ae){var Oe;return we.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Ae=Ae||{},Ae.position===void 0&&(Ae.position="0"),Ae.subres={append:"",position:Ae.position},Ae.method="POST",Ie.next=6,this.put(ve,Pe,Ae);case 6:return Oe=Ie.sent,Oe.nextAppendPosition=Oe.res.headers["x-oss-next-append-position"],Ie.abrupt("return",Oe);case 9:case"end":return Ie.stop()}},me,this)}),le.put=we.default.mark(function me(ve,Pe,Ae){var Oe,Ie,Ze,qe,Je,mt;return we.default.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:if(Oe=void 0,Ae=Ae||{},!fe.buffer(Pe)){gt.next=6;break}Oe=Pe,gt.next=18;break;case 6:if(!fe.blob(Pe)&&!fe.file(Pe)){gt.next=17;break}return Ae.mime||(fe.file(Pe)?Ae.mime=oe.getType(z.extname(Pe.name)):Ae.mime=Pe.type),Ie=this._createStream(Pe,0,Pe.size),gt.next=11,this._getFileSize(Pe);case 11:return Ae.contentLength=gt.sent,gt.next=14,this.putStream(ve,Ie,Ae);case 14:return gt.abrupt("return",gt.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return Ae.headers=Ae.headers||{},this._convertMetaToHeaders(Ae.meta,Ae.headers),Ze=Ae.method||"PUT",qe=this._objectRequestParams(Ze,ve,Ae),re.encodeCallback(qe,Ae),qe.mime=Ae.mime,qe.content=Oe,qe.successStatuses=[200],gt.next=28,this.request(qe);case 28:return Je=gt.sent,mt={name:ve,url:this._objectUrl(ve),res:Je.res},qe.headers&&qe.headers["x-oss-callback"]&&(mt.data=JSON.parse(Je.data.toString())),gt.abrupt("return",mt);case 32:case"end":return gt.stop()}},me,this)}),le.putStream=we.default.mark(function me(ve,Pe,Ae){var Oe,Ie,Ze,qe;return we.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},Ae.contentLength?Ae.headers["Content-Length"]=Ae.contentLength:Ae.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ae.meta,Ae.headers),Oe=Ae.method||"PUT",Ie=this._objectRequestParams(Oe,ve,Ae),re.encodeCallback(Ie,Ae),Ie.mime=Ae.mime,Ie.stream=Pe,Ie.successStatuses=[200],Je.next=12,this.request(Ie);case 12:return Ze=Je.sent,qe={name:ve,url:this._objectUrl(ve),res:Ze.res},Ie.headers&&Ie.headers["x-oss-callback"]&&(qe.data=JSON.parse(Ze.data.toString())),Je.abrupt("return",qe);case 16:case"end":return Je.stop()}},me,this)}),le.head=we.default.mark(function me(ve,Pe){var Ae,Oe,Ie;return we.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ae=this._objectRequestParams("HEAD",ve,Pe),Ae.successStatuses=[200,304],Ze.next=4,this.request(Ae);case 4:return Oe=Ze.sent,Ie={meta:null,res:Oe.res,status:Oe.status},Oe.status===200&&(0,be.default)(Oe.headers).forEach(function(qe){qe.indexOf("x-oss-meta-")===0&&(Ie.meta||(Ie.meta={}),Ie.meta[qe.substring(11)]=Oe.headers[qe])}),Ze.abrupt("return",Ie);case 8:case"end":return Ze.stop()}},me,this)}),le.get=we.default.mark(function me(ve,Pe,Ae){var Oe,Ie,Ze,qe;return we.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Oe=null,Ie=!1,fe.writableStream(Pe)?Oe=Pe:fe.string(Pe)?(Oe=ge.createWriteStream(Pe),Ie=!0):Ae=Pe,Ae=Ae||{},Ae.process&&(Ae.subres=Ae.subres||{},Ae.subres["x-oss-process"]=Ae.process),Ze=void 0,Je.prev=6,qe=this._objectRequestParams("GET",ve,Ae),qe.writeStream=Oe,qe.successStatuses=[200,206,304],Je.next=12,this.request(qe);case 12:Ze=Je.sent,Ie&&Oe.destroy(),Je.next=24;break;case 16:if(Je.prev=16,Je.t0=Je.catch(6),!Ie){Je.next=23;break}return Oe.destroy(),pe("get error: %s, delete the exists file %s",Je.t0,Pe),Je.next=23,this._deleteFileSafe(Pe);case 23:throw Je.t0;case 24:return Je.abrupt("return",{res:Ze.res,content:Ze.data});case 25:case"end":return Je.stop()}},me,this,[[6,16]])}),le.getStream=we.default.mark(function me(ve,Pe){var Ae,Oe;return we.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Pe=Pe||{},Ae=this._objectRequestParams("GET",ve,Pe),Ae.customResponse=!0,Ae.successStatuses=[200,206,304],Ie.next=6,this.request(Ae);case 6:return Oe=Ie.sent,Ie.abrupt("return",{stream:Oe.res,res:{status:Oe.status,headers:Oe.headers}});case 8:case"end":return Ie.stop()}},me,this)}),le.delete=we.default.mark(function me(ve,Pe){var Ae,Oe;return we.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Ae=this._objectRequestParams("DELETE",ve,Pe),Ae.successStatuses=[204],Ie.next=4,this.request(Ae);case 4:return Oe=Ie.sent,Ie.abrupt("return",{res:Oe.res});case 6:case"end":return Ie.stop()}},me,this)}),le.deleteMulti=we.default.mark(function me(ve,Pe){var Ae,Oe,Ie,Ze,qe,Je;return we.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:for(Pe=Pe||{},Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,Pe.quiet?Ae+=` <Quiet>true</Quiet>
|
|
|
`:Ae+=` <Quiet>false</Quiet>
|
|
|
`,Oe=0;Oe<ve.length;Oe++)Ae+=" <Object><Key>"+de.escape(this._objectName(ve[Oe]))+`</Key></Object>
|
|
|
`;return Ae+="</Delete>",pe("delete multi objects: %s",Ae),Pe.subres="delete",Ie=this._objectRequestParams("POST","",Pe),Ie.mime="xml",Ie.content=Ae,Ie.xmlResponse=!0,Ie.successStatuses=[200],mt.next=14,this.request(Ie);case 14:return Ze=mt.sent,qe=Ze.data,Je=qe&&qe.Deleted||null,Je&&(Array.isArray(Je)||(Je=[Je]),Je=Je.map(function(gt){return gt.Key})),mt.abrupt("return",{res:Ze.res,deleted:Je});case 19:case"end":return mt.stop()}},me,this)}),le.copy=we.default.mark(function me(ve,Pe,Ae){var Oe,Ie,Ze;return we.default.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},(0,be.default)(Ae.headers).forEach(function(Je){Ae.headers["x-oss-copy-source-"+Je.toLowerCase()]=Ae.headers[Je]}),Ae.meta&&(Ae.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(Ae.meta,Ae.headers),Pe=Pe[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(Pe):"/"+encodeURIComponent(Pe.slice(1)),Ae.headers["x-oss-copy-source"]=Pe,Oe=this._objectRequestParams("PUT",ve,Ae),Oe.xmlResponse=!0,Oe.successStatuses=[200,304],qe.next=12,this.request(Oe);case 12:return Ie=qe.sent,Ze=Ie.data,Ze&&(Ze={etag:Ze.ETag,lastModified:Ze.LastModified}),qe.abrupt("return",{data:Ze,res:Ie.res});case 16:case"end":return qe.stop()}},me,this)}),le.putMeta=we.default.mark(function me(ve,Pe,Ae){return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Oe.next=2,this.copy(ve,ve,{meta:Pe||{},timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx});case 2:return Oe.abrupt("return",Oe.sent);case 3:case"end":return Oe.stop()}},me,this)}),le.list=we.default.mark(function me(ve,Pe){var Ae,Oe,Ie,Ze,qe;return we.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Ae=this._objectRequestParams("GET","",Pe),Ae.query=ve,Ae.xmlResponse=!0,Ae.successStatuses=[200],Je.next=6,this.request(Ae);case 6:return Oe=Je.sent,Ie=Oe.data.Contents,Ze=this,Ie&&(Array.isArray(Ie)||(Ie=[Ie]),Ie=Ie.map(function(mt){return{name:mt.Key,url:Ze._objectUrl(mt.Key),lastModified:mt.LastModified,etag:mt.ETag,type:mt.Type,size:Number(mt.Size),storageClass:mt.StorageClass,owner:{id:mt.Owner.ID,displayName:mt.Owner.DisplayName}}})),qe=Oe.data.CommonPrefixes||null,qe&&(Array.isArray(qe)||(qe=[qe]),qe=qe.map(function(mt){return mt.Prefix})),Je.abrupt("return",{res:Oe.res,objects:Ie,prefixes:qe,nextMarker:Oe.data.NextMarker||null,isTruncated:Oe.data.IsTruncated==="true"});case 13:case"end":return Je.stop()}},me,this)}),le.putACL=we.default.mark(function me(ve,Pe,Ae){var Oe,Ie;return we.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ae=Ae||{},Ae.subres="acl",Ae.headers=Ae.headers||{},Ae.headers["x-oss-object-acl"]=Pe,ve=this._objectName(ve),Oe=this._objectRequestParams("PUT",ve,Ae),Oe.successStatuses=[200],Ze.next=9,this.request(Oe);case 9:return Ie=Ze.sent,Ze.abrupt("return",{res:Ie.res});case 11:case"end":return Ze.stop()}},me,this)}),le.getACL=we.default.mark(function me(ve,Pe){var Ae,Oe;return we.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Pe=Pe||{},Pe.subres="acl",ve=this._objectName(ve),Ae=this._objectRequestParams("GET",ve,Pe),Ae.successStatuses=[200],Ae.xmlResponse=!0,Ie.next=8,this.request(Ae);case 8:return Oe=Ie.sent,Ie.abrupt("return",{acl:Oe.data.AccessControlList.Grant,owner:{id:Oe.data.Owner.ID,displayName:Oe.data.Owner.DisplayName},res:Oe.res});case 10:case"end":return Ie.stop()}},me,this)}),le.restore=we.default.mark(function me(ve,Pe){var Ae,Oe;return we.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Pe=Pe||{},Pe.subres="restore",Ae=this._objectRequestParams("POST",ve,Pe),Ae.successStatuses=[202],Ie.next=6,this.request(Ae);case 6:return Oe=Ie.sent,Ie.abrupt("return",{res:Oe.res});case 8:case"end":return Ie.stop()}},me,this)}),le.signatureUrl=function(me,ve){ve=ve||{},me=this._objectName(me),ve.method=ve.method||"GET";var Pe=de.timestamp()+(ve.expires||1800),Ae={bucket:this.options.bucket,object:me},Oe=this._getResource(Ae);this.options.stsToken&&(ve["security-token"]=this.options.stsToken);var Ie=ae._signatureForURL(this.options.accessKeySecret,ve,Oe,Pe),Ze=ue.parse(this._getReqUrl(Ae));return Ze.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Pe,Signature:Ie.Signature},ee(Ie.subResource).to(Ze.query),Ze.format()},le.getObjectUrl=function(me,ve){return ve?ve[ve.length-1]!=="/"&&(ve+="/"):ve=this.options.endpoint.format(),ve+this._escape(this._objectName(me))},le._objectUrl=function(me){return this._getReqUrl({bucket:this.options.bucket,object:me})},le.generateObjectUrl=function(me,ve){if(ve)ve[ve.length-1]!=="/"&&(ve+="/");else{ve=this.options.endpoint.format();var Pe=ue.parse(ve),Ae=this.options.bucket;Pe.hostname=Ae+"."+Pe.hostname,Pe.host=Ae+"."+Pe.host,ve=Pe.format()}return ve+this._escape(this._objectName(me))},le._objectRequestParams=function(me,ve,Pe){if(!this.options.bucket)throw new Error("Please create a bucket first");Pe=Pe||{},ve=this._objectName(ve);var Ae={object:ve,bucket:this.options.bucket,method:me,subres:Pe&&Pe.subres,timeout:Pe&&Pe.timeout,ctx:Pe&&Pe.ctx};return Pe.headers&&(Ae.headers={},ee(Pe.headers).to(Ae.headers)),Ae},le._objectName=function(me){return me.replace(/^\/+/,"")},le._statFile=function(me){return function(ve){ge.stat(me,ve)}},le._convertMetaToHeaders=function(me,ve){me&&(0,be.default)(me).forEach(function(Pe){ve["x-oss-meta-"+Pe]=me[Pe]})},le._deleteFileSafe=function(me){return function(ve){ge.exists(me,function(Pe){Pe?ge.unlink(me,function(Ae){Ae&&pe("unlink %j error: %s",me,Ae),ve()}):ve()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(Se,Be,Le){"use strict";Le.version="5.3.1"},{}],6:[function(Se,Be,Le){"use strict";function Ce(z){return z&&z.__esModule?z:{default:z}}function xe(z){return z&&typeof z.next=="function"&&typeof z.throw=="function"}function be(z){if(!z)return!1;var oe=z.constructor;return!!oe&&(oe.name==="GeneratorFunction"||oe.displayName==="GeneratorFunction"||xe(oe.prototype)||xe(z.prototype))}function ye(z,oe){var re=new z(oe),ae=(0,fe.default)(re),le=(0,fe.default)((0,de.default)(re));ae.concat(le).forEach(function(me){be(re[me])?this[me]=ue.wrap(re[me]).bind(re):this[me]=re[me]},this)}function we(z){if(!(this instanceof we))return new we(z);ye.call(this,ee,z)}var pe=Se("babel-runtime/core-js/object/get-prototype-of"),de=Ce(pe),ge=Se("babel-runtime/core-js/object/keys"),fe=Ce(ge),ue=Se("co"),ee=Se("./client");Be.exports=we,we.STS=function z(oe){if(!(this instanceof z))return new z(oe);ye.call(this,ee.STS,oe)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(Se,Be,Le){(function(Ce){"use strict";function xe(de){return de&&de.__esModule?de:{default:de}}var be=Se("babel-runtime/core-js/object/keys"),ye=xe(be),we=Se("babel-runtime/core-js/json/stringify"),pe=xe(we);Le.encodeCallback=function(de,ge){if(de.headers=de.headers||{},!Object.prototype.hasOwnProperty.call(de.headers,"x-oss-callback")&&ge.callback){var fe={callbackUrl:encodeURI(ge.callback.url),callbackBody:ge.callback.body};ge.callback.host&&(fe.callbackHost=ge.callback.host),ge.callback.contentType&&(fe.callbackBodyType=ge.callback.contentType);var ue=new Ce((0,pe.default)(fe)).toString("base64");if(de.headers["x-oss-callback"]=ue,ge.callback.customValue){var ee={};(0,ye.default)(ge.callback.customValue).forEach(function(z){ee["x:"+z]=ge.callback.customValue[z]}),de.headers["x-oss-callback-var"]=new Ce((0,pe.default)(ee)).toString("base64")}}}}).call(this,Se("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/regenerator"),xe=function(pe){return pe&&pe.__esModule?pe:{default:pe}}(Ce),be=Se("copy-to"),ye=Se("./callback"),we=Le;we.listUploads=xe.default.mark(function pe(de,ge){var fe,ue,ee,z;return xe.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return ge=ge||{},fe={},be(ge).to(fe),fe.subres="uploads",ue=this._objectRequestParams("GET","",fe),ue.query=de,ue.xmlResponse=!0,ue.successStatuses=[200],oe.next=10,this.request(ue);case 10:return ee=oe.sent,z=ee.data.Upload||[],Array.isArray(z)||(z=[z]),z=z.map(function(re){return{name:re.Key,uploadId:re.UploadId,initiated:re.Initiated}}),oe.abrupt("return",{res:ee.res,uploads:z,bucket:ee.data.Bucket,nextKeyMarker:ee.data.NextKeyMarker,nextUploadIdMarker:ee.data.NextUploadIdMarker,isTruncated:ee.data.IsTruncated==="true"});case 15:case"end":return oe.stop()}},pe,this)}),we.listParts=xe.default.mark(function pe(de,ge,fe,ue){var ee,z,oe;return xe.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return ue=ue||{},ee={},be(ue).to(ee),ee.subres={uploadId:ge},z=this._objectRequestParams("GET",de,ee),z.query=fe,z.xmlResponse=!0,z.successStatuses=[200],re.next=10,this.request(z);case 10:return oe=re.sent,re.abrupt("return",{res:oe.res,uploadId:oe.data.UploadId,bucket:oe.data.Bucket,name:oe.data.Key,partNumberMarker:oe.data.PartNumberMarker,nextPartNumberMarker:oe.data.NextPartNumberMarker,maxParts:oe.data.MaxParts,isTruncated:oe.data.IsTruncated,parts:oe.data.Part||[]});case 12:case"end":return re.stop()}},pe,this)}),we.abortMultipartUpload=xe.default.mark(function pe(de,ge,fe){var ue,ee,z;return xe.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return this.cancel(),fe=fe||{},ue={},be(fe).to(ue),ue.subres={uploadId:ge},ee=this._objectRequestParams("DELETE",de,ue),ee.successStatuses=[204],oe.next=9,this.request(ee);case 9:return z=oe.sent,oe.abrupt("return",{res:z.res});case 11:case"end":return oe.stop()}},pe,this)}),we.initMultipartUpload=xe.default.mark(function pe(de,ge){var fe,ue,ee;return xe.default.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return ge=ge||{},fe={},be(ge).to(fe),fe.headers=fe.headers||{},this._convertMetaToHeaders(ge.meta,fe.headers),fe.subres="uploads",ue=this._objectRequestParams("POST",de,fe),ue.mime=ge.mime,ue.xmlResponse=!0,ue.successStatuses=[200],z.next=12,this.request(ue);case 12:return ee=z.sent,z.abrupt("return",{res:ee.res,bucket:ee.data.Bucket,name:ee.data.Key,uploadId:ee.data.UploadId});case 14:case"end":return z.stop()}},pe,this)}),we.uploadPart=xe.default.mark(function pe(de,ge,fe,ue,ee,z,oe){var re;return xe.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return re={stream:this._createStream(ue,ee,z),size:z-ee},ae.next=3,this._uploadPart(de,ge,fe,re,oe);case 3:return ae.abrupt("return",ae.sent);case 4:case"end":return ae.stop()}},pe,this)}),we.completeMultipartUpload=xe.default.mark(function pe(de,ge,fe,ue){var ee,z,oe,re,ae,le,me,ve;return xe.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:for(ee=fe.concat().sort(function(Ae,Oe){return Ae.number-Oe.number}).filter(function(Ae,Oe,Ie){return!Oe||Ae.number!==Ie[Oe-1].number}),z=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,oe=0;oe<ee.length;oe++)re=ee[oe],z+=`<Part>
|
|
|
`,z+="<PartNumber>"+re.number+`</PartNumber>
|
|
|
`,z+="<ETag>"+re.etag+`</ETag>
|
|
|
`,z+=`</Part>
|
|
|
`;return z+="</CompleteMultipartUpload>",ue=ue||{},ae={},be(ue).to(ae),ae.subres={uploadId:ge},le=this._objectRequestParams("POST",de,ae),ye.encodeCallback(le,ae),le.mime="xml",le.content=z,le.headers&&le.headers["x-oss-callback"]||(le.xmlResponse=!0),le.successStatuses=[200],Pe.next=16,this.request(le);case 16:return me=Pe.sent,ve={res:me.res,bucket:le.bucket,name:de,etag:me.res.headers.etag},le.headers&&le.headers["x-oss-callback"]&&(ve.data=JSON.parse(me.data.toString())),Pe.abrupt("return",ve);case 20:case"end":return Pe.stop()}},pe,this)}),we._uploadPart=xe.default.mark(function pe(de,ge,fe,ue,ee){var z,oe,re;return xe.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return ee=ee||{},z={},be(ee).to(z),z.headers={"Content-Length":ue.size},z.subres={partNumber:fe,uploadId:ge},oe=this._objectRequestParams("PUT",de,z),oe.mime=z.mime,oe.stream=ue.stream,oe.successStatuses=[200],ae.next=11,this.request(oe);case 11:return re=ae.sent,ue.stream=null,oe.stream=null,ae.abrupt("return",{name:de,etag:re.res.headers.etag,res:re.res});case 15:case"end":return ae.stop()}},pe,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(Se,Be,Le){(function(Ce){"use strict";function xe(fe){return fe&&fe.__esModule?fe:{default:fe}}var be=Se("babel-runtime/core-js/json/stringify"),ye=xe(be),we=Se("babel-runtime/core-js/object/keys"),pe=xe(we),de=Se("./../../shims/crypto/crypto.js"),ge=Se("is-type-of");Le.buildCanonicalizedResource=function(fe,ue){var ee=""+fe,z="?";if(ge.string(ue)&&ue.trim()!=="")ee+=z+ue;else if(ge.array(ue))ue.sort(),ee+=z+ue.join("&");else if(ue){var oe=function(ae,le){return ae[0]>le[0]?1:ae[0]<le[0]?-1:0},re=function(ae){ee+=z+ae,ue[ae]&&(ee+="="+ue[ae]),z="&"};(0,pe.default)(ue).sort(oe).forEach(re)}return ee},Le.buildCanonicalString=function(fe,ue,ee,z){ee=ee||{};var oe=ee.headers||{},re=[],ae={},le=[fe.toUpperCase(),oe["Content-Md5"]||"",oe["Content-Type"]||oe["Content-Type".toLowerCase()],z||oe["x-oss-date"]];return(0,pe.default)(oe).forEach(function(me){var ve=me.toLowerCase();ve.indexOf("x-oss-")===0&&(ae[ve]=String(oe[me]).trim())}),(0,pe.default)(ae).sort().forEach(function(me){re.push(me+":"+ae[me])}),le=le.concat(re),le.push(this.buildCanonicalizedResource(ue,ee.parameters)),le.join(`
|
|
|
`)},Le.computeSignature=function(fe,ue){return de.createHmac("sha1",fe).update(new Ce(ue,"utf8")).digest("base64")},Le.authorization=function(fe,ue,ee){return"OSS "+fe+":"+this.computeSignature(ue,ee)},Le._signatureForURL=function(fe,ue,ee,z){var oe={},re={};if(ue.process&&(re["x-oss-process"]=ue.process),ue.response&&(0,pe.default)(ue.response).forEach(function(ve){var Pe="response-"+ve.toLowerCase();re[Pe]=ue.response[ve]}),(0,pe.default)(ue).forEach(function(ve){var Pe=ve.toLowerCase(),Ae=ue[ve];Pe.indexOf("x-oss-")===0?oe[Pe]=Ae:Pe.indexOf("content-md5")===0||Pe.indexOf("content-type")===0?oe[ve]=Ae:Pe!=="expires"&&Pe!=="response"&&Pe!=="process"&&Pe!=="method"&&(re[Pe]=Ae)}),Object.prototype.hasOwnProperty.call(ue,"security-token")&&(re["security-token"]=ue["security-token"]),Object.prototype.hasOwnProperty.call(ue,"callback")){var ae={callbackUrl:encodeURI(ue.callback.url),callbackBody:ue.callback.body};if(ue.callback.host&&(ae.callbackHost=ue.callback.host),ue.callback.contentType&&(ae.callbackBodyType=ue.callback.contentType),re.callback=new Ce((0,ye.default)(ae)).toString("base64"),ue.callback.customValue){var le={};(0,pe.default)(ue.callback.customValue).forEach(function(ve){le["x:"+ve]=ue.callback.customValue[ve]}),re["callback-var"]=new Ce((0,ye.default)(le)).toString("base64")}}var me=this.buildCanonicalString(ue.method,ee,{headers:oe,parameters:re},z.toString());return{Signature:this.computeSignature(fe,me),subResource:re}}}).call(this,Se("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/regenerator"),xe=function(de){return de&&de.__esModule?de:{default:de}}(Ce),be=Se("co"),ye=Se("co-priority-queue"),we=Se("any-promise"),pe=Le;pe._thunkPool=function(de,ge){function fe(re,ae){++z===re.length&&ae(oe)}function ue(re,ae){function le(){var Ie;return xe.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:Ie=void 0;case 1:if(ee.isCancel()){Ze.next=9;break}return Ze.next=4,Pe.next();case 4:return Ie=Ze.sent,Ze.next=7,Ie();case 7:Ze.next=1;break;case 9:Ae+=1,Ae===re&&(Pe.fns=[],Pe.buffer=[],ae(oe));case 11:case"end":return Ze.stop()}},ve,this)}function me(Ie){console.error(Ie.stack)}for(var ve=xe.default.mark(le),Pe=new ye,Ae=0,Oe=0;Oe<re;Oe++)be(le).catch(me);return function(Ie,Ze){return function(qe){Pe.push(xe.default.mark(function Je(){return xe.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return mt.prev=0,mt.t0=qe,mt.next=4,Ie;case 4:mt.t1=mt.sent,(0,mt.t0)(null,mt.t1),mt.next=11;break;case 8:mt.prev=8,mt.t2=mt.catch(0),qe(mt.t2);case 11:case"end":return mt.stop()}},Je,this,[[0,8]])}),Ze)}}}var ee=this,z=0,oe=[];return new we(function(re){function ae(Ae){return xe.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Oe.next=2,ve(de[Ae]);case 2:fe(de,re);case 3:case"end":return Oe.stop()}},me,this)}function le(Ae){oe.push(Ae),fe(de,re)}for(var me=xe.default.mark(ae),ve=new ue(ge,re),Pe=0;Pe<de.length;Pe++)be(ae(Pe)).catch(le)})},pe.cancel=function(){this.options.cancelFlag=!0},pe.isCancel=function(){return this.options.cancelFlag},pe.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(Se,Be,Le){"use strict";Le._isIP=function(Ce){var xe=/^(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 xe.test(Ce)||be.test(Ce)}},{}],12:[function(Se,Be,Le){function Ce(){}Be.exports=Ce,Be.exports.HttpsAgent=Ce},{}],13:[function(Se,Be,Le){Be.exports=Se("./register")().Promise},{"./register":15}],14:[function(Se,Be,Le){"use strict";var Ce=null;Be.exports=function(xe,be){return function(ye,we){ye=ye||null,we=we||{};var pe=we.global!==!1;if(Ce===null&&pe&&(Ce=xe["@@any-promise/REGISTRATION"]||null),Ce!==null&&ye!==null&&Ce.implementation!==ye)throw new Error('any-promise already defined as "'+Ce.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return Ce===null&&(Ce=ye!==null&&we.Promise!==void 0?{Promise:we.Promise,implementation:ye}:be(ye),pe&&(xe["@@any-promise/REGISTRATION"]=Ce)),Ce}}},{}],15:[function(Se,Be,Le){"use strict";function Ce(){if(window.Promise===void 0)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}Be.exports=Se("./loader")(window,Ce)},{"./loader":14}],16:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(Se,Be,Le){Be.exports={default:Se("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(Se,Be,Le){"use strict";Le.__esModule=!0,Le.default=function(Ce,xe){if(!(Ce instanceof xe))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(Se,Be,Le){"use strict";Le.__esModule=!0;var Ce=Se("../core-js/object/define-property"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);Le.default=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),(0,xe.default)(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}()},{"../core-js/object/define-property":20}],32:[function(Se,Be,Le){"use strict";function Ce(de){return de&&de.__esModule?de:{default:de}}Le.__esModule=!0;var xe=Se("../core-js/symbol/iterator"),be=Ce(xe),ye=Se("../core-js/symbol"),we=Ce(ye),pe=typeof we.default=="function"&&typeof be.default=="symbol"?function(de){return typeof de}:function(de){return de&&typeof we.default=="function"&&de.constructor===we.default&&de!==we.default.prototype?"symbol":typeof de};Le.default=typeof we.default=="function"&&pe(be.default)==="symbol"?function(de){return de===void 0?"undefined":pe(de)}:function(de){return de&&typeof we.default=="function"&&de.constructor===we.default&&de!==we.default.prototype?"symbol":de===void 0?"undefined":pe(de)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(Se,Be,Le){Be.exports=Se("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(Se,Be,Le){"use strict";function Ce(re){var ae=re.length;if(ae%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var le=re.indexOf("=");return le===-1&&(le=ae),[le,le===ae?0:4-le%4]}function xe(re){var ae=Ce(re),le=ae[0],me=ae[1];return 3*(le+me)/4-me}function be(re,ae,le){return 3*(ae+le)/4-le}function ye(re){for(var ae,le=Ce(re),me=le[0],ve=le[1],Pe=new ue(be(re,me,ve)),Ae=0,Oe=ve>0?me-4:me,Ie=0;Ie<Oe;Ie+=4)ae=fe[re.charCodeAt(Ie)]<<18|fe[re.charCodeAt(Ie+1)]<<12|fe[re.charCodeAt(Ie+2)]<<6|fe[re.charCodeAt(Ie+3)],Pe[Ae++]=ae>>16&255,Pe[Ae++]=ae>>8&255,Pe[Ae++]=255&ae;return ve===2&&(ae=fe[re.charCodeAt(Ie)]<<2|fe[re.charCodeAt(Ie+1)]>>4,Pe[Ae++]=255&ae),ve===1&&(ae=fe[re.charCodeAt(Ie)]<<10|fe[re.charCodeAt(Ie+1)]<<4|fe[re.charCodeAt(Ie+2)]>>2,Pe[Ae++]=ae>>8&255,Pe[Ae++]=255&ae),Pe}function we(re){return ge[re>>18&63]+ge[re>>12&63]+ge[re>>6&63]+ge[63&re]}function pe(re,ae,le){for(var me,ve=[],Pe=ae;Pe<le;Pe+=3)me=(re[Pe]<<16&16711680)+(re[Pe+1]<<8&65280)+(255&re[Pe+2]),ve.push(we(me));return ve.join("")}function de(re){for(var ae,le=re.length,me=le%3,ve=[],Pe=0,Ae=le-me;Pe<Ae;Pe+=16383)ve.push(pe(re,Pe,Pe+16383>Ae?Ae:Pe+16383));return me===1?(ae=re[le-1],ve.push(ge[ae>>2]+ge[ae<<4&63]+"==")):me===2&&(ae=(re[le-2]<<8)+re[le-1],ve.push(ge[ae>>10]+ge[ae>>4&63]+ge[ae<<2&63]+"=")),ve.join("")}Le.byteLength=xe,Le.toByteArray=ye,Le.fromByteArray=de;for(var ge=[],fe=[],ue=typeof Uint8Array!="undefined"?Uint8Array:Array,ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",z=0,oe=ee.length;z<oe;++z)ge[z]=ee[z],fe[ee.charCodeAt(z)]=z;fe[45]=62,fe[95]=63},{}],35:[function(Se,Be,Le){(function(Ce,xe,be){Be!==void 0&&Be.exports?Be.exports=be():typeof ke=="function"&&ke.amd?ke("bowser",be):Ce.bowser=be()})(this,0,function(){function Ce(fe){function ue(ot){var ct=fe.match(ot);return ct&&ct.length>1&&ct[1]||""}function ee(ot){var ct=fe.match(ot);return ct&&ct.length>1&&ct[2]||""}var z,oe=ue(/(ipod|iphone|ipad)/i).toLowerCase(),re=/like android/i.test(fe),ae=!re&&/android/i.test(fe),le=/nexus\s*[0-6]\s*/i.test(fe),me=!le&&/nexus\s*[0-9]+/i.test(fe),ve=/CrOS/.test(fe),Pe=/silk/i.test(fe),Ae=/sailfish/i.test(fe),Oe=/tizen/i.test(fe),Ie=/(web|hpw)os/i.test(fe),Ze=/windows phone/i.test(fe),qe=(/SamsungBrowser/i.test(fe),!Ze&&/windows/i.test(fe)),Je=!oe&&!Pe&&/macintosh/i.test(fe),mt=!ae&&!Ae&&!Oe&&!Ie&&/linux/i.test(fe),gt=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),Mt=ue(/version\/(\d+(\.\d+)?)/i),at=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),_t=!at&&/[^-]mobi/i.test(fe),ht=/xbox/i.test(fe);/opera/i.test(fe)?z={name:"Opera",opera:de,version:Mt||ue(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(fe)?z={name:"Opera",opera:de,version:ue(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||Mt}:/SamsungBrowser/i.test(fe)?z={name:"Samsung Internet for Android",samsungBrowser:de,version:Mt||ue(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(fe)?z={name:"Opera Coast",coast:de,version:Mt||ue(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(fe)?z={name:"Yandex Browser",yandexbrowser:de,version:Mt||ue(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(fe)?z={name:"UC Browser",ucbrowser:de,version:ue(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(fe)?z={name:"Maxthon",maxthon:de,version:ue(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(fe)?z={name:"Epiphany",epiphany:de,version:ue(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(fe)?z={name:"Puffin",puffin:de,version:ue(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(fe)?z={name:"Sleipnir",sleipnir:de,version:ue(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(fe)?z={name:"K-Meleon",kMeleon:de,version:ue(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ze?(z={name:"Windows Phone",osname:"Windows Phone",windowsphone:de},gt?(z.msedge=de,z.version=gt):(z.msie=de,z.version=ue(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(fe)?z={name:"Internet Explorer",msie:de,version:ue(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:ve?z={name:"Chrome",osname:"Chrome OS",chromeos:de,chromeBook:de,chrome:de,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(fe)?z={name:"Microsoft Edge",msedge:de,version:gt}:/vivaldi/i.test(fe)?z={name:"Vivaldi",vivaldi:de,version:ue(/vivaldi\/(\d+(\.\d+)?)/i)||Mt}:Ae?z={name:"Sailfish",osname:"Sailfish OS",sailfish:de,version:ue(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(fe)?z={name:"SeaMonkey",seamonkey:de,version:ue(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(fe)?(z={name:"Firefox",firefox:de,version:ue(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(fe)&&(z.firefoxos=de,z.osname="Firefox OS")):Pe?z={name:"Amazon Silk",silk:de,version:ue(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(fe)?z={name:"PhantomJS",phantom:de,version:ue(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(fe)?z={name:"SlimerJS",slimer:de,version:ue(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(fe)||/rim\stablet/i.test(fe)?z={name:"BlackBerry",osname:"BlackBerry OS",blackberry:de,version:Mt||ue(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Ie?(z={name:"WebOS",osname:"WebOS",webos:de,version:Mt||ue(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(fe)&&(z.touchpad=de)):/bada/i.test(fe)?z={name:"Bada",osname:"Bada",bada:de,version:ue(/dolfin\/(\d+(\.\d+)?)/i)}:Oe?z={name:"Tizen",osname:"Tizen",tizen:de,version:ue(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||Mt}:/qupzilla/i.test(fe)?z={name:"QupZilla",qupzilla:de,version:ue(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||Mt}:/chromium/i.test(fe)?z={name:"Chromium",chromium:de,version:ue(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||Mt}:/chrome|crios|crmo/i.test(fe)?z={name:"Chrome",chrome:de,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:ae?z={name:"Android",version:Mt}:/safari|applewebkit/i.test(fe)?(z={name:"Safari",safari:de},Mt&&(z.version=Mt)):oe?(z={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},Mt&&(z.version=Mt)):z=/googlebot/i.test(fe)?{name:"Googlebot",googlebot:de,version:ue(/googlebot\/(\d+(\.\d+))/i)||Mt}:{name:ue(/^(.*)\/(.*) /),version:ee(/^(.*)\/(.*) /)},!z.msedge&&/(apple)?webkit/i.test(fe)?(/(apple)?webkit\/537\.36/i.test(fe)?(z.name=z.name||"Blink",z.blink=de):(z.name=z.name||"Webkit",z.webkit=de),!z.version&&Mt&&(z.version=Mt)):!z.opera&&/gecko\//i.test(fe)&&(z.name=z.name||"Gecko",z.gecko=de,z.version=z.version||ue(/gecko\/(\d+(\.\d+)?)/i)),z.windowsphone||!ae&&!z.silk?!z.windowsphone&&oe?(z[oe]=de,z.ios=de,z.osname="iOS"):Je?(z.mac=de,z.osname="macOS"):ht?(z.xbox=de,z.osname="Xbox"):qe?(z.windows=de,z.osname="Windows"):mt&&(z.linux=de,z.osname="Linux"):(z.android=de,z.osname="Android");var Dt="";z.windows?Dt=function(ot){switch(ot){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}}(ue(/Windows ((NT|XP)( \d\d?.\d)?)/i)):z.windowsphone?Dt=ue(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):z.mac?(Dt=ue(/Mac OS X (\d+([_\.\s]\d+)*)/i),Dt=Dt.replace(/[_\s]/g,".")):oe?(Dt=ue(/os (\d+([_\s]\d+)*) like mac os x/i),Dt=Dt.replace(/[_\s]/g,".")):ae?Dt=ue(/android[ \/-](\d+(\.\d+)*)/i):z.webos?Dt=ue(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):z.blackberry?Dt=ue(/rim\stablet\sos\s(\d+(\.\d+)*)/i):z.bada?Dt=ue(/bada\/(\d+(\.\d+)*)/i):z.tizen&&(Dt=ue(/tizen[\/\s](\d+(\.\d+)*)/i)),Dt&&(z.osversion=Dt);var ut=!z.windows&&Dt.split(".")[0];return at||me||oe=="ipad"||ae&&(ut==3||ut>=4&&!_t)||z.silk?z.tablet=de:(_t||oe=="iphone"||oe=="ipod"||ae||le||z.blackberry||z.webos||z.bada)&&(z.mobile=de),z.msedge||z.msie&&z.version>=10||z.yandexbrowser&&z.version>=15||z.vivaldi&&z.version>=1||z.chrome&&z.version>=20||z.samsungBrowser&&z.version>=4||z.firefox&&z.version>=20||z.safari&&z.version>=6||z.opera&&z.version>=10||z.ios&&z.osversion&&z.osversion.split(".")[0]>=6||z.blackberry&&z.version>=10.1||z.chromium&&z.version>=20?z.a=de:z.msie&&z.version<10||z.chrome&&z.version<20||z.firefox&&z.version<20||z.safari&&z.version<6||z.opera&&z.version<10||z.ios&&z.osversion&&z.osversion.split(".")[0]<6||z.chromium&&z.version<20?z.c=de:z.x=de,z}function xe(fe){return fe.split(".").length}function be(fe,ue){var ee,z=[];if(Array.prototype.map)return Array.prototype.map.call(fe,ue);for(ee=0;ee<fe.length;ee++)z.push(ue(fe[ee]));return z}function ye(fe){for(var ue=Math.max(xe(fe[0]),xe(fe[1])),ee=be(fe,function(z){var oe=ue-xe(z);return z+=new Array(oe+1).join(".0"),be(z.split("."),function(re){return new Array(20-re.length).join("0")+re}).reverse()});--ue>=0;){if(ee[0][ue]>ee[1][ue])return 1;if(ee[0][ue]!==ee[1][ue])return-1;if(ue===0)return 0}}function we(fe,ue,ee){var z=ge;typeof ue=="string"&&(ee=ue,ue=void 0),ue===void 0&&(ue=!1),ee&&(z=Ce(ee));var oe=""+z.version;for(var re in fe)if(fe.hasOwnProperty(re)&&z[re]){if(typeof fe[re]!="string")throw new Error("Browser version in the minVersion map should be a string: "+re+": "+String(fe));return ye([oe,fe[re]])<0}return ue}function pe(fe,ue,ee){return!we(fe,ue,ee)}var de=!0,ge=Ce(typeof navigator!="undefined"&&navigator.userAgent||"");return ge.test=function(fe){for(var ue=0;ue<fe.length;++ue){var ee=fe[ue];if(typeof ee=="string"&&ee in ge)return!0}return!1},ge.isUnsupportedBrowser=we,ge.compareVersions=ye,ge.check=pe,ge._detect=Ce,ge.detect=Ce,ge})},{}],36:[function(Se,Be,Le){},{}],37:[function(Se,Be,Le){function Ce(ge){if(ge&&!pe(ge))throw new Error("Unknown encoding: "+ge)}function xe(ge){return ge.toString(this.encoding)}function be(ge){this.charReceived=ge.length%2,this.charLength=this.charReceived?2:0}function ye(ge){this.charReceived=ge.length%3,this.charLength=this.charReceived?3:0}var we=Se("buffer").Buffer,pe=we.isEncoding||function(ge){switch(ge&&ge.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}},de=Le.StringDecoder=function(ge){switch(this.encoding=(ge||"utf8").toLowerCase().replace(/[-_]/,""),Ce(ge),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=be;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ye;break;default:return void(this.write=xe)}this.charBuffer=new we(6),this.charReceived=0,this.charLength=0};de.prototype.write=function(ge){for(var fe="";this.charLength;){var ue=ge.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:ge.length;if(ge.copy(this.charBuffer,this.charReceived,0,ue),this.charReceived+=ue,this.charReceived<this.charLength)return"";ge=ge.slice(ue,ge.length),fe=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var z=fe.charCodeAt(fe.length-1);if(!(z>=55296&&z<=56319)){if(this.charReceived=this.charLength=0,ge.length===0)return fe;break}this.charLength+=this.surrogateSize,fe=""}this.detectIncompleteChar(ge);var ee=ge.length;this.charLength&&(ge.copy(this.charBuffer,0,ge.length-this.charReceived,ee),ee-=this.charReceived),fe+=ge.toString(this.encoding,0,ee);var ee=fe.length-1,z=fe.charCodeAt(ee);if(z>=55296&&z<=56319){var oe=this.surrogateSize;return this.charLength+=oe,this.charReceived+=oe,this.charBuffer.copy(this.charBuffer,oe,0,oe),ge.copy(this.charBuffer,0,0,oe),fe.substring(0,ee)}return fe},de.prototype.detectIncompleteChar=function(ge){for(var fe=ge.length>=3?3:ge.length;fe>0;fe--){var ue=ge[ge.length-fe];if(fe==1&&ue>>5==6){this.charLength=2;break}if(fe<=2&&ue>>4==14){this.charLength=3;break}if(fe<=3&&ue>>3==30){this.charLength=4;break}}this.charReceived=fe},de.prototype.end=function(ge){var fe="";if(ge&&ge.length&&(fe=this.write(ge)),this.charReceived){var ue=this.charReceived,ee=this.charBuffer,z=this.encoding;fe+=ee.slice(0,ue).toString(z)}return fe}},{buffer:38}],38:[function(Se,Be,Le){(function(Ce){"use strict";function xe(){return ye.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function be(De,ze){if(xe()<ze)throw new RangeError("Invalid typed array length");return ye.TYPED_ARRAY_SUPPORT?(De=new Uint8Array(ze),De.__proto__=ye.prototype):(De===null&&(De=new ye(ze)),De.length=ze),De}function ye(De,ze,$e){if(!(ye.TYPED_ARRAY_SUPPORT||this instanceof ye))return new ye(De,ze,$e);if(typeof De=="number"){if(typeof ze=="string")throw new Error("If encoding is specified then the first argument must be a string");return ge(this,De)}return we(this,De,ze,$e)}function we(De,ze,$e,We){if(typeof ze=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&ze instanceof ArrayBuffer?ee(De,ze,$e,We):typeof ze=="string"?fe(De,ze,$e):z(De,ze)}function pe(De){if(typeof De!="number")throw new TypeError('"size" argument must be a number');if(De<0)throw new RangeError('"size" argument must not be negative')}function de(De,ze,$e,We){return pe(ze),ze<=0?be(De,ze):$e!==void 0?typeof We=="string"?be(De,ze).fill($e,We):be(De,ze).fill($e):be(De,ze)}function ge(De,ze){if(pe(ze),De=be(De,ze<0?0:0|oe(ze)),!ye.TYPED_ARRAY_SUPPORT)for(var $e=0;$e<ze;++$e)De[$e]=0;return De}function fe(De,ze,$e){if(typeof $e=="string"&&$e!==""||($e="utf8"),!ye.isEncoding($e))throw new TypeError('"encoding" must be a valid string encoding');var We=0|ae(ze,$e);De=be(De,We);var Ve=De.write(ze,$e);return Ve!==We&&(De=De.slice(0,Ve)),De}function ue(De,ze){var $e=ze.length<0?0:0|oe(ze.length);De=be(De,$e);for(var We=0;We<$e;We+=1)De[We]=255&ze[We];return De}function ee(De,ze,$e,We){if(ze.byteLength,$e<0||ze.byteLength<$e)throw new RangeError("'offset' is out of bounds");if(ze.byteLength<$e+(We||0))throw new RangeError("'length' is out of bounds");return ze=$e===void 0&&We===void 0?new Uint8Array(ze):We===void 0?new Uint8Array(ze,$e):new Uint8Array(ze,$e,We),ye.TYPED_ARRAY_SUPPORT?(De=ze,De.__proto__=ye.prototype):De=ue(De,ze),De}function z(De,ze){if(ye.isBuffer(ze)){var $e=0|oe(ze.length);return De=be(De,$e),De.length===0||ze.copy(De,0,0,$e),De}if(ze){if(typeof ArrayBuffer!="undefined"&&ze.buffer instanceof ArrayBuffer||"length"in ze)return typeof ze.length!="number"||Ue(ze.length)?be(De,0):ue(De,ze);if(ze.type==="Buffer"&&dt(ze.data))return ue(De,ze.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(De){if(De>=xe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+xe().toString(16)+" bytes");return 0|De}function re(De){return+De!=De&&(De=0),ye.alloc(+De)}function ae(De,ze){if(ye.isBuffer(De))return De.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(De)||De instanceof ArrayBuffer))return De.byteLength;typeof De!="string"&&(De=""+De);var $e=De.length;if($e===0)return 0;for(var We=!1;;)switch(ze){case"ascii":case"latin1":case"binary":return $e;case"utf8":case"utf-8":case void 0:return mn(De).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$e;case"hex":return $e>>>1;case"base64":return tn(De).length;default:if(We)return mn(De).length;ze=(""+ze).toLowerCase(),We=!0}}function le(De,ze,$e){var We=!1;if((ze===void 0||ze<0)&&(ze=0),ze>this.length||(($e===void 0||$e>this.length)&&($e=this.length),$e<=0)||($e>>>=0,ze>>>=0,$e<=ze))return"";for(De||(De="utf8");;)switch(De){case"hex":return ht(this,ze,$e);case"utf8":case"utf-8":return gt(this,ze,$e);case"ascii":return at(this,ze,$e);case"latin1":case"binary":return _t(this,ze,$e);case"base64":return mt(this,ze,$e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Dt(this,ze,$e);default:if(We)throw new TypeError("Unknown encoding: "+De);De=(De+"").toLowerCase(),We=!0}}function me(De,ze,$e){var We=De[ze];De[ze]=De[$e],De[$e]=We}function ve(De,ze,$e,We,Ve){if(De.length===0)return-1;if(typeof $e=="string"?(We=$e,$e=0):$e>2147483647?$e=2147483647:$e<-2147483648&&($e=-2147483648),$e=+$e,isNaN($e)&&($e=Ve?0:De.length-1),$e<0&&($e=De.length+$e),$e>=De.length){if(Ve)return-1;$e=De.length-1}else if($e<0){if(!Ve)return-1;$e=0}if(typeof ze=="string"&&(ze=ye.from(ze,We)),ye.isBuffer(ze))return ze.length===0?-1:Pe(De,ze,$e,We,Ve);if(typeof ze=="number")return ze&=255,ye.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ve?Uint8Array.prototype.indexOf.call(De,ze,$e):Uint8Array.prototype.lastIndexOf.call(De,ze,$e):Pe(De,[ze],$e,We,Ve);throw new TypeError("val must be string, number or Buffer")}function Pe(De,ze,$e,We,Ve){function pt(dn,Zn){return Lt===1?dn[Zn]:dn.readUInt16BE(Zn*Lt)}var Lt=1,on=De.length,Xt=ze.length;if(We!==void 0&&((We=String(We).toLowerCase())==="ucs2"||We==="ucs-2"||We==="utf16le"||We==="utf-16le")){if(De.length<2||ze.length<2)return-1;Lt=2,on/=2,Xt/=2,$e/=2}var Rt;if(Ve){var fn=-1;for(Rt=$e;Rt<on;Rt++)if(pt(De,Rt)===pt(ze,fn===-1?0:Rt-fn)){if(fn===-1&&(fn=Rt),Rt-fn+1===Xt)return fn*Lt}else fn!==-1&&(Rt-=Rt-fn),fn=-1}else for($e+Xt>on&&($e=on-Xt),Rt=$e;Rt>=0;Rt--){for(var En=!0,Sn=0;Sn<Xt;Sn++)if(pt(De,Rt+Sn)!==pt(ze,Sn)){En=!1;break}if(En)return Rt}return-1}function Ae(De,ze,$e,We){$e=Number($e)||0;var Ve=De.length-$e;We?(We=Number(We))>Ve&&(We=Ve):We=Ve;var pt=ze.length;if(pt%2!=0)throw new TypeError("Invalid hex string");We>pt/2&&(We=pt/2);for(var Lt=0;Lt<We;++Lt){var on=parseInt(ze.substr(2*Lt,2),16);if(isNaN(on))return Lt;De[$e+Lt]=on}return Lt}function Oe(De,ze,$e,We){return lt(mn(ze,De.length-$e),De,$e,We)}function Ie(De,ze,$e,We){return lt(Ft(ze),De,$e,We)}function Ze(De,ze,$e,We){return Ie(De,ze,$e,We)}function qe(De,ze,$e,We){return lt(tn(ze),De,$e,We)}function Je(De,ze,$e,We){return lt(Yt(ze,De.length-$e),De,$e,We)}function mt(De,ze,$e){return ze===0&&$e===De.length?je.fromByteArray(De):je.fromByteArray(De.slice(ze,$e))}function gt(De,ze,$e){$e=Math.min(De.length,$e);for(var We=[],Ve=ze;Ve<$e;){var pt=De[Ve],Lt=null,on=pt>239?4:pt>223?3:pt>191?2:1;if(Ve+on<=$e){var Xt,Rt,fn,En;switch(on){case 1:pt<128&&(Lt=pt);break;case 2:Xt=De[Ve+1],(192&Xt)==128&&(En=(31&pt)<<6|63&Xt)>127&&(Lt=En);break;case 3:Xt=De[Ve+1],Rt=De[Ve+2],(192&Xt)==128&&(192&Rt)==128&&(En=(15&pt)<<12|(63&Xt)<<6|63&Rt)>2047&&(En<55296||En>57343)&&(Lt=En);break;case 4:Xt=De[Ve+1],Rt=De[Ve+2],fn=De[Ve+3],(192&Xt)==128&&(192&Rt)==128&&(192&fn)==128&&(En=(15&pt)<<18|(63&Xt)<<12|(63&Rt)<<6|63&fn)>65535&&En<1114112&&(Lt=En)}}Lt===null?(Lt=65533,on=1):Lt>65535&&(Lt-=65536,We.push(Lt>>>10&1023|55296),Lt=56320|1023&Lt),We.push(Lt),Ve+=on}return Mt(We)}function Mt(De){var ze=De.length;if(ze<=tt)return String.fromCharCode.apply(String,De);for(var $e="",We=0;We<ze;)$e+=String.fromCharCode.apply(String,De.slice(We,We+=tt));return $e}function at(De,ze,$e){var We="";$e=Math.min(De.length,$e);for(var Ve=ze;Ve<$e;++Ve)We+=String.fromCharCode(127&De[Ve]);return We}function _t(De,ze,$e){var We="";$e=Math.min(De.length,$e);for(var Ve=ze;Ve<$e;++Ve)We+=String.fromCharCode(De[Ve]);return We}function ht(De,ze,$e){var We=De.length;(!ze||ze<0)&&(ze=0),(!$e||$e<0||$e>We)&&($e=We);for(var Ve="",pt=ze;pt<$e;++pt)Ve+=jt(De[pt]);return Ve}function Dt(De,ze,$e){for(var We=De.slice(ze,$e),Ve="",pt=0;pt<We.length;pt+=2)Ve+=String.fromCharCode(We[pt]+256*We[pt+1]);return Ve}function ut(De,ze,$e){if(De%1!=0||De<0)throw new RangeError("offset is not uint");if(De+ze>$e)throw new RangeError("Trying to access beyond buffer length")}function ot(De,ze,$e,We,Ve,pt){if(!ye.isBuffer(De))throw new TypeError('"buffer" argument must be a Buffer instance');if(ze>Ve||ze<pt)throw new RangeError('"value" argument is out of bounds');if($e+We>De.length)throw new RangeError("Index out of range")}function ct(De,ze,$e,We){ze<0&&(ze=65535+ze+1);for(var Ve=0,pt=Math.min(De.length-$e,2);Ve<pt;++Ve)De[$e+Ve]=(ze&255<<8*(We?Ve:1-Ve))>>>8*(We?Ve:1-Ve)}function yt(De,ze,$e,We){ze<0&&(ze=4294967295+ze+1);for(var Ve=0,pt=Math.min(De.length-$e,4);Ve<pt;++Ve)De[$e+Ve]=ze>>>8*(We?Ve:3-Ve)&255}function wt(De,ze,$e,We,Ve,pt){if($e+We>De.length)throw new RangeError("Index out of range");if($e<0)throw new RangeError("Index out of range")}function xt(De,ze,$e,We,Ve){return Ve||wt(De,ze,$e,4,34028234663852886e22,-34028234663852886e22),rt.write(De,ze,$e,We,23,4),$e+4}function zt(De,ze,$e,We,Ve){return Ve||wt(De,ze,$e,8,17976931348623157e292,-17976931348623157e292),rt.write(De,ze,$e,We,52,8),$e+8}function Ut(De){if(De=cn(De).replace(Ke,""),De.length<2)return"";for(;De.length%4!=0;)De+="=";return De}function cn(De){return De.trim?De.trim():De.replace(/^\s+|\s+$/g,"")}function jt(De){return De<16?"0"+De.toString(16):De.toString(16)}function mn(De,ze){ze=ze||1/0;for(var $e,We=De.length,Ve=null,pt=[],Lt=0;Lt<We;++Lt){if(($e=De.charCodeAt(Lt))>55295&&$e<57344){if(!Ve){if($e>56319){(ze-=3)>-1&&pt.push(239,191,189);continue}if(Lt+1===We){(ze-=3)>-1&&pt.push(239,191,189);continue}Ve=$e;continue}if($e<56320){(ze-=3)>-1&&pt.push(239,191,189),Ve=$e;continue}$e=65536+(Ve-55296<<10|$e-56320)}else Ve&&(ze-=3)>-1&&pt.push(239,191,189);if(Ve=null,$e<128){if((ze-=1)<0)break;pt.push($e)}else if($e<2048){if((ze-=2)<0)break;pt.push($e>>6|192,63&$e|128)}else if($e<65536){if((ze-=3)<0)break;pt.push($e>>12|224,$e>>6&63|128,63&$e|128)}else{if(!($e<1114112))throw new Error("Invalid code point");if((ze-=4)<0)break;pt.push($e>>18|240,$e>>12&63|128,$e>>6&63|128,63&$e|128)}}return pt}function Ft(De){for(var ze=[],$e=0;$e<De.length;++$e)ze.push(255&De.charCodeAt($e));return ze}function Yt(De,ze){for(var $e,We,Ve,pt=[],Lt=0;Lt<De.length&&!((ze-=2)<0);++Lt)$e=De.charCodeAt(Lt),We=$e>>8,Ve=$e%256,pt.push(Ve),pt.push(We);return pt}function tn(De){return je.toByteArray(Ut(De))}function lt(De,ze,$e,We){for(var Ve=0;Ve<We&&!(Ve+$e>=ze.length||Ve>=De.length);++Ve)ze[Ve+$e]=De[Ve];return Ve}function Ue(De){return De!==De}var je=Se("base64-js"),rt=Se("ieee754"),dt=Se("isarray");Le.Buffer=ye,Le.SlowBuffer=re,Le.INSPECT_MAX_BYTES=50,ye.TYPED_ARRAY_SUPPORT=Ce.TYPED_ARRAY_SUPPORT!==void 0?Ce.TYPED_ARRAY_SUPPORT:function(){try{var De=new Uint8Array(1);return De.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},De.foo()===42&&typeof De.subarray=="function"&&De.subarray(1,1).byteLength===0}catch(ze){return!1}}(),Le.kMaxLength=xe(),ye.poolSize=8192,ye._augment=function(De){return De.__proto__=ye.prototype,De},ye.from=function(De,ze,$e){return we(null,De,ze,$e)},ye.TYPED_ARRAY_SUPPORT&&(ye.prototype.__proto__=Uint8Array.prototype,ye.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&ye[Symbol.species]===ye&&Object.defineProperty(ye,Symbol.species,{value:null,configurable:!0})),ye.alloc=function(De,ze,$e){return de(null,De,ze,$e)},ye.allocUnsafe=function(De){return ge(null,De)},ye.allocUnsafeSlow=function(De){return ge(null,De)},ye.isBuffer=function(De){return!(De==null||!De._isBuffer)},ye.compare=function(De,ze){if(!ye.isBuffer(De)||!ye.isBuffer(ze))throw new TypeError("Arguments must be Buffers");if(De===ze)return 0;for(var $e=De.length,We=ze.length,Ve=0,pt=Math.min($e,We);Ve<pt;++Ve)if(De[Ve]!==ze[Ve]){$e=De[Ve],We=ze[Ve];break}return $e<We?-1:We<$e?1:0},ye.isEncoding=function(De){switch(String(De).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}},ye.concat=function(De,ze){if(!dt(De))throw new TypeError('"list" argument must be an Array of Buffers');if(De.length===0)return ye.alloc(0);var $e;if(ze===void 0)for(ze=0,$e=0;$e<De.length;++$e)ze+=De[$e].length;var We=ye.allocUnsafe(ze),Ve=0;for($e=0;$e<De.length;++$e){var pt=De[$e];if(!ye.isBuffer(pt))throw new TypeError('"list" argument must be an Array of Buffers');pt.copy(We,Ve),Ve+=pt.length}return We},ye.byteLength=ae,ye.prototype._isBuffer=!0,ye.prototype.swap16=function(){var De=this.length;if(De%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ze=0;ze<De;ze+=2)me(this,ze,ze+1);return this},ye.prototype.swap32=function(){var De=this.length;if(De%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ze=0;ze<De;ze+=4)me(this,ze,ze+3),me(this,ze+1,ze+2);return this},ye.prototype.swap64=function(){var De=this.length;if(De%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ze=0;ze<De;ze+=8)me(this,ze,ze+7),me(this,ze+1,ze+6),me(this,ze+2,ze+5),me(this,ze+3,ze+4);return this},ye.prototype.toString=function(){var De=0|this.length;return De===0?"":arguments.length===0?gt(this,0,De):le.apply(this,arguments)},ye.prototype.equals=function(De){if(!ye.isBuffer(De))throw new TypeError("Argument must be a Buffer");return this===De||ye.compare(this,De)===0},ye.prototype.inspect=function(){var De="",ze=Le.INSPECT_MAX_BYTES;return this.length>0&&(De=this.toString("hex",0,ze).match(/.{2}/g).join(" "),this.length>ze&&(De+=" ... ")),"<Buffer "+De+">"},ye.prototype.compare=function(De,ze,$e,We,Ve){if(!ye.isBuffer(De))throw new TypeError("Argument must be a Buffer");if(ze===void 0&&(ze=0),$e===void 0&&($e=De?De.length:0),We===void 0&&(We=0),Ve===void 0&&(Ve=this.length),ze<0||$e>De.length||We<0||Ve>this.length)throw new RangeError("out of range index");if(We>=Ve&&ze>=$e)return 0;if(We>=Ve)return-1;if(ze>=$e)return 1;if(ze>>>=0,$e>>>=0,We>>>=0,Ve>>>=0,this===De)return 0;for(var pt=Ve-We,Lt=$e-ze,on=Math.min(pt,Lt),Xt=this.slice(We,Ve),Rt=De.slice(ze,$e),fn=0;fn<on;++fn)if(Xt[fn]!==Rt[fn]){pt=Xt[fn],Lt=Rt[fn];break}return pt<Lt?-1:Lt<pt?1:0},ye.prototype.includes=function(De,ze,$e){return this.indexOf(De,ze,$e)!==-1},ye.prototype.indexOf=function(De,ze,$e){return ve(this,De,ze,$e,!0)},ye.prototype.lastIndexOf=function(De,ze,$e){return ve(this,De,ze,$e,!1)},ye.prototype.write=function(De,ze,$e,We){if(ze===void 0)We="utf8",$e=this.length,ze=0;else if($e===void 0&&typeof ze=="string")We=ze,$e=this.length,ze=0;else{if(!isFinite(ze))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");ze|=0,isFinite($e)?($e|=0,We===void 0&&(We="utf8")):(We=$e,$e=void 0)}var Ve=this.length-ze;if(($e===void 0||$e>Ve)&&($e=Ve),De.length>0&&($e<0||ze<0)||ze>this.length)throw new RangeError("Attempt to write outside buffer bounds");We||(We="utf8");for(var pt=!1;;)switch(We){case"hex":return Ae(this,De,ze,$e);case"utf8":case"utf-8":return Oe(this,De,ze,$e);case"ascii":return Ie(this,De,ze,$e);case"latin1":case"binary":return Ze(this,De,ze,$e);case"base64":return qe(this,De,ze,$e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Je(this,De,ze,$e);default:if(pt)throw new TypeError("Unknown encoding: "+We);We=(""+We).toLowerCase(),pt=!0}},ye.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;ye.prototype.slice=function(De,ze){var $e=this.length;De=~~De,ze=ze===void 0?$e:~~ze,De<0?(De+=$e)<0&&(De=0):De>$e&&(De=$e),ze<0?(ze+=$e)<0&&(ze=0):ze>$e&&(ze=$e),ze<De&&(ze=De);var We;if(ye.TYPED_ARRAY_SUPPORT)We=this.subarray(De,ze),We.__proto__=ye.prototype;else{var Ve=ze-De;We=new ye(Ve,void 0);for(var pt=0;pt<Ve;++pt)We[pt]=this[pt+De]}return We},ye.prototype.readUIntLE=function(De,ze,$e){De|=0,ze|=0,$e||ut(De,ze,this.length);for(var We=this[De],Ve=1,pt=0;++pt<ze&&(Ve*=256);)We+=this[De+pt]*Ve;return We},ye.prototype.readUIntBE=function(De,ze,$e){De|=0,ze|=0,$e||ut(De,ze,this.length);for(var We=this[De+--ze],Ve=1;ze>0&&(Ve*=256);)We+=this[De+--ze]*Ve;return We},ye.prototype.readUInt8=function(De,ze){return ze||ut(De,1,this.length),this[De]},ye.prototype.readUInt16LE=function(De,ze){return ze||ut(De,2,this.length),this[De]|this[De+1]<<8},ye.prototype.readUInt16BE=function(De,ze){return ze||ut(De,2,this.length),this[De]<<8|this[De+1]},ye.prototype.readUInt32LE=function(De,ze){return ze||ut(De,4,this.length),(this[De]|this[De+1]<<8|this[De+2]<<16)+16777216*this[De+3]},ye.prototype.readUInt32BE=function(De,ze){return ze||ut(De,4,this.length),16777216*this[De]+(this[De+1]<<16|this[De+2]<<8|this[De+3])},ye.prototype.readIntLE=function(De,ze,$e){De|=0,ze|=0,$e||ut(De,ze,this.length);for(var We=this[De],Ve=1,pt=0;++pt<ze&&(Ve*=256);)We+=this[De+pt]*Ve;return Ve*=128,We>=Ve&&(We-=Math.pow(2,8*ze)),We},ye.prototype.readIntBE=function(De,ze,$e){De|=0,ze|=0,$e||ut(De,ze,this.length);for(var We=ze,Ve=1,pt=this[De+--We];We>0&&(Ve*=256);)pt+=this[De+--We]*Ve;return Ve*=128,pt>=Ve&&(pt-=Math.pow(2,8*ze)),pt},ye.prototype.readInt8=function(De,ze){return ze||ut(De,1,this.length),128&this[De]?-1*(255-this[De]+1):this[De]},ye.prototype.readInt16LE=function(De,ze){ze||ut(De,2,this.length);var $e=this[De]|this[De+1]<<8;return 32768&$e?4294901760|$e:$e},ye.prototype.readInt16BE=function(De,ze){ze||ut(De,2,this.length);var $e=this[De+1]|this[De]<<8;return 32768&$e?4294901760|$e:$e},ye.prototype.readInt32LE=function(De,ze){return ze||ut(De,4,this.length),this[De]|this[De+1]<<8|this[De+2]<<16|this[De+3]<<24},ye.prototype.readInt32BE=function(De,ze){return ze||ut(De,4,this.length),this[De]<<24|this[De+1]<<16|this[De+2]<<8|this[De+3]},ye.prototype.readFloatLE=function(De,ze){return ze||ut(De,4,this.length),rt.read(this,De,!0,23,4)},ye.prototype.readFloatBE=function(De,ze){return ze||ut(De,4,this.length),rt.read(this,De,!1,23,4)},ye.prototype.readDoubleLE=function(De,ze){return ze||ut(De,8,this.length),rt.read(this,De,!0,52,8)},ye.prototype.readDoubleBE=function(De,ze){return ze||ut(De,8,this.length),rt.read(this,De,!1,52,8)},ye.prototype.writeUIntLE=function(De,ze,$e,We){De=+De,ze|=0,$e|=0,!We&&ot(this,De,ze,$e,Math.pow(2,8*$e)-1,0);var Ve=1,pt=0;for(this[ze]=255&De;++pt<$e&&(Ve*=256);)this[ze+pt]=De/Ve&255;return ze+$e},ye.prototype.writeUIntBE=function(De,ze,$e,We){De=+De,ze|=0,$e|=0,!We&&ot(this,De,ze,$e,Math.pow(2,8*$e)-1,0);var Ve=$e-1,pt=1;for(this[ze+Ve]=255&De;--Ve>=0&&(pt*=256);)this[ze+Ve]=De/pt&255;return ze+$e},ye.prototype.writeUInt8=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,1,255,0),ye.TYPED_ARRAY_SUPPORT||(De=Math.floor(De)),this[ze]=255&De,ze+1},ye.prototype.writeUInt16LE=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[ze]=255&De,this[ze+1]=De>>>8):ct(this,De,ze,!0),ze+2},ye.prototype.writeUInt16BE=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[ze]=De>>>8,this[ze+1]=255&De):ct(this,De,ze,!1),ze+2},ye.prototype.writeUInt32LE=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[ze+3]=De>>>24,this[ze+2]=De>>>16,this[ze+1]=De>>>8,this[ze]=255&De):yt(this,De,ze,!0),ze+4},ye.prototype.writeUInt32BE=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[ze]=De>>>24,this[ze+1]=De>>>16,this[ze+2]=De>>>8,this[ze+3]=255&De):yt(this,De,ze,!1),ze+4},ye.prototype.writeIntLE=function(De,ze,$e,We){if(De=+De,ze|=0,!We){var Ve=Math.pow(2,8*$e-1);ot(this,De,ze,$e,Ve-1,-Ve)}var pt=0,Lt=1,on=0;for(this[ze]=255&De;++pt<$e&&(Lt*=256);)De<0&&on===0&&this[ze+pt-1]!==0&&(on=1),this[ze+pt]=(De/Lt>>0)-on&255;return ze+$e},ye.prototype.writeIntBE=function(De,ze,$e,We){if(De=+De,ze|=0,!We){var Ve=Math.pow(2,8*$e-1);ot(this,De,ze,$e,Ve-1,-Ve)}var pt=$e-1,Lt=1,on=0;for(this[ze+pt]=255&De;--pt>=0&&(Lt*=256);)De<0&&on===0&&this[ze+pt+1]!==0&&(on=1),this[ze+pt]=(De/Lt>>0)-on&255;return ze+$e},ye.prototype.writeInt8=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,1,127,-128),ye.TYPED_ARRAY_SUPPORT||(De=Math.floor(De)),De<0&&(De=255+De+1),this[ze]=255&De,ze+1},ye.prototype.writeInt16LE=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[ze]=255&De,this[ze+1]=De>>>8):ct(this,De,ze,!0),ze+2},ye.prototype.writeInt16BE=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[ze]=De>>>8,this[ze+1]=255&De):ct(this,De,ze,!1),ze+2},ye.prototype.writeInt32LE=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,4,2147483647,-2147483648),ye.TYPED_ARRAY_SUPPORT?(this[ze]=255&De,this[ze+1]=De>>>8,this[ze+2]=De>>>16,this[ze+3]=De>>>24):yt(this,De,ze,!0),ze+4},ye.prototype.writeInt32BE=function(De,ze,$e){return De=+De,ze|=0,$e||ot(this,De,ze,4,2147483647,-2147483648),De<0&&(De=4294967295+De+1),ye.TYPED_ARRAY_SUPPORT?(this[ze]=De>>>24,this[ze+1]=De>>>16,this[ze+2]=De>>>8,this[ze+3]=255&De):yt(this,De,ze,!1),ze+4},ye.prototype.writeFloatLE=function(De,ze,$e){return xt(this,De,ze,!0,$e)},ye.prototype.writeFloatBE=function(De,ze,$e){return xt(this,De,ze,!1,$e)},ye.prototype.writeDoubleLE=function(De,ze,$e){return zt(this,De,ze,!0,$e)},ye.prototype.writeDoubleBE=function(De,ze,$e){return zt(this,De,ze,!1,$e)},ye.prototype.copy=function(De,ze,$e,We){if($e||($e=0),We||We===0||(We=this.length),ze>=De.length&&(ze=De.length),ze||(ze=0),We>0&&We<$e&&(We=$e),We===$e||De.length===0||this.length===0)return 0;if(ze<0)throw new RangeError("targetStart out of bounds");if($e<0||$e>=this.length)throw new RangeError("sourceStart out of bounds");if(We<0)throw new RangeError("sourceEnd out of bounds");We>this.length&&(We=this.length),De.length-ze<We-$e&&(We=De.length-ze+$e);var Ve,pt=We-$e;if(this===De&&$e<ze&&ze<We)for(Ve=pt-1;Ve>=0;--Ve)De[Ve+ze]=this[Ve+$e];else if(pt<1e3||!ye.TYPED_ARRAY_SUPPORT)for(Ve=0;Ve<pt;++Ve)De[Ve+ze]=this[Ve+$e];else Uint8Array.prototype.set.call(De,this.subarray($e,$e+pt),ze);return pt},ye.prototype.fill=function(De,ze,$e,We){if(typeof De=="string"){if(typeof ze=="string"?(We=ze,ze=0,$e=this.length):typeof $e=="string"&&(We=$e,$e=this.length),De.length===1){var Ve=De.charCodeAt(0);Ve<256&&(De=Ve)}if(We!==void 0&&typeof We!="string")throw new TypeError("encoding must be a string");if(typeof We=="string"&&!ye.isEncoding(We))throw new TypeError("Unknown encoding: "+We)}else typeof De=="number"&&(De&=255);if(ze<0||this.length<ze||this.length<$e)throw new RangeError("Out of range index");if($e<=ze)return this;ze>>>=0,$e=$e===void 0?this.length:$e>>>0,De||(De=0);var pt;if(typeof De=="number")for(pt=ze;pt<$e;++pt)this[pt]=De;else{var Lt=ye.isBuffer(De)?De:mn(new ye(De,We).toString()),on=Lt.length;for(pt=0;pt<$e-ze;++pt)this[pt+ze]=Lt[pt%on]}return this};var Ke=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(Se,Be,Le){Be.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"}},{}],40:[function(Se,Be,Le){"use strict";var Ce=function(){this.buffer=[],this.fns=[]};Ce.prototype.push=function(be,ye){if(this.fns.length)return this.fns.shift()(null,be);var we={data:be,priority:ye},pe=xe(this.buffer,we,function(de){return de.priority});this.buffer.splice(pe,0,we)},Ce.prototype.next=function(){var be=this;return function(ye){if(be.buffer.length)return ye(null,be.buffer.pop().data);be.fns.push(ye)}};var xe=function(be,ye,we){ye=we(ye);for(var pe=0,de=be?be.length:pe;pe<de;){var ge=pe+de>>>1;we(be[ge])<ye?pe=ge+1:de=ge}return pe};Be.exports=Ce},{}],41:[function(Se,Be,Le){function Ce(ee){var z=this,oe=ue.call(arguments,1);return new Promise(function(re,ae){function le(Pe){var Ae;try{Ae=ee.next(Pe)}catch(Oe){return ae(Oe)}ve(Ae)}function me(Pe){var Ae;try{Ae=ee.throw(Pe)}catch(Oe){return ae(Oe)}ve(Ae)}function ve(Pe){if(Pe.done)return re(Pe.value);var Ae=xe.call(z,Pe.value);return Ae&&pe(Ae)?Ae.then(le,me):me(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(Pe.value)+'"'))}if(typeof ee=="function"&&(ee=ee.apply(z,oe)),!ee||typeof ee.next!="function")return re(ee);le()})}function xe(ee){return ee&&(pe(ee)?ee:ge(ee)||de(ee)?Ce.call(this,ee):typeof ee=="function"?be.call(this,ee):Array.isArray(ee)?ye.call(this,ee):fe(ee)?we.call(this,ee):ee)}function be(ee){var z=this;return new Promise(function(oe,re){ee.call(z,function(ae,le){if(ae)return re(ae);arguments.length>2&&(le=ue.call(arguments,1)),oe(le)})})}function ye(ee){return Promise.all(ee.map(xe,this))}function we(ee){for(var z=new ee.constructor,oe=Object.keys(ee),re=[],ae=0;ae<oe.length;ae++){var le=oe[ae],me=xe.call(this,ee[le]);me&&pe(me)?function(ve,Pe){z[Pe]=void 0,re.push(ve.then(function(Ae){z[Pe]=Ae}))}(me,le):z[le]=ee[le]}return Promise.all(re).then(function(){return z})}function pe(ee){return typeof ee.then=="function"}function de(ee){return typeof ee.next=="function"&&typeof ee.throw=="function"}function ge(ee){var z=ee.constructor;return!!z&&(z.name==="GeneratorFunction"||z.displayName==="GeneratorFunction"||de(z.prototype))}function fe(ee){return Object==ee.constructor}var ue=Array.prototype.slice;Be.exports=Ce.default=Ce.co=Ce,Ce.wrap=function(ee){function z(){return Ce.call(this,ee.apply(this,arguments))}return z.__generatorFunction__=ee,z}},{}],42:[function(Se,Be,Le){Be.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(Se,Be,Le){"use strict";function Ce(ye,we){if(!(this instanceof Ce))return new Ce(ye,we);this.src=ye,this._withAccess=we}function xe(ye,we){return ye[we]===void 0&&ye.__lookupGetter__(we)===void 0&&ye.__lookupSetter__(we)===void 0}var be=Array.prototype.slice;Be.exports=Ce,Ce.prototype.withAccess=function(ye){return this._withAccess=ye!==!1,this},Ce.prototype.pick=function(ye){return Array.isArray(ye)||(ye=be.call(arguments)),ye.length&&(this.keys=ye),this},Ce.prototype.to=function(ye){if(ye=ye||{},!this.src)return ye;var we=this.keys||Object.keys(this.src);if(!this._withAccess){for(var pe=0;pe<we.length;pe++)de=we[pe],ye[de]===void 0&&(ye[de]=this.src[de]);return ye}for(var pe=0;pe<we.length;pe++){var de=we[pe];if(xe(ye,de)){var ge=this.src.__lookupGetter__(de),fe=this.src.__lookupSetter__(de);ge&&ye.__defineGetter__(de,ge),fe&&ye.__defineSetter__(de,fe),ge||fe||(ye[de]=this.src[de])}}return ye},Ce.prototype.toCover=function(ye){for(var we=this.keys||Object.keys(this.src),pe=0;pe<we.length;pe++){var de=we[pe];delete ye[de];var ge=this.src.__lookupGetter__(de),fe=this.src.__lookupSetter__(de);ge&&ye.__defineGetter__(de,ge),fe&&ye.__defineSetter__(de,fe),ge||fe||(ye[de]=this.src[de])}},Ce.prototype.override=Ce.prototype.toCover,Ce.prototype.and=function(ye){var we={};return this.to(we),this.src=ye,this.to(we),this.src=we,this}},{}],44:[function(Se,Be,Le){Se("../../modules/es6.string.iterator"),Se("../../modules/es6.array.from"),Be.exports=Se("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(Se,Be,Le){var Ce=Se("../../modules/_core"),xe=Ce.JSON||(Ce.JSON={stringify:JSON.stringify});Be.exports=function(be){return xe.stringify.apply(xe,arguments)}},{"../../modules/_core":65}],46:[function(Se,Be,Le){Se("../../modules/es6.object.assign"),Be.exports=Se("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(Se,Be,Le){Se("../../modules/es6.object.create");var Ce=Se("../../modules/_core").Object;Be.exports=function(xe,be){return Ce.create(xe,be)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(Se,Be,Le){Se("../../modules/es6.object.define-property");var Ce=Se("../../modules/_core").Object;Be.exports=function(xe,be,ye){return Ce.defineProperty(xe,be,ye)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(Se,Be,Le){Se("../../modules/es6.object.get-own-property-names");var Ce=Se("../../modules/_core").Object;Be.exports=function(xe){return Ce.getOwnPropertyNames(xe)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(Se,Be,Le){Se("../../modules/es6.object.get-prototype-of"),Be.exports=Se("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(Se,Be,Le){Se("../../modules/es6.object.keys"),Be.exports=Se("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(Se,Be,Le){Se("../modules/es6.object.to-string"),Se("../modules/es6.string.iterator"),Se("../modules/web.dom.iterable"),Se("../modules/es6.promise"),Se("../modules/es7.promise.finally"),Se("../modules/es7.promise.try"),Be.exports=Se("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(Se,Be,Le){Se("../modules/web.immediate"),Be.exports=Se("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(Se,Be,Le){Se("../../modules/es6.string.from-code-point"),Be.exports=Se("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(Se,Be,Le){Se("../../modules/es6.function.has-instance"),Be.exports=Se("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(Se,Be,Le){Se("../../modules/es6.symbol"),Se("../../modules/es6.object.to-string"),Se("../../modules/es7.symbol.async-iterator"),Se("../../modules/es7.symbol.observable"),Be.exports=Se("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(Se,Be,Le){Se("../../modules/es6.string.iterator"),Se("../../modules/web.dom.iterable"),Be.exports=Se("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(Se,Be,Le){Be.exports=function(Ce){if(typeof Ce!="function")throw TypeError(Ce+" is not a function!");return Ce}},{}],59:[function(Se,Be,Le){Be.exports=function(){}},{}],60:[function(Se,Be,Le){Be.exports=function(Ce,xe,be,ye){if(!(Ce instanceof xe)||ye!==void 0&&ye in Ce)throw TypeError(be+": incorrect invocation!");return Ce}},{}],61:[function(Se,Be,Le){var Ce=Se("./_is-object");Be.exports=function(xe){if(!Ce(xe))throw TypeError(xe+" is not an object!");return xe}},{"./_is-object":85}],62:[function(Se,Be,Le){var Ce=Se("./_to-iobject"),xe=Se("./_to-length"),be=Se("./_to-absolute-index");Be.exports=function(ye){return function(we,pe,de){var ge,fe=Ce(we),ue=xe(fe.length),ee=be(de,ue);if(ye&&pe!=pe){for(;ue>ee;)if((ge=fe[ee++])!=ge)return!0}else for(;ue>ee;ee++)if((ye||ee in fe)&&fe[ee]===pe)return ye||ee||0;return!ye&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(Se,Be,Le){var Ce=Se("./_cof"),xe=Se("./_wks")("toStringTag"),be=Ce(function(){return arguments}())=="Arguments",ye=function(we,pe){try{return we[pe]}catch(de){}};Be.exports=function(we){var pe,de,ge;return we===void 0?"Undefined":we===null?"Null":typeof(de=ye(pe=Object(we),xe))=="string"?de:be?Ce(pe):(ge=Ce(pe))=="Object"&&typeof pe.callee=="function"?"Arguments":ge}},{"./_cof":64,"./_wks":131}],64:[function(Se,Be,Le){var Ce={}.toString;Be.exports=function(xe){return Ce.call(xe).slice(8,-1)}},{}],65:[function(Se,Be,Le){var Ce=Be.exports={version:"2.5.7"};typeof __e=="number"&&(__e=Ce)},{}],66:[function(Se,Be,Le){"use strict";var Ce=Se("./_object-dp"),xe=Se("./_property-desc");Be.exports=function(be,ye,we){ye in be?Ce.f(be,ye,xe(0,we)):be[ye]=we}},{"./_object-dp":98,"./_property-desc":111}],67:[function(Se,Be,Le){var Ce=Se("./_a-function");Be.exports=function(xe,be,ye){if(Ce(xe),be===void 0)return xe;switch(ye){case 1:return function(we){return xe.call(be,we)};case 2:return function(we,pe){return xe.call(be,we,pe)};case 3:return function(we,pe,de){return xe.call(be,we,pe,de)}}return function(){return xe.apply(be,arguments)}}},{"./_a-function":58}],68:[function(Se,Be,Le){Be.exports=function(Ce){if(Ce==null)throw TypeError("Can't call method on "+Ce);return Ce}},{}],69:[function(Se,Be,Le){Be.exports=!Se("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(Se,Be,Le){var Ce=Se("./_is-object"),xe=Se("./_global").document,be=Ce(xe)&&Ce(xe.createElement);Be.exports=function(ye){return be?xe.createElement(ye):{}}},{"./_global":76,"./_is-object":85}],71:[function(Se,Be,Le){Be.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(Se,Be,Le){var Ce=Se("./_object-keys"),xe=Se("./_object-gops"),be=Se("./_object-pie");Be.exports=function(ye){var we=Ce(ye),pe=xe.f;if(pe)for(var de,ge=pe(ye),fe=be.f,ue=0;ge.length>ue;)fe.call(ye,de=ge[ue++])&&we.push(de);return we}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(Se,Be,Le){var Ce=Se("./_global"),xe=Se("./_core"),be=Se("./_ctx"),ye=Se("./_hide"),we=Se("./_has"),pe=function(de,ge,fe){var ue,ee,z,oe=de&pe.F,re=de&pe.G,ae=de&pe.S,le=de&pe.P,me=de&pe.B,ve=de&pe.W,Pe=re?xe:xe[ge]||(xe[ge]={}),Ae=Pe.prototype,Oe=re?Ce:ae?Ce[ge]:(Ce[ge]||{}).prototype;re&&(fe=ge);for(ue in fe)(ee=!oe&&Oe&&Oe[ue]!==void 0)&&we(Pe,ue)||(z=ee?Oe[ue]:fe[ue],Pe[ue]=re&&typeof Oe[ue]!="function"?fe[ue]:me&&ee?be(z,Ce):ve&&Oe[ue]==z?function(Ie){var Ze=function(qe,Je,mt){if(this instanceof Ie){switch(arguments.length){case 0:return new Ie;case 1:return new Ie(qe);case 2:return new Ie(qe,Je)}return new Ie(qe,Je,mt)}return Ie.apply(this,arguments)};return Ze.prototype=Ie.prototype,Ze}(z):le&&typeof z=="function"?be(Function.call,z):z,le&&((Pe.virtual||(Pe.virtual={}))[ue]=z,de&pe.R&&Ae&&!Ae[ue]&&ye(Ae,ue,z)))};pe.F=1,pe.G=2,pe.S=4,pe.P=8,pe.B=16,pe.W=32,pe.U=64,pe.R=128,Be.exports=pe},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(Se,Be,Le){Be.exports=function(Ce){try{return!!Ce()}catch(xe){return!0}}},{}],75:[function(Se,Be,fe){var Ce=Se("./_ctx"),xe=Se("./_iter-call"),be=Se("./_is-array-iter"),ye=Se("./_an-object"),we=Se("./_to-length"),pe=Se("./core.get-iterator-method"),de={},ge={},fe=Be.exports=function(ue,ee,z,oe,re){var ae,le,me,ve,Pe=re?function(){return ue}:pe(ue),Ae=Ce(z,oe,ee?2:1),Oe=0;if(typeof Pe!="function")throw TypeError(ue+" is not iterable!");if(be(Pe)){for(ae=we(ue.length);ae>Oe;Oe++)if((ve=ee?Ae(ye(le=ue[Oe])[0],le[1]):Ae(ue[Oe]))===de||ve===ge)return ve}else for(me=Pe.call(ue);!(le=me.next()).done;)if((ve=xe(me,Ae,le.value,ee))===de||ve===ge)return ve};fe.BREAK=de,fe.RETURN=ge},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(Se,Be,Le){var Ce=Be.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=Ce)},{}],77:[function(Se,Be,Le){var Ce={}.hasOwnProperty;Be.exports=function(xe,be){return Ce.call(xe,be)}},{}],78:[function(Se,Be,Le){var Ce=Se("./_object-dp"),xe=Se("./_property-desc");Be.exports=Se("./_descriptors")?function(be,ye,we){return Ce.f(be,ye,xe(1,we))}:function(be,ye,we){return be[ye]=we,be}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(Se,Be,Le){var Ce=Se("./_global").document;Be.exports=Ce&&Ce.documentElement},{"./_global":76}],80:[function(Se,Be,Le){Be.exports=!Se("./_descriptors")&&!Se("./_fails")(function(){return Object.defineProperty(Se("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(Se,Be,Le){Be.exports=function(Ce,xe,be){var ye=be===void 0;switch(xe.length){case 0:return ye?Ce():Ce.call(be);case 1:return ye?Ce(xe[0]):Ce.call(be,xe[0]);case 2:return ye?Ce(xe[0],xe[1]):Ce.call(be,xe[0],xe[1]);case 3:return ye?Ce(xe[0],xe[1],xe[2]):Ce.call(be,xe[0],xe[1],xe[2]);case 4:return ye?Ce(xe[0],xe[1],xe[2],xe[3]):Ce.call(be,xe[0],xe[1],xe[2],xe[3])}return Ce.apply(be,xe)}},{}],82:[function(Se,Be,Le){var Ce=Se("./_cof");Be.exports=Object("z").propertyIsEnumerable(0)?Object:function(xe){return Ce(xe)=="String"?xe.split(""):Object(xe)}},{"./_cof":64}],83:[function(Se,Be,Le){var Ce=Se("./_iterators"),xe=Se("./_wks")("iterator"),be=Array.prototype;Be.exports=function(ye){return ye!==void 0&&(Ce.Array===ye||be[xe]===ye)}},{"./_iterators":91,"./_wks":131}],84:[function(Se,Be,Le){var Ce=Se("./_cof");Be.exports=Array.isArray||function(xe){return Ce(xe)=="Array"}},{"./_cof":64}],85:[function(Se,Be,Le){Be.exports=function(Ce){return typeof Ce=="object"?Ce!==null:typeof Ce=="function"}},{}],86:[function(Se,Be,Le){var Ce=Se("./_an-object");Be.exports=function(xe,be,ye,we){try{return we?be(Ce(ye)[0],ye[1]):be(ye)}catch(de){var pe=xe.return;throw pe!==void 0&&Ce(pe.call(xe)),de}}},{"./_an-object":61}],87:[function(Se,Be,Le){"use strict";var Ce=Se("./_object-create"),xe=Se("./_property-desc"),be=Se("./_set-to-string-tag"),ye={};Se("./_hide")(ye,Se("./_wks")("iterator"),function(){return this}),Be.exports=function(we,pe,de){we.prototype=Ce(ye,{next:xe(1,de)}),be(we,pe+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(Se,Be,Le){"use strict";var Ce=Se("./_library"),xe=Se("./_export"),be=Se("./_redefine"),ye=Se("./_hide"),we=Se("./_iterators"),pe=Se("./_iter-create"),de=Se("./_set-to-string-tag"),ge=Se("./_object-gpo"),fe=Se("./_wks")("iterator"),ue=!([].keys&&"next"in[].keys()),ee=function(){return this};Be.exports=function(z,oe,re,ae,le,me,ve){pe(re,oe,ae);var Pe,Ae,Oe,Ie=function(ht){if(!ue&&ht in mt)return mt[ht];switch(ht){case"keys":case"values":return function(){return new re(this,ht)}}return function(){return new re(this,ht)}},Ze=oe+" Iterator",qe=le=="values",Je=!1,mt=z.prototype,gt=mt[fe]||mt["@@iterator"]||le&&mt[le],Mt=gt||Ie(le),at=le?qe?Ie("entries"):Mt:void 0,_t=oe=="Array"&&mt.entries||gt;if(_t&&(Oe=ge(_t.call(new z)))!==Object.prototype&&Oe.next&&(de(Oe,Ze,!0),Ce||typeof Oe[fe]=="function"||ye(Oe,fe,ee)),qe&>&>.name!=="values"&&(Je=!0,Mt=function(){return gt.call(this)}),Ce&&!ve||!ue&&!Je&&mt[fe]||ye(mt,fe,Mt),we[oe]=Mt,we[Ze]=ee,le)if(Pe={values:qe?Mt:Ie("values"),keys:me?Mt:Ie("keys"),entries:at},ve)for(Ae in Pe)Ae in mt||be(mt,Ae,Pe[Ae]);else xe(xe.P+xe.F*(ue||Je),oe,Pe);return Pe}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(Se,Be,Le){var Ce=Se("./_wks")("iterator"),xe=!1;try{var be=[7][Ce]();be.return=function(){xe=!0},Array.from(be,function(){throw 2})}catch(ye){}Be.exports=function(ye,we){if(!we&&!xe)return!1;var pe=!1;try{var de=[7],ge=de[Ce]();ge.next=function(){return{done:pe=!0}},de[Ce]=function(){return ge},ye(de)}catch(fe){}return pe}},{"./_wks":131}],90:[function(Se,Be,Le){Be.exports=function(Ce,xe){return{value:xe,done:!!Ce}}},{}],91:[function(Se,Be,Le){Be.exports={}},{}],92:[function(Se,Be,Le){Be.exports=!0},{}],93:[function(Se,Be,Le){var Ce=Se("./_uid")("meta"),xe=Se("./_is-object"),be=Se("./_has"),ye=Se("./_object-dp").f,we=0,pe=Object.isExtensible||function(){return!0},de=!Se("./_fails")(function(){return pe(Object.preventExtensions({}))}),ge=function(oe){ye(oe,Ce,{value:{i:"O"+ ++we,w:{}}})},fe=function(oe,re){if(!xe(oe))return typeof oe=="symbol"?oe:(typeof oe=="string"?"S":"P")+oe;if(!be(oe,Ce)){if(!pe(oe))return"F";if(!re)return"E";ge(oe)}return oe[Ce].i},ue=function(oe,re){if(!be(oe,Ce)){if(!pe(oe))return!0;if(!re)return!1;ge(oe)}return oe[Ce].w},ee=function(oe){return de&&z.NEED&&pe(oe)&&!be(oe,Ce)&&ge(oe),oe},z=Be.exports={KEY:Ce,NEED:!1,fastKey:fe,getWeak:ue,onFreeze:ee}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(Se,Be,Le){var Ce=Se("./_global"),xe=Se("./_task").set,be=Ce.MutationObserver||Ce.WebKitMutationObserver,ye=Ce.process,we=Ce.Promise,pe=Se("./_cof")(ye)=="process";Be.exports=function(){var de,ge,fe,ue=function(){var re,ae;for(pe&&(re=ye.domain)&&re.exit();de;){ae=de.fn,de=de.next;try{ae()}catch(le){throw de?fe():ge=void 0,le}}ge=void 0,re&&re.enter()};if(pe)fe=function(){ye.nextTick(ue)};else if(!be||Ce.navigator&&Ce.navigator.standalone)if(we&&we.resolve){var ee=we.resolve(void 0);fe=function(){ee.then(ue)}}else fe=function(){xe.call(Ce,ue)};else{var z=!0,oe=document.createTextNode("");new be(ue).observe(oe,{characterData:!0}),fe=function(){oe.data=z=!z}}return function(re){var ae={fn:re,next:void 0};ge&&(ge.next=ae),de||(de=ae,fe()),ge=ae}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(Se,Be,Le){"use strict";function Ce(be){var ye,we;this.promise=new be(function(pe,de){if(ye!==void 0||we!==void 0)throw TypeError("Bad Promise constructor");ye=pe,we=de}),this.resolve=xe(ye),this.reject=xe(we)}var xe=Se("./_a-function");Be.exports.f=function(be){return new Ce(be)}},{"./_a-function":58}],96:[function(Se,Be,Le){"use strict";var Ce=Se("./_object-keys"),xe=Se("./_object-gops"),be=Se("./_object-pie"),ye=Se("./_to-object"),we=Se("./_iobject"),pe=Object.assign;Be.exports=!pe||Se("./_fails")(function(){var de={},ge={},fe=Symbol(),ue="abcdefghijklmnopqrst";return de[fe]=7,ue.split("").forEach(function(ee){ge[ee]=ee}),pe({},de)[fe]!=7||Object.keys(pe({},ge)).join("")!=ue})?function(de,ge){for(var fe=ye(de),ue=arguments.length,ee=1,z=xe.f,oe=be.f;ue>ee;)for(var re,ae=we(arguments[ee++]),le=z?Ce(ae).concat(z(ae)):Ce(ae),me=le.length,ve=0;me>ve;)oe.call(ae,re=le[ve++])&&(fe[re]=ae[re]);return fe}:pe},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(Se,Be,Le){var Ce=Se("./_an-object"),xe=Se("./_object-dps"),be=Se("./_enum-bug-keys"),ye=Se("./_shared-key")("IE_PROTO"),we=function(){},pe=function(){var de,ge=Se("./_dom-create")("iframe"),fe=be.length;for(ge.style.display="none",Se("./_html").appendChild(ge),ge.src="javascript:",de=ge.contentWindow.document,de.open(),de.write("<script>document.F=Object<\/script>"),de.close(),pe=de.F;fe--;)delete pe.prototype[be[fe]];return pe()};Be.exports=Object.create||function(de,ge){var fe;return de!==null?(we.prototype=Ce(de),fe=new we,we.prototype=null,fe[ye]=de):fe=pe(),ge===void 0?fe:xe(fe,ge)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(Se,Be,Le){var Ce=Se("./_an-object"),xe=Se("./_ie8-dom-define"),be=Se("./_to-primitive"),ye=Object.defineProperty;Le.f=Se("./_descriptors")?Object.defineProperty:function(we,pe,de){if(Ce(we),pe=be(pe,!0),Ce(de),xe)try{return ye(we,pe,de)}catch(ge){}if("get"in de||"set"in de)throw TypeError("Accessors not supported!");return"value"in de&&(we[pe]=de.value),we}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(Se,Be,Le){var Ce=Se("./_object-dp"),xe=Se("./_an-object"),be=Se("./_object-keys");Be.exports=Se("./_descriptors")?Object.defineProperties:function(ye,we){xe(ye);for(var pe,de=be(we),ge=de.length,fe=0;ge>fe;)Ce.f(ye,pe=de[fe++],we[pe]);return ye}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(Se,Be,Le){var Ce=Se("./_object-pie"),xe=Se("./_property-desc"),be=Se("./_to-iobject"),ye=Se("./_to-primitive"),we=Se("./_has"),pe=Se("./_ie8-dom-define"),de=Object.getOwnPropertyDescriptor;Le.f=Se("./_descriptors")?de:function(ge,fe){if(ge=be(ge),fe=ye(fe,!0),pe)try{return de(ge,fe)}catch(ue){}if(we(ge,fe))return xe(!Ce.f.call(ge,fe),ge[fe])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(Se,Be,Le){var Ce=Se("./_to-iobject"),xe=Se("./_object-gopn").f,be={}.toString,ye=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],we=function(pe){try{return xe(pe)}catch(de){return ye.slice()}};Be.exports.f=function(pe){return ye&&be.call(pe)=="[object Window]"?we(pe):xe(Ce(pe))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(Se,Be,Le){var Ce=Se("./_object-keys-internal"),xe=Se("./_enum-bug-keys").concat("length","prototype");Le.f=Object.getOwnPropertyNames||function(be){return Ce(be,xe)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(Se,Be,Le){Le.f=Object.getOwnPropertySymbols},{}],104:[function(Se,Be,Le){var Ce=Se("./_has"),xe=Se("./_to-object"),be=Se("./_shared-key")("IE_PROTO"),ye=Object.prototype;Be.exports=Object.getPrototypeOf||function(we){return we=xe(we),Ce(we,be)?we[be]:typeof we.constructor=="function"&&we instanceof we.constructor?we.constructor.prototype:we instanceof Object?ye:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(Se,Be,Le){var Ce=Se("./_has"),xe=Se("./_to-iobject"),be=Se("./_array-includes")(!1),ye=Se("./_shared-key")("IE_PROTO");Be.exports=function(we,pe){var de,ge=xe(we),fe=0,ue=[];for(de in ge)de!=ye&&Ce(ge,de)&&ue.push(de);for(;pe.length>fe;)Ce(ge,de=pe[fe++])&&(~be(ue,de)||ue.push(de));return ue}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(Se,Be,Le){var Ce=Se("./_object-keys-internal"),xe=Se("./_enum-bug-keys");Be.exports=Object.keys||function(be){return Ce(be,xe)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(Se,Be,Le){Le.f={}.propertyIsEnumerable},{}],108:[function(Se,Be,Le){var Ce=Se("./_export"),xe=Se("./_core"),be=Se("./_fails");Be.exports=function(ye,we){var pe=(xe.Object||{})[ye]||Object[ye],de={};de[ye]=we(pe),Ce(Ce.S+Ce.F*be(function(){pe(1)}),"Object",de)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(Se,Be,Le){Be.exports=function(Ce){try{return{e:!1,v:Ce()}}catch(xe){return{e:!0,v:xe}}}},{}],110:[function(Se,Be,Le){var Ce=Se("./_an-object"),xe=Se("./_is-object"),be=Se("./_new-promise-capability");Be.exports=function(ye,we){if(Ce(ye),xe(we)&&we.constructor===ye)return we;var pe=be.f(ye);return(0,pe.resolve)(we),pe.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(Se,Be,Le){Be.exports=function(Ce,xe){return{enumerable:!(1&Ce),configurable:!(2&Ce),writable:!(4&Ce),value:xe}}},{}],112:[function(Se,Be,Le){var Ce=Se("./_hide");Be.exports=function(xe,be,ye){for(var we in be)ye&&xe[we]?xe[we]=be[we]:Ce(xe,we,be[we]);return xe}},{"./_hide":78}],113:[function(Se,Be,Le){Be.exports=Se("./_hide")},{"./_hide":78}],114:[function(Se,Be,Le){"use strict";var Ce=Se("./_global"),xe=Se("./_core"),be=Se("./_object-dp"),ye=Se("./_descriptors"),we=Se("./_wks")("species");Be.exports=function(pe){var de=typeof xe[pe]=="function"?xe[pe]:Ce[pe];ye&&de&&!de[we]&&be.f(de,we,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(Se,Be,Le){var Ce=Se("./_object-dp").f,xe=Se("./_has"),be=Se("./_wks")("toStringTag");Be.exports=function(ye,we,pe){ye&&!xe(ye=pe?ye:ye.prototype,be)&&Ce(ye,be,{configurable:!0,value:we})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(Se,Be,Le){var Ce=Se("./_shared")("keys"),xe=Se("./_uid");Be.exports=function(be){return Ce[be]||(Ce[be]=xe(be))}},{"./_shared":117,"./_uid":127}],117:[function(Se,Be,Le){var Ce=Se("./_core"),xe=Se("./_global"),be=xe["__core-js_shared__"]||(xe["__core-js_shared__"]={});(Be.exports=function(ye,we){return be[ye]||(be[ye]=we!==void 0?we:{})})("versions",[]).push({version:Ce.version,mode:Se("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(Se,Be,Le){var Ce=Se("./_an-object"),xe=Se("./_a-function"),be=Se("./_wks")("species");Be.exports=function(ye,we){var pe,de=Ce(ye).constructor;return de===void 0||(pe=Ce(de)[be])==null?we:xe(pe)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(Se,Be,Le){var Ce=Se("./_to-integer"),xe=Se("./_defined");Be.exports=function(be){return function(ye,we){var pe,de,ge=String(xe(ye)),fe=Ce(we),ue=ge.length;return fe<0||fe>=ue?be?"":void 0:(pe=ge.charCodeAt(fe),pe<55296||pe>56319||fe+1===ue||(de=ge.charCodeAt(fe+1))<56320||de>57343?be?ge.charAt(fe):pe:be?ge.slice(fe,fe+2):de-56320+(pe-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(Se,Be,Le){var Ce,xe,be,ye=Se("./_ctx"),we=Se("./_invoke"),pe=Se("./_html"),de=Se("./_dom-create"),ge=Se("./_global"),fe=ge.process,ue=ge.setImmediate,ee=ge.clearImmediate,z=ge.MessageChannel,oe=ge.Dispatch,re=0,ae={},le=function(){var ve=+this;if(ae.hasOwnProperty(ve)){var Pe=ae[ve];delete ae[ve],Pe()}},me=function(ve){le.call(ve.data)};ue&&ee||(ue=function(ve){for(var Pe=[],Ae=1;arguments.length>Ae;)Pe.push(arguments[Ae++]);return ae[++re]=function(){we(typeof ve=="function"?ve:Function(ve),Pe)},Ce(re),re},ee=function(ve){delete ae[ve]},Se("./_cof")(fe)=="process"?Ce=function(ve){fe.nextTick(ye(le,ve,1))}:oe&&oe.now?Ce=function(ve){oe.now(ye(le,ve,1))}:z?(xe=new z,be=xe.port2,xe.port1.onmessage=me,Ce=ye(be.postMessage,be,1)):ge.addEventListener&&typeof postMessage=="function"&&!ge.importScripts?(Ce=function(ve){ge.postMessage(ve+"","*")},ge.addEventListener("message",me,!1)):Ce="onreadystatechange"in de("script")?function(ve){pe.appendChild(de("script")).onreadystatechange=function(){pe.removeChild(this),le.call(ve)}}:function(ve){setTimeout(ye(le,ve,1),0)}),Be.exports={set:ue,clear:ee}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(Se,Be,Le){var Ce=Se("./_to-integer"),xe=Math.max,be=Math.min;Be.exports=function(ye,we){return ye=Ce(ye),ye<0?xe(ye+we,0):be(ye,we)}},{"./_to-integer":122}],122:[function(Se,Be,Le){var Ce=Math.ceil,xe=Math.floor;Be.exports=function(be){return isNaN(be=+be)?0:(be>0?xe:Ce)(be)}},{}],123:[function(Se,Be,Le){var Ce=Se("./_iobject"),xe=Se("./_defined");Be.exports=function(be){return Ce(xe(be))}},{"./_defined":68,"./_iobject":82}],124:[function(Se,Be,Le){var Ce=Se("./_to-integer"),xe=Math.min;Be.exports=function(be){return be>0?xe(Ce(be),9007199254740991):0}},{"./_to-integer":122}],125:[function(Se,Be,Le){var Ce=Se("./_defined");Be.exports=function(xe){return Object(Ce(xe))}},{"./_defined":68}],126:[function(Se,Be,Le){var Ce=Se("./_is-object");Be.exports=function(xe,be){if(!Ce(xe))return xe;var ye,we;if(be&&typeof(ye=xe.toString)=="function"&&!Ce(we=ye.call(xe))||typeof(ye=xe.valueOf)=="function"&&!Ce(we=ye.call(xe))||!be&&typeof(ye=xe.toString)=="function"&&!Ce(we=ye.call(xe)))return we;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(Se,Be,Le){var Ce=0,xe=Math.random();Be.exports=function(be){return"Symbol(".concat(be===void 0?"":be,")_",(++Ce+xe).toString(36))}},{}],128:[function(Se,Be,Le){var Ce=Se("./_global"),xe=Ce.navigator;Be.exports=xe&&xe.userAgent||""},{"./_global":76}],129:[function(Se,Be,Le){var Ce=Se("./_global"),xe=Se("./_core"),be=Se("./_library"),ye=Se("./_wks-ext"),we=Se("./_object-dp").f;Be.exports=function(pe){var de=xe.Symbol||(xe.Symbol=be?{}:Ce.Symbol||{});pe.charAt(0)=="_"||pe in de||we(de,pe,{value:ye.f(pe)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(Se,Be,Le){Le.f=Se("./_wks")},{"./_wks":131}],131:[function(Se,Be,Le){var Ce=Se("./_shared")("wks"),xe=Se("./_uid"),be=Se("./_global").Symbol,ye=typeof be=="function";(Be.exports=function(we){return Ce[we]||(Ce[we]=ye&&be[we]||(ye?be:xe)("Symbol."+we))}).store=Ce},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(Se,Be,Le){var Ce=Se("./_classof"),xe=Se("./_wks")("iterator"),be=Se("./_iterators");Be.exports=Se("./_core").getIteratorMethod=function(ye){if(ye!=null)return ye[xe]||ye["@@iterator"]||be[Ce(ye)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(Se,Be,Le){"use strict";var Ce=Se("./_ctx"),xe=Se("./_export"),be=Se("./_to-object"),ye=Se("./_iter-call"),we=Se("./_is-array-iter"),pe=Se("./_to-length"),de=Se("./_create-property"),ge=Se("./core.get-iterator-method");xe(xe.S+xe.F*!Se("./_iter-detect")(function(fe){Array.from(fe)}),"Array",{from:function(fe){var ue,ee,z,oe,re=be(fe),ae=typeof this=="function"?this:Array,le=arguments.length,me=le>1?arguments[1]:void 0,ve=me!==void 0,Pe=0,Ae=ge(re);if(ve&&(me=Ce(me,le>2?arguments[2]:void 0,2)),Ae==null||ae==Array&&we(Ae))for(ue=pe(re.length),ee=new ae(ue);ue>Pe;Pe++)de(ee,Pe,ve?me(re[Pe],Pe):re[Pe]);else for(oe=Ae.call(re),ee=new ae;!(z=oe.next()).done;Pe++)de(ee,Pe,ve?ye(oe,me,[z.value,Pe],!0):z.value);return ee.length=Pe,ee}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(Se,Be,Le){"use strict";var Ce=Se("./_add-to-unscopables"),xe=Se("./_iter-step"),be=Se("./_iterators"),ye=Se("./_to-iobject");Be.exports=Se("./_iter-define")(Array,"Array",function(we,pe){this._t=ye(we),this._i=0,this._k=pe},function(){var we=this._t,pe=this._k,de=this._i++;return!we||de>=we.length?(this._t=void 0,xe(1)):pe=="keys"?xe(0,de):pe=="values"?xe(0,we[de]):xe(0,[de,we[de]])},"values"),be.Arguments=be.Array,Ce("keys"),Ce("values"),Ce("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(Se,Be,Le){"use strict";var Ce=Se("./_is-object"),xe=Se("./_object-gpo"),be=Se("./_wks")("hasInstance"),ye=Function.prototype;be in ye||Se("./_object-dp").f(ye,be,{value:function(we){if(typeof this!="function"||!Ce(we))return!1;if(!Ce(this.prototype))return we instanceof this;for(;we=xe(we);)if(this.prototype===we)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(Se,Be,Le){var Ce=Se("./_export");Ce(Ce.S+Ce.F,"Object",{assign:Se("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(Se,Be,Le){var Ce=Se("./_export");Ce(Ce.S,"Object",{create:Se("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(Se,Be,Le){var Ce=Se("./_export");Ce(Ce.S+Ce.F*!Se("./_descriptors"),"Object",{defineProperty:Se("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(Se,Be,Le){Se("./_object-sap")("getOwnPropertyNames",function(){return Se("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(Se,Be,Le){var Ce=Se("./_to-object"),xe=Se("./_object-gpo");Se("./_object-sap")("getPrototypeOf",function(){return function(be){return xe(Ce(be))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(Se,Be,Le){var Ce=Se("./_to-object"),xe=Se("./_object-keys");Se("./_object-sap")("keys",function(){return function(be){return xe(Ce(be))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(Se,Be,Le){arguments[4][36][0].apply(Le,arguments)},{dup:36}],143:[function(Se,Be,Le){"use strict";var Ce,xe,be,ye,we=Se("./_library"),pe=Se("./_global"),de=Se("./_ctx"),ge=Se("./_classof"),fe=Se("./_export"),ue=Se("./_is-object"),ee=Se("./_a-function"),z=Se("./_an-instance"),oe=Se("./_for-of"),re=Se("./_species-constructor"),ae=Se("./_task").set,le=Se("./_microtask")(),me=Se("./_new-promise-capability"),ve=Se("./_perform"),Pe=Se("./_user-agent"),Ae=Se("./_promise-resolve"),Oe=pe.TypeError,Ie=pe.process,Ze=Ie&&Ie.versions,qe=Ze&&Ze.v8||"",Je=pe.Promise,mt=ge(Ie)=="process",gt=function(){},Mt=xe=me.f,at=!!function(){try{var wt=Je.resolve(1),xt=(wt.constructor={})[Se("./_wks")("species")]=function(zt){zt(gt,gt)};return(mt||typeof PromiseRejectionEvent=="function")&&wt.then(gt)instanceof xt&&qe.indexOf("6.6")!==0&&Pe.indexOf("Chrome/66")===-1}catch(zt){}}(),_t=function(wt){var xt;return!(!ue(wt)||typeof(xt=wt.then)!="function")&&xt},ht=function(wt,xt){if(!wt._n){wt._n=!0;var zt=wt._c;le(function(){for(var Ut=wt._v,cn=wt._s==1,jt=0;zt.length>jt;)(function(mn){var Ft,Yt,tn,lt=cn?mn.ok:mn.fail,Ue=mn.resolve,je=mn.reject,rt=mn.domain;try{lt?(cn||(wt._h==2&&ot(wt),wt._h=1),lt===!0?Ft=Ut:(rt&&rt.enter(),Ft=lt(Ut),rt&&(rt.exit(),tn=!0)),Ft===mn.promise?je(Oe("Promise-chain cycle")):(Yt=_t(Ft))?Yt.call(Ft,Ue,je):Ue(Ft)):je(Ut)}catch(dt){rt&&!tn&&rt.exit(),je(dt)}})(zt[jt++]);wt._c=[],wt._n=!1,xt&&!wt._h&&Dt(wt)})}},Dt=function(wt){ae.call(pe,function(){var xt,zt,Ut,cn=wt._v,jt=ut(wt);if(jt&&(xt=ve(function(){mt?Ie.emit("unhandledRejection",cn,wt):(zt=pe.onunhandledrejection)?zt({promise:wt,reason:cn}):(Ut=pe.console)&&Ut.error&&Ut.error("Unhandled promise rejection",cn)}),wt._h=mt||ut(wt)?2:1),wt._a=void 0,jt&&xt.e)throw xt.v})},ut=function(wt){return wt._h!==1&&(wt._a||wt._c).length===0},ot=function(wt){ae.call(pe,function(){var xt;mt?Ie.emit("rejectionHandled",wt):(xt=pe.onrejectionhandled)&&xt({promise:wt,reason:wt._v})})},ct=function(wt){var xt=this;xt._d||(xt._d=!0,xt=xt._w||xt,xt._v=wt,xt._s=2,xt._a||(xt._a=xt._c.slice()),ht(xt,!0))},yt=function(wt){var xt,zt=this;if(!zt._d){zt._d=!0,zt=zt._w||zt;try{if(zt===wt)throw Oe("Promise can't be resolved itself");(xt=_t(wt))?le(function(){var Ut={_w:zt,_d:!1};try{xt.call(wt,de(yt,Ut,1),de(ct,Ut,1))}catch(cn){ct.call(Ut,cn)}}):(zt._v=wt,zt._s=1,ht(zt,!1))}catch(Ut){ct.call({_w:zt,_d:!1},Ut)}}};at||(Je=function(wt){z(this,Je,"Promise","_h"),ee(wt),Ce.call(this);try{wt(de(yt,this,1),de(ct,this,1))}catch(xt){ct.call(this,xt)}},Ce=function(wt){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Ce.prototype=Se("./_redefine-all")(Je.prototype,{then:function(wt,xt){var zt=Mt(re(this,Je));return zt.ok=typeof wt!="function"||wt,zt.fail=typeof xt=="function"&&xt,zt.domain=mt?Ie.domain:void 0,this._c.push(zt),this._a&&this._a.push(zt),this._s&&ht(this,!1),zt.promise},catch:function(wt){return this.then(void 0,wt)}}),be=function(){var wt=new Ce;this.promise=wt,this.resolve=de(yt,wt,1),this.reject=de(ct,wt,1)},me.f=Mt=function(wt){return wt===Je||wt===ye?new be(wt):xe(wt)}),fe(fe.G+fe.W+fe.F*!at,{Promise:Je}),Se("./_set-to-string-tag")(Je,"Promise"),Se("./_set-species")("Promise"),ye=Se("./_core").Promise,fe(fe.S+fe.F*!at,"Promise",{reject:function(wt){var xt=Mt(this);return(0,xt.reject)(wt),xt.promise}}),fe(fe.S+fe.F*(we||!at),"Promise",{resolve:function(wt){return Ae(we&&this===ye?Je:this,wt)}}),fe(fe.S+fe.F*!(at&&Se("./_iter-detect")(function(wt){Je.all(wt).catch(gt)})),"Promise",{all:function(wt){var xt=this,zt=Mt(xt),Ut=zt.resolve,cn=zt.reject,jt=ve(function(){var mn=[],Ft=0,Yt=1;oe(wt,!1,function(tn){var lt=Ft++,Ue=!1;mn.push(void 0),Yt++,xt.resolve(tn).then(function(je){Ue||(Ue=!0,mn[lt]=je,--Yt||Ut(mn))},cn)}),--Yt||Ut(mn)});return jt.e&&cn(jt.v),zt.promise},race:function(wt){var xt=this,zt=Mt(xt),Ut=zt.reject,cn=ve(function(){oe(wt,!1,function(jt){xt.resolve(jt).then(zt.resolve,Ut)})});return cn.e&&Ut(cn.v),zt.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(Se,Be,Le){var Ce=Se("./_export"),xe=Se("./_to-absolute-index"),be=String.fromCharCode,ye=String.fromCodePoint;Ce(Ce.S+Ce.F*(!!ye&&ye.length!=1),"String",{fromCodePoint:function(we){for(var pe,de=[],ge=arguments.length,fe=0;ge>fe;){if(pe=+arguments[fe++],xe(pe,1114111)!==pe)throw RangeError(pe+" is not a valid code point");de.push(pe<65536?be(pe):be(55296+((pe-=65536)>>10),pe%1024+56320))}return de.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(Se,Be,Le){"use strict";var Ce=Se("./_string-at")(!0);Se("./_iter-define")(String,"String",function(xe){this._t=String(xe),this._i=0},function(){var xe,be=this._t,ye=this._i;return ye>=be.length?{value:void 0,done:!0}:(xe=Ce(be,ye),this._i+=xe.length,{value:xe,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(Se,Be,Le){"use strict";var Ce=Se("./_global"),xe=Se("./_has"),be=Se("./_descriptors"),ye=Se("./_export"),we=Se("./_redefine"),pe=Se("./_meta").KEY,de=Se("./_fails"),ge=Se("./_shared"),fe=Se("./_set-to-string-tag"),ue=Se("./_uid"),ee=Se("./_wks"),z=Se("./_wks-ext"),oe=Se("./_wks-define"),re=Se("./_enum-keys"),ae=Se("./_is-array"),le=Se("./_an-object"),me=Se("./_is-object"),ve=Se("./_to-iobject"),Pe=Se("./_to-primitive"),Ae=Se("./_property-desc"),Oe=Se("./_object-create"),Ie=Se("./_object-gopn-ext"),Ze=Se("./_object-gopd"),qe=Se("./_object-dp"),Je=Se("./_object-keys"),mt=Ze.f,gt=qe.f,Mt=Ie.f,at=Ce.Symbol,_t=Ce.JSON,ht=_t&&_t.stringify,Dt=ee("_hidden"),ut=ee("toPrimitive"),ot={}.propertyIsEnumerable,ct=ge("symbol-registry"),yt=ge("symbols"),wt=ge("op-symbols"),xt=Object.prototype,zt=typeof at=="function",Ut=Ce.QObject,cn=!Ut||!Ut.prototype||!Ut.prototype.findChild,jt=be&&de(function(){return Oe(gt({},"a",{get:function(){return gt(this,"a",{value:7}).a}})).a!=7})?function($e,We,Ve){var pt=mt(xt,We);pt&&delete xt[We],gt($e,We,Ve),pt&&$e!==xt&>(xt,We,pt)}:gt,mn=function($e){var We=yt[$e]=Oe(at.prototype);return We._k=$e,We},Ft=zt&&typeof at.iterator=="symbol"?function($e){return typeof $e=="symbol"}:function($e){return $e instanceof at},Yt=function($e,We,Ve){return $e===xt&&Yt(wt,We,Ve),le($e),We=Pe(We,!0),le(Ve),xe(yt,We)?(Ve.enumerable?(xe($e,Dt)&&$e[Dt][We]&&($e[Dt][We]=!1),Ve=Oe(Ve,{enumerable:Ae(0,!1)})):(xe($e,Dt)||gt($e,Dt,Ae(1,{})),$e[Dt][We]=!0),jt($e,We,Ve)):gt($e,We,Ve)},tn=function($e,We){le($e);for(var Ve,pt=re(We=ve(We)),Lt=0,on=pt.length;on>Lt;)Yt($e,Ve=pt[Lt++],We[Ve]);return $e},lt=function($e,We){return We===void 0?Oe($e):tn(Oe($e),We)},Ue=function($e){var We=ot.call(this,$e=Pe($e,!0));return!(this===xt&&xe(yt,$e)&&!xe(wt,$e))&&(!(We||!xe(this,$e)||!xe(yt,$e)||xe(this,Dt)&&this[Dt][$e])||We)},je=function($e,We){if($e=ve($e),We=Pe(We,!0),$e!==xt||!xe(yt,We)||xe(wt,We)){var Ve=mt($e,We);return!Ve||!xe(yt,We)||xe($e,Dt)&&$e[Dt][We]||(Ve.enumerable=!0),Ve}},rt=function($e){for(var We,Ve=Mt(ve($e)),pt=[],Lt=0;Ve.length>Lt;)xe(yt,We=Ve[Lt++])||We==Dt||We==pe||pt.push(We);return pt},dt=function($e){for(var We,Ve=$e===xt,pt=Mt(Ve?wt:ve($e)),Lt=[],on=0;pt.length>on;)!xe(yt,We=pt[on++])||Ve&&!xe(xt,We)||Lt.push(yt[We]);return Lt};zt||(at=function(){if(this instanceof at)throw TypeError("Symbol is not a constructor!");var $e=ue(arguments.length>0?arguments[0]:void 0),We=function(Ve){this===xt&&We.call(wt,Ve),xe(this,Dt)&&xe(this[Dt],$e)&&(this[Dt][$e]=!1),jt(this,$e,Ae(1,Ve))};return be&&cn&&jt(xt,$e,{configurable:!0,set:We}),mn($e)},we(at.prototype,"toString",function(){return this._k}),Ze.f=je,qe.f=Yt,Se("./_object-gopn").f=Ie.f=rt,Se("./_object-pie").f=Ue,Se("./_object-gops").f=dt,be&&!Se("./_library")&&we(xt,"propertyIsEnumerable",Ue,!0),z.f=function($e){return mn(ee($e))}),ye(ye.G+ye.W+ye.F*!zt,{Symbol:at});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ke=0;tt.length>Ke;)ee(tt[Ke++]);for(var De=Je(ee.store),ze=0;De.length>ze;)oe(De[ze++]);ye(ye.S+ye.F*!zt,"Symbol",{for:function($e){return xe(ct,$e+="")?ct[$e]:ct[$e]=at($e)},keyFor:function($e){if(!Ft($e))throw TypeError($e+" is not a symbol!");for(var We in ct)if(ct[We]===$e)return We},useSetter:function(){cn=!0},useSimple:function(){cn=!1}}),ye(ye.S+ye.F*!zt,"Object",{create:lt,defineProperty:Yt,defineProperties:tn,getOwnPropertyDescriptor:je,getOwnPropertyNames:rt,getOwnPropertySymbols:dt}),_t&&ye(ye.S+ye.F*(!zt||de(function(){var $e=at();return ht([$e])!="[null]"||ht({a:$e})!="{}"||ht(Object($e))!="{}"})),"JSON",{stringify:function($e){for(var We,Ve,pt=[$e],Lt=1;arguments.length>Lt;)pt.push(arguments[Lt++]);if(Ve=We=pt[1],(me(We)||$e!==void 0)&&!Ft($e))return ae(We)||(We=function(on,Xt){if(typeof Ve=="function"&&(Xt=Ve.call(this,on,Xt)),!Ft(Xt))return Xt}),pt[1]=We,ht.apply(_t,pt)}}),at.prototype[ut]||Se("./_hide")(at.prototype,ut,at.prototype.valueOf),fe(at,"Symbol"),fe(Math,"Math",!0),fe(Ce.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(Se,Be,Le){"use strict";var Ce=Se("./_export"),xe=Se("./_core"),be=Se("./_global"),ye=Se("./_species-constructor"),we=Se("./_promise-resolve");Ce(Ce.P+Ce.R,"Promise",{finally:function(pe){var de=ye(this,xe.Promise||be.Promise),ge=typeof pe=="function";return this.then(ge?function(fe){return we(de,pe()).then(function(){return fe})}:pe,ge?function(fe){return we(de,pe()).then(function(){throw fe})}:pe)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(Se,Be,Le){"use strict";var Ce=Se("./_export"),xe=Se("./_new-promise-capability"),be=Se("./_perform");Ce(Ce.S,"Promise",{try:function(ye){var we=xe.f(this),pe=be(ye);return(pe.e?we.reject:we.resolve)(pe.v),we.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(Se,Be,Le){Se("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(Se,Be,Le){Se("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(Se,Be,Le){Se("./es6.array.iterator");for(var Ce=Se("./_global"),xe=Se("./_hide"),be=Se("./_iterators"),ye=Se("./_wks")("toStringTag"),we="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),pe=0;pe<we.length;pe++){var de=we[pe],ge=Ce[de],fe=ge&&ge.prototype;fe&&!fe[ye]&&xe(fe,ye,de),be[de]=be.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(Se,Be,Le){var Ce=Se("./_export"),xe=Se("./_task");Ce(Ce.G+Ce.B,{setImmediate:xe.set,clearImmediate:xe.clear})},{"./_export":73,"./_task":120}],153:[function(Se,Be,Le){(function(Ce){"use strict";function xe(Pe){return Array.isArray?Array.isArray(Pe):le(Pe)==="[object Array]"}function be(Pe){return typeof Pe=="boolean"}function ye(Pe){return Pe===null}function we(Pe){return Pe==null}function pe(Pe){return typeof Pe=="number"}function de(Pe){return typeof Pe=="string"}function ge(Pe){return(Pe===void 0?"undefined":(0,ve.default)(Pe))==="symbol"}function fe(Pe){return Pe===void 0}function ue(Pe){return le(Pe)==="[object RegExp]"}function ee(Pe){return(Pe===void 0?"undefined":(0,ve.default)(Pe))==="object"&&Pe!==null}function z(Pe){return le(Pe)==="[object Date]"}function oe(Pe){return le(Pe)==="[object Error]"||Pe instanceof Error}function re(Pe){return typeof Pe=="function"}function ae(Pe){return Pe===null||typeof Pe=="boolean"||typeof Pe=="number"||typeof Pe=="string"||(Pe===void 0?"undefined":(0,ve.default)(Pe))==="symbol"||Pe===void 0}function le(Pe){return Object.prototype.toString.call(Pe)}var me=Se("babel-runtime/helpers/typeof"),ve=function(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}(me);Le.isArray=xe,Le.isBoolean=be,Le.isNull=ye,Le.isNullOrUndefined=we,Le.isNumber=pe,Le.isString=de,Le.isSymbol=ge,Le.isUndefined=fe,Le.isRegExp=ue,Le.isObject=ee,Le.isDate=z,Le.isError=oe,Le.isFunction=re,Le.isPrimitive=ae,Le.isBuffer=Ce.isBuffer}).call(this,{isBuffer:Se("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/helpers/typeof"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(be){function ye(fe,ue){for(fe=String(fe),ue=ue||2;fe.length<ue;)fe="0"+fe;return fe}function we(fe){var ue=new Date(fe.getFullYear(),fe.getMonth(),fe.getDate());ue.setDate(ue.getDate()-(ue.getDay()+6)%7+3);var ee=new Date(ue.getFullYear(),0,4);ee.setDate(ee.getDate()-(ee.getDay()+6)%7+3);var z=ue.getTimezoneOffset()-ee.getTimezoneOffset();ue.setHours(ue.getHours()-z);var oe=(ue-ee)/6048e5;return 1+Math.floor(oe)}function pe(fe){var ue=fe.getDay();return ue===0&&(ue=7),ue}function de(fe){return fe===null?"null":fe===void 0?"undefined":(fe===void 0?"undefined":(0,xe.default)(fe))!=="object"?fe===void 0?"undefined":(0,xe.default)(fe):Array.isArray(fe)?"array":{}.toString.call(fe).slice(8,-1).toLowerCase()}var ge=function(){var fe=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,ue=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,ee=/[^-+\dA-Z]/g;return function(z,oe,re,ae){if(arguments.length!==1||de(z)!=="string"||/\d/.test(z)||(oe=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");oe=String(ge.masks[oe]||oe||ge.masks.default);var le=oe.slice(0,4);le!=="UTC:"&&le!=="GMT:"||(oe=oe.slice(4),re=!0,le==="GMT:"&&(ae=!0));var me=re?"getUTC":"get",ve=z[me+"Date"](),Pe=z[me+"Day"](),Ae=z[me+"Month"](),Oe=z[me+"FullYear"](),Ie=z[me+"Hours"](),Ze=z[me+"Minutes"](),qe=z[me+"Seconds"](),Je=z[me+"Milliseconds"](),mt=re?0:z.getTimezoneOffset(),gt=we(z),Mt=pe(z),at={d:ve,dd:ye(ve),ddd:ge.i18n.dayNames[Pe],dddd:ge.i18n.dayNames[Pe+7],m:Ae+1,mm:ye(Ae+1),mmm:ge.i18n.monthNames[Ae],mmmm:ge.i18n.monthNames[Ae+12],yy:String(Oe).slice(2),yyyy:Oe,h:Ie%12||12,hh:ye(Ie%12||12),H:Ie,HH:ye(Ie),M:Ze,MM:ye(Ze),s:qe,ss:ye(qe),l:ye(Je,3),L:ye(Math.round(Je/10)),t:Ie<12?"a":"p",tt:Ie<12?"am":"pm",T:Ie<12?"A":"P",TT:Ie<12?"AM":"PM",Z:ae?"GMT":re?"UTC":(String(z).match(ue)||[""]).pop().replace(ee,""),o:(mt>0?"-":"+")+ye(100*Math.floor(Math.abs(mt)/60)+Math.abs(mt)%60,4),S:["th","st","nd","rd"][ve%10>3?0:(ve%100-ve%10!=10)*ve%10],W:gt,N:Mt};return oe.replace(fe,function(_t){return _t in at?at[_t]:_t.slice(1,_t.length-1)})}}();ge.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"},ge.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"]},typeof ke=="function"&&ke.amd?ke(function(){return ge}):(Le===void 0?"undefined":(0,xe.default)(Le))==="object"?Be.exports=ge:be.dateFormat=ge})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(Se,Be,Le){(function(Ce){function xe(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function be(de){var ge=this.useColors;if(de[0]=(ge?"%c":"")+this.namespace+(ge?" %c":" ")+de[0]+(ge?"%c ":" ")+"+"+Le.humanize(this.diff),ge){var fe="color: "+this.color;de.splice(1,0,fe,"color: inherit");var ue=0,ee=0;de[0].replace(/%[a-zA-Z%]/g,function(z){z!=="%%"&&(ue++,z==="%c"&&(ee=ue))}),de.splice(ee,0,fe)}}function ye(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function we(de){try{de==null?Le.storage.removeItem("debug"):Le.storage.debug=de}catch(ge){}}function pe(){var de;try{de=Le.storage.debug}catch(ge){}return!de&&Ce!==void 0&&"env"in Ce&&(de=Ce.env.DEBUG),de}Le=Be.exports=Se("./debug"),Le.log=ye,Le.formatArgs=be,Le.save=we,Le.load=pe,Le.useColors=xe,Le.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(de){}}(),Le.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],Le.formatters.j=function(de){try{return JSON.stringify(de)}catch(ge){return"[UnexpectedJSONParseError]: "+ge.message}},Le.enable(pe())}).call(this,Se("_process"))},{"./debug":156,_process:173}],156:[function(Se,Be,Le){function Ce(ge){var fe,ue=0;for(fe in ge)ue=(ue<<5)-ue+ge.charCodeAt(fe),ue|=0;return Le.colors[Math.abs(ue)%Le.colors.length]}function xe(ge){function fe(){if(fe.enabled){var ue=fe,ee=+new Date,z=ee-(de||ee);ue.diff=z,ue.prev=de,ue.curr=ee,de=ee;for(var oe=new Array(arguments.length),re=0;re<oe.length;re++)oe[re]=arguments[re];oe[0]=Le.coerce(oe[0]),typeof oe[0]!="string"&&oe.unshift("%O");var ae=0;oe[0]=oe[0].replace(/%([a-zA-Z%])/g,function(le,me){if(le==="%%")return le;ae++;var ve=Le.formatters[me];if(typeof ve=="function"){var Pe=oe[ae];le=ve.call(ue,Pe),oe.splice(ae,1),ae--}return le}),Le.formatArgs.call(ue,oe),(fe.log||Le.log||console.log.bind(console)).apply(ue,oe)}}return fe.namespace=ge,fe.enabled=Le.enabled(ge),fe.useColors=Le.useColors(),fe.color=Ce(ge),typeof Le.init=="function"&&Le.init(fe),fe}function be(ge){Le.save(ge),Le.names=[],Le.skips=[];for(var fe=(typeof ge=="string"?ge:"").split(/[\s,]+/),ue=fe.length,ee=0;ee<ue;ee++)fe[ee]&&(ge=fe[ee].replace(/\*/g,".*?"),ge[0]==="-"?Le.skips.push(new RegExp("^"+ge.substr(1)+"$")):Le.names.push(new RegExp("^"+ge+"$")))}function ye(){Le.enable("")}function we(ge){var fe,ue;for(fe=0,ue=Le.skips.length;fe<ue;fe++)if(Le.skips[fe].test(ge))return!1;for(fe=0,ue=Le.names.length;fe<ue;fe++)if(Le.names[fe].test(ge))return!0;return!1}function pe(ge){return ge instanceof Error?ge.stack||ge.message:ge}Le=Be.exports=xe.debug=xe.default=xe,Le.coerce=pe,Le.disable=ye,Le.enable=be,Le.enabled=we,Le.humanize=Se("ms"),Le.names=[],Le.skips=[],Le.formatters={};var de},{ms:169}],157:[function(Se,Be,Le){"use strict";function Ce(be){var ye=""+be,we=xe.exec(ye);if(!we)return ye;var pe,de="",ge=0,fe=0;for(ge=we.index;ge<ye.length;ge++){switch(ye.charCodeAt(ge)){case 34:pe=""";break;case 38:pe="&";break;case 39:pe="'";break;case 60:pe="<";break;case 62:pe=">";break;default:continue}fe!==ge&&(de+=ye.substring(fe,ge)),fe=ge+1,de+=pe}return fe!==ge?de+ye.substring(fe,ge):de}var xe=/["'&<>]/;Be.exports=Ce},{}],158:[function(Se,Be,Le){function Ce(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function xe(pe){return typeof pe=="function"}function be(pe){return typeof pe=="number"}function ye(pe){return typeof pe=="object"&&pe!==null}function we(pe){return pe===void 0}Be.exports=Ce,Ce.EventEmitter=Ce,Ce.prototype._events=void 0,Ce.prototype._maxListeners=void 0,Ce.defaultMaxListeners=10,Ce.prototype.setMaxListeners=function(pe){if(!be(pe)||pe<0||isNaN(pe))throw TypeError("n must be a positive number");return this._maxListeners=pe,this},Ce.prototype.emit=function(pe){var de,ge,fe,ue,ee,z;if(this._events||(this._events={}),pe==="error"&&(!this._events.error||ye(this._events.error)&&!this._events.error.length)){if((de=arguments[1])instanceof Error)throw de;var oe=new Error('Uncaught, unspecified "error" event. ('+de+")");throw oe.context=de,oe}if(ge=this._events[pe],we(ge))return!1;if(xe(ge))switch(arguments.length){case 1:ge.call(this);break;case 2:ge.call(this,arguments[1]);break;case 3:ge.call(this,arguments[1],arguments[2]);break;default:ue=Array.prototype.slice.call(arguments,1),ge.apply(this,ue)}else if(ye(ge))for(ue=Array.prototype.slice.call(arguments,1),z=ge.slice(),fe=z.length,ee=0;ee<fe;ee++)z[ee].apply(this,ue);return!0},Ce.prototype.addListener=function(pe,de){var ge;if(!xe(de))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",pe,xe(de.listener)?de.listener:de),this._events[pe]?ye(this._events[pe])?this._events[pe].push(de):this._events[pe]=[this._events[pe],de]:this._events[pe]=de,ye(this._events[pe])&&!this._events[pe].warned&&(ge=we(this._maxListeners)?Ce.defaultMaxListeners:this._maxListeners)&&ge>0&&this._events[pe].length>ge&&(this._events[pe].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[pe].length),typeof console.trace=="function"&&console.trace()),this},Ce.prototype.on=Ce.prototype.addListener,Ce.prototype.once=function(pe,de){function ge(){this.removeListener(pe,ge),fe||(fe=!0,de.apply(this,arguments))}if(!xe(de))throw TypeError("listener must be a function");var fe=!1;return ge.listener=de,this.on(pe,ge),this},Ce.prototype.removeListener=function(pe,de){var ge,fe,ue,ee;if(!xe(de))throw TypeError("listener must be a function");if(!this._events||!this._events[pe])return this;if(ge=this._events[pe],ue=ge.length,fe=-1,ge===de||xe(ge.listener)&&ge.listener===de)delete this._events[pe],this._events.removeListener&&this.emit("removeListener",pe,de);else if(ye(ge)){for(ee=ue;ee-- >0;)if(ge[ee]===de||ge[ee].listener&&ge[ee].listener===de){fe=ee;break}if(fe<0)return this;ge.length===1?(ge.length=0,delete this._events[pe]):ge.splice(fe,1),this._events.removeListener&&this.emit("removeListener",pe,de)}return this},Ce.prototype.removeAllListeners=function(pe){var de,ge;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[pe]&&delete this._events[pe],this;if(arguments.length===0){for(de in this._events)de!=="removeListener"&&this.removeAllListeners(de);return this.removeAllListeners("removeListener"),this._events={},this}if(ge=this._events[pe],xe(ge))this.removeListener(pe,ge);else if(ge)for(;ge.length;)this.removeListener(pe,ge[ge.length-1]);return delete this._events[pe],this},Ce.prototype.listeners=function(pe){return this._events&&this._events[pe]?xe(this._events[pe])?[this._events[pe]]:this._events[pe].slice():[]},Ce.prototype.listenerCount=function(pe){if(this._events){var de=this._events[pe];if(xe(de))return 1;if(de)return de.length}return 0},Ce.listenerCount=function(pe,de){return pe.listenerCount(de)}},{}],159:[function(Se,Be,Le){var Ce=Se("http"),xe=Be.exports;for(var be in Ce)Ce.hasOwnProperty(be)&&(xe[be]=Ce[be]);xe.request=function(ye,we){return ye||(ye={}),ye.scheme="https",ye.protocol="https:",Ce.request.call(this,ye,we)}},{http:196}],160:[function(Se,Be,Le){"use strict";var Ce=Se("util"),xe=Se("ms");Be.exports=function(be){if(typeof be=="number")return be;var ye=xe(be);if(ye===void 0){var we=new Error(Ce.format("humanize-ms(%j) result undefined",be));console.warn(we.stack)}return ye}},{ms:169,util:207}],161:[function(Se,Be,Le){Le.read=function(Ce,xe,be,ye,we){var pe,de,ge=8*we-ye-1,fe=(1<<ge)-1,ue=fe>>1,ee=-7,z=be?we-1:0,oe=be?-1:1,re=Ce[xe+z];for(z+=oe,pe=re&(1<<-ee)-1,re>>=-ee,ee+=ge;ee>0;pe=256*pe+Ce[xe+z],z+=oe,ee-=8);for(de=pe&(1<<-ee)-1,pe>>=-ee,ee+=ye;ee>0;de=256*de+Ce[xe+z],z+=oe,ee-=8);if(pe===0)pe=1-ue;else{if(pe===fe)return de?NaN:1/0*(re?-1:1);de+=Math.pow(2,ye),pe-=ue}return(re?-1:1)*de*Math.pow(2,pe-ye)},Le.write=function(Ce,xe,be,ye,we,pe){var de,ge,fe,ue=8*pe-we-1,ee=(1<<ue)-1,z=ee>>1,oe=we===23?Math.pow(2,-24)-Math.pow(2,-77):0,re=ye?0:pe-1,ae=ye?1:-1,le=xe<0||xe===0&&1/xe<0?1:0;for(xe=Math.abs(xe),isNaN(xe)||xe===1/0?(ge=isNaN(xe)?1:0,de=ee):(de=Math.floor(Math.log(xe)/Math.LN2),xe*(fe=Math.pow(2,-de))<1&&(de--,fe*=2),xe+=de+z>=1?oe/fe:oe*Math.pow(2,1-z),xe*fe>=2&&(de++,fe/=2),de+z>=ee?(ge=0,de=ee):de+z>=1?(ge=(xe*fe-1)*Math.pow(2,we),de+=z):(ge=xe*Math.pow(2,z-1)*Math.pow(2,we),de=0));we>=8;Ce[be+re]=255&ge,re+=ae,ge/=256,we-=8);for(de=de<<we|ge,ue+=we;ue>0;Ce[be+re]=255&de,re+=ae,de/=256,ue-=8);Ce[be+re-ae]|=128*le}},{}],162:[function(Se,Be,Le){typeof Object.create=="function"?Be.exports=function(Ce,xe){Ce.super_=xe,Ce.prototype=Object.create(xe.prototype,{constructor:{value:Ce,enumerable:!1,writable:!0,configurable:!0}})}:Be.exports=function(Ce,xe){Ce.super_=xe;var be=function(){};be.prototype=xe.prototype,Ce.prototype=new be,Ce.prototype.constructor=Ce}},{}],163:[function(Se,Be,Le){function Ce(be){return!!be.constructor&&typeof be.constructor.isBuffer=="function"&&be.constructor.isBuffer(be)}function xe(be){return typeof be.readFloatLE=="function"&&typeof be.slice=="function"&&Ce(be.slice(0,0))}Be.exports=function(be){return be!=null&&(Ce(be)||xe(be)||!!be._isBuffer)}},{}],164:[function(Se,Be,Le){(function(Ce){function xe(we){return ye.call(we).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function be(we){return typeof we=="function"&&(/^class(\s|\{\}$)/.test(ye.call(we))||/^.*classCallCheck\(/.test(xe(we)))}var ye=Function.prototype.toString;Le!==void 0?(Be!==void 0&&Be.exports&&(Le=Be.exports=be),Le.isClass=be):typeof ke=="function"&&ke.amd?ke([],function(){return be}):Ce.isClass=be})(this)},{}],165:[function(Se,Be,Le){"use strict";function Ce(pe){var de=pe.slice(2);return de=de[0].toLowerCase()+de.slice(1)}var xe=Se("core-util-is"),be=Se("isstream"),ye=Se("is-class");Object.keys(xe).map(function(pe){Le[Ce(pe)]=xe[pe]}),Le.stream=be,Le.readableStream=be.isReadable,Le.writableStream=be.isWritable,Le.duplexStream=be.isDuplex,Le.class=ye,Le.finite=function(pe){return Number.isFinite(pe)},Le.NaN=function(pe){return Number.isNaN(pe)},Le.generator=function(pe){return pe&&typeof pe.next=="function"&&typeof pe.throw=="function"},Le.generatorFunction=function(pe){return pe&&pe.constructor&&pe.constructor.name==="GeneratorFunction"},Le.asyncFunction=function(pe){return pe&&pe.constructor&&pe.constructor.name==="AsyncFunction"},Le.promise=function(pe){return pe&&typeof pe.then=="function"};var we=Math.pow(2,31);Le.int=function(pe){return xe.isNumber(pe)&&pe%1==0},Le.int32=function(pe){return Le.int(pe)&&pe<we&&pe>=-we},Le.long=function(pe){return Le.int(pe)&&(pe>=we||pe<-we)},Le.Long=function(pe){return Le.object(pe)&&Le.number(pe.high)&&Le.number(pe.low)},Le.double=function(pe){return xe.isNumber(pe)&&!isNaN(pe)&&pe%1!=0},Le.date=function(pe){return pe instanceof Date},Le.regExp=function(pe){return pe instanceof RegExp},Le.regexp=Le.regExp,Le.error=function(pe){return pe instanceof Error},Le.array=function(pe){return Array.isArray(pe)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(Se,Be,Le){var Ce={}.toString;Be.exports=Array.isArray||function(xe){return Ce.call(xe)=="[object Array]"}},{}],167:[function(Se,Be,Le){function Ce(pe){return pe instanceof we.Stream}function xe(pe){return Ce(pe)&&typeof pe._read=="function"&&typeof pe._readableState=="object"}function be(pe){return Ce(pe)&&typeof pe._write=="function"&&typeof pe._writableState=="object"}function ye(pe){return xe(pe)&&be(pe)}var we=Se("stream");Be.exports=Ce,Be.exports.isReadable=xe,Be.exports.isWritable=be,Be.exports.isDuplex=ye},{stream:195}],168:[function(Se,Be,Le){"use strict";function Ce(be,ye,we){if(!be)throw new TypeError("argument dest is required");if(!ye)throw new TypeError("argument src is required");return we===void 0&&(we=!0),Object.getOwnPropertyNames(ye).forEach(function(pe){if(we||!xe.call(be,pe)){var de=Object.getOwnPropertyDescriptor(ye,pe);Object.defineProperty(be,pe,de)}}),be}Be.exports=Ce;var xe=Object.prototype.hasOwnProperty},{}],169:[function(Se,Be,Le){function Ce(ue){if(ue=String(ue),!(ue.length>100)){var ee=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(ue);if(ee){var z=parseFloat(ee[1]);switch((ee[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return z*fe;case"days":case"day":case"d":return z*ge;case"hours":case"hour":case"hrs":case"hr":case"h":return z*de;case"minutes":case"minute":case"mins":case"min":case"m":return z*pe;case"seconds":case"second":case"secs":case"sec":case"s":return z*we;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return z;default:return}}}}function xe(ue){return ue>=ge?Math.round(ue/ge)+"d":ue>=de?Math.round(ue/de)+"h":ue>=pe?Math.round(ue/pe)+"m":ue>=we?Math.round(ue/we)+"s":ue+"ms"}function be(ue){return ye(ue,ge,"day")||ye(ue,de,"hour")||ye(ue,pe,"minute")||ye(ue,we,"second")||ue+" ms"}function ye(ue,ee,z){if(!(ue<ee))return ue<1.5*ee?Math.floor(ue/ee)+" "+z:Math.ceil(ue/ee)+" "+z+"s"}var we=1e3,pe=60*we,de=60*pe,ge=24*de,fe=365.25*ge;Be.exports=function(ue,ee){ee=ee||{};var z=typeof ue;if(z==="string"&&ue.length>0)return Ce(ue);if(z==="number"&&isNaN(ue)===!1)return ee.long?be(ue):xe(ue);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ue))}},{}],170:[function(Se,Be,Le){(function(Ce){function xe(pe,de){for(var ge=0,fe=pe.length-1;fe>=0;fe--){var ue=pe[fe];ue==="."?pe.splice(fe,1):ue===".."?(pe.splice(fe,1),ge++):ge&&(pe.splice(fe,1),ge--)}if(de)for(;ge--;ge)pe.unshift("..");return pe}function be(pe){typeof pe!="string"&&(pe+="");var de,ge=0,fe=-1,ue=!0;for(de=pe.length-1;de>=0;--de)if(pe.charCodeAt(de)===47){if(!ue){ge=de+1;break}}else fe===-1&&(ue=!1,fe=de+1);return fe===-1?"":pe.slice(ge,fe)}function ye(pe,de){if(pe.filter)return pe.filter(de);for(var ge=[],fe=0;fe<pe.length;fe++)de(pe[fe],fe,pe)&&ge.push(pe[fe]);return ge}Le.resolve=function(){for(var pe="",de=!1,ge=arguments.length-1;ge>=-1&&!de;ge--){var fe=ge>=0?arguments[ge]:Ce.cwd();if(typeof fe!="string")throw new TypeError("Arguments to path.resolve must be strings");fe&&(pe=fe+"/"+pe,de=fe.charAt(0)==="/")}return pe=xe(ye(pe.split("/"),function(ue){return!!ue}),!de).join("/"),(de?"/":"")+pe||"."},Le.normalize=function(pe){var de=Le.isAbsolute(pe),ge=we(pe,-1)==="/";return pe=xe(ye(pe.split("/"),function(fe){return!!fe}),!de).join("/"),pe||de||(pe="."),pe&&ge&&(pe+="/"),(de?"/":"")+pe},Le.isAbsolute=function(pe){return pe.charAt(0)==="/"},Le.join=function(){var pe=Array.prototype.slice.call(arguments,0);return Le.normalize(ye(pe,function(de,ge){if(typeof de!="string")throw new TypeError("Arguments to path.join must be strings");return de}).join("/"))},Le.relative=function(pe,de){function ge(ae){for(var le=0;le<ae.length&&ae[le]==="";le++);for(var me=ae.length-1;me>=0&&ae[me]==="";me--);return le>me?[]:ae.slice(le,me-le+1)}pe=Le.resolve(pe).substr(1),de=Le.resolve(de).substr(1);for(var fe=ge(pe.split("/")),ue=ge(de.split("/")),ee=Math.min(fe.length,ue.length),z=ee,oe=0;oe<ee;oe++)if(fe[oe]!==ue[oe]){z=oe;break}for(var re=[],oe=z;oe<fe.length;oe++)re.push("..");return re=re.concat(ue.slice(z)),re.join("/")},Le.sep="/",Le.delimiter=":",Le.dirname=function(pe){if(typeof pe!="string"&&(pe+=""),pe.length===0)return".";for(var de=pe.charCodeAt(0),ge=de===47,fe=-1,ue=!0,ee=pe.length-1;ee>=1;--ee)if((de=pe.charCodeAt(ee))===47){if(!ue){fe=ee;break}}else ue=!1;return fe===-1?ge?"/":".":ge&&fe===1?"/":pe.slice(0,fe)},Le.basename=function(pe,de){var ge=be(pe);return de&&ge.substr(-1*de.length)===de&&(ge=ge.substr(0,ge.length-de.length)),ge},Le.extname=function(pe){typeof pe!="string"&&(pe+="");for(var de=-1,ge=0,fe=-1,ue=!0,ee=0,z=pe.length-1;z>=0;--z){var oe=pe.charCodeAt(z);if(oe!==47)fe===-1&&(ue=!1,fe=z+1),oe===46?de===-1?de=z:ee!==1&&(ee=1):de!==-1&&(ee=-1);else if(!ue){ge=z+1;break}}return de===-1||fe===-1||ee===0||ee===1&&de===fe-1&&de===ge+1?"":pe.slice(de,fe)};var we=function(pe,de,ge){return pe.substr(de,ge)}}).call(this,Se("_process"))},{_process:173}],171:[function(Se,Be,Le){(function(Ce){(function(){"use strict";function xe(qe){return qe=String(qe),qe.charAt(0).toUpperCase()+qe.slice(1)}function be(qe,Je,mt){var gt={"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 Je&&mt&&/^Win/i.test(qe)&&!/^Windows Phone /i.test(qe)&&(gt=gt[/[\d.]+$/.exec(qe)])&&(qe="Windows "+gt),qe=String(qe),Je&&mt&&(qe=qe.replace(RegExp(Je,"i"),mt)),qe=we(qe.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])}function ye(qe,Je){var mt=-1,gt=qe?qe.length:0;if(typeof gt=="number"&>>-1&><=ve)for(;++mt<gt;)Je(qe[mt],mt,qe);else pe(qe,Je)}function we(qe){return qe=ee(qe),/^(?:webOS|i(?:OS|P))/.test(qe)?qe:xe(qe)}function pe(qe,Je){for(var mt in qe)Oe.call(qe,mt)&&Je(qe[mt],mt,qe)}function de(qe){return qe==null?xe(qe):Ie.call(qe).slice(8,-1)}function ge(qe,Je){var mt=qe!=null?typeof qe[Je]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(mt)||mt=="object"&&!qe[Je])}function fe(qe){return String(qe).replace(/([ -])(?!$)/g,"$1?")}function ue(qe,Je){var mt=null;return ye(qe,function(gt,Mt){mt=Je(mt,gt,Mt,qe)}),mt}function ee(qe){return String(qe).replace(/^ +| +$/g,"")}function z(qe){function Je($e){return ue($e,function(We,Ve){var pt=Ve.pattern||fe(Ve);return!We&&(We=RegExp("\\b"+pt+" *\\d+[.\\w_]*","i").exec(qe)||RegExp("\\b"+pt+" *\\w+-[\\w]*","i").exec(qe)||RegExp("\\b"+pt+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(qe))&&((We=String(Ve.label&&!RegExp(pt,"i").test(Ve.label)?Ve.label:We).split("/"))[1]&&!/[\d.]+/.test(We[0])&&(We[0]+=" "+We[1]),Ve=Ve.label||Ve,We=we(We[0].replace(RegExp(pt,"i"),Ve).replace(RegExp("; *(?:"+Ve+"[_-])?","i")," ").replace(RegExp("("+Ve+")[-_.]?(\\w)","i"),"$1 $2"))),We})}function mt(){return this.description||""}var gt=re,Mt=qe&&typeof qe=="object"&&de(qe)!="String";Mt&&(gt=qe,qe=null);var at=gt.navigator||{},_t=at.userAgent||"";qe||(qe=_t);var ht,Dt,ut=Mt?!!at.likeChrome:/\bChrome\b/.test(qe)&&!/internal|\n/i.test(Ie.toString()),ot=Mt?"Object":"ScriptBridgingProxyObject",ct=Mt?"Object":"Environment",yt=Mt&>.java?"JavaPackage":de(gt.java),wt=Mt?"Object":"RuntimeObject",xt=/\bJava/.test(yt)&>.java,zt=xt&&de(gt.environment)==ct,Ut=xt?"a":"\u4F2A",cn=xt?"b":"\u5C3E",jt=gt.document||{},mn=gt.operamini||gt.opera,Ft=Pe.test(Ft=Mt&&mn?mn["[[Class]]"]:de(mn))?Ft:mn=null,Yt=qe,tn=[],lt=null,Ue=qe==_t,je=Ue&&mn&&typeof mn.version=="function"&&mn.version(),rt=function($e){return ue($e,function(We,Ve){return We||RegExp("\\b"+(Ve.pattern||fe(Ve))+"\\b","i").exec(qe)&&(Ve.label||Ve)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),dt=function($e){return ue($e,function(We,Ve){return We||RegExp("\\b"+(Ve.pattern||fe(Ve))+"\\b","i").exec(qe)&&(Ve.label||Ve)})}(["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"},"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","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{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"]),tt=Je([{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"]),Ke=function($e){return ue($e,function(We,Ve,pt){return We||(Ve[tt]||Ve[/^[a-z]+(?: +[a-z]+\b)*/i.exec(tt)]||RegExp("\\b"+fe(pt)+"(?:\\b|\\w*\\d)","i").exec(qe))&&pt})}({Apple:{iPad:1,iPhone:1,iPod:1},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:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),De=function($e){return ue($e,function(We,Ve){var pt=Ve.pattern||fe(Ve);return!We&&(We=RegExp("\\b"+pt+"(?:/[\\d.]+|[ \\w.]*)","i").exec(qe))&&(We=be(We,pt,Ve.label||Ve)),We})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","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 "]);if(rt&&(rt=[rt]),Ke&&!tt&&(tt=Je([Ke])),(ht=/\bGoogle TV\b/.exec(tt))&&(tt=ht[0]),/\bSimulator\b/i.test(qe)&&(tt=(tt?tt+" ":"")+"Simulator"),dt=="Opera Mini"&&/\bOPiOS\b/.test(qe)&&tn.push("running in Turbo/Uncompressed mode"),dt=="IE"&&/\blike iPhone OS\b/.test(qe)?(ht=z(qe.replace(/like iPhone OS/,"")),Ke=ht.manufacturer,tt=ht.product):/^iP/.test(tt)?(dt||(dt="Safari"),De="iOS"+((ht=/ OS ([\d_]+)/i.exec(qe))?" "+ht[1].replace(/_/g,"."):"")):dt!="Konqueror"||/buntu/i.test(De)?Ke&&Ke!="Google"&&(/Chrome/.test(dt)&&!/\bMobile Safari\b/i.test(qe)||/\bVita\b/.test(tt))||/\bAndroid\b/.test(De)&&/^Chrome/.test(dt)&&/\bVersion\//i.test(qe)?(dt="Android Browser",De=/\bAndroid\b/.test(De)?De:"Android"):dt=="Silk"?(/\bMobi/i.test(qe)||(De="Android",tn.unshift("desktop mode")),/Accelerated *= *true/i.test(qe)&&tn.unshift("accelerated")):dt=="PaleMoon"&&(ht=/\bFirefox\/([\d.]+)\b/.exec(qe))?tn.push("identifying as Firefox "+ht[1]):dt=="Firefox"&&(ht=/\b(Mobile|Tablet|TV)\b/i.exec(qe))?(De||(De="Firefox OS"),tt||(tt=ht[1])):!dt||(ht=!/\bMinefield\b/i.test(qe)&&/\b(?:Firefox|Safari)\b/.exec(dt))?(dt&&!tt&&/[\/,]|^[^(]+?\)/.test(qe.slice(qe.indexOf(ht+"/")+8))&&(dt=null),(ht=tt||Ke||De)&&(tt||Ke||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(De))&&(dt=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(De)?De:ht)+" Browser")):dt=="Electron"&&(ht=(/\bChrome\/([\d.]+)\b/.exec(qe)||0)[1])&&tn.push("Chromium "+ht):De="Kubuntu",je||(je=function($e){return ue($e,function(We,Ve){return We||(RegExp(Ve+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(qe)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",fe(dt),"(?:Firefox|Minefield|NetFront)"])),(ht=rt=="iCab"&&parseFloat(je)>3&&"WebKit"||/\bOpera\b/.test(dt)&&(/\bOPR\b/.test(qe)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(qe)&&!/^(?:Trident|EdgeHTML)$/.test(rt)&&"WebKit"||!rt&&/\bMSIE\b/i.test(qe)&&(De=="Mac OS"?"Tasman":"Trident")||rt=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(dt)&&"NetFront")&&(rt=[ht]),dt=="IE"&&(ht=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(qe)||0)[1])?(dt+=" Mobile",De="Windows Phone "+(/\+$/.test(ht)?ht:ht+".x"),tn.unshift("desktop mode")):/\bWPDesktop\b/i.test(qe)?(dt="IE Mobile",De="Windows Phone 8.x",tn.unshift("desktop mode"),je||(je=(/\brv:([\d.]+)/.exec(qe)||0)[1])):dt!="IE"&&rt=="Trident"&&(ht=/\brv:([\d.]+)/.exec(qe))&&(dt&&tn.push("identifying as "+dt+(je?" "+je:"")),dt="IE",je=ht[1]),Ue){if(ge(gt,"global"))if(xt&&(ht=xt.lang.System,Yt=ht.getProperty("os.arch"),De=De||ht.getProperty("os.name")+" "+ht.getProperty("os.version")),zt){try{je=gt.require("ringo/engine").version.join("."),dt="RingoJS"}catch($e){(ht=gt.system)&&ht.global.system==gt.system&&(dt="Narwhal",De||(De=ht[0].os||null))}dt||(dt="Rhino")}else typeof gt.process=="object"&&!gt.process.browser&&(ht=gt.process)&&(typeof ht.versions=="object"&&(typeof ht.versions.electron=="string"?(tn.push("Node "+ht.versions.node),dt="Electron",je=ht.versions.electron):typeof ht.versions.nw=="string"&&(tn.push("Chromium "+je,"Node "+ht.versions.node),dt="NW.js",je=ht.versions.nw)),dt||(dt="Node.js",Yt=ht.arch,De=ht.platform,je=/[\d.]+/.exec(ht.version),je=je?je[0]:null));else de(ht=gt.runtime)==ot?(dt="Adobe AIR",De=ht.flash.system.Capabilities.os):de(ht=gt.phantom)==wt?(dt="PhantomJS",je=(ht=ht.version||null)&&ht.major+"."+ht.minor+"."+ht.patch):typeof jt.documentMode=="number"&&(ht=/\bTrident\/(\d+)/i.exec(qe))?(je=[je,jt.documentMode],(ht=+ht[1]+4)!=je[1]&&(tn.push("IE "+je[1]+" mode"),rt&&(rt[1]=""),je[1]=ht),je=dt=="IE"?String(je[1].toFixed(1)):je[0]):typeof jt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(dt)&&(tn.push("masking as "+dt+" "+je),dt="IE",je="11.0",rt=["Trident"],De="Windows");De=De&&we(De)}if(je&&(ht=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(je)||/(?:alpha|beta)(?: ?\d)?/i.exec(qe+";"+(Ue&&at.appMinorVersion))||/\bMinefield\b/i.test(qe)&&"a")&&(lt=/b/i.test(ht)?"beta":"alpha",je=je.replace(RegExp(ht+"\\+?$"),"")+(lt=="beta"?cn:Ut)+(/\d+\+?/.exec(ht)||"")),dt=="Fennec"||dt=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(De))dt="Firefox Mobile";else if(dt=="Maxthon"&&je)je=je.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(tt))tt=="Xbox 360"&&(De=null),tt=="Xbox 360"&&/\bIEMobile\b/.test(qe)&&tn.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(dt)&&(!dt||tt||/Browser|Mobi/.test(dt))||De!="Windows CE"&&!/Mobi/i.test(qe))if(dt=="IE"&&Ue)try{gt.external===null&&tn.unshift("platform preview")}catch($e){tn.unshift("embedded")}else(/\bBlackBerry\b/.test(tt)||/\bBB10\b/.test(qe))&&(ht=(RegExp(tt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(qe)||0)[1]||je)?(ht=[ht,/BB10/.test(qe)],De=(ht[1]?(tt=null,Ke="BlackBerry"):"Device Software")+" "+ht[0],je=null):this!=pe&&tt!="Wii"&&(Ue&&mn||/Opera/.test(dt)&&/\b(?:MSIE|Firefox)\b/i.test(qe)||dt=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(De)||dt=="IE"&&(De&&!/^Win/.test(De)&&je>5.5||/\bWindows XP\b/.test(De)&&je>8||je==8&&!/\bTrident\b/.test(qe)))&&!Pe.test(ht=z.call(pe,qe.replace(Pe,"")+";"))&&ht.name&&(ht="ing as "+ht.name+((ht=ht.version)?" "+ht:""),Pe.test(dt)?(/\bIE\b/.test(ht)&&De=="Mac OS"&&(De=null),ht="identify"+ht):(ht="mask"+ht,dt=Ft?we(Ft.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(ht)&&(De=null),Ue||(je=null)),rt=["Presto"],tn.push(ht));else dt+=" Mobile";(ht=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(qe)||0)[1])&&(ht=[parseFloat(ht.replace(/\.(\d)$/,".0$1")),ht],dt=="Safari"&&ht[1].slice(-1)=="+"?(dt="WebKit Nightly",lt="alpha",je=ht[1].slice(0,-1)):je!=ht[1]&&je!=(ht[2]=(/\bSafari\/([\d.]+\+?)/i.exec(qe)||0)[1])||(je=null),ht[1]=(/\bChrome\/([\d.]+)/i.exec(qe)||0)[1],ht[0]==537.36&&ht[2]==537.36&&parseFloat(ht[1])>=28&&rt=="WebKit"&&(rt=["Blink"]),Ue&&(ut||ht[1])?(rt&&(rt[1]="like Chrome"),ht=ht[1]||(ht=ht[0],ht<530?1:ht<532?2:ht<532.05?3:ht<533?4:ht<534.03?5:ht<534.07?6:ht<534.1?7:ht<534.13?8:ht<534.16?9:ht<534.24?10:ht<534.3?11:ht<535.01?12:ht<535.02?"13+":ht<535.07?15:ht<535.11?16:ht<535.19?17:ht<536.05?18:ht<536.1?19:ht<537.01?20:ht<537.11?"21+":ht<537.13?23:ht<537.18?24:ht<537.24?25:ht<537.36?26:rt!="Blink"?"27":"28")):(rt&&(rt[1]="like Safari"),ht=ht[0],ht=ht<400?1:ht<500?2:ht<526?3:ht<533?4:ht<534?"4+":ht<535?5:ht<537?6:ht<538?7:ht<601?8:"8"),rt&&(rt[1]+=" "+(ht+=typeof ht=="number"?".x":/[.+]/.test(ht)?"":"+")),dt=="Safari"&&(!je||parseInt(je)>45)&&(je=ht)),dt=="Opera"&&(ht=/\bzbov|zvav$/.exec(De))?(dt+=" ",tn.unshift("desktop mode"),ht=="zvav"?(dt+="Mini",je=null):dt+="Mobile",De=De.replace(RegExp(" *"+ht+"$"),"")):dt=="Safari"&&/\bChrome\b/.exec(rt&&rt[1])&&(tn.unshift("desktop mode"),dt="Chrome Mobile",je=null,/\bOS X\b/.test(De)?(Ke="Apple",De="iOS 4.3+"):De=null),je&&je.indexOf(ht=/[\d.]+$/.exec(De))==0&&qe.indexOf("/"+ht+"-")>-1&&(De=ee(De.replace(ht,""))),rt&&!/\b(?:Avant|Nook)\b/.test(dt)&&(/Browser|Lunascape|Maxthon/.test(dt)||dt!="Safari"&&/^iOS/.test(De)&&/\bSafari\b/.test(rt[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(dt)&&rt[1])&&(ht=rt[rt.length-1])&&tn.push(ht),tn.length&&(tn=["("+tn.join("; ")+")"]),Ke&&tt&&tt.indexOf(Ke)<0&&tn.push("on "+Ke),tt&&tn.push((/^on /.test(tn[tn.length-1])?"":"on ")+tt),De&&(ht=/ ([\d.+]+)$/.exec(De),Dt=ht&&De.charAt(De.length-ht[0].length-1)=="/",De={architecture:32,family:ht&&!Dt?De.replace(ht[0],""):De,version:ht?ht[1]:null,toString:function(){var $e=this.version;return this.family+($e&&!Dt?" "+$e:"")+(this.architecture==64?" 64-bit":"")}}),(ht=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Yt))&&!/\bi686\b/i.test(Yt)?(De&&(De.architecture=64,De.family=De.family.replace(RegExp(" *"+ht),"")),dt&&(/\bWOW64\b/i.test(qe)||Ue&&/\w(?:86|32)$/.test(at.cpuClass||at.platform)&&!/\bWin64; x64\b/i.test(qe))&&tn.unshift("32-bit")):De&&/^OS X/.test(De.family)&&dt=="Chrome"&&parseFloat(je)>=39&&(De.architecture=64),qe||(qe=null);var ze={};return ze.description=qe,ze.layout=rt&&rt[0],ze.manufacturer=Ke,ze.name=dt,ze.prerelease=lt,ze.product=tt,ze.ua=qe,ze.version=dt&&je,ze.os=De||{architecture:null,family:null,version:null,toString:function(){return"null"}},ze.parse=z,ze.toString=mt,ze.version&&tn.unshift(je),ze.name&&tn.unshift(dt),De&&dt&&(De!=String(De).split(" ")[0]||De!=dt.split(" ")[0]&&!tt)&&tn.push(tt?"("+De+")":"on "+De),tn.length&&(ze.description=tn.join(" ")),ze}var oe={function:!0,object:!0},re=oe[typeof window]&&window||this,ae=oe[typeof Le]&&Le,le=oe[typeof Be]&&Be&&!Be.nodeType&&Be,me=ae&&le&&typeof Ce=="object"&&Ce;!me||me.global!==me&&me.window!==me&&me.self!==me||(re=me);var ve=Math.pow(2,53)-1,Pe=/\bOpera/,Ae=Object.prototype,Oe=Ae.hasOwnProperty,Ie=Ae.toString,Ze=z();typeof ke=="function"&&typeof ke.amd=="object"&&ke.amd?(re.platform=Ze,ke(function(){return Ze})):ae&&le?pe(Ze,function(qe,Je){ae[Je]=qe}):re.platform=Ze}).call(this)}).call(this,typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(Se,Be,Le){(function(Ce){"use strict";function xe(be,ye,we,pe){if(typeof be!="function")throw new TypeError('"callback" argument must be a function');var de,ge,fe=arguments.length;switch(fe){case 0:case 1:return Ce.nextTick(be);case 2:return Ce.nextTick(function(){be.call(null,ye)});case 3:return Ce.nextTick(function(){be.call(null,ye,we)});case 4:return Ce.nextTick(function(){be.call(null,ye,we,pe)});default:for(de=new Array(fe-1),ge=0;ge<de.length;)de[ge++]=arguments[ge];return Ce.nextTick(function(){be.apply(null,de)})}}!Ce.version||Ce.version.indexOf("v0.")===0||Ce.version.indexOf("v1.")===0&&Ce.version.indexOf("v1.8.")!==0?Be.exports={nextTick:xe}:Be.exports=Ce}).call(this,Se("_process"))},{_process:173}],173:[function(Se,Be,Le){function Ce(){throw new Error("setTimeout has not been defined")}function xe(){throw new Error("clearTimeout has not been defined")}function be(le){if(fe===setTimeout)return setTimeout(le,0);if((fe===Ce||!fe)&&setTimeout)return fe=setTimeout,setTimeout(le,0);try{return fe(le,0)}catch(me){try{return fe.call(null,le,0)}catch(ve){return fe.call(this,le,0)}}}function ye(le){if(ue===clearTimeout)return clearTimeout(le);if((ue===xe||!ue)&&clearTimeout)return ue=clearTimeout,clearTimeout(le);try{return ue(le)}catch(me){try{return ue.call(null,le)}catch(ve){return ue.call(this,le)}}}function we(){re&&z&&(re=!1,z.length?oe=z.concat(oe):ae=-1,oe.length&&pe())}function pe(){if(!re){var le=be(we);re=!0;for(var me=oe.length;me;){for(z=oe,oe=[];++ae<me;)z&&z[ae].run();ae=-1,me=oe.length}z=null,re=!1,ye(le)}}function de(le,me){this.fun=le,this.array=me}function ge(){}var fe,ue,ee=Be.exports={};(function(){try{fe=typeof setTimeout=="function"?setTimeout:Ce}catch(le){fe=Ce}try{ue=typeof clearTimeout=="function"?clearTimeout:xe}catch(le){ue=xe}})();var z,oe=[],re=!1,ae=-1;ee.nextTick=function(le){var me=new Array(arguments.length-1);if(arguments.length>1)for(var ve=1;ve<arguments.length;ve++)me[ve-1]=arguments[ve];oe.push(new de(le,me)),oe.length!==1||re||be(pe)},de.prototype.run=function(){this.fun.apply(null,this.array)},ee.title="browser",ee.browser=!0,ee.env={},ee.argv=[],ee.version="",ee.versions={},ee.on=ge,ee.addListener=ge,ee.once=ge,ee.off=ge,ee.removeListener=ge,ee.removeAllListeners=ge,ee.emit=ge,ee.prependListener=ge,ee.prependOnceListener=ge,ee.listeners=function(le){return[]},ee.binding=function(le){throw new Error("process.binding is not supported")},ee.cwd=function(){return"/"},ee.chdir=function(le){throw new Error("process.chdir is not supported")},ee.umask=function(){return 0}},{}],174:[function(Se,Be,Le){(function(Ce){(function(xe){function be(yt){throw new RangeError(Dt[yt])}function ye(yt,wt){for(var xt=yt.length,zt=[];xt--;)zt[xt]=wt(yt[xt]);return zt}function we(yt,wt){var xt=yt.split("@"),zt="";return xt.length>1&&(zt=xt[0]+"@",yt=xt[1]),yt=yt.replace(ht,"."),zt+ye(yt.split("."),wt).join(".")}function pe(yt){for(var wt,xt,zt=[],Ut=0,cn=yt.length;Ut<cn;)wt=yt.charCodeAt(Ut++),wt>=55296&&wt<=56319&&Ut<cn?(xt=yt.charCodeAt(Ut++),(64512&xt)==56320?zt.push(((1023&wt)<<10)+(1023&xt)+65536):(zt.push(wt),Ut--)):zt.push(wt);return zt}function de(yt){return ye(yt,function(wt){var xt="";return wt>65535&&(wt-=65536,xt+=ct(wt>>>10&1023|55296),wt=56320|1023&wt),xt+=ct(wt)}).join("")}function ge(yt){return yt-48<10?yt-22:yt-65<26?yt-65:yt-97<26?yt-97:Oe}function fe(yt,wt){return yt+22+75*(yt<26)-((wt!=0)<<5)}function ue(yt,wt,xt){var zt=0;for(yt=xt?ot(yt/Je):yt>>1,yt+=ot(yt/wt);yt>ut*Ze>>1;zt+=Oe)yt=ot(yt/ut);return ot(zt+(ut+1)*yt/(yt+qe))}function ee(yt){var wt,xt,zt,Ut,cn,jt,mn,Ft,Yt,tn,lt=[],Ue=yt.length,je=0,rt=gt,dt=mt;for(xt=yt.lastIndexOf(Mt),xt<0&&(xt=0),zt=0;zt<xt;++zt)yt.charCodeAt(zt)>=128&&be("not-basic"),lt.push(yt.charCodeAt(zt));for(Ut=xt>0?xt+1:0;Ut<Ue;){for(cn=je,jt=1,mn=Oe;Ut>=Ue&&be("invalid-input"),Ft=ge(yt.charCodeAt(Ut++)),(Ft>=Oe||Ft>ot((Ae-je)/jt))&&be("overflow"),je+=Ft*jt,Yt=mn<=dt?Ie:mn>=dt+Ze?Ze:mn-dt,!(Ft<Yt);mn+=Oe)tn=Oe-Yt,jt>ot(Ae/tn)&&be("overflow"),jt*=tn;wt=lt.length+1,dt=ue(je-cn,wt,cn==0),ot(je/wt)>Ae-rt&&be("overflow"),rt+=ot(je/wt),je%=wt,lt.splice(je++,0,rt)}return de(lt)}function z(yt){var wt,xt,zt,Ut,cn,jt,mn,Ft,Yt,tn,lt,Ue,je,rt,dt,tt=[];for(yt=pe(yt),Ue=yt.length,wt=gt,xt=0,cn=mt,jt=0;jt<Ue;++jt)(lt=yt[jt])<128&&tt.push(ct(lt));for(zt=Ut=tt.length,Ut&&tt.push(Mt);zt<Ue;){for(mn=Ae,jt=0;jt<Ue;++jt)(lt=yt[jt])>=wt&<<mn&&(mn=lt);for(je=zt+1,mn-wt>ot((Ae-xt)/je)&&be("overflow"),xt+=(mn-wt)*je,wt=mn,jt=0;jt<Ue;++jt)if(lt=yt[jt],lt<wt&&++xt>Ae&&be("overflow"),lt==wt){for(Ft=xt,Yt=Oe;tn=Yt<=cn?Ie:Yt>=cn+Ze?Ze:Yt-cn,!(Ft<tn);Yt+=Oe)dt=Ft-tn,rt=Oe-tn,tt.push(ct(fe(tn+dt%rt,0))),Ft=ot(dt/rt);tt.push(ct(fe(Ft,0))),cn=ue(xt,je,zt==Ut),xt=0,++zt}++xt,++wt}return tt.join("")}function oe(yt){return we(yt,function(wt){return at.test(wt)?ee(wt.slice(4).toLowerCase()):wt})}function re(yt){return we(yt,function(wt){return _t.test(wt)?"xn--"+z(wt):wt})}var ae=typeof Le=="object"&&Le&&!Le.nodeType&&Le,le=typeof Be=="object"&&Be&&!Be.nodeType&&Be,me=typeof Ce=="object"&&Ce;me.global!==me&&me.window!==me&&me.self!==me||(xe=me);var ve,Pe,Ae=2147483647,Oe=36,Ie=1,Ze=26,qe=38,Je=700,mt=72,gt=128,Mt="-",at=/^xn--/,_t=/[^\x20-\x7E]/,ht=/[\x2E\u3002\uFF0E\uFF61]/g,Dt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ut=Oe-Ie,ot=Math.floor,ct=String.fromCharCode;if(ve={version:"1.4.1",ucs2:{decode:pe,encode:de},decode:ee,encode:z,toASCII:re,toUnicode:oe},typeof ke=="function"&&typeof ke.amd=="object"&&ke.amd)ke("punycode",function(){return ve});else if(ae&&le)if(Be.exports==ae)le.exports=ve;else for(Pe in ve)ve.hasOwnProperty(Pe)&&(ae[Pe]=ve[Pe]);else xe.punycode=ve})(this)}).call(this,typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(Se,Be,Le){"use strict";function Ce(be,ye){return Object.prototype.hasOwnProperty.call(be,ye)}Be.exports=function(be,ye,we,pe){ye=ye||"&",we=we||"=";var de={};if(typeof be!="string"||be.length===0)return de;var ge=/\+/g;be=be.split(ye);var fe=1e3;pe&&typeof pe.maxKeys=="number"&&(fe=pe.maxKeys);var ue=be.length;fe>0&&ue>fe&&(ue=fe);for(var ee=0;ee<ue;++ee){var z,oe,re,ae,le=be[ee].replace(ge,"%20"),me=le.indexOf(we);me>=0?(z=le.substr(0,me),oe=le.substr(me+1)):(z=le,oe=""),re=decodeURIComponent(z),ae=decodeURIComponent(oe),Ce(de,re)?xe(de[re])?de[re].push(ae):de[re]=[de[re],ae]:de[re]=ae}return de};var xe=Array.isArray||function(be){return Object.prototype.toString.call(be)==="[object Array]"}},{}],176:[function(Se,Be,Le){"use strict";function Ce(we,pe){if(we.map)return we.map(pe);for(var de=[],ge=0;ge<we.length;ge++)de.push(pe(we[ge],ge));return de}var xe=function(we){switch(typeof we){case"string":return we;case"boolean":return we?"true":"false";case"number":return isFinite(we)?we:"";default:return""}};Be.exports=function(we,pe,de,ge){return pe=pe||"&",de=de||"=",we===null&&(we=void 0),typeof we=="object"?Ce(ye(we),function(fe){var ue=encodeURIComponent(xe(fe))+de;return be(we[fe])?Ce(we[fe],function(ee){return ue+encodeURIComponent(xe(ee))}).join(pe):ue+encodeURIComponent(xe(we[fe]))}).join(pe):ge?encodeURIComponent(xe(ge))+de+encodeURIComponent(xe(we)):""};var be=Array.isArray||function(we){return Object.prototype.toString.call(we)==="[object Array]"},ye=Object.keys||function(we){var pe=[];for(var de in we)Object.prototype.hasOwnProperty.call(we,de)&&pe.push(de);return pe}},{}],177:[function(Se,Be,Le){"use strict";Le.decode=Le.parse=Se("./decode"),Le.encode=Le.stringify=Se("./encode")},{"./decode":175,"./encode":176}],178:[function(Se,Be,Le){Be.exports=Se("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(Se,Be,Le){"use strict";function Ce(re){if(!(this instanceof Ce))return new Ce(re);fe.call(this,re),ue.call(this,re),re&&re.readable===!1&&(this.readable=!1),re&&re.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,re&&re.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",xe)}function xe(){this.allowHalfOpen||this._writableState.ended||pe.nextTick(be,this)}function be(re){re.end()}var ye=Se("babel-runtime/core-js/object/keys"),we=function(re){return re&&re.__esModule?re:{default:re}}(ye),pe=Se("process-nextick-args"),de=we.default||function(re){var ae=[];for(var le in re)ae.push(le);return ae};Be.exports=Ce;var ge=Se("core-util-is");ge.inherits=Se("inherits");var fe=Se("./_stream_readable"),ue=Se("./_stream_writable");ge.inherits(Ce,fe);for(var ee=de(ue.prototype),z=0;z<ee.length;z++){var oe=ee[z];Ce.prototype[oe]||(Ce.prototype[oe]=ue.prototype[oe])}Object.defineProperty(Ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Ce.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(re){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=re,this._writableState.destroyed=re)}}),Ce.prototype._destroy=function(re,ae){this.push(null),this.end(),pe.nextTick(ae,re)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(Se,Be,Le){"use strict";function Ce(ye){if(!(this instanceof Ce))return new Ce(ye);xe.call(this,ye)}Be.exports=Ce;var xe=Se("./_stream_transform"),be=Se("core-util-is");be.inherits=Se("inherits"),be.inherits(Ce,xe),Ce.prototype._transform=function(ye,we,pe){pe(null,ye)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(Se,Be,Le){(function(Ce,xe){"use strict";function be(Ue){return xt.from(Ue)}function ye(Ue){return xt.isBuffer(Ue)||Ue instanceof zt}function we(Ue,je,rt){if(typeof Ue.prependListener=="function")return Ue.prependListener(je,rt);Ue._events&&Ue._events[je]?ct(Ue._events[je])?Ue._events[je].unshift(rt):Ue._events[je]=[rt,Ue._events[je]]:Ue.on(je,rt)}function pe(Ue,je){ot=ot||Se("./_stream_duplex"),Ue=Ue||{};var rt=je instanceof ot;this.objectMode=!!Ue.objectMode,rt&&(this.objectMode=this.objectMode||!!Ue.readableObjectMode);var dt=Ue.highWaterMark,tt=Ue.readableHighWaterMark,Ke=this.objectMode?16:16384;this.highWaterMark=dt||dt===0?dt:rt&&(tt||tt===0)?tt:Ke,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Ft,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=Ue.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ue.encoding&&(mn||(mn=Se("string_decoder/").StringDecoder),this.decoder=new mn(Ue.encoding),this.encoding=Ue.encoding)}function de(Ue){if(ot=ot||Se("./_stream_duplex"),!(this instanceof de))return new de(Ue);this._readableState=new pe(Ue,this),this.readable=!0,Ue&&(typeof Ue.read=="function"&&(this._read=Ue.read),typeof Ue.destroy=="function"&&(this._destroy=Ue.destroy)),wt.call(this)}function ge(Ue,je,rt,dt,tt){var Ke=Ue._readableState;if(je===null)Ke.reading=!1,re(Ue,Ke);else{var De;tt||(De=ue(Ke,je)),De?Ue.emit("error",De):Ke.objectMode||je&&je.length>0?(typeof je=="string"||Ke.objectMode||(0,Dt.default)(je)===xt.prototype||(je=be(je)),dt?Ke.endEmitted?Ue.emit("error",new Error("stream.unshift() after end event")):fe(Ue,Ke,je,!0):Ke.ended?Ue.emit("error",new Error("stream.push() after EOF")):(Ke.reading=!1,Ke.decoder&&!rt?(je=Ke.decoder.write(je),Ke.objectMode||je.length!==0?fe(Ue,Ke,je,!1):me(Ue,Ke)):fe(Ue,Ke,je,!1))):dt||(Ke.reading=!1)}return ee(Ke)}function fe(Ue,je,rt,dt){je.flowing&&je.length===0&&!je.sync?(Ue.emit("data",rt),Ue.read(0)):(je.length+=je.objectMode?1:rt.length,dt?je.buffer.unshift(rt):je.buffer.push(rt),je.needReadable&&ae(Ue)),me(Ue,je)}function ue(Ue,je){var rt;return ye(je)||typeof je=="string"||je===void 0||Ue.objectMode||(rt=new TypeError("Invalid non-string/buffer chunk")),rt}function ee(Ue){return!Ue.ended&&(Ue.needReadable||Ue.length<Ue.highWaterMark||Ue.length===0)}function z(Ue){return Ue>=lt?Ue=lt:(Ue--,Ue|=Ue>>>1,Ue|=Ue>>>2,Ue|=Ue>>>4,Ue|=Ue>>>8,Ue|=Ue>>>16,Ue++),Ue}function oe(Ue,je){return Ue<=0||je.length===0&&je.ended?0:je.objectMode?1:Ue!==Ue?je.flowing&&je.length?je.buffer.head.data.length:je.length:(Ue>je.highWaterMark&&(je.highWaterMark=z(Ue)),Ue<=je.length?Ue:je.ended?je.length:(je.needReadable=!0,0))}function re(Ue,je){if(!je.ended){if(je.decoder){var rt=je.decoder.end();rt&&rt.length&&(je.buffer.push(rt),je.length+=je.objectMode?1:rt.length)}je.ended=!0,ae(Ue)}}function ae(Ue){var je=Ue._readableState;je.needReadable=!1,je.emittedReadable||(jt("emitReadable",je.flowing),je.emittedReadable=!0,je.sync?ut.nextTick(le,Ue):le(Ue))}function le(Ue){jt("emit readable"),Ue.emit("readable"),Ze(Ue)}function me(Ue,je){je.readingMore||(je.readingMore=!0,ut.nextTick(ve,Ue,je))}function ve(Ue,je){for(var rt=je.length;!je.reading&&!je.flowing&&!je.ended&&je.length<je.highWaterMark&&(jt("maybeReadMore read 0"),Ue.read(0),rt!==je.length);)rt=je.length;je.readingMore=!1}function Pe(Ue){return function(){var je=Ue._readableState;jt("pipeOnDrain",je.awaitDrain),je.awaitDrain&&je.awaitDrain--,je.awaitDrain===0&&yt(Ue,"data")&&(je.flowing=!0,Ze(Ue))}}function Ae(Ue){jt("readable nexttick read 0"),Ue.read(0)}function Oe(Ue,je){je.resumeScheduled||(je.resumeScheduled=!0,ut.nextTick(Ie,Ue,je))}function Ie(Ue,je){je.reading||(jt("resume read 0"),Ue.read(0)),je.resumeScheduled=!1,je.awaitDrain=0,Ue.emit("resume"),Ze(Ue),je.flowing&&!je.reading&&Ue.read(0)}function Ze(Ue){var je=Ue._readableState;for(jt("flow",je.flowing);je.flowing&&Ue.read()!==null;);}function qe(Ue,je){if(je.length===0)return null;var rt;return je.objectMode?rt=je.buffer.shift():!Ue||Ue>=je.length?(rt=je.decoder?je.buffer.join(""):je.buffer.length===1?je.buffer.head.data:je.buffer.concat(je.length),je.buffer.clear()):rt=Je(Ue,je.buffer,je.decoder),rt}function Je(Ue,je,rt){var dt;return Ue<je.head.data.length?(dt=je.head.data.slice(0,Ue),je.head.data=je.head.data.slice(Ue)):dt=Ue===je.head.data.length?je.shift():rt?mt(Ue,je):gt(Ue,je),dt}function mt(Ue,je){var rt=je.head,dt=1,tt=rt.data;for(Ue-=tt.length;rt=rt.next;){var Ke=rt.data,De=Ue>Ke.length?Ke.length:Ue;if(De===Ke.length?tt+=Ke:tt+=Ke.slice(0,Ue),(Ue-=De)===0){De===Ke.length?(++dt,rt.next?je.head=rt.next:je.head=je.tail=null):(je.head=rt,rt.data=Ke.slice(De));break}++dt}return je.length-=dt,tt}function gt(Ue,je){var rt=xt.allocUnsafe(Ue),dt=je.head,tt=1;for(dt.data.copy(rt),Ue-=dt.data.length;dt=dt.next;){var Ke=dt.data,De=Ue>Ke.length?Ke.length:Ue;if(Ke.copy(rt,rt.length-Ue,0,De),(Ue-=De)===0){De===Ke.length?(++tt,dt.next?je.head=dt.next:je.head=je.tail=null):(je.head=dt,dt.data=Ke.slice(De));break}++tt}return je.length-=tt,rt}function Mt(Ue){var je=Ue._readableState;if(je.length>0)throw new Error('"endReadable()" called on non-empty stream');je.endEmitted||(je.ended=!0,ut.nextTick(at,je,Ue))}function at(Ue,je){Ue.endEmitted||Ue.length!==0||(Ue.endEmitted=!0,je.readable=!1,je.emit("end"))}function _t(Ue,je){for(var rt=0,dt=Ue.length;rt<dt;rt++)if(Ue[rt]===je)return rt;return-1}var ht=Se("babel-runtime/core-js/object/get-prototype-of"),Dt=function(Ue){return Ue&&Ue.__esModule?Ue:{default:Ue}}(ht),ut=Se("process-nextick-args");Be.exports=de;var ot,ct=Se("isarray");de.ReadableState=pe;var yt=(Se("events").EventEmitter,function(Ue,je){return Ue.listeners(je).length}),wt=Se("./internal/streams/stream"),xt=Se("safe-buffer").Buffer,zt=xe.Uint8Array||function(){},Ut=Se("core-util-is");Ut.inherits=Se("inherits");var cn=Se("util"),jt=void 0;jt=cn&&cn.debuglog?cn.debuglog("stream"):function(){};var mn,Ft=Se("./internal/streams/BufferList"),Yt=Se("./internal/streams/destroy");Ut.inherits(de,wt);var tn=["error","close","destroy","pause","resume"];Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(Ue){this._readableState&&(this._readableState.destroyed=Ue)}}),de.prototype.destroy=Yt.destroy,de.prototype._undestroy=Yt.undestroy,de.prototype._destroy=function(Ue,je){this.push(null),je(Ue)},de.prototype.push=function(Ue,je){var rt,dt=this._readableState;return dt.objectMode?rt=!0:typeof Ue=="string"&&(je=je||dt.defaultEncoding,je!==dt.encoding&&(Ue=xt.from(Ue,je),je=""),rt=!0),ge(this,Ue,je,!1,rt)},de.prototype.unshift=function(Ue){return ge(this,Ue,null,!0,!1)},de.prototype.isPaused=function(){return this._readableState.flowing===!1},de.prototype.setEncoding=function(Ue){return mn||(mn=Se("string_decoder/").StringDecoder),this._readableState.decoder=new mn(Ue),this._readableState.encoding=Ue,this};var lt=8388608;de.prototype.read=function(Ue){jt("read",Ue),Ue=parseInt(Ue,10);var je=this._readableState,rt=Ue;if(Ue!==0&&(je.emittedReadable=!1),Ue===0&&je.needReadable&&(je.length>=je.highWaterMark||je.ended))return jt("read: emitReadable",je.length,je.ended),je.length===0&&je.ended?Mt(this):ae(this),null;if((Ue=oe(Ue,je))===0&&je.ended)return je.length===0&&Mt(this),null;var dt=je.needReadable;jt("need readable",dt),(je.length===0||je.length-Ue<je.highWaterMark)&&(dt=!0,jt("length less than watermark",dt)),je.ended||je.reading?(dt=!1,jt("reading or ended",dt)):dt&&(jt("do read"),je.reading=!0,je.sync=!0,je.length===0&&(je.needReadable=!0),this._read(je.highWaterMark),je.sync=!1,je.reading||(Ue=oe(rt,je)));var tt;return tt=Ue>0?qe(Ue,je):null,tt===null?(je.needReadable=!0,Ue=0):je.length-=Ue,je.length===0&&(je.ended||(je.needReadable=!0),rt!==Ue&&je.ended&&Mt(this)),tt!==null&&this.emit("data",tt),tt},de.prototype._read=function(Ue){this.emit("error",new Error("_read() is not implemented"))},de.prototype.pipe=function(Ue,je){function rt(En,Sn){jt("onunpipe"),En===Ve&&Sn&&Sn.hasUnpiped===!1&&(Sn.hasUnpiped=!0,tt())}function dt(){jt("onend"),Ue.end()}function tt(){jt("cleanup"),Ue.removeListener("close",ze),Ue.removeListener("finish",$e),Ue.removeListener("drain",Xt),Ue.removeListener("error",De),Ue.removeListener("unpipe",rt),Ve.removeListener("end",dt),Ve.removeListener("end",We),Ve.removeListener("data",Ke),Rt=!0,!pt.awaitDrain||Ue._writableState&&!Ue._writableState.needDrain||Xt()}function Ke(En){jt("ondata"),fn=!1,Ue.write(En)!==!1||fn||((pt.pipesCount===1&&pt.pipes===Ue||pt.pipesCount>1&&_t(pt.pipes,Ue)!==-1)&&!Rt&&(jt("false write response, pause",Ve._readableState.awaitDrain),Ve._readableState.awaitDrain++,fn=!0),Ve.pause())}function De(En){jt("onerror",En),We(),Ue.removeListener("error",De),yt(Ue,"error")===0&&Ue.emit("error",En)}function ze(){Ue.removeListener("finish",$e),We()}function $e(){jt("onfinish"),Ue.removeListener("close",ze),We()}function We(){jt("unpipe"),Ve.unpipe(Ue)}var Ve=this,pt=this._readableState;switch(pt.pipesCount){case 0:pt.pipes=Ue;break;case 1:pt.pipes=[pt.pipes,Ue];break;default:pt.pipes.push(Ue)}pt.pipesCount+=1,jt("pipe count=%d opts=%j",pt.pipesCount,je);var Lt=(!je||je.end!==!1)&&Ue!==Ce.stdout&&Ue!==Ce.stderr,on=Lt?dt:We;pt.endEmitted?ut.nextTick(on):Ve.once("end",on),Ue.on("unpipe",rt);var Xt=Pe(Ve);Ue.on("drain",Xt);var Rt=!1,fn=!1;return Ve.on("data",Ke),we(Ue,"error",De),Ue.once("close",ze),Ue.once("finish",$e),Ue.emit("pipe",Ve),pt.flowing||(jt("pipe resume"),Ve.resume()),Ue},de.prototype.unpipe=function(Ue){var je=this._readableState,rt={hasUnpiped:!1};if(je.pipesCount===0)return this;if(je.pipesCount===1)return Ue&&Ue!==je.pipes?this:(Ue||(Ue=je.pipes),je.pipes=null,je.pipesCount=0,je.flowing=!1,Ue&&Ue.emit("unpipe",this,rt),this);if(!Ue){var dt=je.pipes,tt=je.pipesCount;je.pipes=null,je.pipesCount=0,je.flowing=!1;for(var Ke=0;Ke<tt;Ke++)dt[Ke].emit("unpipe",this,rt);return this}var De=_t(je.pipes,Ue);return De===-1?this:(je.pipes.splice(De,1),je.pipesCount-=1,je.pipesCount===1&&(je.pipes=je.pipes[0]),Ue.emit("unpipe",this,rt),this)},de.prototype.on=function(Ue,je){var rt=wt.prototype.on.call(this,Ue,je);if(Ue==="data")this._readableState.flowing!==!1&&this.resume();else if(Ue==="readable"){var dt=this._readableState;dt.endEmitted||dt.readableListening||(dt.readableListening=dt.needReadable=!0,dt.emittedReadable=!1,dt.reading?dt.length&&ae(this):ut.nextTick(Ae,this))}return rt},de.prototype.addListener=de.prototype.on,de.prototype.resume=function(){var Ue=this._readableState;return Ue.flowing||(jt("resume"),Ue.flowing=!0,Oe(this,Ue)),this},de.prototype.pause=function(){return jt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(jt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},de.prototype.wrap=function(Ue){var je=this,rt=this._readableState,dt=!1;Ue.on("end",function(){if(jt("wrapped end"),rt.decoder&&!rt.ended){var De=rt.decoder.end();De&&De.length&&je.push(De)}je.push(null)}),Ue.on("data",function(De){jt("wrapped data"),rt.decoder&&(De=rt.decoder.write(De)),(!rt.objectMode||De!=null)&&(rt.objectMode||De&&De.length)&&(je.push(De)||(dt=!0,Ue.pause()))});for(var tt in Ue)this[tt]===void 0&&typeof Ue[tt]=="function"&&(this[tt]=function(De){return function(){return Ue[De].apply(Ue,arguments)}}(tt));for(var Ke=0;Ke<tn.length;Ke++)Ue.on(tn[Ke],this.emit.bind(this,tn[Ke]));return this._read=function(De){jt("wrapped _read",De),dt&&(dt=!1,Ue.resume())},this},Object.defineProperty(de.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),de._fromList=qe}).call(this,Se("_process"),typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(Se,Be,Le){"use strict";function Ce(de,ge){var fe=this._transformState;fe.transforming=!1;var ue=fe.writecb;if(!ue)return this.emit("error",new Error("write callback called multiple times"));fe.writechunk=null,fe.writecb=null,ge!=null&&this.push(ge),ue(de);var ee=this._readableState;ee.reading=!1,(ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}function xe(de){if(!(this instanceof xe))return new xe(de);we.call(this,de),this._transformState={afterTransform:Ce.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,de&&(typeof de.transform=="function"&&(this._transform=de.transform),typeof de.flush=="function"&&(this._flush=de.flush)),this.on("prefinish",be)}function be(){var de=this;typeof this._flush=="function"?this._flush(function(ge,fe){ye(de,ge,fe)}):ye(this,null,null)}function ye(de,ge,fe){if(ge)return de.emit("error",ge);if(fe!=null&&de.push(fe),de._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(de._transformState.transforming)throw new Error("Calling transform done when still transforming");return de.push(null)}Be.exports=xe;var we=Se("./_stream_duplex"),pe=Se("core-util-is");pe.inherits=Se("inherits"),pe.inherits(xe,we),xe.prototype.push=function(de,ge){return this._transformState.needTransform=!1,we.prototype.push.call(this,de,ge)},xe.prototype._transform=function(de,ge,fe){throw new Error("_transform() is not implemented")},xe.prototype._write=function(de,ge,fe){var ue=this._transformState;if(ue.writecb=fe,ue.writechunk=de,ue.writeencoding=ge,!ue.transforming){var ee=this._readableState;(ue.needTransform||ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}},xe.prototype._read=function(de){var ge=this._transformState;ge.writechunk!==null&&ge.writecb&&!ge.transforming?(ge.transforming=!0,this._transform(ge.writechunk,ge.writeencoding,ge.afterTransform)):ge.needTransform=!0},xe.prototype._destroy=function(de,ge){var fe=this;we.prototype._destroy.call(this,de,function(ue){ge(ue),fe.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(Se,Be,Le){(function(Ce,xe){"use strict";function be(Yt){return Yt&&Yt.__esModule?Yt:{default:Yt}}function ye(Yt){var tn=this;this.next=null,this.entry=null,this.finish=function(){mt(tn,Yt)}}function we(Yt){return cn.from(Yt)}function pe(Yt){return cn.isBuffer(Yt)||Yt instanceof jt}function de(){}function ge(Yt,tn){yt=yt||Se("./_stream_duplex"),Yt=Yt||{};var lt=tn instanceof yt;this.objectMode=!!Yt.objectMode,lt&&(this.objectMode=this.objectMode||!!Yt.writableObjectMode);var Ue=Yt.highWaterMark,je=Yt.writableHighWaterMark,rt=this.objectMode?16:16384;this.highWaterMark=Ue||Ue===0?Ue:lt&&(je||je===0)?je:rt,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 dt=Yt.decodeStrings===!1;this.decodeStrings=!dt,this.defaultEncoding=Yt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(tt){me(tn,tt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ye(this)}function fe(Yt){if(yt=yt||Se("./_stream_duplex"),!(Ft.call(fe,this)||this instanceof yt))return new fe(Yt);this._writableState=new ge(Yt,this),this.writable=!0,Yt&&(typeof Yt.write=="function"&&(this._write=Yt.write),typeof Yt.writev=="function"&&(this._writev=Yt.writev),typeof Yt.destroy=="function"&&(this._destroy=Yt.destroy),typeof Yt.final=="function"&&(this._final=Yt.final)),Ut.call(this)}function ue(Yt,tn){var lt=new Error("write after end");Yt.emit("error",lt),ct.nextTick(tn,lt)}function ee(Yt,tn,lt,Ue){var je=!0,rt=!1;return lt===null?rt=new TypeError("May not write null values to stream"):typeof lt=="string"||lt===void 0||tn.objectMode||(rt=new TypeError("Invalid non-string/buffer chunk")),rt&&(Yt.emit("error",rt),ct.nextTick(Ue,rt),je=!1),je}function z(Yt,tn,lt){return Yt.objectMode||Yt.decodeStrings===!1||typeof tn!="string"||(tn=cn.from(tn,lt)),tn}function oe(Yt,tn,lt,Ue,je,rt){if(!lt){var dt=z(tn,Ue,je);Ue!==dt&&(lt=!0,je="buffer",Ue=dt)}var tt=tn.objectMode?1:Ue.length;tn.length+=tt;var Ke=tn.length<tn.highWaterMark;if(Ke||(tn.needDrain=!0),tn.writing||tn.corked){var De=tn.lastBufferedRequest;tn.lastBufferedRequest={chunk:Ue,encoding:je,isBuf:lt,callback:rt,next:null},De?De.next=tn.lastBufferedRequest:tn.bufferedRequest=tn.lastBufferedRequest,tn.bufferedRequestCount+=1}else re(Yt,tn,!1,tt,Ue,je,rt);return Ke}function re(Yt,tn,lt,Ue,je,rt,dt){tn.writelen=Ue,tn.writecb=dt,tn.writing=!0,tn.sync=!0,lt?Yt._writev(je,tn.onwrite):Yt._write(je,rt,tn.onwrite),tn.sync=!1}function ae(Yt,tn,lt,Ue,je){--tn.pendingcb,lt?(ct.nextTick(je,Ue),ct.nextTick(qe,Yt,tn),Yt._writableState.errorEmitted=!0,Yt.emit("error",Ue)):(je(Ue),Yt._writableState.errorEmitted=!0,Yt.emit("error",Ue),qe(Yt,tn))}function le(Yt){Yt.writing=!1,Yt.writecb=null,Yt.length-=Yt.writelen,Yt.writelen=0}function me(Yt,tn){var lt=Yt._writableState,Ue=lt.sync,je=lt.writecb;if(le(lt),tn)ae(Yt,lt,Ue,tn,je);else{var rt=Oe(lt);rt||lt.corked||lt.bufferProcessing||!lt.bufferedRequest||Ae(Yt,lt),Ue?wt(ve,Yt,lt,rt,je):ve(Yt,lt,rt,je)}}function ve(Yt,tn,lt,Ue){lt||Pe(Yt,tn),tn.pendingcb--,Ue(),qe(Yt,tn)}function Pe(Yt,tn){tn.length===0&&tn.needDrain&&(tn.needDrain=!1,Yt.emit("drain"))}function Ae(Yt,tn){tn.bufferProcessing=!0;var lt=tn.bufferedRequest;if(Yt._writev&<&<.next){var Ue=tn.bufferedRequestCount,je=new Array(Ue),rt=tn.corkedRequestsFree;rt.entry=lt;for(var dt=0,tt=!0;lt;)je[dt]=lt,lt.isBuf||(tt=!1),lt=lt.next,dt+=1;je.allBuffers=tt,re(Yt,tn,!0,tn.length,je,"",rt.finish),tn.pendingcb++,tn.lastBufferedRequest=null,rt.next?(tn.corkedRequestsFree=rt.next,rt.next=null):tn.corkedRequestsFree=new ye(tn),tn.bufferedRequestCount=0}else{for(;lt;){var Ke=lt.chunk,De=lt.encoding,ze=lt.callback;if(re(Yt,tn,!1,tn.objectMode?1:Ke.length,Ke,De,ze),lt=lt.next,tn.bufferedRequestCount--,tn.writing)break}lt===null&&(tn.lastBufferedRequest=null)}tn.bufferedRequest=lt,tn.bufferProcessing=!1}function Oe(Yt){return Yt.ending&&Yt.length===0&&Yt.bufferedRequest===null&&!Yt.finished&&!Yt.writing}function Ie(Yt,tn){Yt._final(function(lt){tn.pendingcb--,lt&&Yt.emit("error",lt),tn.prefinished=!0,Yt.emit("prefinish"),qe(Yt,tn)})}function Ze(Yt,tn){tn.prefinished||tn.finalCalled||(typeof Yt._final=="function"?(tn.pendingcb++,tn.finalCalled=!0,ct.nextTick(Ie,Yt,tn)):(tn.prefinished=!0,Yt.emit("prefinish")))}function qe(Yt,tn){var lt=Oe(tn);return lt&&(Ze(Yt,tn),tn.pendingcb===0&&(tn.finished=!0,Yt.emit("finish"))),lt}function Je(Yt,tn,lt){tn.ending=!0,qe(Yt,tn),lt&&(tn.finished?ct.nextTick(lt):Yt.once("finish",lt)),tn.ended=!0,Yt.writable=!1}function mt(Yt,tn,lt){var Ue=Yt.entry;for(Yt.entry=null;Ue;){var je=Ue.callback;tn.pendingcb--,je(lt),Ue=Ue.next}tn.corkedRequestsFree?tn.corkedRequestsFree.next=Yt:tn.corkedRequestsFree=Yt}var gt=Se("babel-runtime/core-js/object/define-property"),Mt=be(gt),at=Se("babel-runtime/core-js/symbol/has-instance"),_t=be(at),ht=Se("babel-runtime/core-js/symbol"),Dt=be(ht),ut=Se("babel-runtime/core-js/set-immediate"),ot=be(ut),ct=Se("process-nextick-args");Be.exports=fe;var yt,wt=!Ce.browser&&["v0.10","v0.9."].indexOf(Ce.version.slice(0,5))>-1?ot.default:ct.nextTick;fe.WritableState=ge;var xt=Se("core-util-is");xt.inherits=Se("inherits");var zt={deprecate:Se("util-deprecate")},Ut=Se("./internal/streams/stream"),cn=Se("safe-buffer").Buffer,jt=xe.Uint8Array||function(){},mn=Se("./internal/streams/destroy");xt.inherits(fe,Ut),ge.prototype.getBuffer=function(){for(var Yt=this.bufferedRequest,tn=[];Yt;)tn.push(Yt),Yt=Yt.next;return tn},function(){try{Object.defineProperty(ge.prototype,"buffer",{get:zt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Yt){}}();var Ft;typeof Dt.default=="function"&&_t.default&&typeof Function.prototype[_t.default]=="function"?(Ft=Function.prototype[_t.default],(0,Mt.default)(fe,_t.default,{value:function(Yt){return!!Ft.call(this,Yt)||this===fe&&Yt&&Yt._writableState instanceof ge}})):Ft=function(Yt){return Yt instanceof this},fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},fe.prototype.write=function(Yt,tn,lt){var Ue=this._writableState,je=!1,rt=!Ue.objectMode&&pe(Yt);return rt&&!cn.isBuffer(Yt)&&(Yt=we(Yt)),typeof tn=="function"&&(lt=tn,tn=null),rt?tn="buffer":tn||(tn=Ue.defaultEncoding),typeof lt!="function"&&(lt=de),Ue.ended?ue(this,lt):(rt||ee(this,Ue,Yt,lt))&&(Ue.pendingcb++,je=oe(this,Ue,rt,Yt,tn,lt)),je},fe.prototype.cork=function(){this._writableState.corked++},fe.prototype.uncork=function(){var Yt=this._writableState;Yt.corked&&(Yt.corked--,Yt.writing||Yt.corked||Yt.finished||Yt.bufferProcessing||!Yt.bufferedRequest||Ae(this,Yt))},fe.prototype.setDefaultEncoding=function(Yt){if(typeof Yt=="string"&&(Yt=Yt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Yt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Yt);return this._writableState.defaultEncoding=Yt,this},Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),fe.prototype._write=function(Yt,tn,lt){lt(new Error("_write() is not implemented"))},fe.prototype._writev=null,fe.prototype.end=function(Yt,tn,lt){var Ue=this._writableState;typeof Yt=="function"?(lt=Yt,Yt=null,tn=null):typeof tn=="function"&&(lt=tn,tn=null),Yt!=null&&this.write(Yt,tn),Ue.corked&&(Ue.corked=1,this.uncork()),Ue.ending||Ue.finished||Je(this,Ue,lt)},Object.defineProperty(fe.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Yt){this._writableState&&(this._writableState.destroyed=Yt)}}),fe.prototype.destroy=mn.destroy,fe.prototype._undestroy=mn.undestroy,fe.prototype._destroy=function(Yt,tn){this.end(),tn(Yt)}}).call(this,Se("_process"),typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(Se,Be,Le){"use strict";function Ce(we,pe){if(!(we instanceof pe))throw new TypeError("Cannot call a class as a function")}function xe(we,pe,de){we.copy(pe,de)}var be=Se("safe-buffer").Buffer,ye=Se("util");Be.exports=function(){function we(){Ce(this,we),this.head=null,this.tail=null,this.length=0}return we.prototype.push=function(pe){var de={data:pe,next:null};this.length>0?this.tail.next=de:this.head=de,this.tail=de,++this.length},we.prototype.unshift=function(pe){var de={data:pe,next:this.head};this.length===0&&(this.tail=de),this.head=de,++this.length},we.prototype.shift=function(){if(this.length!==0){var pe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,pe}},we.prototype.clear=function(){this.head=this.tail=null,this.length=0},we.prototype.join=function(pe){if(this.length===0)return"";for(var de=this.head,ge=""+de.data;de=de.next;)ge+=pe+de.data;return ge},we.prototype.concat=function(pe){if(this.length===0)return be.alloc(0);if(this.length===1)return this.head.data;for(var de=be.allocUnsafe(pe>>>0),ge=this.head,fe=0;ge;)xe(ge.data,de,fe),fe+=ge.data.length,ge=ge.next;return de},we}(),ye&&ye.inspect&&ye.inspect.custom&&(Be.exports.prototype[ye.inspect.custom]=function(){var we=ye.inspect({length:this.length});return this.constructor.name+" "+we})},{"safe-buffer":193,util:36}],185:[function(Se,Be,Le){"use strict";function Ce(we,pe){var de=this,ge=this._readableState&&this._readableState.destroyed,fe=this._writableState&&this._writableState.destroyed;return ge||fe?(pe?pe(we):!we||this._writableState&&this._writableState.errorEmitted||ye.nextTick(be,this,we),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(we||null,function(ue){!pe&&ue?(ye.nextTick(be,de,ue),de._writableState&&(de._writableState.errorEmitted=!0)):pe&&pe(ue)}),this)}function xe(){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 be(we,pe){we.emit("error",pe)}var ye=Se("process-nextick-args");Be.exports={destroy:Ce,undestroy:xe}},{"process-nextick-args":172}],186:[function(Se,Be,Le){"use strict";Be.exports=Se("events").EventEmitter},{events:158}],187:[function(Se,Be,Le){Be.exports=Se("./readable").PassThrough},{"./readable":188}],188:[function(Se,Be,Le){Le=Be.exports=Se("./lib/_stream_readable.js"),Le.Stream=Le,Le.Readable=Le,Le.Writable=Se("./lib/_stream_writable.js"),Le.Duplex=Se("./lib/_stream_duplex.js"),Le.Transform=Se("./lib/_stream_transform.js"),Le.PassThrough=Se("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(Se,Be,Le){Be.exports=Se("./readable").Transform},{"./readable":188}],190:[function(Se,Be,Le){Be.exports=Se("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(Se,Be,Le){var Ce=function(){return this}()||Function("return this")(),xe=Ce.regeneratorRuntime&&Object.getOwnPropertyNames(Ce).indexOf("regeneratorRuntime")>=0,be=xe&&Ce.regeneratorRuntime;if(Ce.regeneratorRuntime=void 0,Be.exports=Se("./runtime"),xe)Ce.regeneratorRuntime=be;else try{delete Ce.regeneratorRuntime}catch(ye){Ce.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(Se,Be,Le){(function(Ce){"use strict";function xe(ot,ct,yt,wt){var xt=ct&&ct.prototype instanceof ye?ct:ye,zt=Object.create(xt.prototype),Ut=new oe(wt||[]);return zt._invoke=fe(ot,yt,Ut),zt}function be(ot,ct,yt){try{return{type:"normal",arg:ot.call(ct,yt)}}catch(wt){return{type:"throw",arg:wt}}}function ye(){}function we(){}function pe(){}function de(ot){["next","throw","return"].forEach(function(ct){ot[ct]=function(yt){return this._invoke(ct,yt)}})}function ge(ot){function ct(xt,zt,Ut,cn){var jt=be(ot[xt],ot,zt);if(jt.type!=="throw"){var mn=jt.arg,Ft=mn.value;return Ft&&typeof Ft=="object"&&ve.call(Ft,"__await")?Promise.resolve(Ft.__await).then(function(Yt){ct("next",Yt,Ut,cn)},function(Yt){ct("throw",Yt,Ut,cn)}):Promise.resolve(Ft).then(function(Yt){mn.value=Yt,Ut(mn)},cn)}cn(jt.arg)}function yt(xt,zt){function Ut(){return new Promise(function(cn,jt){ct(xt,zt,cn,jt)})}return wt=wt?wt.then(Ut,Ut):Ut()}var wt;this._invoke=yt}function fe(ot,ct,yt){var wt=Je;return function(xt,zt){if(wt===gt)throw new Error("Generator is already running");if(wt===Mt){if(xt==="throw")throw zt;return ae()}for(yt.method=xt,yt.arg=zt;;){var Ut=yt.delegate;if(Ut){var cn=ue(Ut,yt);if(cn){if(cn===at)continue;return cn}}if(yt.method==="next")yt.sent=yt._sent=yt.arg;else if(yt.method==="throw"){if(wt===Je)throw wt=Mt,yt.arg;yt.dispatchException(yt.arg)}else yt.method==="return"&&yt.abrupt("return",yt.arg);wt=gt;var jt=be(ot,ct,yt);if(jt.type==="normal"){if(wt=yt.done?Mt:mt,jt.arg===at)continue;return{value:jt.arg,done:yt.done}}jt.type==="throw"&&(wt=Mt,yt.method="throw",yt.arg=jt.arg)}}}function ue(ot,ct){var yt=ot.iterator[ct.method];if(yt===le){if(ct.delegate=null,ct.method==="throw"){if(ot.iterator.return&&(ct.method="return",ct.arg=le,ue(ot,ct),ct.method==="throw"))return at;ct.method="throw",ct.arg=new TypeError("The iterator does not provide a 'throw' method")}return at}var wt=be(yt,ot.iterator,ct.arg);if(wt.type==="throw")return ct.method="throw",ct.arg=wt.arg,ct.delegate=null,at;var xt=wt.arg;return xt?xt.done?(ct[ot.resultName]=xt.value,ct.next=ot.nextLoc,ct.method!=="return"&&(ct.method="next",ct.arg=le),ct.delegate=null,at):xt:(ct.method="throw",ct.arg=new TypeError("iterator result is not an object"),ct.delegate=null,at)}function ee(ot){var ct={tryLoc:ot[0]};1 in ot&&(ct.catchLoc=ot[1]),2 in ot&&(ct.finallyLoc=ot[2],ct.afterLoc=ot[3]),this.tryEntries.push(ct)}function z(ot){var ct=ot.completion||{};ct.type="normal",delete ct.arg,ot.completion=ct}function oe(ot){this.tryEntries=[{tryLoc:"root"}],ot.forEach(ee,this),this.reset(!0)}function re(ot){if(ot){var ct=ot[Ae];if(ct)return ct.call(ot);if(typeof ot.next=="function")return ot;if(!isNaN(ot.length)){var yt=-1,wt=function xt(){for(;++yt<ot.length;)if(ve.call(ot,yt))return xt.value=ot[yt],xt.done=!1,xt;return xt.value=le,xt.done=!0,xt};return wt.next=wt}}return{next:ae}}function ae(){return{value:le,done:!0}}var le,me=Object.prototype,ve=me.hasOwnProperty,Pe=typeof Symbol=="function"?Symbol:{},Ae=Pe.iterator||"@@iterator",Oe=Pe.asyncIterator||"@@asyncIterator",Ie=Pe.toStringTag||"@@toStringTag",Ze=typeof Be=="object",qe=Ce.regeneratorRuntime;if(qe)return void(Ze&&(Be.exports=qe));qe=Ce.regeneratorRuntime=Ze?Be.exports:{},qe.wrap=xe;var Je="suspendedStart",mt="suspendedYield",gt="executing",Mt="completed",at={},_t={};_t[Ae]=function(){return this};var ht=Object.getPrototypeOf,Dt=ht&&ht(ht(re([])));Dt&&Dt!==me&&ve.call(Dt,Ae)&&(_t=Dt);var ut=pe.prototype=ye.prototype=Object.create(_t);we.prototype=ut.constructor=pe,pe.constructor=we,pe[Ie]=we.displayName="GeneratorFunction",qe.isGeneratorFunction=function(ot){var ct=typeof ot=="function"&&ot.constructor;return!!ct&&(ct===we||(ct.displayName||ct.name)==="GeneratorFunction")},qe.mark=function(ot){return Object.setPrototypeOf?Object.setPrototypeOf(ot,pe):(ot.__proto__=pe,Ie in ot||(ot[Ie]="GeneratorFunction")),ot.prototype=Object.create(ut),ot},qe.awrap=function(ot){return{__await:ot}},de(ge.prototype),ge.prototype[Oe]=function(){return this},qe.AsyncIterator=ge,qe.async=function(ot,ct,yt,wt){var xt=new ge(xe(ot,ct,yt,wt));return qe.isGeneratorFunction(ct)?xt:xt.next().then(function(zt){return zt.done?zt.value:xt.next()})},de(ut),ut[Ie]="Generator",ut[Ae]=function(){return this},ut.toString=function(){return"[object Generator]"},qe.keys=function(ot){var ct=[];for(var yt in ot)ct.push(yt);return ct.reverse(),function wt(){for(;ct.length;){var xt=ct.pop();if(xt in ot)return wt.value=xt,wt.done=!1,wt}return wt.done=!0,wt}},qe.values=re,oe.prototype={constructor:oe,reset:function(ot){if(this.prev=0,this.next=0,this.sent=this._sent=le,this.done=!1,this.delegate=null,this.method="next",this.arg=le,this.tryEntries.forEach(z),!ot)for(var ct in this)ct.charAt(0)==="t"&&ve.call(this,ct)&&!isNaN(+ct.slice(1))&&(this[ct]=le)},stop:function(){this.done=!0;var ot=this.tryEntries[0],ct=ot.completion;if(ct.type==="throw")throw ct.arg;return this.rval},dispatchException:function(ot){function ct(jt,mn){return zt.type="throw",zt.arg=ot,yt.next=jt,mn&&(yt.method="next",yt.arg=le),!!mn}if(this.done)throw ot;for(var yt=this,wt=this.tryEntries.length-1;wt>=0;--wt){var xt=this.tryEntries[wt],zt=xt.completion;if(xt.tryLoc==="root")return ct("end");if(xt.tryLoc<=this.prev){var Ut=ve.call(xt,"catchLoc"),cn=ve.call(xt,"finallyLoc");if(Ut&&cn){if(this.prev<xt.catchLoc)return ct(xt.catchLoc,!0);if(this.prev<xt.finallyLoc)return ct(xt.finallyLoc)}else if(Ut){if(this.prev<xt.catchLoc)return ct(xt.catchLoc,!0)}else{if(!cn)throw new Error("try statement without catch or finally");if(this.prev<xt.finallyLoc)return ct(xt.finallyLoc)}}}},abrupt:function(ot,ct){for(var yt=this.tryEntries.length-1;yt>=0;--yt){var wt=this.tryEntries[yt];if(wt.tryLoc<=this.prev&&ve.call(wt,"finallyLoc")&&this.prev<wt.finallyLoc){var xt=wt;break}}xt&&(ot==="break"||ot==="continue")&&xt.tryLoc<=ct&&ct<=xt.finallyLoc&&(xt=null);var zt=xt?xt.completion:{};return zt.type=ot,zt.arg=ct,xt?(this.method="next",this.next=xt.finallyLoc,at):this.complete(zt)},complete:function(ot,ct){if(ot.type==="throw")throw ot.arg;return ot.type==="break"||ot.type==="continue"?this.next=ot.arg:ot.type==="return"?(this.rval=this.arg=ot.arg,this.method="return",this.next="end"):ot.type==="normal"&&ct&&(this.next=ct),at},finish:function(ot){for(var ct=this.tryEntries.length-1;ct>=0;--ct){var yt=this.tryEntries[ct];if(yt.finallyLoc===ot)return this.complete(yt.completion,yt.afterLoc),z(yt),at}},catch:function(ot){for(var ct=this.tryEntries.length-1;ct>=0;--ct){var yt=this.tryEntries[ct];if(yt.tryLoc===ot){var wt=yt.completion;if(wt.type==="throw"){var xt=wt.arg;z(yt)}return xt}}throw new Error("illegal catch attempt")},delegateYield:function(ot,ct,yt){return this.delegate={iterator:re(ot),resultName:ct,nextLoc:yt},this.method==="next"&&(this.arg=le),at}}})(function(){return this}()||Function("return this")())},{}],193:[function(Se,Be,Le){function Ce(we,pe){for(var de in we)pe[de]=we[de]}function xe(we,pe,de){return ye(we,pe,de)}var be=Se("buffer"),ye=be.Buffer;ye.from&&ye.alloc&&ye.allocUnsafe&&ye.allocUnsafeSlow?Be.exports=be:(Ce(be,Le),Le.Buffer=xe),Ce(ye,xe),xe.from=function(we,pe,de){if(typeof we=="number")throw new TypeError("Argument must not be a number");return ye(we,pe,de)},xe.alloc=function(we,pe,de){if(typeof we!="number")throw new TypeError("Argument must be a number");var ge=ye(we);return pe!==void 0?typeof de=="string"?ge.fill(pe,de):ge.fill(pe):ge.fill(0),ge},xe.allocUnsafe=function(we){if(typeof we!="number")throw new TypeError("Argument must be a number");return ye(we)},xe.allocUnsafeSlow=function(we){if(typeof we!="number")throw new TypeError("Argument must be a number");return be.SlowBuffer(we)}},{buffer:38}],194:[function(Se,Be,Le){(function(Ce){"use strict";function xe(ae){return ae&&ae.__esModule?ae:{default:ae}}var be=Se("babel-runtime/core-js/string/from-code-point"),ye=xe(be),we=Se("babel-runtime/core-js/json/stringify"),pe=xe(we),de=Se("babel-runtime/helpers/typeof"),ge=xe(de),fe=Se("babel-runtime/core-js/object/define-property"),ue=xe(fe),ee=Se("babel-runtime/core-js/object/keys"),z=xe(ee),oe=Se("babel-runtime/core-js/object/create"),re=xe(oe);(function(ae){function le(We,Ve){if(!(this instanceof le))return new le(We,Ve);var pt=this;ve(pt),pt.q=pt.c="",pt.bufferCheckPosition=ae.MAX_BUFFER_LENGTH,pt.opt=Ve||{},pt.opt.lowercase=pt.opt.lowercase||pt.opt.lowercasetags,pt.looseCase=pt.opt.lowercase?"toLowerCase":"toUpperCase",pt.tags=[],pt.closed=pt.closedRoot=pt.sawRoot=!1,pt.tag=pt.error=null,pt.strict=!!We,pt.noscript=!(!We&&!pt.opt.noscript),pt.state=ze.BEGIN,pt.strictEntities=pt.opt.strictEntities,pt.ENTITIES=pt.strictEntities?(0,re.default)(ae.XML_ENTITIES):(0,re.default)(ae.ENTITIES),pt.attribList=[],pt.opt.xmlns&&(pt.ns=(0,re.default)(rt)),pt.trackPosition=pt.opt.position!==!1,pt.trackPosition&&(pt.position=pt.line=pt.column=0),gt(pt,"onready")}function me(We){for(var Ve=Math.max(ae.MAX_BUFFER_LENGTH,10),pt=0,Lt=0,on=mn.length;Lt<on;Lt++){var Xt=We[mn[Lt]].length;if(Xt>Ve)switch(mn[Lt]){case"textNode":at(We);break;case"cdata":Mt(We,"oncdata",We.cdata),We.cdata="";break;case"script":Mt(We,"onscript",We.script),We.script="";break;default:ht(We,"Max buffer length exceeded: "+mn[Lt])}pt=Math.max(pt,Xt)}var Rt=ae.MAX_BUFFER_LENGTH-pt;We.bufferCheckPosition=Rt+We.position}function ve(We){for(var Ve=0,pt=mn.length;Ve<pt;Ve++)We[mn[Ve]]=""}function Pe(We){at(We),We.cdata!==""&&(Mt(We,"oncdata",We.cdata),We.cdata=""),We.script!==""&&(Mt(We,"onscript",We.script),We.script="")}function Ae(We,Ve){return new Oe(We,Ve)}function Oe(We,Ve){if(!(this instanceof Oe))return new Oe(We,Ve);Ft.apply(this),this._parser=new le(We,Ve),this.writable=!0,this.readable=!0;var pt=this;this._parser.onend=function(){pt.emit("end")},this._parser.onerror=function(Lt){pt.emit("error",Lt),pt._parser.error=null},this._decoder=null,Yt.forEach(function(Lt){(0,ue.default)(pt,"on"+Lt,{get:function(){return pt._parser["on"+Lt]},set:function(on){if(!on)return pt.removeAllListeners(Lt),pt._parser["on"+Lt]=on,on;pt.on(Lt,on)},enumerable:!0,configurable:!1})})}function Ie(We){return We===" "||We===`
|
|
|
`||We==="\r"||We===" "}function Ze(We){return We==='"'||We==="'"}function qe(We){return We===">"||Ie(We)}function Je(We,Ve){return We.test(Ve)}function mt(We,Ve){return!Je(We,Ve)}function gt(We,Ve,pt){We[Ve]&&We[Ve](pt)}function Mt(We,Ve,pt){We.textNode&&at(We),gt(We,Ve,pt)}function at(We){We.textNode=_t(We.opt,We.textNode),We.textNode&>(We,"ontext",We.textNode),We.textNode=""}function _t(We,Ve){return We.trim&&(Ve=Ve.trim()),We.normalize&&(Ve=Ve.replace(/\s+/g," ")),Ve}function ht(We,Ve){return at(We),We.trackPosition&&(Ve+=`
|
|
|
Line: `+We.line+`
|
|
|
Column: `+We.column+`
|
|
|
Char: `+We.c),Ve=new Error(Ve),We.error=Ve,gt(We,"onerror",Ve),We}function Dt(We){return We.sawRoot&&!We.closedRoot&&ut(We,"Unclosed root tag"),We.state!==ze.BEGIN&&We.state!==ze.BEGIN_WHITESPACE&&We.state!==ze.TEXT&&ht(We,"Unexpected end"),at(We),We.c="",We.closed=!0,gt(We,"onend"),le.call(We,We.strict,We.opt),We}function ut(We,Ve){if((We===void 0?"undefined":(0,ge.default)(We))!=="object"||!(We instanceof le))throw new Error("bad call to strictFail");We.strict&&ht(We,Ve)}function ot(We){We.strict||(We.tagName=We.tagName[We.looseCase]());var Ve=We.tags[We.tags.length-1]||We,pt=We.tag={name:We.tagName,attributes:{}};We.opt.xmlns&&(pt.ns=Ve.ns),We.attribList.length=0,Mt(We,"onopentagstart",pt)}function ct(We,Ve){var pt=We.indexOf(":"),Lt=pt<0?["",We]:We.split(":"),on=Lt[0],Xt=Lt[1];return Ve&&We==="xmlns"&&(on="xmlns",Xt=""),{prefix:on,local:Xt}}function yt(We){if(We.strict||(We.attribName=We.attribName[We.looseCase]()),We.attribList.indexOf(We.attribName)!==-1||We.tag.attributes.hasOwnProperty(We.attribName))return void(We.attribName=We.attribValue="");if(We.opt.xmlns){var Ve=ct(We.attribName,!0),pt=Ve.prefix,Lt=Ve.local;if(pt==="xmlns")if(Lt==="xml"&&We.attribValue!==Ue)ut(We,"xml: prefix must be bound to "+Ue+`
|
|
|
Actual: `+We.attribValue);else if(Lt==="xmlns"&&We.attribValue!==je)ut(We,"xmlns: prefix must be bound to "+je+`
|
|
|
Actual: `+We.attribValue);else{var on=We.tag,Xt=We.tags[We.tags.length-1]||We;on.ns===Xt.ns&&(on.ns=(0,re.default)(Xt.ns)),on.ns[Lt]=We.attribValue}We.attribList.push([We.attribName,We.attribValue])}else We.tag.attributes[We.attribName]=We.attribValue,Mt(We,"onattribute",{name:We.attribName,value:We.attribValue});We.attribName=We.attribValue=""}function wt(We,Ve){if(We.opt.xmlns){var pt=We.tag,Lt=ct(We.tagName);pt.prefix=Lt.prefix,pt.local=Lt.local,pt.uri=pt.ns[Lt.prefix]||"",pt.prefix&&!pt.uri&&(ut(We,"Unbound namespace prefix: "+(0,pe.default)(We.tagName)),pt.uri=Lt.prefix);var on=We.tags[We.tags.length-1]||We;pt.ns&&on.ns!==pt.ns&&(0,z.default)(pt.ns).forEach(function(Ni){Mt(We,"onopennamespace",{prefix:Ni,uri:pt.ns[Ni]})});for(var Xt=0,Rt=We.attribList.length;Xt<Rt;Xt++){var fn=We.attribList[Xt],En=fn[0],Sn=fn[1],dn=ct(En,!0),Zn=dn.prefix,vn=dn.local,Wn=Zn===""?"":pt.ns[Zn]||"",ri={name:En,value:Sn,prefix:Zn,local:vn,uri:Wn};Zn&&Zn!=="xmlns"&&!Wn&&(ut(We,"Unbound namespace prefix: "+(0,pe.default)(Zn)),ri.uri=Zn),We.tag.attributes[En]=ri,Mt(We,"onattribute",ri)}We.attribList.length=0}We.tag.isSelfClosing=!!Ve,We.sawRoot=!0,We.tags.push(We.tag),Mt(We,"onopentag",We.tag),Ve||(We.noscript||We.tagName.toLowerCase()!=="script"?We.state=ze.TEXT:We.state=ze.SCRIPT,We.tag=null,We.tagName=""),We.attribName=We.attribValue="",We.attribList.length=0}function xt(We){if(!We.tagName)return ut(We,"Weird empty close tag."),We.textNode+="</>",void(We.state=ze.TEXT);if(We.script){if(We.tagName!=="script")return We.script+="</"+We.tagName+">",We.tagName="",void(We.state=ze.SCRIPT);Mt(We,"onscript",We.script),We.script=""}var Ve=We.tags.length,pt=We.tagName;We.strict||(pt=pt[We.looseCase]());for(var Lt=pt;Ve--&&We.tags[Ve].name!==Lt;)ut(We,"Unexpected close tag");if(Ve<0)return ut(We,"Unmatched closing tag: "+We.tagName),We.textNode+="</"+We.tagName+">",void(We.state=ze.TEXT);We.tagName=pt;for(var on=We.tags.length;on-- >Ve;){var Xt=We.tag=We.tags.pop();We.tagName=We.tag.name,Mt(We,"onclosetag",We.tagName);var Rt={};for(var fn in Xt.ns)Rt[fn]=Xt.ns[fn];var En=We.tags[We.tags.length-1]||We;We.opt.xmlns&&Xt.ns!==En.ns&&(0,z.default)(Xt.ns).forEach(function(Sn){var dn=Xt.ns[Sn];Mt(We,"onclosenamespace",{prefix:Sn,uri:dn})})}Ve===0&&(We.closedRoot=!0),We.tagName=We.attribValue=We.attribName="",We.attribList.length=0,We.state=ze.TEXT}function zt(We){var Ve,pt=We.entity,Lt=pt.toLowerCase(),on="";return We.ENTITIES[pt]?We.ENTITIES[pt]:We.ENTITIES[Lt]?We.ENTITIES[Lt]:(pt=Lt,pt.charAt(0)==="#"&&(pt.charAt(1)==="x"?(pt=pt.slice(2),Ve=parseInt(pt,16),on=Ve.toString(16)):(pt=pt.slice(1),Ve=parseInt(pt,10),on=Ve.toString(10))),pt=pt.replace(/^0+/,""),isNaN(Ve)||on.toLowerCase()!==pt?(ut(We,"Invalid character entity"),"&"+We.entity+";"):(0,ye.default)(Ve))}function Ut(We,Ve){Ve==="<"?(We.state=ze.OPEN_WAKA,We.startTagPosition=We.position):Ie(Ve)||(ut(We,"Non-whitespace before first tag."),We.textNode=Ve,We.state=ze.TEXT)}function cn(We,Ve){var pt="";return Ve<We.length&&(pt=We.charAt(Ve)),pt}function jt(We){var Ve=this;if(this.error)throw this.error;if(Ve.closed)return ht(Ve,"Cannot write after close. Assign an onready handler.");if(We===null)return Dt(Ve);(We===void 0?"undefined":(0,ge.default)(We))==="object"&&(We=We.toString());for(var pt=0,Lt="";Lt=cn(We,pt++),Ve.c=Lt,!!Lt;)switch(Ve.trackPosition&&(Ve.position++,Lt===`
|
|
|
`?(Ve.line++,Ve.column=0):Ve.column++),Ve.state){case ze.BEGIN:if(Ve.state=ze.BEGIN_WHITESPACE,Lt==="\uFEFF")continue;Ut(Ve,Lt);continue;case ze.BEGIN_WHITESPACE:Ut(Ve,Lt);continue;case ze.TEXT:if(Ve.sawRoot&&!Ve.closedRoot){for(var on=pt-1;Lt&&Lt!=="<"&&Lt!=="&";)(Lt=cn(We,pt++))&&Ve.trackPosition&&(Ve.position++,Lt===`
|
|
|
`?(Ve.line++,Ve.column=0):Ve.column++);Ve.textNode+=We.substring(on,pt-1)}Lt!=="<"||Ve.sawRoot&&Ve.closedRoot&&!Ve.strict?(Ie(Lt)||Ve.sawRoot&&!Ve.closedRoot||ut(Ve,"Text data outside of root node."),Lt==="&"?Ve.state=ze.TEXT_ENTITY:Ve.textNode+=Lt):(Ve.state=ze.OPEN_WAKA,Ve.startTagPosition=Ve.position);continue;case ze.SCRIPT:Lt==="<"?Ve.state=ze.SCRIPT_ENDING:Ve.script+=Lt;continue;case ze.SCRIPT_ENDING:Lt==="/"?Ve.state=ze.CLOSE_TAG:(Ve.script+="<"+Lt,Ve.state=ze.SCRIPT);continue;case ze.OPEN_WAKA:if(Lt==="!")Ve.state=ze.SGML_DECL,Ve.sgmlDecl="";else if(!Ie(Lt))if(Je(dt,Lt))Ve.state=ze.OPEN_TAG,Ve.tagName=Lt;else if(Lt==="/")Ve.state=ze.CLOSE_TAG,Ve.tagName="";else if(Lt==="?")Ve.state=ze.PROC_INST,Ve.procInstName=Ve.procInstBody="";else{if(ut(Ve,"Unencoded <"),Ve.startTagPosition+1<Ve.position){var Xt=Ve.position-Ve.startTagPosition;Lt=new Array(Xt).join(" ")+Lt}Ve.textNode+="<"+Lt,Ve.state=ze.TEXT}continue;case ze.SGML_DECL:(Ve.sgmlDecl+Lt).toUpperCase()===tn?(Mt(Ve,"onopencdata"),Ve.state=ze.CDATA,Ve.sgmlDecl="",Ve.cdata=""):Ve.sgmlDecl+Lt==="--"?(Ve.state=ze.COMMENT,Ve.comment="",Ve.sgmlDecl=""):(Ve.sgmlDecl+Lt).toUpperCase()===lt?(Ve.state=ze.DOCTYPE,(Ve.doctype||Ve.sawRoot)&&ut(Ve,"Inappropriately located doctype declaration"),Ve.doctype="",Ve.sgmlDecl=""):Lt===">"?(Mt(Ve,"onsgmldeclaration",Ve.sgmlDecl),Ve.sgmlDecl="",Ve.state=ze.TEXT):(Ze(Lt)&&(Ve.state=ze.SGML_DECL_QUOTED),Ve.sgmlDecl+=Lt);continue;case ze.SGML_DECL_QUOTED:Lt===Ve.q&&(Ve.state=ze.SGML_DECL,Ve.q=""),Ve.sgmlDecl+=Lt;continue;case ze.DOCTYPE:Lt===">"?(Ve.state=ze.TEXT,Mt(Ve,"ondoctype",Ve.doctype),Ve.doctype=!0):(Ve.doctype+=Lt,Lt==="["?Ve.state=ze.DOCTYPE_DTD:Ze(Lt)&&(Ve.state=ze.DOCTYPE_QUOTED,Ve.q=Lt));continue;case ze.DOCTYPE_QUOTED:Ve.doctype+=Lt,Lt===Ve.q&&(Ve.q="",Ve.state=ze.DOCTYPE);continue;case ze.DOCTYPE_DTD:Ve.doctype+=Lt,Lt==="]"?Ve.state=ze.DOCTYPE:Ze(Lt)&&(Ve.state=ze.DOCTYPE_DTD_QUOTED,Ve.q=Lt);continue;case ze.DOCTYPE_DTD_QUOTED:Ve.doctype+=Lt,Lt===Ve.q&&(Ve.state=ze.DOCTYPE_DTD,Ve.q="");continue;case ze.COMMENT:Lt==="-"?Ve.state=ze.COMMENT_ENDING:Ve.comment+=Lt;continue;case ze.COMMENT_ENDING:Lt==="-"?(Ve.state=ze.COMMENT_ENDED,Ve.comment=_t(Ve.opt,Ve.comment),Ve.comment&&Mt(Ve,"oncomment",Ve.comment),Ve.comment=""):(Ve.comment+="-"+Lt,Ve.state=ze.COMMENT);continue;case ze.COMMENT_ENDED:Lt!==">"?(ut(Ve,"Malformed comment"),Ve.comment+="--"+Lt,Ve.state=ze.COMMENT):Ve.state=ze.TEXT;continue;case ze.CDATA:Lt==="]"?Ve.state=ze.CDATA_ENDING:Ve.cdata+=Lt;continue;case ze.CDATA_ENDING:Lt==="]"?Ve.state=ze.CDATA_ENDING_2:(Ve.cdata+="]"+Lt,Ve.state=ze.CDATA);continue;case ze.CDATA_ENDING_2:Lt===">"?(Ve.cdata&&Mt(Ve,"oncdata",Ve.cdata),Mt(Ve,"onclosecdata"),Ve.cdata="",Ve.state=ze.TEXT):Lt==="]"?Ve.cdata+="]":(Ve.cdata+="]]"+Lt,Ve.state=ze.CDATA);continue;case ze.PROC_INST:Lt==="?"?Ve.state=ze.PROC_INST_ENDING:Ie(Lt)?Ve.state=ze.PROC_INST_BODY:Ve.procInstName+=Lt;continue;case ze.PROC_INST_BODY:if(!Ve.procInstBody&&Ie(Lt))continue;Lt==="?"?Ve.state=ze.PROC_INST_ENDING:Ve.procInstBody+=Lt;continue;case ze.PROC_INST_ENDING:Lt===">"?(Mt(Ve,"onprocessinginstruction",{name:Ve.procInstName,body:Ve.procInstBody}),Ve.procInstName=Ve.procInstBody="",Ve.state=ze.TEXT):(Ve.procInstBody+="?"+Lt,Ve.state=ze.PROC_INST_BODY);continue;case ze.OPEN_TAG:Je(tt,Lt)?Ve.tagName+=Lt:(ot(Ve),Lt===">"?wt(Ve):Lt==="/"?Ve.state=ze.OPEN_TAG_SLASH:(Ie(Lt)||ut(Ve,"Invalid character in tag name"),Ve.state=ze.ATTRIB));continue;case ze.OPEN_TAG_SLASH:Lt===">"?(wt(Ve,!0),xt(Ve)):(ut(Ve,"Forward-slash in opening tag not followed by >"),Ve.state=ze.ATTRIB);continue;case ze.ATTRIB:if(Ie(Lt))continue;Lt===">"?wt(Ve):Lt==="/"?Ve.state=ze.OPEN_TAG_SLASH:Je(dt,Lt)?(Ve.attribName=Lt,Ve.attribValue="",Ve.state=ze.ATTRIB_NAME):ut(Ve,"Invalid attribute name");continue;case ze.ATTRIB_NAME:Lt==="="?Ve.state=ze.ATTRIB_VALUE:Lt===">"?(ut(Ve,"Attribute without value"),Ve.attribValue=Ve.attribName,yt(Ve),wt(Ve)):Ie(Lt)?Ve.state=ze.ATTRIB_NAME_SAW_WHITE:Je(tt,Lt)?Ve.attribName+=Lt:ut(Ve,"Invalid attribute name");continue;case ze.ATTRIB_NAME_SAW_WHITE:if(Lt==="=")Ve.state=ze.ATTRIB_VALUE;else{if(Ie(Lt))continue;ut(Ve,"Attribute without value"),Ve.tag.attributes[Ve.attribName]="",Ve.attribValue="",Mt(Ve,"onattribute",{name:Ve.attribName,value:""}),Ve.attribName="",Lt===">"?wt(Ve):Je(dt,Lt)?(Ve.attribName=Lt,Ve.state=ze.ATTRIB_NAME):(ut(Ve,"Invalid attribute name"),Ve.state=ze.ATTRIB)}continue;case ze.ATTRIB_VALUE:if(Ie(Lt))continue;Ze(Lt)?(Ve.q=Lt,Ve.state=ze.ATTRIB_VALUE_QUOTED):(ut(Ve,"Unquoted attribute value"),Ve.state=ze.ATTRIB_VALUE_UNQUOTED,Ve.attribValue=Lt);continue;case ze.ATTRIB_VALUE_QUOTED:if(Lt!==Ve.q){Lt==="&"?Ve.state=ze.ATTRIB_VALUE_ENTITY_Q:Ve.attribValue+=Lt;continue}yt(Ve),Ve.q="",Ve.state=ze.ATTRIB_VALUE_CLOSED;continue;case ze.ATTRIB_VALUE_CLOSED:Ie(Lt)?Ve.state=ze.ATTRIB:Lt===">"?wt(Ve):Lt==="/"?Ve.state=ze.OPEN_TAG_SLASH:Je(dt,Lt)?(ut(Ve,"No whitespace between attributes"),Ve.attribName=Lt,Ve.attribValue="",Ve.state=ze.ATTRIB_NAME):ut(Ve,"Invalid attribute name");continue;case ze.ATTRIB_VALUE_UNQUOTED:if(!qe(Lt)){Lt==="&"?Ve.state=ze.ATTRIB_VALUE_ENTITY_U:Ve.attribValue+=Lt;continue}yt(Ve),Lt===">"?wt(Ve):Ve.state=ze.ATTRIB;continue;case ze.CLOSE_TAG:if(Ve.tagName)Lt===">"?xt(Ve):Je(tt,Lt)?Ve.tagName+=Lt:Ve.script?(Ve.script+="</"+Ve.tagName,Ve.tagName="",Ve.state=ze.SCRIPT):(Ie(Lt)||ut(Ve,"Invalid tagname in closing tag"),Ve.state=ze.CLOSE_TAG_SAW_WHITE);else{if(Ie(Lt))continue;mt(dt,Lt)?Ve.script?(Ve.script+="</"+Lt,Ve.state=ze.SCRIPT):ut(Ve,"Invalid tagname in closing tag."):Ve.tagName=Lt}continue;case ze.CLOSE_TAG_SAW_WHITE:if(Ie(Lt))continue;Lt===">"?xt(Ve):ut(Ve,"Invalid characters in closing tag");continue;case ze.TEXT_ENTITY:case ze.ATTRIB_VALUE_ENTITY_Q:case ze.ATTRIB_VALUE_ENTITY_U:var Rt,fn;switch(Ve.state){case ze.TEXT_ENTITY:Rt=ze.TEXT,fn="textNode";break;case ze.ATTRIB_VALUE_ENTITY_Q:Rt=ze.ATTRIB_VALUE_QUOTED,fn="attribValue";break;case ze.ATTRIB_VALUE_ENTITY_U:Rt=ze.ATTRIB_VALUE_UNQUOTED,fn="attribValue"}Lt===";"?(Ve[fn]+=zt(Ve),Ve.entity="",Ve.state=Rt):Je(Ve.entity.length?De:Ke,Lt)?Ve.entity+=Lt:(ut(Ve,"Invalid character in entity name"),Ve[fn]+="&"+Ve.entity+Lt,Ve.entity="",Ve.state=Rt);continue;default:throw new Error(Ve,"Unknown state: "+Ve.state)}return Ve.position>=Ve.bufferCheckPosition&&me(Ve),Ve}ae.parser=function(We,Ve){return new le(We,Ve)},ae.SAXParser=le,ae.SAXStream=Oe,ae.createStream=Ae,ae.MAX_BUFFER_LENGTH=65536;var mn=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];ae.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],re.default||(Object.create=function(We){function Ve(){}return Ve.prototype=We,new Ve}),z.default||(Object.keys=function(We){var Ve=[];for(var pt in We)We.hasOwnProperty(pt)&&Ve.push(pt);return Ve}),le.prototype={end:function(){Dt(this)},write:jt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){Pe(this)}};var Ft;try{Ft=Se("stream").Stream}catch(We){Ft=function(){}}var Yt=ae.EVENTS.filter(function(We){return We!=="error"&&We!=="end"});Oe.prototype=(0,re.default)(Ft.prototype,{constructor:{value:Oe}}),Oe.prototype.write=function(We){if(typeof Ce=="function"&&typeof Ce.isBuffer=="function"&&Ce.isBuffer(We)){if(!this._decoder){var Ve=Se("string_decoder").StringDecoder;this._decoder=new Ve("utf8")}We=this._decoder.write(We)}return this._parser.write(We.toString()),this.emit("data",We),!0},Oe.prototype.end=function(We){return We&&We.length&&this.write(We),this._parser.end(),!0},Oe.prototype.on=function(We,Ve){var pt=this;return pt._parser["on"+We]||Yt.indexOf(We)===-1||(pt._parser["on"+We]=function(){var Lt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Lt.splice(0,0,We),pt.emit.apply(pt,Lt)}),Ft.prototype.on.call(pt,We,Ve)};var tn="[CDATA[",lt="DOCTYPE",Ue="http://www.w3.org/XML/1998/namespace",je="http://www.w3.org/2000/xmlns/",rt={xml:Ue,xmlns:je},dt=/[:_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]/,tt=/[:_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-]/,Ke=/[#:_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]/,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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,ze=0;ae.STATE={BEGIN:ze++,BEGIN_WHITESPACE:ze++,TEXT:ze++,TEXT_ENTITY:ze++,OPEN_WAKA:ze++,SGML_DECL:ze++,SGML_DECL_QUOTED:ze++,DOCTYPE:ze++,DOCTYPE_QUOTED:ze++,DOCTYPE_DTD:ze++,DOCTYPE_DTD_QUOTED:ze++,COMMENT_STARTING:ze++,COMMENT:ze++,COMMENT_ENDING:ze++,COMMENT_ENDED:ze++,CDATA:ze++,CDATA_ENDING:ze++,CDATA_ENDING_2:ze++,PROC_INST:ze++,PROC_INST_BODY:ze++,PROC_INST_ENDING:ze++,OPEN_TAG:ze++,OPEN_TAG_SLASH:ze++,ATTRIB:ze++,ATTRIB_NAME:ze++,ATTRIB_NAME_SAW_WHITE:ze++,ATTRIB_VALUE:ze++,ATTRIB_VALUE_QUOTED:ze++,ATTRIB_VALUE_CLOSED:ze++,ATTRIB_VALUE_UNQUOTED:ze++,ATTRIB_VALUE_ENTITY_Q:ze++,ATTRIB_VALUE_ENTITY_U:ze++,CLOSE_TAG:ze++,CLOSE_TAG_SAW_WHITE:ze++,SCRIPT:ze++,SCRIPT_ENDING:ze++},ae.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ae.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},(0,z.default)(ae.ENTITIES).forEach(function(We){var Ve=ae.ENTITIES[We],pt=typeof Ve=="number"?String.fromCharCode(Ve):Ve;ae.ENTITIES[We]=pt});for(var $e in ae.STATE)ae.STATE[ae.STATE[$e]]=$e;ze=ae.STATE,ye.default||function(){var We=String.fromCharCode,Ve=Math.floor,pt=function(){var Lt,on,Xt=[],Rt=-1,fn=arguments.length;if(!fn)return"";for(var En="";++Rt<fn;){var Sn=Number(arguments[Rt]);if(!isFinite(Sn)||Sn<0||Sn>1114111||Ve(Sn)!==Sn)throw RangeError("Invalid code point: "+Sn);Sn<=65535?Xt.push(Sn):(Sn-=65536,Lt=55296+(Sn>>10),on=Sn%1024+56320,Xt.push(Lt,on)),(Rt+1===fn||Xt.length>16384)&&(En+=We.apply(null,Xt),Xt.length=0)}return En};ue.default?Object.defineProperty(String,"fromCodePoint",{value:pt,configurable:!0,writable:!0}):String.fromCodePoint=pt}()})(Le===void 0?(void 0).sax={}:Le)}).call(this,Se("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(Se,Be,Le){function Ce(){xe.call(this)}Be.exports=Ce;var xe=Se("events").EventEmitter;Se("inherits")(Ce,xe),Ce.Readable=Se("readable-stream/readable.js"),Ce.Writable=Se("readable-stream/writable.js"),Ce.Duplex=Se("readable-stream/duplex.js"),Ce.Transform=Se("readable-stream/transform.js"),Ce.PassThrough=Se("readable-stream/passthrough.js"),Ce.Stream=Ce,Ce.prototype.pipe=function(be,ye){function we(oe){be.writable&&be.write(oe)===!1&&ee.pause&&ee.pause()}function pe(){ee.readable&&ee.resume&&ee.resume()}function de(){z||(z=!0,be.end())}function ge(){z||(z=!0,typeof be.destroy=="function"&&be.destroy())}function fe(oe){if(ue(),xe.listenerCount(this,"error")===0)throw oe}function ue(){ee.removeListener("data",we),be.removeListener("drain",pe),ee.removeListener("end",de),ee.removeListener("close",ge),ee.removeListener("error",fe),be.removeListener("error",fe),ee.removeListener("end",ue),ee.removeListener("close",ue),be.removeListener("close",ue)}var ee=this;ee.on("data",we),be.on("drain",pe),be._isStdio||ye&&ye.end===!1||(ee.on("end",de),ee.on("close",ge));var z=!1;return ee.on("error",fe),be.on("error",fe),ee.on("end",ue),ee.on("close",ue),be.on("close",ue),be.emit("pipe",ee),be}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(Se,Be,Le){(function(Ce){var xe=Se("./lib/request"),be=Se("./lib/response"),ye=Se("xtend"),we=Se("builtin-status-codes"),pe=Se("url"),de=Le;de.request=function(ge,fe){ge=typeof ge=="string"?pe.parse(ge):ye(ge);var ue=Ce.location.protocol.search(/^https?:$/)===-1?"http:":"",ee=ge.protocol||ue,z=ge.hostname||ge.host,oe=ge.port,re=ge.path||"/";z&&z.indexOf(":")!==-1&&(z="["+z+"]"),ge.url=(z?ee+"//"+z:"")+(oe?":"+oe:"")+re,ge.method=(ge.method||"GET").toUpperCase(),ge.headers=ge.headers||{};var ae=new xe(ge);return fe&&ae.on("response",fe),ae},de.get=function(ge,fe){var ue=de.request(ge,fe);return ue.end(),ue},de.ClientRequest=xe,de.IncomingMessage=be.IncomingMessage,de.Agent=function(){},de.Agent.defaultMaxSockets=4,de.globalAgent=new de.Agent,de.STATUS_CODES=we,de.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,typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(Se,Be,Le){(function(Ce){"use strict";function xe(){if(we!==void 0)return we;if(Ce.XMLHttpRequest){we=new Ce.XMLHttpRequest;try{we.open("GET",Ce.XDomainRequest?"/":"https://example.com")}catch(ge){we=null}}else we=null;return we}function be(ge){var fe=xe();if(!fe)return!1;try{return fe.responseType=ge,fe.responseType===ge}catch(ue){}return!1}function ye(ge){return typeof ge=="function"}Le.fetch=ye(Ce.fetch)&&ye(Ce.ReadableStream),Le.writableStream=ye(Ce.WritableStream),Le.abortController=ye(Ce.AbortController),Le.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Le.blobConstructor=!0}catch(ge){}var we,pe=Ce.ArrayBuffer!==void 0,de=pe&&ye(Ce.ArrayBuffer.prototype.slice);Le.arraybuffer=Le.fetch||pe&&be("arraybuffer"),Le.msstream=!Le.fetch&&de&&be("ms-stream"),Le.mozchunkedarraybuffer=!Le.fetch&&pe&&be("moz-chunked-arraybuffer"),Le.overrideMimeType=Le.fetch||!!xe()&&ye(xe().overrideMimeType),Le.vbArray=ye(Ce.VBArray),we=null}).call(this,typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(Se,Be,Le){(function(Ce,xe,be){"use strict";function ye(me,ve){return ge.fetch&&ve?"fetch":ge.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ge.msstream?"ms-stream":ge.arraybuffer&&me?"arraybuffer":ge.vbArray&&me?"text:vbarray":"text"}function we(me){try{var ve=me.status;return ve!==null&&ve!==0}catch(Pe){return!1}}var pe=Se("babel-runtime/core-js/object/keys"),de=function(me){return me&&me.__esModule?me:{default:me}}(pe),ge=Se("./capability"),fe=Se("inherits"),ue=Se("./response"),ee=Se("readable-stream"),z=Se("to-arraybuffer"),oe=ue.IncomingMessage,re=ue.readyStates,ae=Be.exports=function(me){var ve=this;ee.Writable.call(ve),ve._opts=me,ve._body=[],ve._headers={},me.auth&&ve.setHeader("Authorization","Basic "+new be(me.auth).toString("base64")),(0,de.default)(me.headers).forEach(function(Oe){ve.setHeader(Oe,me.headers[Oe])});var Pe,Ae=!0;if(me.mode==="disable-fetch"||"requestTimeout"in me&&!ge.abortController)Ae=!1,Pe=!0;else if(me.mode==="prefer-streaming")Pe=!1;else if(me.mode==="allow-wrong-content-type")Pe=!ge.overrideMimeType;else{if(me.mode&&me.mode!=="default"&&me.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");Pe=!0}ve._mode=ye(Pe,Ae),ve._fetchTimer=null,ve.on("finish",function(){ve._onFinish()})};fe(ae,ee.Writable),ae.prototype.setHeader=function(me,ve){var Pe=this,Ae=me.toLowerCase();le.indexOf(Ae)===-1&&(Pe._headers[Ae]={name:me,value:ve})},ae.prototype.getHeader=function(me){var ve=this._headers[me.toLowerCase()];return ve?ve.value:null},ae.prototype.removeHeader=function(me){delete this._headers[me.toLowerCase()]},ae.prototype._onFinish=function(){var me=this;if(!me._destroyed){var ve=me._opts,Pe=me._headers,Ae=null;ve.method!=="GET"&&ve.method!=="HEAD"&&(Ae=ge.arraybuffer?z(be.concat(me._body)):ge.blobConstructor?new xe.Blob(me._body.map(function(Je){return z(Je)}),{type:(Pe["content-type"]||{}).value||""}):be.concat(me._body).toString());var Oe=[];if((0,de.default)(Pe).forEach(function(Je){var mt=Pe[Je].name,gt=Pe[Je].value;Array.isArray(gt)?gt.forEach(function(Mt){Oe.push([mt,Mt])}):Oe.push([mt,gt])}),me._mode==="fetch"){var Ie=null;if(ge.abortController){var Ze=new AbortController;Ie=Ze.signal,me._fetchAbortController=Ze,"requestTimeout"in ve&&ve.requestTimeout!==0&&(me._fetchTimer=xe.setTimeout(function(){me.emit("requestTimeout"),me._fetchAbortController&&me._fetchAbortController.abort()},ve.requestTimeout))}xe.fetch(me._opts.url,{method:me._opts.method,headers:Oe,body:Ae||void 0,mode:"cors",credentials:ve.withCredentials?"include":"same-origin",signal:Ie}).then(function(Je){me._fetchResponse=Je,me._connect()},function(Je){xe.clearTimeout(me._fetchTimer),me._destroyed||me.emit("error",Je)})}else{var qe=me._xhr=new xe.XMLHttpRequest;try{qe.open(me._opts.method,me._opts.url,!0)}catch(Je){return void Ce.nextTick(function(){me.emit("error",Je)})}"responseType"in qe&&(qe.responseType=me._mode.split(":")[0]),"withCredentials"in qe&&(qe.withCredentials=!!ve.withCredentials),me._mode==="text"&&"overrideMimeType"in qe&&qe.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in ve&&(qe.timeout=ve.requestTimeout,qe.ontimeout=function(){me.emit("requestTimeout")}),Oe.forEach(function(Je){qe.setRequestHeader(Je[0],Je[1])}),me._response=null,qe.onreadystatechange=function(){switch(qe.readyState){case re.LOADING:case re.DONE:me._onXHRProgress()}},me._mode==="moz-chunked-arraybuffer"&&(qe.onprogress=function(){me._onXHRProgress()}),qe.onerror=function(){me._destroyed||me.emit("error",new Error("XHR error"))};try{qe.send(Ae)}catch(Je){return void Ce.nextTick(function(){me.emit("error",Je)})}}}},ae.prototype._onXHRProgress=function(){var me=this;we(me._xhr)&&!me._destroyed&&(me._response||me._connect(),me._response._onXHRProgress())},ae.prototype._connect=function(){var me=this;me._destroyed||(me._response=new oe(me._xhr,me._fetchResponse,me._mode,me._fetchTimer),me._response.on("error",function(ve){me.emit("error",ve)}),me.emit("response",me._response))},ae.prototype._write=function(me,ve,Pe){this._body.push(me),Pe()},ae.prototype.abort=ae.prototype.destroy=function(){var me=this;me._destroyed=!0,xe.clearTimeout(me._fetchTimer),me._response&&(me._response._destroyed=!0),me._xhr?me._xhr.abort():me._fetchAbortController&&me._fetchAbortController.abort()},ae.prototype.end=function(me,ve,Pe){var Ae=this;typeof me=="function"&&(Pe=me,me=void 0),ee.Writable.prototype.end.call(Ae,me,ve,Pe)},ae.prototype.flushHeaders=function(){},ae.prototype.setTimeout=function(){},ae.prototype.setNoDelay=function(){},ae.prototype.setSocketKeepAlive=function(){};var le=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,Se("_process"),typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},Se("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(Se,Be,Le){(function(Ce,xe,be){"use strict";var ye=Se("babel-runtime/core-js/promise"),we=function(ee){return ee&&ee.__esModule?ee:{default:ee}}(ye),pe=Se("./capability"),de=Se("inherits"),ge=Se("readable-stream"),fe=Le.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},ue=Le.IncomingMessage=function(ee,z,oe,re){var ae=this;if(ge.Readable.call(ae),ae._mode=oe,ae.headers={},ae.rawHeaders=[],ae.trailers={},ae.rawTrailers=[],ae.on("end",function(){Ce.nextTick(function(){ae.emit("close")})}),oe==="fetch"){if(ae._fetchResponse=z,ae.url=z.url,ae.statusCode=z.status,ae.statusMessage=z.statusText,z.headers.forEach(function(Ae,Oe){ae.headers[Oe.toLowerCase()]=Ae,ae.rawHeaders.push(Oe,Ae)}),pe.writableStream){var le=new WritableStream({write:function(Ae){return new we.default(function(Oe,Ie){ae._destroyed?Ie():ae.push(new be(Ae))?Oe():ae._resumeFetch=Oe})},close:function(){xe.clearTimeout(re),ae._destroyed||ae.push(null)},abort:function(Ae){ae._destroyed||ae.emit("error",Ae)}});try{return void z.body.pipeTo(le).catch(function(Ae){xe.clearTimeout(re),ae._destroyed||ae.emit("error",Ae)})}catch(Ae){}}var me=z.body.getReader();(function Ae(){me.read().then(function(Oe){if(!ae._destroyed){if(Oe.done)return xe.clearTimeout(re),void ae.push(null);ae.push(new be(Oe.value)),Ae()}}).catch(function(Oe){xe.clearTimeout(re),ae._destroyed||ae.emit("error",Oe)})})()}else if(ae._xhr=ee,ae._pos=0,ae.url=ee.responseURL,ae.statusCode=ee.status,ae.statusMessage=ee.statusText,ee.getAllResponseHeaders().split(/\r?\n/).forEach(function(Ae){var Oe=Ae.match(/^([^:]+):\s*(.*)/);if(Oe){var Ie=Oe[1].toLowerCase();Ie==="set-cookie"?(ae.headers[Ie]===void 0&&(ae.headers[Ie]=[]),ae.headers[Ie].push(Oe[2])):ae.headers[Ie]!==void 0?ae.headers[Ie]+=", "+Oe[2]:ae.headers[Ie]=Oe[2],ae.rawHeaders.push(Oe[1],Oe[2])}}),ae._charset="x-user-defined",!pe.overrideMimeType){var ve=ae.rawHeaders["mime-type"];if(ve){var Pe=ve.match(/;\s*charset=([^;])(;|$)/);Pe&&(ae._charset=Pe[1].toLowerCase())}ae._charset||(ae._charset="utf-8")}};de(ue,ge.Readable),ue.prototype._read=function(){var ee=this,z=ee._resumeFetch;z&&(ee._resumeFetch=null,z())},ue.prototype._onXHRProgress=function(){var ee=this,z=ee._xhr,oe=null;switch(ee._mode){case"text:vbarray":if(z.readyState!==fe.DONE)break;try{oe=new xe.VBArray(z.responseBody).toArray()}catch(ve){}if(oe!==null){ee.push(new be(oe));break}case"text":try{oe=z.responseText}catch(ve){ee._mode="text:vbarray";break}if(oe.length>ee._pos){var re=oe.substr(ee._pos);if(ee._charset==="x-user-defined"){for(var ae=new be(re.length),le=0;le<re.length;le++)ae[le]=255&re.charCodeAt(le);ee.push(ae)}else ee.push(re,ee._charset);ee._pos=oe.length}break;case"arraybuffer":if(z.readyState!==fe.DONE||!z.response)break;oe=z.response,ee.push(new be(new Uint8Array(oe)));break;case"moz-chunked-arraybuffer":if(oe=z.response,z.readyState!==fe.LOADING||!oe)break;ee.push(new be(new Uint8Array(oe)));break;case"ms-stream":if(oe=z.response,z.readyState!==fe.LOADING)break;var me=new xe.MSStreamReader;me.onprogress=function(){me.result.byteLength>ee._pos&&(ee.push(new be(new Uint8Array(me.result.slice(ee._pos)))),ee._pos=me.result.byteLength)},me.onload=function(){ee.push(null)},me.readAsArrayBuffer(oe)}ee._xhr.readyState===fe.DONE&&ee._mode!=="ms-stream"&&ee.push(null)}}).call(this,Se("_process"),typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},Se("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(Se,Be,Le){"use strict";function Ce(ve){if(!ve)return"utf8";for(var Pe;;)switch(ve){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 ve;default:if(Pe)return;ve=(""+ve).toLowerCase(),Pe=!0}}function xe(ve){var Pe=Ce(ve);if(typeof Pe!="string"&&(le.isEncoding===me||!me(ve)))throw new Error("Unknown encoding: "+ve);return Pe||ve}function be(ve){this.encoding=xe(ve);var Pe;switch(this.encoding){case"utf16le":this.text=ue,this.end=ee,Pe=4;break;case"utf8":this.fillLast=de,Pe=4;break;case"base64":this.text=z,this.end=oe,Pe=3;break;default:return this.write=re,void(this.end=ae)}this.lastNeed=0,this.lastTotal=0,this.lastChar=le.allocUnsafe(Pe)}function ye(ve){return ve<=127?0:ve>>5==6?2:ve>>4==14?3:ve>>3==30?4:ve>>6==2?-1:-2}function we(ve,Pe,Ae){var Oe=Pe.length-1;if(Oe<Ae)return 0;var Ie=ye(Pe[Oe]);return Ie>=0?(Ie>0&&(ve.lastNeed=Ie-1),Ie):--Oe<Ae||Ie===-2?0:(Ie=ye(Pe[Oe]))>=0?(Ie>0&&(ve.lastNeed=Ie-2),Ie):--Oe<Ae||Ie===-2?0:(Ie=ye(Pe[Oe]),Ie>=0?(Ie>0&&(Ie===2?Ie=0:ve.lastNeed=Ie-3),Ie):0)}function pe(ve,Pe,Ae){if((192&Pe[0])!=128)return ve.lastNeed=0,"\u951F\uFFFD";if(ve.lastNeed>1&&Pe.length>1){if((192&Pe[1])!=128)return ve.lastNeed=1,"\u951F\uFFFD";if(ve.lastNeed>2&&Pe.length>2&&(192&Pe[2])!=128)return ve.lastNeed=2,"\u951F\uFFFD"}}function de(ve){var Pe=this.lastTotal-this.lastNeed,Ae=pe(this,ve,Pe);return Ae!==void 0?Ae:this.lastNeed<=ve.length?(ve.copy(this.lastChar,Pe,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(ve.copy(this.lastChar,Pe,0,ve.length),void(this.lastNeed-=ve.length))}function ge(ve,Pe){var Ae=we(this,ve,Pe);if(!this.lastNeed)return ve.toString("utf8",Pe);this.lastTotal=Ae;var Oe=ve.length-(Ae-this.lastNeed);return ve.copy(this.lastChar,0,Oe),ve.toString("utf8",Pe,Oe)}function fe(ve){var Pe=ve&&ve.length?this.write(ve):"";return this.lastNeed?Pe+"\u951F\uFFFD":Pe}function ue(ve,Pe){if((ve.length-Pe)%2==0){var Ae=ve.toString("utf16le",Pe);if(Ae){var Oe=Ae.charCodeAt(Ae.length-1);if(Oe>=55296&&Oe<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=ve[ve.length-2],this.lastChar[1]=ve[ve.length-1],Ae.slice(0,-1)}return Ae}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=ve[ve.length-1],ve.toString("utf16le",Pe,ve.length-1)}function ee(ve){var Pe=ve&&ve.length?this.write(ve):"";if(this.lastNeed){var Ae=this.lastTotal-this.lastNeed;return Pe+this.lastChar.toString("utf16le",0,Ae)}return Pe}function z(ve,Pe){var Ae=(ve.length-Pe)%3;return Ae===0?ve.toString("base64",Pe):(this.lastNeed=3-Ae,this.lastTotal=3,Ae===1?this.lastChar[0]=ve[ve.length-1]:(this.lastChar[0]=ve[ve.length-2],this.lastChar[1]=ve[ve.length-1]),ve.toString("base64",Pe,ve.length-Ae))}function oe(ve){var Pe=ve&&ve.length?this.write(ve):"";return this.lastNeed?Pe+this.lastChar.toString("base64",0,3-this.lastNeed):Pe}function re(ve){return ve.toString(this.encoding)}function ae(ve){return ve&&ve.length?this.write(ve):""}var le=Se("safe-buffer").Buffer,me=le.isEncoding||function(ve){switch((ve=""+ve)&&ve.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}};Le.StringDecoder=be,be.prototype.write=function(ve){if(ve.length===0)return"";var Pe,Ae;if(this.lastNeed){if((Pe=this.fillLast(ve))===void 0)return"";Ae=this.lastNeed,this.lastNeed=0}else Ae=0;return Ae<ve.length?Pe?Pe+this.text(ve,Ae):this.text(ve,Ae):Pe||""},be.prototype.end=fe,be.prototype.text=ge,be.prototype.fillLast=function(ve){if(this.lastNeed<=ve.length)return ve.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);ve.copy(this.lastChar,this.lastTotal-this.lastNeed,0,ve.length),this.lastNeed-=ve.length}},{"safe-buffer":193}],201:[function(Se,Be,Le){(function(Ce,xe){function be(fe,ue){this._id=fe,this._clearFn=ue}var ye=Se("process/browser.js").nextTick,we=Function.prototype.apply,pe=Array.prototype.slice,de={},ge=0;Le.setTimeout=function(){return new be(we.call(setTimeout,window,arguments),clearTimeout)},Le.setInterval=function(){return new be(we.call(setInterval,window,arguments),clearInterval)},Le.clearTimeout=Le.clearInterval=function(fe){fe.close()},be.prototype.unref=be.prototype.ref=function(){},be.prototype.close=function(){this._clearFn.call(window,this._id)},Le.enroll=function(fe,ue){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=ue},Le.unenroll=function(fe){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=-1},Le._unrefActive=Le.active=function(fe){clearTimeout(fe._idleTimeoutId);var ue=fe._idleTimeout;ue>=0&&(fe._idleTimeoutId=setTimeout(function(){fe._onTimeout&&fe._onTimeout()},ue))},Le.setImmediate=typeof Ce=="function"?Ce:function(fe){var ue=ge++,ee=!(arguments.length<2)&&pe.call(arguments,1);return de[ue]=!0,ye(function(){de[ue]&&(ee?fe.apply(null,ee):fe.call(null),Le.clearImmediate(ue))}),ue},Le.clearImmediate=typeof xe=="function"?xe:function(fe){delete de[fe]}}).call(this,Se("timers").setImmediate,Se("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(Se,Be,Le){var Ce=Se("buffer").Buffer;Be.exports=function(xe){if(xe instanceof Uint8Array){if(xe.byteOffset===0&&xe.byteLength===xe.buffer.byteLength)return xe.buffer;if(typeof xe.buffer.slice=="function")return xe.buffer.slice(xe.byteOffset,xe.byteOffset+xe.byteLength)}if(Ce.isBuffer(xe)){for(var be=new Uint8Array(xe.length),ye=xe.length,we=0;we<ye;we++)be[we]=xe[we];return be.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(Se,Be,Le){"use strict";function Ce(){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}function xe(Ie,Ze,qe){if(Ie&&de.isObject(Ie)&&Ie instanceof Ce)return Ie;var Je=new Ce;return Je.parse(Ie,Ze,qe),Je}function be(Ie){return de.isString(Ie)&&(Ie=xe(Ie)),Ie instanceof Ce?Ie.format():Ce.prototype.format.call(Ie)}function ye(Ie,Ze){return xe(Ie,!1,!0).resolve(Ze)}function we(Ie,Ze){return Ie?xe(Ie,!1,!0).resolveObject(Ze):Ze}var pe=Se("punycode"),de=Se("./util");Le.parse=xe,Le.resolve=ye,Le.resolveObject=we,Le.format=be,Le.Url=Ce;var ge=/^([a-z0-9.+-]+:)/i,fe=/:[0-9]*$/,ue=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ee=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],z=["{","}","|","\\","^","`"].concat(ee),oe=["'"].concat(z),re=["%","/","?",";","#"].concat(oe),ae=["/","?","#"],le=/^[+a-z0-9A-Z_-]{0,63}$/,me=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ve={javascript:!0,"javascript:":!0},Pe={javascript:!0,"javascript:":!0},Ae={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Oe=Se("querystring");Ce.prototype.parse=function(Ie,Ze,qe){if(!de.isString(Ie))throw new TypeError("Parameter 'url' must be a string, not "+typeof Ie);var Je=Ie.indexOf("?"),mt=Je!==-1&&Je<Ie.indexOf("#")?"?":"#",gt=Ie.split(mt),Mt=/\\/g;gt[0]=gt[0].replace(Mt,"/"),Ie=gt.join(mt);var at=Ie;if(at=at.trim(),!qe&&Ie.split("#").length===1){var _t=ue.exec(at);if(_t)return this.path=at,this.href=at,this.pathname=_t[1],_t[2]?(this.search=_t[2],this.query=Ze?Oe.parse(this.search.substr(1)):this.search.substr(1)):Ze&&(this.search="",this.query={}),this}var ht=ge.exec(at);if(ht){ht=ht[0];var Dt=ht.toLowerCase();this.protocol=Dt,at=at.substr(ht.length)}if(qe||ht||at.match(/^\/\/[^@\/]+@[^@\/]+/)){var ut=at.substr(0,2)==="//";!ut||ht&&Pe[ht]||(at=at.substr(2),this.slashes=!0)}if(!Pe[ht]&&(ut||ht&&!Ae[ht])){for(var ot=-1,ct=0;ct<ae.length;ct++){var yt=at.indexOf(ae[ct]);yt!==-1&&(ot===-1||yt<ot)&&(ot=yt)}var wt,xt;xt=ot===-1?at.lastIndexOf("@"):at.lastIndexOf("@",ot),xt!==-1&&(wt=at.slice(0,xt),at=at.slice(xt+1),this.auth=decodeURIComponent(wt)),ot=-1;for(var ct=0;ct<re.length;ct++){var yt=at.indexOf(re[ct]);yt!==-1&&(ot===-1||yt<ot)&&(ot=yt)}ot===-1&&(ot=at.length),this.host=at.slice(0,ot),at=at.slice(ot),this.parseHost(),this.hostname=this.hostname||"";var zt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!zt)for(var Ut=this.hostname.split(/\./),ct=0,cn=Ut.length;ct<cn;ct++){var jt=Ut[ct];if(jt&&!jt.match(le)){for(var mn="",Ft=0,Yt=jt.length;Ft<Yt;Ft++)jt.charCodeAt(Ft)>127?mn+="x":mn+=jt[Ft];if(!mn.match(le)){var tn=Ut.slice(0,ct),lt=Ut.slice(ct+1),Ue=jt.match(me);Ue&&(tn.push(Ue[1]),lt.unshift(Ue[2])),lt.length&&(at="/"+lt.join(".")+at),this.hostname=tn.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),zt||(this.hostname=pe.toASCII(this.hostname));var je=this.port?":"+this.port:"",rt=this.hostname||"";this.host=rt+je,this.href+=this.host,zt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),at[0]!=="/"&&(at="/"+at))}if(!ve[Dt])for(var ct=0,cn=oe.length;ct<cn;ct++){var dt=oe[ct];if(at.indexOf(dt)!==-1){var tt=encodeURIComponent(dt);tt===dt&&(tt=escape(dt)),at=at.split(dt).join(tt)}}var Ke=at.indexOf("#");Ke!==-1&&(this.hash=at.substr(Ke),at=at.slice(0,Ke));var De=at.indexOf("?");if(De!==-1?(this.search=at.substr(De),this.query=at.substr(De+1),Ze&&(this.query=Oe.parse(this.query)),at=at.slice(0,De)):Ze&&(this.search="",this.query={}),at&&(this.pathname=at),Ae[Dt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var je=this.pathname||"",ze=this.search||"";this.path=je+ze}return this.href=this.format(),this},Ce.prototype.format=function(){var Ie=this.auth||"";Ie&&(Ie=encodeURIComponent(Ie),Ie=Ie.replace(/%3A/i,":"),Ie+="@");var Ze=this.protocol||"",qe=this.pathname||"",Je=this.hash||"",mt=!1,gt="";this.host?mt=Ie+this.host:this.hostname&&(mt=Ie+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(mt+=":"+this.port)),this.query&&de.isObject(this.query)&&Object.keys(this.query).length&&(gt=Oe.stringify(this.query));var Mt=this.search||gt&&"?"+gt||"";return Ze&&Ze.substr(-1)!==":"&&(Ze+=":"),this.slashes||(!Ze||Ae[Ze])&&mt!==!1?(mt="//"+(mt||""),qe&&qe.charAt(0)!=="/"&&(qe="/"+qe)):mt||(mt=""),Je&&Je.charAt(0)!=="#"&&(Je="#"+Je),Mt&&Mt.charAt(0)!=="?"&&(Mt="?"+Mt),qe=qe.replace(/[?#]/g,function(at){return encodeURIComponent(at)}),Mt=Mt.replace("#","%23"),Ze+mt+qe+Mt+Je},Ce.prototype.resolve=function(Ie){return this.resolveObject(xe(Ie,!1,!0)).format()},Ce.prototype.resolveObject=function(Ie){if(de.isString(Ie)){var Ze=new Ce;Ze.parse(Ie,!1,!0),Ie=Ze}for(var qe=new Ce,Je=Object.keys(this),mt=0;mt<Je.length;mt++){var gt=Je[mt];qe[gt]=this[gt]}if(qe.hash=Ie.hash,Ie.href==="")return qe.href=qe.format(),qe;if(Ie.slashes&&!Ie.protocol){for(var Mt=Object.keys(Ie),at=0;at<Mt.length;at++){var _t=Mt[at];_t!=="protocol"&&(qe[_t]=Ie[_t])}return Ae[qe.protocol]&&qe.hostname&&!qe.pathname&&(qe.path=qe.pathname="/"),qe.href=qe.format(),qe}if(Ie.protocol&&Ie.protocol!==qe.protocol){if(!Ae[Ie.protocol]){for(var ht=Object.keys(Ie),Dt=0;Dt<ht.length;Dt++){var ut=ht[Dt];qe[ut]=Ie[ut]}return qe.href=qe.format(),qe}if(qe.protocol=Ie.protocol,Ie.host||Pe[Ie.protocol])qe.pathname=Ie.pathname;else{for(var cn=(Ie.pathname||"").split("/");cn.length&&!(Ie.host=cn.shift()););Ie.host||(Ie.host=""),Ie.hostname||(Ie.hostname=""),cn[0]!==""&&cn.unshift(""),cn.length<2&&cn.unshift(""),qe.pathname=cn.join("/")}if(qe.search=Ie.search,qe.query=Ie.query,qe.host=Ie.host||"",qe.auth=Ie.auth,qe.hostname=Ie.hostname||Ie.host,qe.port=Ie.port,qe.pathname||qe.search){var ot=qe.pathname||"",ct=qe.search||"";qe.path=ot+ct}return qe.slashes=qe.slashes||Ie.slashes,qe.href=qe.format(),qe}var yt=qe.pathname&&qe.pathname.charAt(0)==="/",wt=Ie.host||Ie.pathname&&Ie.pathname.charAt(0)==="/",xt=wt||yt||qe.host&&Ie.pathname,zt=xt,Ut=qe.pathname&&qe.pathname.split("/")||[],cn=Ie.pathname&&Ie.pathname.split("/")||[],jt=qe.protocol&&!Ae[qe.protocol];if(jt&&(qe.hostname="",qe.port=null,qe.host&&(Ut[0]===""?Ut[0]=qe.host:Ut.unshift(qe.host)),qe.host="",Ie.protocol&&(Ie.hostname=null,Ie.port=null,Ie.host&&(cn[0]===""?cn[0]=Ie.host:cn.unshift(Ie.host)),Ie.host=null),xt=xt&&(cn[0]===""||Ut[0]==="")),wt)qe.host=Ie.host||Ie.host===""?Ie.host:qe.host,qe.hostname=Ie.hostname||Ie.hostname===""?Ie.hostname:qe.hostname,qe.search=Ie.search,qe.query=Ie.query,Ut=cn;else if(cn.length)Ut||(Ut=[]),Ut.pop(),Ut=Ut.concat(cn),qe.search=Ie.search,qe.query=Ie.query;else if(!de.isNullOrUndefined(Ie.search)){if(jt){qe.hostname=qe.host=Ut.shift();var mn=!!(qe.host&&qe.host.indexOf("@")>0)&&qe.host.split("@");mn&&(qe.auth=mn.shift(),qe.host=qe.hostname=mn.shift())}return qe.search=Ie.search,qe.query=Ie.query,de.isNull(qe.pathname)&&de.isNull(qe.search)||(qe.path=(qe.pathname?qe.pathname:"")+(qe.search?qe.search:"")),qe.href=qe.format(),qe}if(!Ut.length)return qe.pathname=null,qe.search?qe.path="/"+qe.search:qe.path=null,qe.href=qe.format(),qe;for(var Ft=Ut.slice(-1)[0],Yt=(qe.host||Ie.host||Ut.length>1)&&(Ft==="."||Ft==="..")||Ft==="",tn=0,lt=Ut.length;lt>=0;lt--)Ft=Ut[lt],Ft==="."?Ut.splice(lt,1):Ft===".."?(Ut.splice(lt,1),tn++):tn&&(Ut.splice(lt,1),tn--);if(!xt&&!zt)for(;tn--;tn)Ut.unshift("..");!xt||Ut[0]===""||Ut[0]&&Ut[0].charAt(0)==="/"||Ut.unshift(""),Yt&&Ut.join("/").substr(-1)!=="/"&&Ut.push("");var Ue=Ut[0]===""||Ut[0]&&Ut[0].charAt(0)==="/";if(jt){qe.hostname=qe.host=Ue?"":Ut.length?Ut.shift():"";var mn=!!(qe.host&&qe.host.indexOf("@")>0)&&qe.host.split("@");mn&&(qe.auth=mn.shift(),qe.host=qe.hostname=mn.shift())}return xt=xt||qe.host&&Ut.length,xt&&!Ue&&Ut.unshift(""),Ut.length?qe.pathname=Ut.join("/"):(qe.pathname=null,qe.path=null),de.isNull(qe.pathname)&&de.isNull(qe.search)||(qe.path=(qe.pathname?qe.pathname:"")+(qe.search?qe.search:"")),qe.auth=Ie.auth||qe.auth,qe.slashes=qe.slashes||Ie.slashes,qe.href=qe.format(),qe},Ce.prototype.parseHost=function(){var Ie=this.host,Ze=fe.exec(Ie);Ze&&(Ze=Ze[0],Ze!==":"&&(this.port=Ze.substr(1)),Ie=Ie.substr(0,Ie.length-Ze.length)),Ie&&(this.hostname=Ie)}},{"./util":204,punycode:174,querystring:177}],204:[function(Se,Be,Le){"use strict";Be.exports={isString:function(Ce){return typeof Ce=="string"},isObject:function(Ce){return typeof Ce=="object"&&Ce!==null},isNull:function(Ce){return Ce===null},isNullOrUndefined:function(Ce){return Ce==null}}},{}],205:[function(Se,Be,Le){(function(Ce){function xe(ye,we){function pe(){if(!de){if(be("throwDeprecation"))throw new Error(we);be("traceDeprecation")?console.trace(we):console.warn(we),de=!0}return ye.apply(this,arguments)}if(be("noDeprecation"))return ye;var de=!1;return pe}function be(ye){try{if(!Ce.localStorage)return!1}catch(pe){return!1}var we=Ce.localStorage[ye];return we!=null&&String(we).toLowerCase()==="true"}Be.exports=xe}).call(this,typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(Se,Be,Le){Be.exports=function(Ce){return Ce&&typeof Ce=="object"&&typeof Ce.copy=="function"&&typeof Ce.fill=="function"&&typeof Ce.readUInt8=="function"}},{}],207:[function(Se,Be,Le){(function(Ce,xe){function be(ct,yt){var wt={seen:[],stylize:we};return arguments.length>=3&&(wt.depth=arguments[2]),arguments.length>=4&&(wt.colors=arguments[3]),re(yt)?wt.showHidden=yt:yt&&Le._extend(wt,yt),Ae(wt.showHidden)&&(wt.showHidden=!1),Ae(wt.depth)&&(wt.depth=2),Ae(wt.colors)&&(wt.colors=!1),Ae(wt.customInspect)&&(wt.customInspect=!0),wt.colors&&(wt.stylize=ye),de(wt,ct,wt.depth)}function ye(ct,yt){var wt=be.styles[yt];return wt?"\x1B["+be.colors[wt][0]+"m"+ct+"\x1B["+be.colors[wt][1]+"m":ct}function we(ct,yt){return ct}function pe(ct){var yt={};return ct.forEach(function(wt,xt){yt[wt]=!0}),yt}function de(ct,yt,wt){if(ct.customInspect&&yt&&Je(yt.inspect)&&yt.inspect!==Le.inspect&&(!yt.constructor||yt.constructor.prototype!==yt)){var xt=yt.inspect(wt,ct);return ve(xt)||(xt=de(ct,xt,wt)),xt}var zt=ge(ct,yt);if(zt)return zt;var Ut=Object.keys(yt),cn=pe(Ut);if(ct.showHidden&&(Ut=Object.getOwnPropertyNames(yt)),qe(yt)&&(Ut.indexOf("message")>=0||Ut.indexOf("description")>=0))return fe(yt);if(Ut.length===0){if(Je(yt)){var jt=yt.name?": "+yt.name:"";return ct.stylize("[Function"+jt+"]","special")}if(Oe(yt))return ct.stylize(RegExp.prototype.toString.call(yt),"regexp");if(Ze(yt))return ct.stylize(Date.prototype.toString.call(yt),"date");if(qe(yt))return fe(yt)}var mn="",Ft=!1,Yt=["{","}"];if(oe(yt)&&(Ft=!0,Yt=["[","]"]),Je(yt)&&(mn=" [Function"+(yt.name?": "+yt.name:"")+"]"),Oe(yt)&&(mn=" "+RegExp.prototype.toString.call(yt)),Ze(yt)&&(mn=" "+Date.prototype.toUTCString.call(yt)),qe(yt)&&(mn=" "+fe(yt)),Ut.length===0&&(!Ft||yt.length==0))return Yt[0]+mn+Yt[1];if(wt<0)return Oe(yt)?ct.stylize(RegExp.prototype.toString.call(yt),"regexp"):ct.stylize("[Object]","special");ct.seen.push(yt);var tn;return tn=Ft?ue(ct,yt,wt,cn,Ut):Ut.map(function(lt){return ee(ct,yt,wt,cn,lt,Ft)}),ct.seen.pop(),z(tn,mn,Yt)}function ge(ct,yt){if(Ae(yt))return ct.stylize("undefined","undefined");if(ve(yt)){var wt="'"+JSON.stringify(yt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ct.stylize(wt,"string")}return me(yt)?ct.stylize(""+yt,"number"):re(yt)?ct.stylize(""+yt,"boolean"):ae(yt)?ct.stylize("null","null"):void 0}function fe(ct){return"["+Error.prototype.toString.call(ct)+"]"}function ue(ct,yt,wt,xt,zt){for(var Ut=[],cn=0,jt=yt.length;cn<jt;++cn)_t(yt,String(cn))?Ut.push(ee(ct,yt,wt,xt,String(cn),!0)):Ut.push("");return zt.forEach(function(mn){mn.match(/^\d+$/)||Ut.push(ee(ct,yt,wt,xt,mn,!0))}),Ut}function ee(ct,yt,wt,xt,zt,Ut){var cn,jt,mn;if(mn=Object.getOwnPropertyDescriptor(yt,zt)||{value:yt[zt]},mn.get?jt=mn.set?ct.stylize("[Getter/Setter]","special"):ct.stylize("[Getter]","special"):mn.set&&(jt=ct.stylize("[Setter]","special")),_t(xt,zt)||(cn="["+zt+"]"),jt||(ct.seen.indexOf(mn.value)<0?(jt=ae(wt)?de(ct,mn.value,null):de(ct,mn.value,wt-1),jt.indexOf(`
|
|
|
`)>-1&&(jt=Ut?jt.split(`
|
|
|
`).map(function(Ft){return" "+Ft}).join(`
|
|
|
`).substr(2):`
|
|
|
`+jt.split(`
|
|
|
`).map(function(Ft){return" "+Ft}).join(`
|
|
|
`))):jt=ct.stylize("[Circular]","special")),Ae(cn)){if(Ut&&zt.match(/^\d+$/))return jt;cn=JSON.stringify(""+zt),cn.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(cn=cn.substr(1,cn.length-2),cn=ct.stylize(cn,"name")):(cn=cn.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),cn=ct.stylize(cn,"string"))}return cn+": "+jt}function z(ct,yt,wt){var xt=0;return ct.reduce(function(zt,Ut){return xt++,Ut.indexOf(`
|
|
|
`)>=0&&xt++,zt+Ut.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?wt[0]+(yt===""?"":yt+`
|
|
|
`)+" "+ct.join(`,
|
|
|
`)+" "+wt[1]:wt[0]+yt+" "+ct.join(", ")+" "+wt[1]}function oe(ct){return Array.isArray(ct)}function re(ct){return typeof ct=="boolean"}function ae(ct){return ct===null}function le(ct){return ct==null}function me(ct){return typeof ct=="number"}function ve(ct){return typeof ct=="string"}function Pe(ct){return typeof ct=="symbol"}function Ae(ct){return ct===void 0}function Oe(ct){return Ie(ct)&>(ct)==="[object RegExp]"}function Ie(ct){return typeof ct=="object"&&ct!==null}function Ze(ct){return Ie(ct)&>(ct)==="[object Date]"}function qe(ct){return Ie(ct)&&(gt(ct)==="[object Error]"||ct instanceof Error)}function Je(ct){return typeof ct=="function"}function mt(ct){return ct===null||typeof ct=="boolean"||typeof ct=="number"||typeof ct=="string"||typeof ct=="symbol"||ct===void 0}function gt(ct){return Object.prototype.toString.call(ct)}function Mt(ct){return ct<10?"0"+ct.toString(10):ct.toString(10)}function at(){var ct=new Date,yt=[Mt(ct.getHours()),Mt(ct.getMinutes()),Mt(ct.getSeconds())].join(":");return[ct.getDate(),ot[ct.getMonth()],yt].join(" ")}function _t(ct,yt){return Object.prototype.hasOwnProperty.call(ct,yt)}var ht=/%[sdj%]/g;Le.format=function(ct){if(!ve(ct)){for(var yt=[],wt=0;wt<arguments.length;wt++)yt.push(be(arguments[wt]));return yt.join(" ")}for(var wt=1,xt=arguments,zt=xt.length,Ut=String(ct).replace(ht,function(mn){if(mn==="%%")return"%";if(wt>=zt)return mn;switch(mn){case"%s":return String(xt[wt++]);case"%d":return Number(xt[wt++]);case"%j":try{return JSON.stringify(xt[wt++])}catch(Ft){return"[Circular]"}default:return mn}}),cn=xt[wt];wt<zt;cn=xt[++wt])ae(cn)||!Ie(cn)?Ut+=" "+cn:Ut+=" "+be(cn);return Ut},Le.deprecate=function(ct,yt){function wt(){if(!xt){if(Ce.throwDeprecation)throw new Error(yt);Ce.traceDeprecation?console.trace(yt):console.error(yt),xt=!0}return ct.apply(this,arguments)}if(Ae(xe.process))return function(){return Le.deprecate(ct,yt).apply(this,arguments)};if(Ce.noDeprecation===!0)return ct;var xt=!1;return wt};var Dt,ut={};Le.debuglog=function(ct){if(Ae(Dt)&&(Dt=Ce.env.NODE_DEBUG||""),ct=ct.toUpperCase(),!ut[ct])if(new RegExp("\\b"+ct+"\\b","i").test(Dt)){var yt=Ce.pid;ut[ct]=function(){var wt=Le.format.apply(Le,arguments);console.error("%s %d: %s",ct,yt,wt)}}else ut[ct]=function(){};return ut[ct]},Le.inspect=be,be.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]},be.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Le.isArray=oe,Le.isBoolean=re,Le.isNull=ae,Le.isNullOrUndefined=le,Le.isNumber=me,Le.isString=ve,Le.isSymbol=Pe,Le.isUndefined=Ae,Le.isRegExp=Oe,Le.isObject=Ie,Le.isDate=Ze,Le.isError=qe,Le.isFunction=Je,Le.isPrimitive=mt,Le.isBuffer=Se("./support/isBuffer");var ot=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Le.log=function(){console.log("%s - %s",at(),Le.format.apply(Le,arguments))},Le.inherits=Se("inherits"),Le._extend=function(ct,yt){if(!yt||!Ie(yt))return ct;for(var wt=Object.keys(yt),xt=wt.length;xt--;)ct[wt[xt]]=yt[wt[xt]];return ct}}).call(this,Se("_process"),typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(Se,Be,Le){"use strict";(function(){Le.stripBOM=function(Ce){return Ce[0]==="\uFEFF"?Ce.substring(1):Ce}}).call(void 0)},{}],209:[function(Se,Be,Le){"use strict";function Ce(pe){return pe&&pe.__esModule?pe:{default:pe}}var xe=Se("babel-runtime/helpers/typeof"),be=Ce(xe),ye=Se("babel-runtime/core-js/object/keys"),we=Ce(ye);(function(){var pe,de,ge,fe,ue,ee={}.hasOwnProperty;pe=Se("xmlbuilder"),de=Se("./defaults").defaults,fe=function(z){return typeof z=="string"&&(z.indexOf("&")>=0||z.indexOf(">")>=0||z.indexOf("<")>=0)},ue=function(z){return"<![CDATA["+ge(z)+"]]>"},ge=function(z){return z.replace("]]>","]]]]><![CDATA[>")},Le.Builder=function(){function z(oe){var re,ae,le;this.options={},ae=de[.2];for(re in ae)ee.call(ae,re)&&(le=ae[re],this.options[re]=le);for(re in oe)ee.call(oe,re)&&(le=oe[re],this.options[re]=le)}return z.prototype.buildObject=function(oe){var re,ae,le,me,ve;return re=this.options.attrkey,ae=this.options.charkey,(0,we.default)(oe).length===1&&this.options.rootName===de[.2].rootName?(ve=(0,we.default)(oe)[0],oe=oe[ve]):ve=this.options.rootName,le=function(Pe){return function(Ae,Oe){var Ie,Ze,qe,Je,mt,gt;if((Oe===void 0?"undefined":(0,be.default)(Oe))!=="object")Pe.options.cdata&&fe(Oe)?Ae.raw(ue(Oe)):Ae.txt(Oe);else if(Array.isArray(Oe)){for(Je in Oe)if(ee.call(Oe,Je)){Ze=Oe[Je];for(mt in Ze)qe=Ze[mt],Ae=le(Ae.ele(mt),qe).up()}}else for(mt in Oe)if(ee.call(Oe,mt))if(Ze=Oe[mt],mt===re){if((Ze===void 0?"undefined":(0,be.default)(Ze))==="object")for(Ie in Ze)gt=Ze[Ie],Ae=Ae.att(Ie,gt)}else if(mt===ae)Ae=Pe.options.cdata&&fe(Ze)?Ae.raw(ue(Ze)):Ae.txt(Ze);else if(Array.isArray(Ze))for(Je in Ze)ee.call(Ze,Je)&&(qe=Ze[Je],Ae=typeof qe=="string"?Pe.options.cdata&&fe(qe)?Ae.ele(mt).raw(ue(qe)).up():Ae.ele(mt,qe).up():le(Ae.ele(mt),qe).up());else(Ze===void 0?"undefined":(0,be.default)(Ze))==="object"?Ae=le(Ae.ele(mt),Ze).up():typeof Ze=="string"&&Pe.options.cdata&&fe(Ze)?Ae=Ae.ele(mt).raw(ue(Ze)).up():(Ze==null&&(Ze=""),Ae=Ae.ele(mt,Ze.toString()).up());return Ae}}(this),me=pe.create(ve,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),le(me,oe).end(this.options.renderOpts)},z}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(Se,Be,Le){"use strict";(function(){Le.defaults={.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:""},.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(void 0)},{}],211:[function(Se,Be,Le){"use strict";function Ce(ge){return ge&&ge.__esModule?ge:{default:ge}}var xe=Se("babel-runtime/core-js/object/get-own-property-names"),be=Ce(xe),ye=Se("babel-runtime/core-js/object/keys"),we=Ce(ye),pe=Se("babel-runtime/helpers/typeof"),de=Ce(pe);(function(){var ge,fe,ue,ee,z,oe,re,ae,le=function(Pe,Ae){return function(){return Pe.apply(Ae,arguments)}},me=function(Pe,Ae){function Oe(){this.constructor=Pe}for(var Ie in Ae)ve.call(Ae,Ie)&&(Pe[Ie]=Ae[Ie]);return Oe.prototype=Ae.prototype,Pe.prototype=new Oe,Pe.__super__=Ae.prototype,Pe},ve={}.hasOwnProperty;re=Se("sax"),ue=Se("events"),ge=Se("./bom"),oe=Se("./processors"),ae=Se("timers").setImmediate,fe=Se("./defaults").defaults,ee=function(Pe){return(Pe===void 0?"undefined":(0,de.default)(Pe))==="object"&&Pe!=null&&(0,we.default)(Pe).length===0},z=function(Pe,Ae,Oe){var Ie,Ze,qe;for(Ie=0,Ze=Pe.length;Ie<Ze;Ie++)qe=Pe[Ie],Ae=qe(Ae,Oe);return Ae},Le.Parser=function(Pe){function Ae(Oe){this.parseString=le(this.parseString,this),this.reset=le(this.reset,this),this.assignOrPush=le(this.assignOrPush,this),this.processAsync=le(this.processAsync,this);var Ie,Ze,qe;if(!(this instanceof Le.Parser))return new Le.Parser(Oe);this.options={},Ze=fe[.2];for(Ie in Ze)ve.call(Ze,Ie)&&(qe=Ze[Ie],this.options[Ie]=qe);for(Ie in Oe)ve.call(Oe,Ie)&&(qe=Oe[Ie],this.options[Ie]=qe);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(oe.normalize)),this.reset()}return me(Ae,Pe),Ae.prototype.processAsync=function(){var Oe,Ie;try{return this.remaining.length<=this.options.chunkSize?(Oe=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(Oe),this.saxParser.close()):(Oe=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(Oe),ae(this.processAsync))}catch(Ze){if(Ie=Ze,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(Ie)}},Ae.prototype.assignOrPush=function(Oe,Ie,Ze){return Ie in Oe?(Oe[Ie]instanceof Array||(Oe[Ie]=[Oe[Ie]]),Oe[Ie].push(Ze)):this.options.explicitArray?Oe[Ie]=[Ze]:Oe[Ie]=Ze},Ae.prototype.reset=function(){var Oe,Ie,Ze,qe;return this.removeAllListeners(),this.saxParser=re.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Je){return function(mt){if(Je.saxParser.resume(),!Je.saxParser.errThrown)return Je.saxParser.errThrown=!0,Je.emit("error",mt)}}(this),this.saxParser.onend=function(Je){return function(){if(!Je.saxParser.ended)return Je.saxParser.ended=!0,Je.emit("end",Je.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,qe=[],Oe=this.options.attrkey,Ie=this.options.charkey,this.saxParser.onopentag=function(Je){return function(mt){var gt,Mt,at,_t,ht;if(at={},at[Ie]="",!Je.options.ignoreAttrs){ht=mt.attributes;for(gt in ht)ve.call(ht,gt)&&(Oe in at||Je.options.mergeAttrs||(at[Oe]={}),Mt=Je.options.attrValueProcessors?z(Je.options.attrValueProcessors,mt.attributes[gt],gt):mt.attributes[gt],_t=Je.options.attrNameProcessors?z(Je.options.attrNameProcessors,gt):gt,Je.options.mergeAttrs?Je.assignOrPush(at,_t,Mt):at[Oe][_t]=Mt)}return at["#name"]=Je.options.tagNameProcessors?z(Je.options.tagNameProcessors,mt.name):mt.name,Je.options.xmlns&&(at[Je.options.xmlnskey]={uri:mt.uri,local:mt.local}),qe.push(at)}}(this),this.saxParser.onclosetag=function(Je){return function(){var mt,gt,Mt,at,_t,ht,Dt,ut,ot,ct;if(ht=qe.pop(),_t=ht["#name"],Je.options.explicitChildren&&Je.options.preserveChildrenOrder||delete ht["#name"],ht.cdata===!0&&(mt=ht.cdata,delete ht.cdata),ot=qe[qe.length-1],ht[Ie].match(/^\s*$/)&&!mt?(gt=ht[Ie],delete ht[Ie]):(Je.options.trim&&(ht[Ie]=ht[Ie].trim()),Je.options.normalize&&(ht[Ie]=ht[Ie].replace(/\s{2,}/g," ").trim()),ht[Ie]=Je.options.valueProcessors?z(Je.options.valueProcessors,ht[Ie],_t):ht[Ie],(0,we.default)(ht).length===1&&Ie in ht&&!Je.EXPLICIT_CHARKEY&&(ht=ht[Ie])),ee(ht)&&(ht=Je.options.emptyTag!==""?Je.options.emptyTag:gt),Je.options.validator!=null&&(ct="/"+function(){var yt,wt,xt;for(xt=[],yt=0,wt=qe.length;yt<wt;yt++)at=qe[yt],xt.push(at["#name"]);return xt}().concat(_t).join("/"),function(){var yt;try{ht=Je.options.validator(ct,ot&&ot[_t],ht)}catch(wt){return yt=wt,Je.emit("error",yt)}}()),Je.options.explicitChildren&&!Je.options.mergeAttrs&&(ht===void 0?"undefined":(0,de.default)(ht))==="object")if(Je.options.preserveChildrenOrder){if(ot){ot[Je.options.childkey]=ot[Je.options.childkey]||[],Dt={};for(Mt in ht)ve.call(ht,Mt)&&(Dt[Mt]=ht[Mt]);ot[Je.options.childkey].push(Dt),delete ht["#name"],(0,we.default)(ht).length===1&&Ie in ht&&!Je.EXPLICIT_CHARKEY&&(ht=ht[Ie])}}else at={},Je.options.attrkey in ht&&(at[Je.options.attrkey]=ht[Je.options.attrkey],delete ht[Je.options.attrkey]),!Je.options.charsAsChildren&&Je.options.charkey in ht&&(at[Je.options.charkey]=ht[Je.options.charkey],delete ht[Je.options.charkey]),(0,be.default)(ht).length>0&&(at[Je.options.childkey]=ht),ht=at;return qe.length>0?Je.assignOrPush(ot,_t,ht):(Je.options.explicitRoot&&(ut=ht,ht={},ht[_t]=ut),Je.resultObject=ht,Je.saxParser.ended=!0,Je.emit("end",Je.resultObject))}}(this),Ze=function(Je){return function(mt){var gt,Mt;if(Mt=qe[qe.length-1])return Mt[Ie]+=mt,Je.options.explicitChildren&&Je.options.preserveChildrenOrder&&Je.options.charsAsChildren&&(Je.options.includeWhiteChars||mt.replace(/\\n/g,"").trim()!=="")&&(Mt[Je.options.childkey]=Mt[Je.options.childkey]||[],gt={"#name":"__text__"},gt[Ie]=mt,Je.options.normalize&&(gt[Ie]=gt[Ie].replace(/\s{2,}/g," ").trim()),Mt[Je.options.childkey].push(gt)),Mt}}(this),this.saxParser.ontext=Ze,this.saxParser.oncdata=function(Je){return function(mt){var gt;if(gt=Ze(mt))return gt.cdata=!0}}()},Ae.prototype.parseString=function(Oe,Ie){var Ze;Ie!=null&&typeof Ie=="function"&&(this.on("end",function(qe){return this.reset(),Ie(null,qe)}),this.on("error",function(qe){return this.reset(),Ie(qe)}));try{return Oe=Oe.toString(),Oe.trim()===""?(this.emit("end",null),!0):(Oe=ge.stripBOM(Oe),this.options.async?(this.remaining=Oe,ae(this.processAsync),this.saxParser):this.saxParser.write(Oe).close())}catch(qe){if(Ze=qe,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",Ze),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw Ze}},Ae}(ue.EventEmitter),Le.parseString=function(Pe,Ae,Oe){var Ie,Ze,qe;return Oe!=null?(typeof Oe=="function"&&(Ie=Oe),(Ae===void 0?"undefined":(0,de.default)(Ae))==="object"&&(Ze=Ae)):(typeof Ae=="function"&&(Ie=Ae),Ze={}),qe=new Le.Parser(Ze),qe.parseString(Pe,Ie)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(Se,Be,Le){"use strict";(function(){var Ce;Ce=new RegExp(/(?!xmlns)^.*:/),Le.normalize=function(xe){return xe.toLowerCase()},Le.firstCharLowerCase=function(xe){return xe.charAt(0).toLowerCase()+xe.slice(1)},Le.stripPrefix=function(xe){return xe.replace(Ce,"")},Le.parseNumbers=function(xe){return isNaN(xe)||(xe=xe%1==0?parseInt(xe,10):parseFloat(xe)),xe},Le.parseBooleans=function(xe){return/^(?:true|false)$/i.test(xe)&&(xe=xe.toLowerCase()==="true"),xe}}).call(void 0)},{}],213:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be,ye,we=function(de,ge){function fe(){this.constructor=de}for(var ue in ge)pe.call(ge,ue)&&(de[ue]=ge[ue]);return fe.prototype=ge.prototype,de.prototype=new fe,de.__super__=ge.prototype,de},pe={}.hasOwnProperty;xe=Se("./defaults"),Ce=Se("./builder"),be=Se("./parser"),ye=Se("./processors"),Le.defaults=xe.defaults,Le.processors=ye,Le.ValidationError=function(de){function ge(fe){this.message=fe}return we(ge,de),ge}(Error),Le.Builder=Ce.Builder,Le.Parser=be.Parser,Le.parseString=be.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(Se,Be,Le){"use strict";function Ce(ge){return ge&&ge.__esModule?ge:{default:ge}}var xe=Se("babel-runtime/core-js/object/get-prototype-of"),be=Ce(xe),ye=Se("babel-runtime/helpers/typeof"),we=Ce(ye),pe=Se("babel-runtime/core-js/object/assign"),de=Ce(pe);(function(){var ge,fe,ue,ee,z,oe,re=[].slice,ae={}.hasOwnProperty;ge=function(){var le,me,ve,Pe,Ae,Oe;if(Oe=arguments[0],Ae=2<=arguments.length?re.call(arguments,1):[],ee(de.default))de.default.apply(null,arguments);else for(le=0,ve=Ae.length;le<ve;le++)if((Pe=Ae[le])!=null)for(me in Pe)ae.call(Pe,me)&&(Oe[me]=Pe[me]);return Oe},ee=function(le){return!!le&&Object.prototype.toString.call(le)==="[object Function]"},z=function(le){var me;return!!le&&((me=le===void 0?"undefined":(0,we.default)(le))==="function"||me==="object")},fe=function(le){return ee(Array.isArray)?Array.isArray(le):Object.prototype.toString.call(le)==="[object Array]"},ue=function(le){var me;if(fe(le))return!le.length;for(me in le)if(ae.call(le,me))return!1;return!0},oe=function(le){var me,ve;return z(le)&&(ve=(0,be.default)(le))&&(me=ve.constructor)&&typeof me=="function"&&me instanceof me&&Function.prototype.toString.call(me)===Function.prototype.toString.call(Object)},Be.exports.assign=ge,Be.exports.isFunction=ee,Be.exports.isObject=z,Be.exports.isArray=fe,Be.exports.isEmpty=ue,Be.exports.isPlainObject=oe}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){Be.exports=function(){function be(ye,we,pe){if(this.options=ye.options,this.stringify=ye.stringify,we==null)throw new Error("Missing attribute name of element "+ye.name);if(pe==null)throw new Error("Missing attribute value for attribute "+we+" of element "+ye.name);this.name=this.stringify.attName(we),this.value=this.stringify.attValue(pe)}return be.prototype.clone=function(){return(0,xe.default)(this)},be.prototype.toString=function(ye){return this.options.writer.set(ye).attribute(this)},be}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),Be.exports=function(pe){function de(ge,fe){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(fe)}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).cdata(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),Be.exports=function(pe){function de(ge,fe){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing comment text");this.text=this.stringify.comment(fe)}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).comment(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(Se,Be,Le){"use strict";(function(){var Ce,xe=function(ye,we){function pe(){this.constructor=ye}for(var de in we)be.call(we,de)&&(ye[de]=we[de]);return pe.prototype=we.prototype,ye.prototype=new pe,ye.__super__=we.prototype,ye},be={}.hasOwnProperty;Ce=Se("./XMLNode"),Be.exports=function(ye){function we(pe,de,ge,fe,ue,ee){if(we.__super__.constructor.call(this,pe),de==null)throw new Error("Missing DTD element name");if(ge==null)throw new Error("Missing DTD attribute name");if(!fe)throw new Error("Missing DTD attribute type");if(!ue)throw new Error("Missing DTD attribute default");if(ue.indexOf("#")!==0&&(ue="#"+ue),!ue.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(ee&&!ue.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(de),this.attributeName=this.stringify.attName(ge),this.attributeType=this.stringify.dtdAttType(fe),this.defaultValue=this.stringify.dtdAttDefault(ee),this.defaultValueType=ue}return xe(we,ye),we.prototype.toString=function(pe){return this.options.writer.set(pe).dtdAttList(this)},we}(Ce)}).call(void 0)},{"./XMLNode":227}],219:[function(Se,Be,Le){"use strict";(function(){var Ce,xe=function(ye,we){function pe(){this.constructor=ye}for(var de in we)be.call(we,de)&&(ye[de]=we[de]);return pe.prototype=we.prototype,ye.prototype=new pe,ye.__super__=we.prototype,ye},be={}.hasOwnProperty;Ce=Se("./XMLNode"),Be.exports=function(ye){function we(pe,de,ge){if(we.__super__.constructor.call(this,pe),de==null)throw new Error("Missing DTD element name");ge||(ge="(#PCDATA)"),Array.isArray(ge)&&(ge="("+ge.join(",")+")"),this.name=this.stringify.eleName(de),this.value=this.stringify.dtdElementValue(ge)}return xe(we,ye),we.prototype.toString=function(pe){return this.options.writer.set(pe).dtdElement(this)},we}(Ce)}).call(void 0)},{"./XMLNode":227}],220:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be=function(we,pe){function de(){this.constructor=we}for(var ge in pe)ye.call(pe,ge)&&(we[ge]=pe[ge]);return de.prototype=pe.prototype,we.prototype=new de,we.__super__=pe.prototype,we},ye={}.hasOwnProperty;xe=Se("./Utility").isObject,Ce=Se("./XMLNode"),Be.exports=function(we){function pe(de,ge,fe,ue){if(pe.__super__.constructor.call(this,de),fe==null)throw new Error("Missing entity name");if(ue==null)throw new Error("Missing entity value");if(this.pe=!!ge,this.name=this.stringify.eleName(fe),xe(ue)){if(!ue.pubID&&!ue.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(ue.pubID&&!ue.sysID)throw new Error("System identifier is required for a public external entity");if(ue.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ue.pubID)),ue.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ue.sysID)),ue.nData!=null&&(this.nData=this.stringify.dtdNData(ue.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(ue)}return be(pe,we),pe.prototype.toString=function(de){return this.options.writer.set(de).dtdEntity(this)},pe}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(Se,Be,Le){"use strict";(function(){var Ce,xe=function(ye,we){function pe(){this.constructor=ye}for(var de in we)be.call(we,de)&&(ye[de]=we[de]);return pe.prototype=we.prototype,ye.prototype=new pe,ye.__super__=we.prototype,ye},be={}.hasOwnProperty;Ce=Se("./XMLNode"),Be.exports=function(ye){function we(pe,de,ge){if(we.__super__.constructor.call(this,pe),de==null)throw new Error("Missing notation name");if(!ge.pubID&&!ge.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(de),ge.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ge.pubID)),ge.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ge.sysID))}return xe(we,ye),we.prototype.toString=function(pe){return this.options.writer.set(pe).dtdNotation(this)},we}(Ce)}).call(void 0)},{"./XMLNode":227}],222:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be=function(we,pe){function de(){this.constructor=we}for(var ge in pe)ye.call(pe,ge)&&(we[ge]=pe[ge]);return de.prototype=pe.prototype,we.prototype=new de,we.__super__=pe.prototype,we},ye={}.hasOwnProperty;xe=Se("./Utility").isObject,Ce=Se("./XMLNode"),Be.exports=function(we){function pe(de,ge,fe,ue){var ee;pe.__super__.constructor.call(this,de),xe(ge)&&(ee=ge,ge=ee.version,fe=ee.encoding,ue=ee.standalone),ge||(ge="1.0"),this.version=this.stringify.xmlVersion(ge),fe!=null&&(this.encoding=this.stringify.xmlEncoding(fe)),ue!=null&&(this.standalone=this.stringify.xmlStandalone(ue))}return be(pe,we),pe.prototype.toString=function(de){return this.options.writer.set(de).declaration(this)},pe}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be,ye,we,pe,de=function(fe,ue){function ee(){this.constructor=fe}for(var z in ue)ge.call(ue,z)&&(fe[z]=ue[z]);return ee.prototype=ue.prototype,fe.prototype=new ee,fe.__super__=ue.prototype,fe},ge={}.hasOwnProperty;pe=Se("./Utility").isObject,we=Se("./XMLNode"),Ce=Se("./XMLDTDAttList"),be=Se("./XMLDTDEntity"),xe=Se("./XMLDTDElement"),ye=Se("./XMLDTDNotation"),Be.exports=function(fe){function ue(ee,z,oe){var re,ae;ue.__super__.constructor.call(this,ee),this.documentObject=ee,pe(z)&&(re=z,z=re.pubID,oe=re.sysID),oe==null&&(ae=[z,oe],oe=ae[0],z=ae[1]),z!=null&&(this.pubID=this.stringify.dtdPubID(z)),oe!=null&&(this.sysID=this.stringify.dtdSysID(oe))}return de(ue,fe),ue.prototype.element=function(ee,z){var oe;return oe=new xe(this,ee,z),this.children.push(oe),this},ue.prototype.attList=function(ee,z,oe,re,ae){var le;return le=new Ce(this,ee,z,oe,re,ae),this.children.push(le),this},ue.prototype.entity=function(ee,z){var oe;return oe=new be(this,!1,ee,z),this.children.push(oe),this},ue.prototype.pEntity=function(ee,z){var oe;return oe=new be(this,!0,ee,z),this.children.push(oe),this},ue.prototype.notation=function(ee,z){var oe;return oe=new ye(this,ee,z),this.children.push(oe),this},ue.prototype.toString=function(ee){return this.options.writer.set(ee).docType(this)},ue.prototype.ele=function(ee,z){return this.element(ee,z)},ue.prototype.att=function(ee,z,oe,re,ae){return this.attList(ee,z,oe,re,ae)},ue.prototype.ent=function(ee,z){return this.entity(ee,z)},ue.prototype.pent=function(ee,z){return this.pEntity(ee,z)},ue.prototype.not=function(ee,z){return this.notation(ee,z)},ue.prototype.up=function(){return this.root()||this.documentObject},ue}(we)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be,ye,we=function(de,ge){function fe(){this.constructor=de}for(var ue in ge)pe.call(ge,ue)&&(de[ue]=ge[ue]);return fe.prototype=ge.prototype,de.prototype=new fe,de.__super__=ge.prototype,de},pe={}.hasOwnProperty;ye=Se("./Utility").isPlainObject,Ce=Se("./XMLNode"),be=Se("./XMLStringifier"),xe=Se("./XMLStringWriter"),Be.exports=function(de){function ge(fe){ge.__super__.constructor.call(this,null),fe||(fe={}),fe.writer||(fe.writer=new xe),this.options=fe,this.stringify=new be(fe),this.isDocument=!0}return we(ge,de),ge.prototype.end=function(fe){var ue;return fe?ye(fe)&&(ue=fe,fe=this.options.writer.set(ue)):fe=this.options.writer,fe.document(this)},ge.prototype.toString=function(fe){return this.options.writer.set(fe).document(this)},ge}(Ce)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be,ye,we,pe,de,ge,fe,ue,ee,z,oe,re,ae,le,me,ve,Pe,Ae={}.hasOwnProperty;Pe=Se("./Utility"),me=Pe.isObject,le=Pe.isFunction,ve=Pe.isPlainObject,ue=Se("./XMLElement"),xe=Se("./XMLCData"),be=Se("./XMLComment"),z=Se("./XMLRaw"),ae=Se("./XMLText"),ee=Se("./XMLProcessingInstruction"),ge=Se("./XMLDeclaration"),fe=Se("./XMLDocType"),ye=Se("./XMLDTDAttList"),pe=Se("./XMLDTDEntity"),we=Se("./XMLDTDElement"),de=Se("./XMLDTDNotation"),Ce=Se("./XMLAttribute"),re=Se("./XMLStringifier"),oe=Se("./XMLStringWriter"),Be.exports=function(){function Oe(Ie,Ze,qe){var Je;Ie||(Ie={}),Ie.writer?ve(Ie.writer)&&(Je=Ie.writer,Ie.writer=new oe(Je)):Ie.writer=new oe(Ie),this.options=Ie,this.writer=Ie.writer,this.stringify=new re(Ie),this.onDataCallback=Ze||function(){},this.onEndCallback=qe||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Oe.prototype.node=function(Ie,Ze,qe){var Je;if(Ie==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),Ie=Ie.valueOf(),Ze==null&&(Ze={}),Ze=Ze.valueOf(),me(Ze)||(Je=[Ze,qe],qe=Je[0],Ze=Je[1]),this.currentNode=new ue(this,Ie,Ze),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,qe!=null&&this.text(qe),this},Oe.prototype.element=function(Ie,Ze,qe){return this.currentNode&&this.currentNode instanceof fe?this.dtdElement.apply(this,arguments):this.node(Ie,Ze,qe)},Oe.prototype.attribute=function(Ie,Ze){var qe,Je;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(Ie!=null&&(Ie=Ie.valueOf()),me(Ie))for(qe in Ie)Ae.call(Ie,qe)&&(Je=Ie[qe],this.attribute(qe,Je));else le(Ze)&&(Ze=Ze.apply()),this.options.skipNullAttributes&&Ze==null||(this.currentNode.attributes[Ie]=new Ce(this,Ie,Ze));return this},Oe.prototype.text=function(Ie){var Ze;return this.openCurrent(),Ze=new ae(this,Ie),this.onData(this.writer.text(Ze,this.currentLevel+1)),this},Oe.prototype.cdata=function(Ie){var Ze;return this.openCurrent(),Ze=new xe(this,Ie),this.onData(this.writer.cdata(Ze,this.currentLevel+1)),this},Oe.prototype.comment=function(Ie){var Ze;return this.openCurrent(),Ze=new be(this,Ie),this.onData(this.writer.comment(Ze,this.currentLevel+1)),this},Oe.prototype.raw=function(Ie){var Ze;return this.openCurrent(),Ze=new z(this,Ie),this.onData(this.writer.raw(Ze,this.currentLevel+1)),this},Oe.prototype.instruction=function(Ie,Ze){var qe,Je,mt,gt,Mt;if(this.openCurrent(),Ie!=null&&(Ie=Ie.valueOf()),Ze!=null&&(Ze=Ze.valueOf()),Array.isArray(Ie))for(qe=0,gt=Ie.length;qe<gt;qe++)Je=Ie[qe],this.instruction(Je);else if(me(Ie))for(Je in Ie)Ae.call(Ie,Je)&&(mt=Ie[Je],this.instruction(Je,mt));else le(Ze)&&(Ze=Ze.apply()),Mt=new ee(this,Ie,Ze),this.onData(this.writer.processingInstruction(Mt,this.currentLevel+1));return this},Oe.prototype.declaration=function(Ie,Ze,qe){var Je;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Je=new ge(this,Ie,Ze,qe),this.onData(this.writer.declaration(Je,this.currentLevel+1)),this},Oe.prototype.doctype=function(Ie,Ze,qe){if(this.openCurrent(),Ie==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 fe(this,Ze,qe),this.currentNode.rootNodeName=Ie,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Oe.prototype.dtdElement=function(Ie,Ze){var qe;return this.openCurrent(),qe=new we(this,Ie,Ze),this.onData(this.writer.dtdElement(qe,this.currentLevel+1)),this},Oe.prototype.attList=function(Ie,Ze,qe,Je,mt){var gt;return this.openCurrent(),gt=new ye(this,Ie,Ze,qe,Je,mt),this.onData(this.writer.dtdAttList(gt,this.currentLevel+1)),this},Oe.prototype.entity=function(Ie,Ze){var qe;return this.openCurrent(),qe=new pe(this,!1,Ie,Ze),this.onData(this.writer.dtdEntity(qe,this.currentLevel+1)),this},Oe.prototype.pEntity=function(Ie,Ze){var qe;return this.openCurrent(),qe=new pe(this,!0,Ie,Ze),this.onData(this.writer.dtdEntity(qe,this.currentLevel+1)),this},Oe.prototype.notation=function(Ie,Ze){var qe;return this.openCurrent(),qe=new de(this,Ie,Ze),this.onData(this.writer.dtdNotation(qe,this.currentLevel+1)),this},Oe.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},Oe.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Oe.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Oe.prototype.openNode=function(Ie){if(!Ie.isOpen)return!this.root&&this.currentLevel===0&&Ie instanceof ue&&(this.root=Ie),this.onData(this.writer.openNode(Ie,this.currentLevel)),Ie.isOpen=!0},Oe.prototype.closeNode=function(Ie){if(!Ie.isClosed)return this.onData(this.writer.closeNode(Ie,this.currentLevel)),Ie.isClosed=!0},Oe.prototype.onData=function(Ie){return this.documentStarted=!0,this.onDataCallback(Ie)},Oe.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Oe.prototype.ele=function(){return this.element.apply(this,arguments)},Oe.prototype.nod=function(Ie,Ze,qe){return this.node(Ie,Ze,qe)},Oe.prototype.txt=function(Ie){return this.text(Ie)},Oe.prototype.dat=function(Ie){return this.cdata(Ie)},Oe.prototype.com=function(Ie){return this.comment(Ie)},Oe.prototype.ins=function(Ie,Ze){return this.instruction(Ie,Ze)},Oe.prototype.dec=function(Ie,Ze,qe){return this.declaration(Ie,Ze,qe)},Oe.prototype.dtd=function(Ie,Ze,qe){return this.doctype(Ie,Ze,qe)},Oe.prototype.e=function(Ie,Ze,qe){return this.element(Ie,Ze,qe)},Oe.prototype.n=function(Ie,Ze,qe){return this.node(Ie,Ze,qe)},Oe.prototype.t=function(Ie){return this.text(Ie)},Oe.prototype.d=function(Ie){return this.cdata(Ie)},Oe.prototype.c=function(Ie){return this.comment(Ie)},Oe.prototype.r=function(Ie){return this.raw(Ie)},Oe.prototype.i=function(Ie,Ze){return this.instruction(Ie,Ze)},Oe.prototype.att=function(){return this.currentNode&&this.currentNode instanceof fe?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Oe.prototype.a=function(){return this.currentNode&&this.currentNode instanceof fe?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Oe.prototype.ent=function(Ie,Ze){return this.entity(Ie,Ze)},Oe.prototype.pent=function(Ie,Ze){return this.pEntity(Ie,Ze)},Oe.prototype.not=function(Ie,Ze){return this.notation(Ie,Ze)},Oe}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye,we,pe,de,ge=function(ue,ee){function z(){this.constructor=ue}for(var oe in ee)fe.call(ee,oe)&&(ue[oe]=ee[oe]);return z.prototype=ee.prototype,ue.prototype=new z,ue.__super__=ee.prototype,ue},fe={}.hasOwnProperty;de=Se("./Utility"),pe=de.isObject,we=de.isFunction,ye=Se("./XMLNode"),be=Se("./XMLAttribute"),Be.exports=function(ue){function ee(z,oe,re){if(ee.__super__.constructor.call(this,z),oe==null)throw new Error("Missing element name");this.name=this.stringify.eleName(oe),this.attributes={},re!=null&&this.attribute(re),z.isDocument&&(this.isRoot=!0,this.documentObject=z,z.rootObject=this)}return ge(ee,ue),ee.prototype.clone=function(){var z,oe,re,ae;re=(0,xe.default)(this),re.isRoot&&(re.documentObject=null),re.attributes={},ae=this.attributes;for(oe in ae)fe.call(ae,oe)&&(z=ae[oe],re.attributes[oe]=z.clone());return re.children=[],this.children.forEach(function(le){var me;return me=le.clone(),me.parent=re,re.children.push(me)}),re},ee.prototype.attribute=function(z,oe){var re,ae;if(z!=null&&(z=z.valueOf()),pe(z))for(re in z)fe.call(z,re)&&(ae=z[re],this.attribute(re,ae));else we(oe)&&(oe=oe.apply()),this.options.skipNullAttributes&&oe==null||(this.attributes[z]=new be(this,z,oe));return this},ee.prototype.removeAttribute=function(z){var oe,re,ae;if(z==null)throw new Error("Missing attribute name");if(z=z.valueOf(),Array.isArray(z))for(re=0,ae=z.length;re<ae;re++)oe=z[re],delete this.attributes[oe];else delete this.attributes[z];return this},ee.prototype.toString=function(z){return this.options.writer.set(z).element(this)},ee.prototype.att=function(z,oe){return this.attribute(z,oe)},ee.prototype.a=function(z,oe){return this.attribute(z,oe)},ee}(ye)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be,ye,we,pe,de,ge,fe,ue,ee,z,oe={}.hasOwnProperty;z=Se("./Utility"),ee=z.isObject,ue=z.isFunction,fe=z.isEmpty,we=null,Ce=null,xe=null,be=null,ye=null,de=null,ge=null,pe=null,Be.exports=function(){function re(ae){this.parent=ae,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],we||(we=Se("./XMLElement"),Ce=Se("./XMLCData"),xe=Se("./XMLComment"),be=Se("./XMLDeclaration"),ye=Se("./XMLDocType"),de=Se("./XMLRaw"),ge=Se("./XMLText"),pe=Se("./XMLProcessingInstruction"))}return re.prototype.element=function(ae,le,me){var ve,Pe,Ae,Oe,Ie,Ze,qe,Je,mt,gt;if(Ze=null,le==null&&(le={}),le=le.valueOf(),ee(le)||(mt=[le,me],me=mt[0],le=mt[1]),ae!=null&&(ae=ae.valueOf()),Array.isArray(ae))for(Ae=0,qe=ae.length;Ae<qe;Ae++)Pe=ae[Ae],Ze=this.element(Pe);else if(ue(ae))Ze=this.element(ae.apply());else if(ee(ae)){for(Ie in ae)if(oe.call(ae,Ie))if(gt=ae[Ie],ue(gt)&&(gt=gt.apply()),ee(gt)&&fe(gt)&&(gt=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&Ie.indexOf(this.stringify.convertAttKey)===0)Ze=this.attribute(Ie.substr(this.stringify.convertAttKey.length),gt);else if(!this.options.separateArrayItems&&Array.isArray(gt))for(Oe=0,Je=gt.length;Oe<Je;Oe++)Pe=gt[Oe],ve={},ve[Ie]=Pe,Ze=this.element(ve);else ee(gt)?(Ze=this.element(Ie),Ze.element(gt)):Ze=this.element(Ie,gt)}else Ze=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&ae.indexOf(this.stringify.convertTextKey)===0?this.text(me):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&ae.indexOf(this.stringify.convertCDataKey)===0?this.cdata(me):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&ae.indexOf(this.stringify.convertCommentKey)===0?this.comment(me):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&ae.indexOf(this.stringify.convertRawKey)===0?this.raw(me):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&ae.indexOf(this.stringify.convertPIKey)===0?this.instruction(ae.substr(this.stringify.convertPIKey.length),me):this.node(ae,le,me);if(Ze==null)throw new Error("Could not create any elements with: "+ae);return Ze},re.prototype.insertBefore=function(ae,le,me){var ve,Pe,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Pe=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Pe),ve=this.parent.element(ae,le,me),Array.prototype.push.apply(this.parent.children,Ae),ve},re.prototype.insertAfter=function(ae,le,me){var ve,Pe,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return Pe=this.parent.children.indexOf(this),Ae=this.parent.children.splice(Pe+1),ve=this.parent.element(ae,le,me),Array.prototype.push.apply(this.parent.children,Ae),ve},re.prototype.remove=function(){var ae;if(this.isRoot)throw new Error("Cannot remove the root element");return ae=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[ae,ae-ae+1].concat([])),this.parent},re.prototype.node=function(ae,le,me){var ve,Pe;return ae!=null&&(ae=ae.valueOf()),le||(le={}),le=le.valueOf(),ee(le)||(Pe=[le,me],me=Pe[0],le=Pe[1]),ve=new we(this,ae,le),me!=null&&ve.text(me),this.children.push(ve),ve},re.prototype.text=function(ae){var le;return le=new ge(this,ae),this.children.push(le),this},re.prototype.cdata=function(ae){var le;return le=new Ce(this,ae),this.children.push(le),this},re.prototype.comment=function(ae){var le;return le=new xe(this,ae),this.children.push(le),this},re.prototype.commentBefore=function(ae){var le,me;return le=this.parent.children.indexOf(this),me=this.parent.children.splice(le),this.parent.comment(ae),Array.prototype.push.apply(this.parent.children,me),this},re.prototype.commentAfter=function(ae){var le,me;return le=this.parent.children.indexOf(this),me=this.parent.children.splice(le+1),this.parent.comment(ae),Array.prototype.push.apply(this.parent.children,me),this},re.prototype.raw=function(ae){var le;return le=new de(this,ae),this.children.push(le),this},re.prototype.instruction=function(ae,le){var me,ve,Pe,Ae,Oe;if(ae!=null&&(ae=ae.valueOf()),le!=null&&(le=le.valueOf()),Array.isArray(ae))for(Ae=0,Oe=ae.length;Ae<Oe;Ae++)me=ae[Ae],this.instruction(me);else if(ee(ae))for(me in ae)oe.call(ae,me)&&(ve=ae[me],this.instruction(me,ve));else ue(le)&&(le=le.apply()),Pe=new pe(this,ae,le),this.children.push(Pe);return this},re.prototype.instructionBefore=function(ae,le){var me,ve;return me=this.parent.children.indexOf(this),ve=this.parent.children.splice(me),this.parent.instruction(ae,le),Array.prototype.push.apply(this.parent.children,ve),this},re.prototype.instructionAfter=function(ae,le){var me,ve;return me=this.parent.children.indexOf(this),ve=this.parent.children.splice(me+1),this.parent.instruction(ae,le),Array.prototype.push.apply(this.parent.children,ve),this},re.prototype.declaration=function(ae,le,me){var ve,Pe;return ve=this.document(),Pe=new be(ve,ae,le,me),ve.children[0]instanceof be?ve.children[0]=Pe:ve.children.unshift(Pe),ve.root()||ve},re.prototype.doctype=function(ae,le){var me,ve,Pe,Ae,Oe,Ie,Ze,qe,Je,mt;for(ve=this.document(),Pe=new ye(ve,ae,le),Je=ve.children,Ae=Oe=0,Ze=Je.length;Oe<Ze;Ae=++Oe)if((me=Je[Ae])instanceof ye)return ve.children[Ae]=Pe,Pe;for(mt=ve.children,Ae=Ie=0,qe=mt.length;Ie<qe;Ae=++Ie)if(me=mt[Ae],me.isRoot)return ve.children.splice(Ae,0,Pe),Pe;return ve.children.push(Pe),Pe},re.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},re.prototype.root=function(){var ae;for(ae=this;ae;){if(ae.isDocument)return ae.rootObject;if(ae.isRoot)return ae;ae=ae.parent}},re.prototype.document=function(){var ae;for(ae=this;ae;){if(ae.isDocument)return ae;ae=ae.parent}},re.prototype.end=function(ae){return this.document().end(ae)},re.prototype.prev=function(){var ae;if((ae=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[ae-1]},re.prototype.next=function(){var ae;if((ae=this.parent.children.indexOf(this))===-1||ae===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[ae+1]},re.prototype.importDocument=function(ae){var le;return le=ae.root().clone(),le.parent=this,le.isRoot=!1,this.children.push(le),this},re.prototype.ele=function(ae,le,me){return this.element(ae,le,me)},re.prototype.nod=function(ae,le,me){return this.node(ae,le,me)},re.prototype.txt=function(ae){return this.text(ae)},re.prototype.dat=function(ae){return this.cdata(ae)},re.prototype.com=function(ae){return this.comment(ae)},re.prototype.ins=function(ae,le){return this.instruction(ae,le)},re.prototype.doc=function(){return this.document()},re.prototype.dec=function(ae,le,me){return this.declaration(ae,le,me)},re.prototype.dtd=function(ae,le){return this.doctype(ae,le)},re.prototype.e=function(ae,le,me){return this.element(ae,le,me)},re.prototype.n=function(ae,le,me){return this.node(ae,le,me)},re.prototype.t=function(ae){return this.text(ae)},re.prototype.d=function(ae){return this.cdata(ae)},re.prototype.c=function(ae){return this.comment(ae)},re.prototype.r=function(ae){return this.raw(ae)},re.prototype.i=function(ae,le){return this.instruction(ae,le)},re.prototype.u=function(){return this.up()},re.prototype.importXMLBuilder=function(ae){return this.importDocument(ae)},re}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),Be.exports=function(pe){function de(ge,fe,ue){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(fe),ue&&(this.value=this.stringify.insValue(ue))}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).processingInstruction(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),Be.exports=function(pe){function de(ge,fe){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing raw text");this.value=this.stringify.raw(fe)}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).raw(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be,ye,we,pe,de,ge,fe,ue,ee,z,oe,re=function(le,me){function ve(){this.constructor=le}for(var Pe in me)ae.call(me,Pe)&&(le[Pe]=me[Pe]);return ve.prototype=me.prototype,le.prototype=new ve,le.__super__=me.prototype,le},ae={}.hasOwnProperty;de=Se("./XMLDeclaration"),ge=Se("./XMLDocType"),Ce=Se("./XMLCData"),xe=Se("./XMLComment"),fe=Se("./XMLElement"),ee=Se("./XMLRaw"),z=Se("./XMLText"),ue=Se("./XMLProcessingInstruction"),be=Se("./XMLDTDAttList"),ye=Se("./XMLDTDElement"),we=Se("./XMLDTDEntity"),pe=Se("./XMLDTDNotation"),oe=Se("./XMLWriterBase"),Be.exports=function(le){function me(ve,Pe){me.__super__.constructor.call(this,Pe),this.stream=ve}return re(me,le),me.prototype.document=function(ve){var Pe,Ae,Oe,Ie,Ze,qe,Je,mt;for(qe=ve.children,Ae=0,Ie=qe.length;Ae<Ie;Ae++)Pe=qe[Ae],Pe.isLastRootNode=!1;for(ve.children[ve.children.length-1].isLastRootNode=!0,Je=ve.children,mt=[],Oe=0,Ze=Je.length;Oe<Ze;Oe++)switch(Pe=Je[Oe],!1){case!(Pe instanceof de):mt.push(this.declaration(Pe));break;case!(Pe instanceof ge):mt.push(this.docType(Pe));break;case!(Pe instanceof xe):mt.push(this.comment(Pe));break;case!(Pe instanceof ue):mt.push(this.processingInstruction(Pe));break;default:mt.push(this.element(Pe))}return mt},me.prototype.attribute=function(ve){return this.stream.write(" "+ve.name+'="'+ve.value+'"')},me.prototype.cdata=function(ve,Pe){return this.stream.write(this.space(Pe)+"<![CDATA["+ve.text+"]]>"+this.endline(ve))},me.prototype.comment=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!-- "+ve.text+" -->"+this.endline(ve))},me.prototype.declaration=function(ve,Pe){return this.stream.write(this.space(Pe)),this.stream.write('<?xml version="'+ve.version+'"'),ve.encoding!=null&&this.stream.write(' encoding="'+ve.encoding+'"'),ve.standalone!=null&&this.stream.write(' standalone="'+ve.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(ve))},me.prototype.docType=function(ve,Pe){var Ae,Oe,Ie,Ze;if(Pe||(Pe=0),this.stream.write(this.space(Pe)),this.stream.write("<!DOCTYPE "+ve.root().name),ve.pubID&&ve.sysID?this.stream.write(' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"'):ve.sysID&&this.stream.write(' SYSTEM "'+ve.sysID+'"'),ve.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(ve)),Ze=ve.children,Oe=0,Ie=Ze.length;Oe<Ie;Oe++)switch(Ae=Ze[Oe],!1){case!(Ae instanceof be):this.dtdAttList(Ae,Pe+1);break;case!(Ae instanceof ye):this.dtdElement(Ae,Pe+1);break;case!(Ae instanceof we):this.dtdEntity(Ae,Pe+1);break;case!(Ae instanceof pe):this.dtdNotation(Ae,Pe+1);break;case!(Ae instanceof Ce):this.cdata(Ae,Pe+1);break;case!(Ae instanceof xe):this.comment(Ae,Pe+1);break;case!(Ae instanceof ue):this.processingInstruction(Ae,Pe+1);break;default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(ve))},me.prototype.element=function(ve,Pe){var Ae,Oe,Ie,Ze,qe,Je,mt,gt;Pe||(Pe=0),gt=this.space(Pe),this.stream.write(gt+"<"+ve.name),Je=ve.attributes;for(qe in Je)ae.call(Je,qe)&&(Ae=Je[qe],this.attribute(Ae));if(ve.children.length===0||ve.children.every(function(Mt){return Mt.value===""}))this.allowEmpty?this.stream.write("></"+ve.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&ve.children.length===1&&ve.children[0].value!=null)this.stream.write(">"),this.stream.write(ve.children[0].value),this.stream.write("</"+ve.name+">");else{for(this.stream.write(">"+this.newline),mt=ve.children,Ie=0,Ze=mt.length;Ie<Ze;Ie++)switch(Oe=mt[Ie],!1){case!(Oe instanceof Ce):this.cdata(Oe,Pe+1);break;case!(Oe instanceof xe):this.comment(Oe,Pe+1);break;case!(Oe instanceof fe):this.element(Oe,Pe+1);break;case!(Oe instanceof ee):this.raw(Oe,Pe+1);break;case!(Oe instanceof z):this.text(Oe,Pe+1);break;case!(Oe instanceof ue):this.processingInstruction(Oe,Pe+1);break;default:throw new Error("Unknown XML node type: "+Oe.constructor.name)}this.stream.write(gt+"</"+ve.name+">")}return this.stream.write(this.endline(ve))},me.prototype.processingInstruction=function(ve,Pe){return this.stream.write(this.space(Pe)+"<?"+ve.target),ve.value&&this.stream.write(" "+ve.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(ve))},me.prototype.raw=function(ve,Pe){return this.stream.write(this.space(Pe)+ve.value+this.endline(ve))},me.prototype.text=function(ve,Pe){return this.stream.write(this.space(Pe)+ve.value+this.endline(ve))},me.prototype.dtdAttList=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!ATTLIST "+ve.elementName+" "+ve.attributeName+" "+ve.attributeType),ve.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+ve.defaultValueType),ve.defaultValue&&this.stream.write(' "'+ve.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(ve))},me.prototype.dtdElement=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!ELEMENT "+ve.name+" "+ve.value),this.stream.write(this.spacebeforeslash+">"+this.endline(ve))},me.prototype.dtdEntity=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!ENTITY"),ve.pe&&this.stream.write(" %"),this.stream.write(" "+ve.name),ve.value?this.stream.write(' "'+ve.value+'"'):(ve.pubID&&ve.sysID?this.stream.write(' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"'):ve.sysID&&this.stream.write(' SYSTEM "'+ve.sysID+'"'),ve.nData&&this.stream.write(" NDATA "+ve.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(ve))},me.prototype.dtdNotation=function(ve,Pe){return this.stream.write(this.space(Pe)+"<!NOTATION "+ve.name),ve.pubID&&ve.sysID?this.stream.write(' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"'):ve.pubID?this.stream.write(' PUBLIC "'+ve.pubID+'"'):ve.sysID&&this.stream.write(' SYSTEM "'+ve.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(ve))},me.prototype.endline=function(ve){return ve.isLastRootNode?"":this.newline},me}(oe)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be,ye,we,pe,de,ge,fe,ue,ee,z,oe,re=function(le,me){function ve(){this.constructor=le}for(var Pe in me)ae.call(me,Pe)&&(le[Pe]=me[Pe]);return ve.prototype=me.prototype,le.prototype=new ve,le.__super__=me.prototype,le},ae={}.hasOwnProperty;de=Se("./XMLDeclaration"),ge=Se("./XMLDocType"),Ce=Se("./XMLCData"),xe=Se("./XMLComment"),fe=Se("./XMLElement"),ee=Se("./XMLRaw"),z=Se("./XMLText"),ue=Se("./XMLProcessingInstruction"),be=Se("./XMLDTDAttList"),ye=Se("./XMLDTDElement"),we=Se("./XMLDTDEntity"),pe=Se("./XMLDTDNotation"),oe=Se("./XMLWriterBase"),Be.exports=function(le){function me(ve){me.__super__.constructor.call(this,ve)}return re(me,le),me.prototype.document=function(ve){var Pe,Ae,Oe,Ie,Ze;for(this.textispresent=!1,Ie="",Ze=ve.children,Ae=0,Oe=Ze.length;Ae<Oe;Ae++)Pe=Ze[Ae],Ie+=function(){switch(!1){case!(Pe instanceof de):return this.declaration(Pe);case!(Pe instanceof ge):return this.docType(Pe);case!(Pe instanceof xe):return this.comment(Pe);case!(Pe instanceof ue):return this.processingInstruction(Pe);default:return this.element(Pe,0)}}.call(this);return this.pretty&&Ie.slice(-this.newline.length)===this.newline&&(Ie=Ie.slice(0,-this.newline.length)),Ie},me.prototype.attribute=function(ve){return" "+ve.name+'="'+ve.value+'"'},me.prototype.cdata=function(ve,Pe){return this.space(Pe)+"<![CDATA["+ve.text+"]]>"+this.newline},me.prototype.comment=function(ve,Pe){return this.space(Pe)+"<!-- "+ve.text+" -->"+this.newline},me.prototype.declaration=function(ve,Pe){var Ae;return Ae=this.space(Pe),Ae+='<?xml version="'+ve.version+'"',ve.encoding!=null&&(Ae+=' encoding="'+ve.encoding+'"'),ve.standalone!=null&&(Ae+=' standalone="'+ve.standalone+'"'),Ae+=this.spacebeforeslash+"?>",Ae+=this.newline},me.prototype.docType=function(ve,Pe){var Ae,Oe,Ie,Ze,qe;if(Pe||(Pe=0),Ze=this.space(Pe),Ze+="<!DOCTYPE "+ve.root().name,ve.pubID&&ve.sysID?Ze+=' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"':ve.sysID&&(Ze+=' SYSTEM "'+ve.sysID+'"'),ve.children.length>0){for(Ze+=" [",Ze+=this.newline,qe=ve.children,Oe=0,Ie=qe.length;Oe<Ie;Oe++)Ae=qe[Oe],Ze+=function(){switch(!1){case!(Ae instanceof be):return this.dtdAttList(Ae,Pe+1);case!(Ae instanceof ye):return this.dtdElement(Ae,Pe+1);case!(Ae instanceof we):return this.dtdEntity(Ae,Pe+1);case!(Ae instanceof pe):return this.dtdNotation(Ae,Pe+1);case!(Ae instanceof Ce):return this.cdata(Ae,Pe+1);case!(Ae instanceof xe):return this.comment(Ae,Pe+1);case!(Ae instanceof ue):return this.processingInstruction(Ae,Pe+1);default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}}.call(this);Ze+="]"}return Ze+=this.spacebeforeslash+">",Ze+=this.newline},me.prototype.element=function(ve,Pe){var Ae,Oe,Ie,Ze,qe,Je,mt,gt,Mt,at,_t,ht,Dt;Pe||(Pe=0),Dt=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),ht=this.space(Pe),gt="",gt+=ht+"<"+ve.name,Mt=ve.attributes;for(mt in Mt)ae.call(Mt,mt)&&(Ae=Mt[mt],gt+=this.attribute(Ae));if(ve.children.length===0||ve.children.every(function(ut){return ut.value===""}))this.allowEmpty?gt+="></"+ve.name+">"+this.newline:gt+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&ve.children.length===1&&ve.children[0].value!=null)gt+=">",gt+=ve.children[0].value,gt+="</"+ve.name+">"+this.newline;else{if(this.dontprettytextnodes){for(at=ve.children,Ie=0,qe=at.length;Ie<qe;Ie++)if(Oe=at[Ie],Oe.value!=null){this.textispresent++,Dt=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,ht=this.space(Pe)),gt+=">"+this.newline,_t=ve.children,Ze=0,Je=_t.length;Ze<Je;Ze++)Oe=_t[Ze],gt+=function(){switch(!1){case!(Oe instanceof Ce):return this.cdata(Oe,Pe+1);case!(Oe instanceof xe):return this.comment(Oe,Pe+1);case!(Oe instanceof fe):return this.element(Oe,Pe+1);case!(Oe instanceof ee):return this.raw(Oe,Pe+1);case!(Oe instanceof z):return this.text(Oe,Pe+1);case!(Oe instanceof ue):return this.processingInstruction(Oe,Pe+1);default:throw new Error("Unknown XML node type: "+Oe.constructor.name)}}.call(this);Dt&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),gt+=ht+"</"+ve.name+">"+this.newline}return gt},me.prototype.processingInstruction=function(ve,Pe){var Ae;return Ae=this.space(Pe)+"<?"+ve.target,ve.value&&(Ae+=" "+ve.value),Ae+=this.spacebeforeslash+"?>"+this.newline},me.prototype.raw=function(ve,Pe){return this.space(Pe)+ve.value+this.newline},me.prototype.text=function(ve,Pe){return this.space(Pe)+ve.value+this.newline},me.prototype.dtdAttList=function(ve,Pe){var Ae;return Ae=this.space(Pe)+"<!ATTLIST "+ve.elementName+" "+ve.attributeName+" "+ve.attributeType,ve.defaultValueType!=="#DEFAULT"&&(Ae+=" "+ve.defaultValueType),ve.defaultValue&&(Ae+=' "'+ve.defaultValue+'"'),Ae+=this.spacebeforeslash+">"+this.newline},me.prototype.dtdElement=function(ve,Pe){return this.space(Pe)+"<!ELEMENT "+ve.name+" "+ve.value+this.spacebeforeslash+">"+this.newline},me.prototype.dtdEntity=function(ve,Pe){var Ae;return Ae=this.space(Pe)+"<!ENTITY",ve.pe&&(Ae+=" %"),Ae+=" "+ve.name,ve.value?Ae+=' "'+ve.value+'"':(ve.pubID&&ve.sysID?Ae+=' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"':ve.sysID&&(Ae+=' SYSTEM "'+ve.sysID+'"'),ve.nData&&(Ae+=" NDATA "+ve.nData)),Ae+=this.spacebeforeslash+">"+this.newline},me.prototype.dtdNotation=function(ve,Pe){var Ae;return Ae=this.space(Pe)+"<!NOTATION "+ve.name,ve.pubID&&ve.sysID?Ae+=' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"':ve.pubID?Ae+=' PUBLIC "'+ve.pubID+'"':ve.sysID&&(Ae+=' SYSTEM "'+ve.sysID+'"'),Ae+=this.spacebeforeslash+">"+this.newline},me.prototype.openNode=function(ve,Pe){var Ae,Oe,Ie,Ze;if(Pe||(Pe=0),ve instanceof fe){Ie=this.space(Pe)+"<"+ve.name,Ze=ve.attributes;for(Oe in Ze)ae.call(Ze,Oe)&&(Ae=Ze[Oe],Ie+=this.attribute(Ae));return Ie+=(ve.children?">":"/>")+this.newline}return Ie=this.space(Pe)+"<!DOCTYPE "+ve.rootNodeName,ve.pubID&&ve.sysID?Ie+=' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"':ve.sysID&&(Ie+=' SYSTEM "'+ve.sysID+'"'),Ie+=(ve.children?" [":">")+this.newline},me.prototype.closeNode=function(ve,Pe){switch(Pe||(Pe=0),!1){case!(ve instanceof fe):return this.space(Pe)+"</"+ve.name+">"+this.newline;case!(ve instanceof ge):return this.space(Pe)+"]>"+this.newline}},me}(oe)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(Se,Be,Le){"use strict";(function(){var Ce=function(be,ye){return function(){return be.apply(ye,arguments)}},xe={}.hasOwnProperty;Be.exports=function(){function be(ye){this.assertLegalChar=Ce(this.assertLegalChar,this);var we,pe,de;ye||(ye={}),this.noDoubleEncoding=ye.noDoubleEncoding,pe=ye.stringify||{};for(we in pe)xe.call(pe,we)&&(de=pe[we],this[we]=de)}return be.prototype.eleName=function(ye){return ye=""+ye||"",this.assertLegalChar(ye)},be.prototype.eleText=function(ye){return ye=""+ye||"",this.assertLegalChar(this.elEscape(ye))},be.prototype.cdata=function(ye){return ye=""+ye||"",ye=ye.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(ye)},be.prototype.comment=function(ye){if(ye=""+ye||"",ye.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+ye);return this.assertLegalChar(ye)},be.prototype.raw=function(ye){return""+ye||""},be.prototype.attName=function(ye){return ye=""+ye||""},be.prototype.attValue=function(ye){return ye=""+ye||"",this.attEscape(ye)},be.prototype.insTarget=function(ye){return""+ye||""},be.prototype.insValue=function(ye){if(ye=""+ye||"",ye.match(/\?>/))throw new Error("Invalid processing instruction value: "+ye);return ye},be.prototype.xmlVersion=function(ye){if(ye=""+ye||"",!ye.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+ye);return ye},be.prototype.xmlEncoding=function(ye){if(ye=""+ye||"",!ye.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+ye);return ye},be.prototype.xmlStandalone=function(ye){return ye?"yes":"no"},be.prototype.dtdPubID=function(ye){return""+ye||""},be.prototype.dtdSysID=function(ye){return""+ye||""},be.prototype.dtdElementValue=function(ye){return""+ye||""},be.prototype.dtdAttType=function(ye){return""+ye||""},be.prototype.dtdAttDefault=function(ye){return ye!=null?""+ye||"":ye},be.prototype.dtdEntityValue=function(ye){return""+ye||""},be.prototype.dtdNData=function(ye){return""+ye||""},be.prototype.convertAttKey="@",be.prototype.convertPIKey="?",be.prototype.convertTextKey="#text",be.prototype.convertCDataKey="#cdata",be.prototype.convertCommentKey="#comment",be.prototype.convertRawKey="#raw",be.prototype.assertLegalChar=function(ye){var we;if(we=ye.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+ye+" at index "+we.index);return ye},be.prototype.elEscape=function(ye){var we;return we=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(we,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},be.prototype.attEscape=function(ye){var we;return we=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(we,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},be}()}).call(void 0)},{}],233:[function(Se,Be,Le){"use strict";var Ce=Se("babel-runtime/core-js/object/create"),xe=function(be){return be&&be.__esModule?be:{default:be}}(Ce);(function(){var be,ye=function(pe,de){function ge(){this.constructor=pe}for(var fe in de)we.call(de,fe)&&(pe[fe]=de[fe]);return ge.prototype=de.prototype,pe.prototype=new ge,pe.__super__=de.prototype,pe},we={}.hasOwnProperty;be=Se("./XMLNode"),Be.exports=function(pe){function de(ge,fe){if(de.__super__.constructor.call(this,ge),fe==null)throw new Error("Missing element text");this.value=this.stringify.eleText(fe)}return ye(de,pe),de.prototype.clone=function(){return(0,xe.default)(this)},de.prototype.toString=function(ge){return this.options.writer.set(ge).text(this)},de}(be)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(Se,Be,Le){"use strict";(function(){var Ce={}.hasOwnProperty;Be.exports=function(){function xe(be){var ye,we,pe,de,ge,fe,ue,ee,z;be||(be={}),this.pretty=be.pretty||!1,this.allowEmpty=(we=be.allowEmpty)!=null&&we,this.pretty?(this.indent=(pe=be.indent)!=null?pe:" ",this.newline=(de=be.newline)!=null?de:`
|
|
|
`,this.offset=(ge=be.offset)!=null?ge:0,this.dontprettytextnodes=(fe=be.dontprettytextnodes)!=null?fe:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(ue=be.spacebeforeslash)!=null?ue:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,ee=be.writer||{};for(ye in ee)Ce.call(ee,ye)&&(z=ee[ye],this[ye]=z)}return xe.prototype.set=function(be){var ye,we,pe;be||(be={}),"pretty"in be&&(this.pretty=be.pretty),"allowEmpty"in be&&(this.allowEmpty=be.allowEmpty),this.pretty?(this.indent="indent"in be?be.indent:" ",this.newline="newline"in be?be.newline:`
|
|
|
`,this.offset="offset"in be?be.offset:0,this.dontprettytextnodes="dontprettytextnodes"in be?be.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in be?be.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,we=be.writer||{};for(ye in we)Ce.call(we,ye)&&(pe=we[ye],this[ye]=pe);return this},xe.prototype.space=function(be){var ye;return this.pretty?(ye=(be||0)+this.offset+1,ye>0?new Array(ye).join(this.indent):""):""},xe}()}).call(void 0)},{}],235:[function(Se,Be,Le){"use strict";(function(){var Ce,xe,be,ye,we,pe,de;de=Se("./Utility"),we=de.assign,pe=de.isFunction,Ce=Se("./XMLDocument"),xe=Se("./XMLDocumentCB"),ye=Se("./XMLStringWriter"),be=Se("./XMLStreamWriter"),Be.exports.create=function(ge,fe,ue,ee){var z,oe;if(ge==null)throw new Error("Root element needs a name");return ee=we({},fe,ue,ee),z=new Ce(ee),oe=z.element(ge),ee.headless||(z.declaration(ee),ee.pubID==null&&ee.sysID==null||z.doctype(ee)),oe},Be.exports.begin=function(ge,fe,ue){var ee;return pe(ge)&&(ee=[ge,fe],fe=ee[0],ue=ee[1],ge={}),fe?new xe(ge,fe,ue):new Ce(ge)},Be.exports.stringWriter=function(ge){return new ye(ge)},Be.exports.streamWriter=function(ge,fe){return new be(ge,fe)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(Se,Be,Le){function Ce(){for(var be={},ye=0;ye<arguments.length;ye++){var we=arguments[ye];for(var pe in we)xe.call(we,pe)&&(be[pe]=we[pe])}return be}Be.exports=Ce;var xe=Object.prototype.hasOwnProperty},{}],237:[function(Se,Be,Le){"use strict";function Ce(ee,z,oe){ye.isBuffer(z)||(z=new ye(z)),ye.isBuffer(oe)||(oe=new ye(oe)),z.length>fe?z=ee(z):z.length<fe&&(z=ye.concat([z,ue],fe));for(var re=new ye(fe),ae=new ye(fe),le=0;le<fe;le++)re[le]=54^z[le],ae[le]=92^z[le];var me=ee(ye.concat([re,oe]));return ee(ye.concat([ae,me]))}function xe(ee,z){ee=ee||"sha1";var oe=ge[ee],re=[],ae=0;return oe||be("algorithm:",ee,"is not yet supported"),{update:function(le){return ye.isBuffer(le)||(le=new ye(le)),re.push(le),ae+=le.length,this},digest:function(le){var me=ye.concat(re),ve=z?Ce(oe,z,me):oe(me);return re=null,le?ve.toString(le):ve}}}function be(){var ee=[].slice.call(arguments).join(" ");throw new Error([ee,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}var ye=Se("buffer").Buffer,we=Se("./sha"),pe=Se("./sha256"),de=Se("./md5"),ge={sha1:we,sha256:pe,md5:de},fe=64,ue=new ye(fe);ue.fill(0),Le.createHash=function(ee){return xe(ee)},Le.createHmac=function(ee,z){return xe(ee,z)},function(ee,z){for(var oe in ee)z(ee[oe],oe)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(ee){Le[ee]=function(){be("sorry,",ee,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(Se,Be,Le){"use strict";function Ce(ge,fe){if(ge.length%we!=0){var ue=ge.length+(we-ge.length%we);ge=ye.concat([ge,pe],ue)}for(var ee=[],z=fe?ge.readInt32BE:ge.readInt32LE,oe=0;oe<ge.length;oe+=we)ee.push(z.call(ge,oe));return ee}function xe(ge,fe,ue){for(var ee=new ye(fe),z=ue?ee.writeInt32BE:ee.writeInt32LE,oe=0;oe<ge.length;oe++)z.call(ee,ge[oe],4*oe,!0);return ee}function be(ge,fe,ue,ee){return ye.isBuffer(ge)||(ge=new ye(ge)),xe(fe(Ce(ge,ee),ge.length*de),ue,ee)}var ye=Se("buffer").Buffer,we=4,pe=new ye(we);pe.fill(0);var de=8;Be.exports={hash:be}},{buffer:38}],239:[function(Se,Be,Le){"use strict";function Ce(ue,ee){ue[ee>>5]|=128<<ee%32,ue[14+(ee+64>>>9<<4)]=ee;for(var z=1732584193,oe=-271733879,re=-1732584194,ae=271733878,le=0;le<ue.length;le+=16){var me=z,ve=oe,Pe=re,Ae=ae;z=be(z,oe,re,ae,ue[le+0],7,-680876936),ae=be(ae,z,oe,re,ue[le+1],12,-389564586),re=be(re,ae,z,oe,ue[le+2],17,606105819),oe=be(oe,re,ae,z,ue[le+3],22,-1044525330),z=be(z,oe,re,ae,ue[le+4],7,-176418897),ae=be(ae,z,oe,re,ue[le+5],12,1200080426),re=be(re,ae,z,oe,ue[le+6],17,-1473231341),oe=be(oe,re,ae,z,ue[le+7],22,-45705983),z=be(z,oe,re,ae,ue[le+8],7,1770035416),ae=be(ae,z,oe,re,ue[le+9],12,-1958414417),re=be(re,ae,z,oe,ue[le+10],17,-42063),oe=be(oe,re,ae,z,ue[le+11],22,-1990404162),z=be(z,oe,re,ae,ue[le+12],7,1804603682),ae=be(ae,z,oe,re,ue[le+13],12,-40341101),re=be(re,ae,z,oe,ue[le+14],17,-1502002290),oe=be(oe,re,ae,z,ue[le+15],22,1236535329),z=ye(z,oe,re,ae,ue[le+1],5,-165796510),ae=ye(ae,z,oe,re,ue[le+6],9,-1069501632),re=ye(re,ae,z,oe,ue[le+11],14,643717713),oe=ye(oe,re,ae,z,ue[le+0],20,-373897302),z=ye(z,oe,re,ae,ue[le+5],5,-701558691),ae=ye(ae,z,oe,re,ue[le+10],9,38016083),re=ye(re,ae,z,oe,ue[le+15],14,-660478335),oe=ye(oe,re,ae,z,ue[le+4],20,-405537848),z=ye(z,oe,re,ae,ue[le+9],5,568446438),ae=ye(ae,z,oe,re,ue[le+14],9,-1019803690),re=ye(re,ae,z,oe,ue[le+3],14,-187363961),oe=ye(oe,re,ae,z,ue[le+8],20,1163531501),z=ye(z,oe,re,ae,ue[le+13],5,-1444681467),ae=ye(ae,z,oe,re,ue[le+2],9,-51403784),re=ye(re,ae,z,oe,ue[le+7],14,1735328473),oe=ye(oe,re,ae,z,ue[le+12],20,-1926607734),z=we(z,oe,re,ae,ue[le+5],4,-378558),ae=we(ae,z,oe,re,ue[le+8],11,-2022574463),re=we(re,ae,z,oe,ue[le+11],16,1839030562),oe=we(oe,re,ae,z,ue[le+14],23,-35309556),z=we(z,oe,re,ae,ue[le+1],4,-1530992060),ae=we(ae,z,oe,re,ue[le+4],11,1272893353),re=we(re,ae,z,oe,ue[le+7],16,-155497632),oe=we(oe,re,ae,z,ue[le+10],23,-1094730640),z=we(z,oe,re,ae,ue[le+13],4,681279174),ae=we(ae,z,oe,re,ue[le+0],11,-358537222),re=we(re,ae,z,oe,ue[le+3],16,-722521979),oe=we(oe,re,ae,z,ue[le+6],23,76029189),z=we(z,oe,re,ae,ue[le+9],4,-640364487),ae=we(ae,z,oe,re,ue[le+12],11,-421815835),re=we(re,ae,z,oe,ue[le+15],16,530742520),oe=we(oe,re,ae,z,ue[le+2],23,-995338651),z=pe(z,oe,re,ae,ue[le+0],6,-198630844),ae=pe(ae,z,oe,re,ue[le+7],10,1126891415),re=pe(re,ae,z,oe,ue[le+14],15,-1416354905),oe=pe(oe,re,ae,z,ue[le+5],21,-57434055),z=pe(z,oe,re,ae,ue[le+12],6,1700485571),ae=pe(ae,z,oe,re,ue[le+3],10,-1894986606),re=pe(re,ae,z,oe,ue[le+10],15,-1051523),oe=pe(oe,re,ae,z,ue[le+1],21,-2054922799),z=pe(z,oe,re,ae,ue[le+8],6,1873313359),ae=pe(ae,z,oe,re,ue[le+15],10,-30611744),re=pe(re,ae,z,oe,ue[le+6],15,-1560198380),oe=pe(oe,re,ae,z,ue[le+13],21,1309151649),z=pe(z,oe,re,ae,ue[le+4],6,-145523070),ae=pe(ae,z,oe,re,ue[le+11],10,-1120210379),re=pe(re,ae,z,oe,ue[le+2],15,718787259),oe=pe(oe,re,ae,z,ue[le+9],21,-343485551),z=de(z,me),oe=de(oe,ve),re=de(re,Pe),ae=de(ae,Ae)}return Array(z,oe,re,ae)}function xe(ue,ee,z,oe,re,ae){return de(ge(de(de(ee,ue),de(oe,ae)),re),z)}function be(ue,ee,z,oe,re,ae,le){return xe(ee&z|~ee&oe,ue,ee,re,ae,le)}function ye(ue,ee,z,oe,re,ae,le){return xe(ee&oe|z&~oe,ue,ee,re,ae,le)}function we(ue,ee,z,oe,re,ae,le){return xe(ee^z^oe,ue,ee,re,ae,le)}function pe(ue,ee,z,oe,re,ae,le){return xe(z^(ee|~oe),ue,ee,re,ae,le)}function de(ue,ee){var z=(65535&ue)+(65535&ee);return(ue>>16)+(ee>>16)+(z>>16)<<16|65535&z}function ge(ue,ee){return ue<<ee|ue>>>32-ee}var fe=Se("./helpers");Be.exports=function(ue){return fe.hash(ue,Ce,16)}},{"./helpers":238}],240:[function(Se,Be,Le){"use strict";function Ce(de,ge){de[ge>>5]|=128<<24-ge%32,de[15+(ge+64>>9<<4)]=ge;for(var fe=Array(80),ue=1732584193,ee=-271733879,z=-1732584194,oe=271733878,re=-1009589776,ae=0;ae<de.length;ae+=16){for(var le=ue,me=ee,ve=z,Pe=oe,Ae=re,Oe=0;Oe<80;Oe++){fe[Oe]=Oe<16?de[ae+Oe]:we(fe[Oe-3]^fe[Oe-8]^fe[Oe-14]^fe[Oe-16],1);var Ie=ye(ye(we(ue,5),xe(Oe,ee,z,oe)),ye(ye(re,fe[Oe]),be(Oe)));re=oe,oe=z,z=we(ee,30),ee=ue,ue=Ie}ue=ye(ue,le),ee=ye(ee,me),z=ye(z,ve),oe=ye(oe,Pe),re=ye(re,Ae)}return Array(ue,ee,z,oe,re)}function xe(de,ge,fe,ue){return de<20?ge&fe|~ge&ue:de<40?ge^fe^ue:de<60?ge&fe|ge&ue|fe&ue:ge^fe^ue}function be(de){return de<20?1518500249:de<40?1859775393:de<60?-1894007588:-899497514}function ye(de,ge){var fe=(65535&de)+(65535&ge);return(de>>16)+(ge>>16)+(fe>>16)<<16|65535&fe}function we(de,ge){return de<<ge|de>>>32-ge}var pe=Se("./helpers");Be.exports=function(de){return pe.hash(de,Ce,20,!0)}},{"./helpers":238}],241:[function(Se,Be,Le){"use strict";var Ce=Se("./helpers"),xe=function(z,oe){var re=(65535&z)+(65535&oe);return(z>>16)+(oe>>16)+(re>>16)<<16|65535&re},be=function(z,oe){return z>>>oe|z<<32-oe},ye=function(z,oe){return z>>>oe},we=function(z,oe,re){return z&oe^~z&re},pe=function(z,oe,re){return z&oe^z&re^oe&re},de=function(z){return be(z,2)^be(z,13)^be(z,22)},ge=function(z){return be(z,6)^be(z,11)^be(z,25)},fe=function(z){return be(z,7)^be(z,18)^ye(z,3)},ue=function(z){return be(z,17)^be(z,19)^ye(z,10)},ee=function(z,oe){var re,ae,le,me,ve,Pe,Ae,Oe,Ie,Ze,qe,Je,mt=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),gt=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),Mt=new Array(64);z[oe>>5]|=128<<24-oe%32,z[15+(oe+64>>9<<4)]=oe;for(var Ie=0;Ie<z.length;Ie+=16){re=gt[0],ae=gt[1],le=gt[2],me=gt[3],ve=gt[4],Pe=gt[5],Ae=gt[6],Oe=gt[7];for(var Ze=0;Ze<64;Ze++)Mt[Ze]=Ze<16?z[Ze+Ie]:xe(xe(xe(ue(Mt[Ze-2]),Mt[Ze-7]),fe(Mt[Ze-15])),Mt[Ze-16]),qe=xe(xe(xe(xe(Oe,ge(ve)),we(ve,Pe,Ae)),mt[Ze]),Mt[Ze]),Je=xe(de(re),pe(re,ae,le)),Oe=Ae,Ae=Pe,Pe=ve,ve=xe(me,qe),me=le,le=ae,ae=re,re=xe(qe,Je);gt[0]=xe(re,gt[0]),gt[1]=xe(ae,gt[1]),gt[2]=xe(le,gt[2]),gt[3]=xe(me,gt[3]),gt[4]=xe(ve,gt[4]),gt[5]=xe(Pe,gt[5]),gt[6]=xe(Ae,gt[6]),gt[7]=xe(Oe,gt[7])}return gt};Be.exports=function(z){return Ce.hash(z,ee,32,!0)}},{"./helpers":238}],242:[function(Se,Be,Le){(function(Ce){"use strict";function xe(ee){return ee&&ee.__esModule?ee:{default:ee}}var be=Se("babel-runtime/core-js/object/create"),ye=xe(be),we=Se("babel-runtime/helpers/classCallCheck"),pe=xe(we),de=Se("babel-runtime/helpers/createClass"),ge=xe(de),fe=Se("babel-runtime/helpers/typeof"),ue=xe(fe);(function(ee){if((Le===void 0?"undefined":(0,ue.default)(Le))==="object"&&Be!==void 0)Be.exports=ee();else if(typeof ke=="function"&&ke.amd)ke([],ee);else{var z;z=typeof window!="undefined"?window:Ce!==void 0?Ce:typeof self!="undefined"?self:this,z.mime=ee()}})(function(){return function ee(z,oe,re){function ae(ve,Pe){if(!oe[ve]){if(!z[ve]){var Ae=typeof Se=="function"&&Se;if(!Pe&&Ae)return Ae(ve,!0);if(le)return le(ve,!0);var Oe=new Error("Cannot find module '"+ve+"'");throw Oe.code="MODULE_NOT_FOUND",Oe}var Ie=oe[ve]={exports:{}};z[ve][0].call(Ie.exports,function(Ze){var qe=z[ve][1][Ze];return ae(qe||Ze)},Ie,Ie.exports,ee,z,oe,re)}return oe[ve].exports}for(var le=typeof Se=="function"&&Se,me=0;me<re.length;me++)ae(re[me]);return ae}({1:[function(ee,z,oe){var re=function(){function ae(){(0,pe.default)(this,ae),this._types=(0,ye.default)(null),this._extensions=(0,ye.default)(null);for(var le=0;le<arguments.length;le++)this.define(arguments[le])}return(0,ge.default)(ae,[{key:"define",value:function(le,me){for(var ve in le){for(var Pe=le[ve],Ae=0;Ae<Pe.length;Ae++){var Oe=Pe[Ae];if(!me&&Oe in this._types)throw new Error('Attempt to change mapping for "'+Oe+'" extension from "'+this._types[Oe]+'" to "'+ve+'". Pass `force=true` to allow this, otherwise remove "'+Oe+'" from the list of extensions for "'+ve+'".');this._types[Oe]=ve}!me&&this._extensions[ve]||(this._extensions[ve]=Pe[0])}}},{key:"getType",value:function(le){le=String(le);var me=le.replace(/^.*[\/\\]/,"").toLowerCase(),ve=me.replace(/^.*\./,"").toLowerCase(),Pe=me.length<le.length;return(ve.length<me.length-1||!Pe)&&this._types[ve]||null}},{key:"getExtension",value:function(le){return(le=/^\s*([^;\s]*)/.test(le)&&RegExp.$1)&&this._extensions[le.toLowerCase()]||null}}]),ae}();z.exports=re},{}],2:[function(ee,z,oe){var re=ee("./Mime");z.exports=new re(ee("./types/standard"),ee("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(ee,z,oe){z.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(ee,z,oe){z.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"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":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"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/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/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"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/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/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"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/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/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"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/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"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":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"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"]}},{}]},{},[2])(2)})}).call(this,typeof Re.g!="undefined"?Re.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(Se,Be,Le){"use strict";Le.encodeURIComponent=function(Ce){try{return encodeURIComponent(Ce)}catch(xe){return Ce}},Le.escape=Se("escape-html"),Le.timestamp=function(Ce){if(Ce){var xe=Ce;return typeof xe=="string"&&(xe=Number(xe)),String(Ce).length===10&&(xe*=1e3),new Date(xe)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(Se,Be,Le){(function(Ce,xe){"use strict";function be(Oe){return Oe&&Oe.__esModule?Oe:{default:Oe}}function ye(Oe,Ie){return Oe===void 0?Ie:Oe}function we(Oe,Ie){return function(Ze,qe,Je){if(Ze)return Ie(Ze);Oe({data:qe,status:Je.statusCode,headers:Je.headers,res:Je})}}var pe,de=Se("babel-runtime/core-js/json/stringify"),ge=be(de),fe=Se("babel-runtime/helpers/typeof"),ue=be(fe),ee=Se("util"),z=Se("url"),oe=Se("http"),re=Se("https"),ae=Se("debug")("urllib"),le=Se("humanize-ms"),me=0,ve=Math.pow(2,31)-10,Pe=/^https?:\/\//i;Le.TIMEOUTS=[le("300s"),le("300s")];var Ae=["json","text"];Le.request=function(Oe,Ie,Ze){return arguments.length===2&&typeof Ie=="function"&&(Ze=Ie,Ie=null),typeof Ze=="function"?Le.requestWithCallback(Oe,Ie,Ze):(pe||(pe=Se("any-promise")),new pe(function(qe,Je){Le.requestWithCallback(Oe,Ie,we(qe,Je))}))},Le.requestWithCallback=function(Oe,Ie,Ze){function qe(){tt&&(clearTimeout(tt),tt=null)}function Je(){Ke&&(clearTimeout(Ke),Ke=null)}function mt(dn,Zn,vn){if(Je(),!Ze)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),ut,Ce.pid,jt.method,Oe),void(dn&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),ut,Ce.pid,dn.name,dn.message,dn.stack));var Wn=Ze;Ze=null;var ri={};if(vn&&(Ve=vn.statusCode,ri=vn.headers),Ve===401&&ri["www-authenticate"]&&(!Ie.headers||!Ie.headers.Authorization)&&Ie.digestAuth){var Ni=ri["www-authenticate"];if(Ni.indexOf("Digest ")>=0)return ae("Request#%d %s: got digest auth header WWW-Authenticate: %s",ut,Oe,Ni),Ie.headers=Ie.headers||{},Ie.headers.Authorization=digestAuthHeader(jt.method,jt.path,Ni,Ie.digestAuth),ae("Request#%d %s: auth with digest header: %s",ut,Oe,Ie.headers.Authorization),vn.headers["set-cookie"]&&(Ie.headers.Cookie=vn.headers["set-cookie"].join(";")),Le.requestWithCallback(Oe,Ie,Wn)}var Qn=Date.now()-yt;Xt&&(Xt.contentDownload=Qn),ae("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Qn,We,Ve,jt.method,jt.host,jt.path,$e,Xt);var ki={status:Ve,statusCode:Ve,headers:ri,size:We,aborted:pt,rt:Qn,keepAliveSocket:$e,data:Zn,requestUrls:Ie.requestUrls,timing:Xt,remoteAddress:Lt,remotePort:on};if(dn){var Hi="";Ut&&typeof Ut.getCurrentStatus=="function"&&(Hi=", agent status: "+(0,ge.default)(Ut.getCurrentStatus())),dn.message+=", "+jt.method+" "+Oe+" "+Ve+" (connected: "+ze+", keepalive socket: "+$e+Hi+`)
|
|
|
headers: `+(0,ge.default)(ri),dn.data=Zn,dn.path=jt.path,dn.status=Ve,dn.headers=ri,dn.res=ki}Wn(dn,Zn,Ie.streaming?vn:ki),Ie.emitter&&(ot.url=Oe,ot.socket=Sn&&Sn.connection,ot.options=jt,ot.size=rt,Ie.emitter.emit("response",{requestId:ut,error:dn,ctx:Ie.ctx,req:ot,res:ki}))}function gt(dn){var Zn=null;if(Ie.followRedirect&&statuses.redirect[dn.statusCode]){Ie._followRedirectCount=(Ie._followRedirectCount||0)+1;var vn=dn.headers.location;if(vn){if(!(Ie._followRedirectCount>Ie.maxRedirects)){var Wn=Ie.formatRedirectUrl?Ie.formatRedirectUrl(Oe,vn):z.resolve(Oe,vn);ae("Request#%d %s: `redirected` from %s to %s",ut,jt.path,Oe,Wn),Je(),Ie.headers&&Ie.headers.Host&&Pe.test(vn)&&(Ie.headers.Host=null);var ri=Ze;return Ze=null,Le.requestWithCallback(Wn,Ie,ri),{redirect:!0,error:null}}Zn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Oe),Zn.name="MaxRedirectError"}else Zn=new Error("Got statusCode "+dn.statusCode+" but cannot resolve next location from headers"),Zn.name="FollowRedirectError"}return{redirect:!1,error:Zn}}function Mt(dn,Zn,vn){return vn(null,Zn,dn.headers["content-encoding"])}function at(dn){if(Xt&&(Xt.waiting=Date.now()-yt),ae("Request#%d %s `req response` event emit: status %d, headers: %j",ut,Oe,dn.statusCode,dn.headers),Ie.streaming){var Zn=gt(dn);return Zn.redirect?void dn.resume():Zn.error?(dn.resume(),mt(Zn.error,null,dn)):mt(null,null,dn)}if(dn.on("close",function(){ae("Request#%d %s: `res close` event emit, total size %d",ut,Oe,We)}),dn.on("error",function(){ae("Request#%d %s: `res error` event emit, total size %d",ut,Oe,We)}),dn.on("aborted",function(){pt=!0,ae("Request#%d %s: `res aborted` event emit, total size %d",ut,Oe,We)}),Rt){var Zn=gt(dn);return Zn.redirect?void dn.resume():Zn.error?(dn.resume(),Rt.end(),mt(Zn.error,null,dn)):(Ie.consumeWriteStream===!1?dn.on("end",mt.bind(null,null,null,dn)):isNode010||isNode012?first([[Rt,"close"],[dn,"aborted"]],function(ri,Ni,Qn){ae("Request#%d %s: writeStream or res %s event emitted",ut,Oe,Qn),mt(De||null,null,dn)}):Rt.on("close",function(){ae("Request#%d %s: writeStream close event emitted",ut,Oe),mt(De||null,null,dn)}),dn.pipe(Rt))}var vn=[];dn.on("data",function(Wn){ae("Request#%d %s: `res data` event emit, size %d",ut,Oe,Wn.length),We+=Wn.length,vn.push(Wn)}),dn.on("end",function(){var Wn=xe.concat(vn,We);if(ae("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",ut,Oe,We,dn._dumped),De)return mt(De,Wn,dn);var ri=gt(dn);if(ri.error)return mt(ri.error,Wn,dn);ri.redirect||Mt(dn,Wn,function(Ni,Qn,ki){if(Ni)return mt(Ni,Wn,dn);if(!ki&&Ae.indexOf(Ie.dataType)>=0){try{Qn=decodeBodyByCharset(Qn,dn)}catch(Gi){return ae("decodeBodyByCharset error: %s",Gi),mt(null,Qn,dn)}if(Ie.dataType==="json")if(We===0)Qn=null;else{var Hi=parseJSON(Qn,cn);Hi.error?Ni=Hi.error:Qn=Hi.data}}pt&&ae("Request#%d %s: Remote socket was terminated before `response.end()` was called",ut,Oe),mt(Ni,Qn,dn)})})}function _t(){ae("Response timer ticking, timeout: %d",En),Ke=setTimeout(function(){Ke=null;var dn="Response timeout for "+En+"ms";De=new Error(dn),De.name="ResponseTimeoutError",De.requestId=ut,ae("ResponseTimeout: Request#%d %s %s: %s, connected: %s",ut,Oe,De.name,dn,ze),ht()},En)}function ht(){ae("Request#%d %s abort, connected: %s",ut,Oe,ze),Sn.socket||(De.noSocket=!0,mt(De)),Sn.abort()}if(!Oe||typeof Oe!="string"&&(Oe===void 0?"undefined":(0,ue.default)(Oe))!=="object"){var Dt=ee.format("expect request url to be a string or a http request options, but got %j",Oe);throw new Error(Dt)}arguments.length===2&&typeof Ie=="function"&&(Ze=Ie,Ie=null),Ie=Ie||{},me>=ve&&(me=0);var ut=++me;Ie.requestUrls=Ie.requestUrls||[];var ot={requestId:ut,url:Oe,args:Ie,ctx:Ie.ctx};Ie.emitter&&Ie.emitter.emit("request",ot),Ie.timeout=Ie.timeout||Le.TIMEOUTS,Ie.maxRedirects=Ie.maxRedirects||10,Ie.streaming=Ie.streaming||Ie.customResponse;var ct,yt=Date.now();typeof Oe=="string"?(Pe.test(Oe)||(Oe="http://"+Oe),ct=z.parse(Oe)):ct=Oe;var wt=(Ie.type||Ie.method||ct.method||"GET").toUpperCase(),xt=ct.port||80,zt=oe,Ut=ye(Ie.agent,Le.agent),cn=Ie.fixJSONCtlChars;ct.protocol==="https:"&&(zt=re,Ut=ye(Ie.httpsAgent,Le.httpsAgent),ct.port||(xt=443));var jt={host:ct.hostname||ct.host||"localhost",path:ct.path||"/",method:wt,port:xt,agent:Ut,headers:Ie.headers||{},lookup:Ie.lookup};Array.isArray(Ie.timeout)?jt.requestTimeout=Ie.timeout[Ie.timeout.length-1]:Ie.timeout!==void 0&&(jt.requestTimeout=Ie.timeout);for(var mn=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Ft=0;Ft<mn.length;Ft++){var Yt=mn[Ft];Ie.hasOwnProperty(Yt)&&(jt[Yt]=Ie[Yt])}jt.rejectUnauthorized!==!1||jt.hasOwnProperty("secureOptions")||(jt.secureOptions=Se("constants").SSL_OP_NO_TLSv1_2);var tn=Ie.auth||ct.auth;tn&&(jt.auth=tn);var lt=Ie.content||Ie.data,Ue=wt==="GET"||wt==="HEAD"||Ie.dataAsQueryString;if(!Ie.content&<&&typeof lt!="string"&&!xe.isBuffer(lt))if(Ue)lt=Ie.nestedQuerystring?qs.stringify(lt):querystring.stringify(lt);else{var je=jt.headers["Content-Type"]||jt.headers["content-type"];je||(je=Ie.contentType==="json"?"application/json":"application/x-www-form-urlencoded",jt.headers["Content-Type"]=je),lt=parseContentType(je).type==="application/json"?(0,ge.default)(lt):Ie.nestedQuerystring?qs.stringify(lt):querystring.stringify(lt)}Ue&<&&(jt.path+=(ct.query?"&":"?")+lt,lt=null);var rt=0;if(lt){var dt=lt.length;xe.isBuffer(lt)||(dt=xe.byteLength(lt)),rt=jt.headers["Content-Length"]=dt}Ie.dataType==="json"&&(jt.headers.Accept="application/json"),typeof Ie.beforeRequest=="function"&&Ie.beforeRequest(jt);var tt=null,Ke=null,De=null,ze=!1,$e=!1,We=0,Ve=-1,pt=!1,Lt="",on="",Xt=null;Ie.timing&&(Xt={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),jt.headers["User-Agent"]||jt.headers["user-agent"]||(jt.headers["User-Agent"]=navigator.userAgent),Ie.gzip&&(jt.headers["Accept-Encoding"]||jt.headers["accept-encoding"]||(jt.headers["Accept-Encoding"]="gzip"));var Rt=Ie.writeStream;ae("Request#%d %s %s with headers %j, options.path: %s",ut,wt,Oe,jt.headers,jt.path),Ie.requestUrls.push(Oe);var fn,En;Array.isArray(Ie.timeout)?(fn=le(Ie.timeout[0]),En=le(Ie.timeout[1])):fn=En=le(Ie.timeout),ae("ConnectTimeout: %d, ResponseTimeout: %d",fn,En);var Sn;try{Sn=zt.request(jt,at)}catch(dn){return mt(dn)}return typeof window=="undefined"?function(){ae("Connect timer ticking, timeout: %d",fn),tt=setTimeout(function(){tt=null,Ve===-1&&(Ve=-2);var dn="Connect timeout for "+fn+"ms",Zn="ConnectionTimeoutError";Sn.socket||(Zn="SocketAssignTimeoutError",dn+=", working sockets is full"),De=new Error(dn),De.name=Zn,De.requestId=ut,ae("ConnectTimeout: Request#%d %s %s: %s, connected: %s",ut,Oe,De.name,dn,ze),ht()},fn)}():Sn.on("requestTimeout",function(){Ve===-1&&(Ve=-2);var dn="Connect timeout for "+fn+"ms";De=new Error(dn),De.name="ConnectionTimeoutError",De.requestId=ut,ht()}),Xt&&Sn.on("finish",function(){Xt.requestSent=Date.now()-yt}),Sn.once("socket",function(dn){Xt&&(Xt.queuing=Date.now()-yt),isNode010&&dn.socket&&(dn=dn.socket);var Zn=dn.readyState;if(Zn==="opening")return dn.once("lookup",function(vn,Wn,ri){ae("Request#%d %s lookup: %s, %s, %s",ut,Oe,vn,Wn,ri),Xt&&(Xt.dnslookup=Date.now()-yt),Wn&&(Lt=Wn)}),void dn.once("connect",function(){Xt&&(Xt.connected=Date.now()-yt),qe(),_t(),ae("Request#%d %s new socket connected",ut,Oe),ze=!0,Lt||(Lt=dn.remoteAddress),on=dn.remotePort});ae("Request#%d %s reuse socket connected, readyState: %s",ut,Oe,Zn),ze=!0,$e=!0,Lt||(Lt=dn.remoteAddress),on=dn.remotePort,qe(),_t()}),Sn.on("error",function(dn){dn.name!=="Error"&&dn.name!=="TypeError"||(dn.name=ze?"ResponseError":"RequestError"),dn.message+=' (req "error")',ae("Request#%d %s `req error` event emit, %s: %s",ut,Oe,dn.name,dn.message),mt(De||dn)}),Rt&&Rt.once("error",function(dn){dn.message+=' (writeStream "error")',De=dn,ae("Request#%d %s `writeStream error` event emit, %s: %s",ut,Oe,dn.name,dn.message),ht()}),Ie.stream?(Ie.stream.pipe(Sn),Ie.stream.once("error",function(dn){dn.message+=' (stream "error")',De=dn,ae("Request#%d %s `readStream error` event emit, %s: %s",ut,Oe,dn.name,dn.message),ht()})):Sn.end(lt),Sn.requestId=ut,Sn}}).call(this,Se("_process"),Se("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),function(ke){function Se(Le){if(Be[Le])return Be[Le].exports;var Ce=Be[Le]={i:Le,l:!1,exports:{}};return ke[Le].call(Ce.exports,Ce,Ce.exports,Se),Ce.l=!0,Ce.exports}var Be={};Se.m=ke,Se.c=Be,Se.d=function(Le,Ce,xe){Se.o(Le,Ce)||Object.defineProperty(Le,Ce,{configurable:!1,enumerable:!0,get:xe})},Se.n=function(Le){var Ce=Le&&Le.__esModule?function(){return Le.default}:function(){return Le};return Se.d(Ce,"a",Ce),Ce},Se.o=function(Le,Ce){return Object.prototype.hasOwnProperty.call(Le,Ce)},Se.p="",Se(Se.s=12)}([function(ke,Se,Be){(function(Le,Ce){ke.exports=Se=Ce()})(0,function(){var Le=Le||function(Ce,xe){var be=Object.create||function(){function re(){}return function(ae){var le;return re.prototype=ae,le=new re,re.prototype=null,le}}(),ye={},we=ye.lib={},pe=we.Base=function(){return{extend:function(re){var ae=be(this);return re&&ae.mixIn(re),ae.hasOwnProperty("init")&&this.init!==ae.init||(ae.init=function(){ae.$super.init.apply(this,arguments)}),ae.init.prototype=ae,ae.$super=this,ae},create:function(){var re=this.extend();return re.init.apply(re,arguments),re},init:function(){},mixIn:function(re){for(var ae in re)re.hasOwnProperty(ae)&&(this[ae]=re[ae]);re.hasOwnProperty("toString")&&(this.toString=re.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),de=we.WordArray=pe.extend({init:function(re,ae){re=this.words=re||[],this.sigBytes=ae!=null?ae:4*re.length},toString:function(re){return(re||fe).stringify(this)},concat:function(re){var ae=this.words,le=re.words,me=this.sigBytes,ve=re.sigBytes;if(this.clamp(),me%4)for(var Pe=0;Pe<ve;Pe++){var Ae=le[Pe>>>2]>>>24-Pe%4*8&255;ae[me+Pe>>>2]|=Ae<<24-(me+Pe)%4*8}else for(var Pe=0;Pe<ve;Pe+=4)ae[me+Pe>>>2]=le[Pe>>>2];return this.sigBytes+=ve,this},clamp:function(){var re=this.words,ae=this.sigBytes;re[ae>>>2]&=4294967295<<32-ae%4*8,re.length=Ce.ceil(ae/4)},clone:function(){var re=pe.clone.call(this);return re.words=this.words.slice(0),re},random:function(re){for(var ae,le=[],me=0;me<re;me+=4){var ve=function(Ae){var Ae=Ae,Oe=987654321,Ie=4294967295;return function(){Oe=36969*(65535&Oe)+(Oe>>16)&Ie,Ae=18e3*(65535&Ae)+(Ae>>16)&Ie;var Ze=(Oe<<16)+Ae&Ie;return Ze/=4294967296,(Ze+=.5)*(Ce.random()>.5?1:-1)}}(4294967296*(ae||Ce.random()));ae=987654071*ve(),le.push(4294967296*ve()|0)}return new de.init(le,re)}}),ge=ye.enc={},fe=ge.Hex={stringify:function(re){for(var ae=re.words,le=re.sigBytes,me=[],ve=0;ve<le;ve++){var Pe=ae[ve>>>2]>>>24-ve%4*8&255;me.push((Pe>>>4).toString(16)),me.push((15&Pe).toString(16))}return me.join("")},parse:function(re){for(var ae=re.length,le=[],me=0;me<ae;me+=2)le[me>>>3]|=parseInt(re.substr(me,2),16)<<24-me%8*4;return new de.init(le,ae/2)}},ue=ge.Latin1={stringify:function(re){for(var ae=re.words,le=re.sigBytes,me=[],ve=0;ve<le;ve++){var Pe=ae[ve>>>2]>>>24-ve%4*8&255;me.push(String.fromCharCode(Pe))}return me.join("")},parse:function(re){for(var ae=re.length,le=[],me=0;me<ae;me++)le[me>>>2]|=(255&re.charCodeAt(me))<<24-me%4*8;return new de.init(le,ae)}},ee=ge.Utf8={stringify:function(re){try{return decodeURIComponent(escape(ue.stringify(re)))}catch(ae){throw new Error("Malformed UTF-8 data")}},parse:function(re){return ue.parse(unescape(encodeURIComponent(re)))}},z=we.BufferedBlockAlgorithm=pe.extend({reset:function(){this._data=new de.init,this._nDataBytes=0},_append:function(re){typeof re=="string"&&(re=ee.parse(re)),this._data.concat(re),this._nDataBytes+=re.sigBytes},_process:function(re){var ae=this._data,le=ae.words,me=ae.sigBytes,ve=this.blockSize,Pe=4*ve,Ae=me/Pe;Ae=re?Ce.ceil(Ae):Ce.max((0|Ae)-this._minBufferSize,0);var Oe=Ae*ve,Ie=Ce.min(4*Oe,me);if(Oe){for(var Ze=0;Ze<Oe;Ze+=ve)this._doProcessBlock(le,Ze);var qe=le.splice(0,Oe);ae.sigBytes-=Ie}return new de.init(qe,Ie)},clone:function(){var re=pe.clone.call(this);return re._data=this._data.clone(),re},_minBufferSize:0}),oe=(we.Hasher=z.extend({cfg:pe.extend(),init:function(re){this.cfg=this.cfg.extend(re),this.reset()},reset:function(){z.reset.call(this),this._doReset()},update:function(re){return this._append(re),this._process(),this},finalize:function(re){return re&&this._append(re),this._doFinalize()},blockSize:16,_createHelper:function(re){return function(ae,le){return new re.init(le).finalize(ae)}},_createHmacHelper:function(re){return function(ae,le){return new oe.HMAC.init(re,le).finalize(ae)}}}),ye.algo={});return ye}(Math);return Le})},function(ke,Se,Be){"use strict";function Le(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Le(this,be)}return Ce(be,null,[{key:"detectIEVersion",value:function(){for(var ye=4,we=document.createElement("div"),pe=we.getElementsByTagName("i");we.innerHTML="<!--[if gt IE "+ye+"]><i></i><![endif]-->",pe[0];)ye++;return ye>4&&ye}},{key:"extend",value:function(ye,we){for(var pe in we)Object.prototype.hasOwnProperty.call(we,pe)&&we[pe]&&(ye[pe]=we[pe])}},{key:"isArray",value:function(ye){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(ye){return ye=ye.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(ye)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(ye)?"audio":/.bmp|.jpg|.jpeg|.png/.test(ye)?"img":"other"}},{key:"isImage",value:function(ye){return ye=ye.toLowerCase(),!!/.jpg|.jpeg|.png/.test(ye)}},{key:"ISODateString",value:function(ye){function we(pe){return pe<10?"0"+pe:pe}return ye.getUTCFullYear()+"-"+we(ye.getUTCMonth()+1)+"-"+we(ye.getUTCDate())+"T"+we(ye.getUTCHours())+":"+we(ye.getUTCMinutes())+":"+we(ye.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(ye){return!!/^\d+$/.test(ye)}}]),be}();Se.default=xe},function(ke,Se,Be){(function(Le,Ce){ke.exports=Se=Ce(Be(0))})(0,function(Le){return function(Ce){function xe(oe,re,ae,le,me,ve,Pe){var Ae=oe+(re&ae|~re&le)+me+Pe;return(Ae<<ve|Ae>>>32-ve)+re}function be(oe,re,ae,le,me,ve,Pe){var Ae=oe+(re&le|ae&~le)+me+Pe;return(Ae<<ve|Ae>>>32-ve)+re}function ye(oe,re,ae,le,me,ve,Pe){var Ae=oe+(re^ae^le)+me+Pe;return(Ae<<ve|Ae>>>32-ve)+re}function we(oe,re,ae,le,me,ve,Pe){var Ae=oe+(ae^(re|~le))+me+Pe;return(Ae<<ve|Ae>>>32-ve)+re}var pe=Le,de=pe.lib,ge=de.WordArray,fe=de.Hasher,ue=pe.algo,ee=[];(function(){for(var oe=0;oe<64;oe++)ee[oe]=4294967296*Ce.abs(Ce.sin(oe+1))|0})();var z=ue.MD5=fe.extend({_doReset:function(){this._hash=new ge.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(oe,re){for(var ae=0;ae<16;ae++){var le=re+ae,me=oe[le];oe[le]=16711935&(me<<8|me>>>24)|4278255360&(me<<24|me>>>8)}var ve=this._hash.words,Pe=oe[re+0],Ae=oe[re+1],Oe=oe[re+2],Ie=oe[re+3],Ze=oe[re+4],qe=oe[re+5],Je=oe[re+6],mt=oe[re+7],gt=oe[re+8],Mt=oe[re+9],at=oe[re+10],_t=oe[re+11],ht=oe[re+12],Dt=oe[re+13],ut=oe[re+14],ot=oe[re+15],ct=ve[0],yt=ve[1],wt=ve[2],xt=ve[3];ct=xe(ct,yt,wt,xt,Pe,7,ee[0]),xt=xe(xt,ct,yt,wt,Ae,12,ee[1]),wt=xe(wt,xt,ct,yt,Oe,17,ee[2]),yt=xe(yt,wt,xt,ct,Ie,22,ee[3]),ct=xe(ct,yt,wt,xt,Ze,7,ee[4]),xt=xe(xt,ct,yt,wt,qe,12,ee[5]),wt=xe(wt,xt,ct,yt,Je,17,ee[6]),yt=xe(yt,wt,xt,ct,mt,22,ee[7]),ct=xe(ct,yt,wt,xt,gt,7,ee[8]),xt=xe(xt,ct,yt,wt,Mt,12,ee[9]),wt=xe(wt,xt,ct,yt,at,17,ee[10]),yt=xe(yt,wt,xt,ct,_t,22,ee[11]),ct=xe(ct,yt,wt,xt,ht,7,ee[12]),xt=xe(xt,ct,yt,wt,Dt,12,ee[13]),wt=xe(wt,xt,ct,yt,ut,17,ee[14]),yt=xe(yt,wt,xt,ct,ot,22,ee[15]),ct=be(ct,yt,wt,xt,Ae,5,ee[16]),xt=be(xt,ct,yt,wt,Je,9,ee[17]),wt=be(wt,xt,ct,yt,_t,14,ee[18]),yt=be(yt,wt,xt,ct,Pe,20,ee[19]),ct=be(ct,yt,wt,xt,qe,5,ee[20]),xt=be(xt,ct,yt,wt,at,9,ee[21]),wt=be(wt,xt,ct,yt,ot,14,ee[22]),yt=be(yt,wt,xt,ct,Ze,20,ee[23]),ct=be(ct,yt,wt,xt,Mt,5,ee[24]),xt=be(xt,ct,yt,wt,ut,9,ee[25]),wt=be(wt,xt,ct,yt,Ie,14,ee[26]),yt=be(yt,wt,xt,ct,gt,20,ee[27]),ct=be(ct,yt,wt,xt,Dt,5,ee[28]),xt=be(xt,ct,yt,wt,Oe,9,ee[29]),wt=be(wt,xt,ct,yt,mt,14,ee[30]),yt=be(yt,wt,xt,ct,ht,20,ee[31]),ct=ye(ct,yt,wt,xt,qe,4,ee[32]),xt=ye(xt,ct,yt,wt,gt,11,ee[33]),wt=ye(wt,xt,ct,yt,_t,16,ee[34]),yt=ye(yt,wt,xt,ct,ut,23,ee[35]),ct=ye(ct,yt,wt,xt,Ae,4,ee[36]),xt=ye(xt,ct,yt,wt,Ze,11,ee[37]),wt=ye(wt,xt,ct,yt,mt,16,ee[38]),yt=ye(yt,wt,xt,ct,at,23,ee[39]),ct=ye(ct,yt,wt,xt,Dt,4,ee[40]),xt=ye(xt,ct,yt,wt,Pe,11,ee[41]),wt=ye(wt,xt,ct,yt,Ie,16,ee[42]),yt=ye(yt,wt,xt,ct,Je,23,ee[43]),ct=ye(ct,yt,wt,xt,Mt,4,ee[44]),xt=ye(xt,ct,yt,wt,ht,11,ee[45]),wt=ye(wt,xt,ct,yt,ot,16,ee[46]),yt=ye(yt,wt,xt,ct,Oe,23,ee[47]),ct=we(ct,yt,wt,xt,Pe,6,ee[48]),xt=we(xt,ct,yt,wt,mt,10,ee[49]),wt=we(wt,xt,ct,yt,ut,15,ee[50]),yt=we(yt,wt,xt,ct,qe,21,ee[51]),ct=we(ct,yt,wt,xt,ht,6,ee[52]),xt=we(xt,ct,yt,wt,Ie,10,ee[53]),wt=we(wt,xt,ct,yt,at,15,ee[54]),yt=we(yt,wt,xt,ct,Ae,21,ee[55]),ct=we(ct,yt,wt,xt,gt,6,ee[56]),xt=we(xt,ct,yt,wt,ot,10,ee[57]),wt=we(wt,xt,ct,yt,Je,15,ee[58]),yt=we(yt,wt,xt,ct,Dt,21,ee[59]),ct=we(ct,yt,wt,xt,Ze,6,ee[60]),xt=we(xt,ct,yt,wt,_t,10,ee[61]),wt=we(wt,xt,ct,yt,Oe,15,ee[62]),yt=we(yt,wt,xt,ct,Mt,21,ee[63]),ve[0]=ve[0]+ct|0,ve[1]=ve[1]+yt|0,ve[2]=ve[2]+wt|0,ve[3]=ve[3]+xt|0},_doFinalize:function(){var oe=this._data,re=oe.words,ae=8*this._nDataBytes,le=8*oe.sigBytes;re[le>>>5]|=128<<24-le%32;var me=Ce.floor(ae/4294967296),ve=ae;re[15+(le+64>>>9<<4)]=16711935&(me<<8|me>>>24)|4278255360&(me<<24|me>>>8),re[14+(le+64>>>9<<4)]=16711935&(ve<<8|ve>>>24)|4278255360&(ve<<24|ve>>>8),oe.sigBytes=4*(re.length+1),this._process();for(var Pe=this._hash,Ae=Pe.words,Oe=0;Oe<4;Oe++){var Ie=Ae[Oe];Ae[Oe]=16711935&(Ie<<8|Ie>>>24)|4278255360&(Ie<<24|Ie>>>8)}return Pe},clone:function(){var oe=fe.clone.call(this);return oe._hash=this._hash.clone(),oe}});pe.MD5=fe._createHelper(z),pe.HmacMD5=fe._createHmacHelper(z)}(Math),Le.MD5})},function(ke,Se,Be){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},Se.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},Se.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(ke,Se,Be){"use strict";function Le(z){return z&&z.__esModule?z:{default:z}}function Ce(z,oe){if(!(z instanceof oe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function z(oe,re){for(var ae=0;ae<re.length;ae++){var le=re[ae];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(oe,le.key,le)}}return function(oe,re,ae){return re&&z(oe.prototype,re),ae&&z(oe,ae),oe}}(),be=Be(5),ye=Le(be),we=Be(25),pe=Le(we),de=Be(6),ge=Le(de),fe=Be(7),ue=Le(fe),ee=function(){function z(oe){Ce(this,z);var re=ue.default.os.name,ae=ue.default.os.version||"",le=ue.default.browser.name,me=ue.default.browser.version||"",ve=window.location.href,Pe="";ve&&(Pe=ue.default.getHost(ve));var Ae="pc";ue.default.os.ipad?Ae="pad":(ue.default.os.iphone||ue.default.os.android)&&(Ae="phone"),this._ri=ye.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:ge.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:z.getUuid(),os:re,ov:ae,et:le,ev:me,uat:navigator.userAgent,app_n:Pe,tt:Ae,dm:"h5",ut:""}}return xe(z,[{key:"log",value:function(oe,re){re&&re.ri?(this._ri=re.ri,delete re.ri):this._ri=ye.default.create(),re&&re.ut&&(this.initParam.ut=re.ut,delete re.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=oe=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=oe;var ae=[];if(re)for(var le in re)ae.push(le+"="+re[le]);var me=ae.join("&");this.initParam.args=encodeURIComponent(me==""?"0":me);var ve=[];for(var le in this.initParam)ve.push(le+"="+this.initParam[le]);var Pe=ve.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(Pe):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+Pe}}],[{key:"getUuid",value:function(){var oe=pe.default.get("p_h5_upload_u");return oe||(oe=ye.default.create(),pe.default.set("p_h5_upload_u",oe,730)),oe}},{key:"getClientId",value:function(){return pe.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(oe){return oe||(oe=ye.default.create()),pe.default.set("p_h5_upload_clientId",oe,730),oe}}]),z}();Se.default=ee},function(ke,Se,Be){"use strict";function Le(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Le(this,be)}return Ce(be,null,[{key:"create",value:function(ye,we){var pe,de="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),ge=[];if(we=we||de.length,ye)for(pe=0;pe<ye;pe++)ge[pe]=de[0|Math.random()*we];else{var fe;for(ge[8]=ge[13]=ge[18]=ge[23]="-",ge[14]="4",pe=0;pe<36;pe++)ge[pe]||(fe=0|16*Math.random(),ge[pe]=de[pe==19?3&fe|8:fe])}return ge.join("")}}]),be}();Se.default=xe},function(ke,Se,Be){"use strict";Object.defineProperty(Se,"__esModule",{value:!0});var Le={version:"1.5.0"};Se.default=Le},function(ke,Se,Be){"use strict";function Le(de,ge){if(!(de instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function de(ge,fe){for(var ue=0;ue<fe.length;ue++){var ee=fe[ue];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(ge,ee.key,ee)}}return function(ge,fe,ue){return fe&&de(ge.prototype,fe),ue&&de(ge,ue),ge}}(),xe=function(de){var ge=navigator.userAgent,fe="other";if(de.ios)return"iOS";if(de.android)return"android";if(ge.indexOf("Baiduspider")>-1)return"Baiduspider";if(ge.indexOf("PlayStation")>-1)return"PS4";var ue=navigator.platform=="Win32"||navigator.platform=="Windows"||ge.indexOf("Windows")>-1,ee=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return ee&&(fe="macOS"),navigator.platform=="X11"&&!ue&&!ee&&(fe="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(fe="Linux"),ue?"windows":fe},be=function(){var de=navigator.userAgent,ge="";return(de.indexOf("Windows NT 5.0")>-1||de.indexOf("Windows 2000")>-1)&&(ge="2000"),(de.indexOf("Windows NT 5.1")>-1||de.indexOf("Windows XP")>-1)&&(ge="XP"),(de.indexOf("Windows NT 5.2")>-1||de.indexOf("Windows 2003")>-1)&&(ge="2003"),(de.indexOf("Windows NT 6.0")>-1||de.indexOf("Windows Vista")>-1)&&(ge="Vista"),(de.indexOf("Windows NT 6.1")>-1||de.indexOf("Windows 7")>-1)&&(ge="7"),(de.indexOf("Windows NT 6.2")>-1||de.indexOf("Windows 8")>-1)&&(ge="8"),(de.indexOf("Windows NT 6.3")>-1||de.indexOf("Windows 8.1")>-1)&&(ge="8.1"),(de.indexOf("Windows NT 10")>-1||de.indexOf("Windows 10")>-1)&&(ge="10"),ge},ye=function(de){var ge=navigator.userAgent.toLowerCase();return de.chrome?"Chrome":de.firefox?"Firefox":de.safari?"Safari":de.webview?"webview":de.ie?/edge/.test(ge)?"Edge":"IE":/baiduspider/.test(ge)?"Baiduspider":/ucweb/.test(ge)||/UCBrowser/.test(ge)?"UC":/opera/.test(ge)?"Opera":/ucweb/.test(ge)?"UC":/360se/.test(ge)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(ge)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(ge)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(ge)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(ge)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(ge)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(ge)?"PS4\u6D4F\u89C8\u5668":void 0},we=function(){var de={},ge={},fe=navigator.userAgent,ue=navigator.platform,ee=fe.match(/Web[kK]it[\/]{0,1}([\d.]+)/),z=fe.match(/(Android);?[\s\/]+([\d.]+)?/),oe=!!fe.match(/\(Macintosh\; Intel /),re=fe.match(/(iPad).*OS\s([\d_]+)/),ae=fe.match(/(iPod)(.*OS\s([\d_]+))?/),le=!re&&fe.match(/(iPhone\sOS)\s([\d_]+)/),me=fe.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),ve=/Win\d{2}|Windows/.test(ue),Pe=fe.match(/Windows Phone ([\d.]+)/),Ae=me&&fe.match(/TouchPad/),Oe=fe.match(/Kindle\/([\d.]+)/),Ie=fe.match(/Silk\/([\d._]+)/),Ze=fe.match(/(BlackBerry).*Version\/([\d.]+)/),qe=fe.match(/(BB10).*Version\/([\d.]+)/),Je=fe.match(/(RIM\sTablet\sOS)\s([\d.]+)/),mt=fe.match(/PlayBook/),gt=fe.match(/Chrome\/([\d.]+)/)||fe.match(/CriOS\/([\d.]+)/),Mt=fe.match(/Firefox\/([\d.]+)/),at=fe.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),_t=fe.match(/MSIE\s([\d.]+)/)||fe.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),ht=!gt&&fe.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),Dt=ht||fe.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((ge.webkit=!!ee)&&(ge.version=ee[1]),z&&(de.android=!0,de.version=z[2]),le&&!ae&&(de.ios=de.iphone=!0,de.version=le[2].replace(/_/g,".")),re&&(de.ios=de.ipad=!0,de.version=re[2].replace(/_/g,".")),ae&&(de.ios=de.ipod=!0,de.version=ae[3]?ae[3].replace(/_/g,"."):null),Pe&&(de.wp=!0,de.version=Pe[1]),me&&(de.webos=!0,de.version=me[2]),Ae&&(de.touchpad=!0),Ze&&(de.blackberry=!0,de.version=Ze[2]),qe&&(de.bb10=!0,de.version=qe[2]),Je&&(de.rimtabletos=!0,de.version=Je[2]),mt&&(ge.playbook=!0),Oe&&(de.kindle=!0,de.version=Oe[1]),Ie&&(ge.silk=!0,ge.version=Ie[1]),!Ie&&de.android&&fe.match(/Kindle Fire/)&&(ge.silk=!0),gt&&(ge.chrome=!0,ge.version=gt[1]),Mt&&(ge.firefox=!0,ge.version=Mt[1]),at&&(de.firefoxos=!0,de.version=at[1]),_t&&(ge.ie=!0,ge.version=_t[1]),Dt&&(oe||de.ios||ve||z)&&(ge.safari=!0,de.ios||(ge.version=Dt[1])),ht&&(ge.webview=!0),oe){var ut=fe.match(/[\d]*_[\d]*_[\d]*/);ut&&ut.length>0&&ut[0]&&(de.version=ut[0].replace(/_/g,"."))}return de.tablet=!!(re||mt||z&&!fe.match(/Mobile/)||Mt&&fe.match(/Tablet/)||_t&&!fe.match(/Phone/)&&fe.match(/Touch/)),de.phone=!(de.tablet||de.ipod||!(z||le||me||Ze||qe||gt&&fe.match(/Android/)||gt&&fe.match(/CriOS\/([\d.]+)/)||Mt&&fe.match(/Mobile/)||_t&&fe.match(/Touch/))),de.pc=!de.tablet&&!de.phone,oe?de.name="macOS":ve?(de.name="windows",de.version=be()):de.name=xe(de),ge.name=ye(ge),{os:de,browser:ge}}(),pe=function(){function de(){Le(this,de)}return Ce(de,null,[{key:"getHost",value:function(ge){var ee="";if(ge===void 0||ge==null||ge=="")return"";var fe=ge.indexOf("//"),ue=ge;fe>-1&&(ue=ge.substring(fe+2));var ee=ue,z=ue.split("/");return z&&z.length>0&&(ee=z[0]),z=ee.split(":"),z&&z.length>0&&(ee=z[0]),ee}},{key:"os",get:function(){return we.os}},{key:"browser",get:function(){var ge=we.browser;return ge.name||(ge.name=ye()),ge}}]),de}();Se.default=pe},function(ke,Se,Be){"use strict";function Le(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Le(this,be)}return Ce(be,null,[{key:"get",value:function(ye,we,pe,de,ge){var fe;pe=pe||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(ue){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(ue){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(ue){}throw new Error("This browser does not support XMLHttpRequest.")}),fe=new XMLHttpRequest,fe.onreadystatechange=function(){fe.readyState===4&&(fe.status===200?we(fe.responseText):pe(fe.responseText))};try{de===void 0&&(de=!0),fe.open("GET",ye,de),ge&&(fe.withCredentials=!0)}catch(ue){return void pe(ue)}try{fe.send()}catch(ue){pe(ue)}}}]),be}();Se.default=xe},function(ke,Se,Be){"use strict";function Le(we,pe){if(!(we instanceof pe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function we(pe,de){for(var ge=0;ge<de.length;ge++){var fe=de[ge];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(pe,fe.key,fe)}}return function(pe,de,ge){return de&&we(pe.prototype,de),ge&&we(pe,ge),pe}}(),xe=Be(27),be=Be(30),ye=(Be(10),function(){function we(){Le(this,we)}return Ce(we,null,[{key:"randomUUID",value:function(){for(var pe=[],de="0123456789abcdef",ge=0;ge<36;ge++)pe[ge]=de.substr(Math.floor(16*Math.random()),1);return pe[14]="4",pe[19]=de.substr(3&pe[19]|8,1),pe[8]=pe[13]=pe[18]=pe[23]="-",pe.join("")}},{key:"aliyunEncodeURI",value:function(pe){var de=encodeURIComponent(pe);return de=de.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(pe,de,ge){if(!pe)throw new Error("PrismPlayer Error: vid should not be null!");var fe=[];for(var ue in pe)fe.push(ue);for(var ee=fe.sort(),z="",oe=ee.length,ue=0;ue<oe;ue++){var re=we.aliyunEncodeURI(ee[ue]),ae=we.aliyunEncodeURI(pe[ee[ue]]);z==""?z=re+de+ae:z+=ge+re+de+ae}return z}},{key:"makeChangeSiga",value:function(pe,de){if(!pe)throw new Error("PrismPlayer Error: vid should not be null!");return be.stringify(xe("GET&"+we.aliyunEncodeURI("/")+"&"+we.aliyunEncodeURI(we.makeUTF8sort(pe,"=","&")),de+"&"))}}]),we}());Se.default=ye},function(ke,Se,Be){(function(Le,Ce){ke.exports=Se=Ce(Be(0))})(0,function(Le){return Le.enc.Utf8})},function(ke,Se,Be){(function(Le,Ce){ke.exports=Se=Ce(Be(0))})(0,function(Le){return Le.enc.Hex})},function(ke,Se,Be){ke.exports=Be(13)},function(ke,Se,Be){"use strict";var Le,Ce,xe=Be(14),be=function(we){return we&&we.__esModule?we:{default:we}}(xe),ye={Vod:be.default};Le=[],(Ce=function(){return ye}.apply(Se,Le))!==void 0&&(ke.exports=Ce),window.AliyunUpload=ye,xn.exports=AliyunUpload},function(ke,Se,Be){"use strict";function Le(qe){return qe&&qe.__esModule?qe:{default:qe}}function Ce(qe,Je){if(!(qe instanceof Je))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function qe(Je,mt){for(var gt=0;gt<mt.length;gt++){var Mt=mt[gt];Mt.enumerable=Mt.enumerable||!1,Mt.configurable=!0,"value"in Mt&&(Mt.writable=!0),Object.defineProperty(Je,Mt.key,Mt)}}return function(Je,mt,gt){return mt&&qe(Je.prototype,mt),gt&&qe(Je,gt),Je}}(),be=Be(15),ye=Be(3),we=Be(16),pe=Le(we),de=Be(18),ge=Le(de),fe=Be(24),ue=Le(fe),ee=Be(4),z=Le(ee),oe=Be(1),re=Le(oe),ae=Be(5),le=Le(ae),me=Be(26),ve=Le(me),Pe=Be(31),Ae=Le(Pe),Oe=Be(32),Ie=Le(Oe),Ze=(Be(2),function(){function qe(Je){Ce(this,qe),this.options=Je,this.options.partSize=this.options.partSize||ye.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||ye.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=be.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new z.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=be.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return xe(qe,[{key:"init",value:function(Je,mt,gt,Mt){return this._retryCount=0,!(gt&&!Mt||!gt&&Mt)&&!(Je&&!mt||!Je&&mt)&&(this._ossCreditor.accessKeyId=Je,this._ossCreditor.accessKeySecret=mt,this._ossCreditor.securityToken=gt,this._ossCreditor.expireTime=Mt,!0)}},{key:"addFile",value:function(Je,mt,gt,Mt,at,_t){if(!Je)return!1;if(Je.size==0)try{this.options.onUploadFailed({file:Je},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(ot){console.log(ot)}for(var ht=(this.options,0);ht<this._uploadList.length;ht++)if(this._uploadList[ht].file==Je)return!1;var Dt=new Object;if(Dt.file=Je,Dt._endpoint=mt,Dt._bucket=gt,Dt._object=Mt,Dt.state=be.UPLOADSTATE.INIT,Dt.isImage=re.default.isImage(Je.name),!Dt.isImage&&this.options.enableUploadProgress){var ut=this;Ie.default.getMd5(Je,function(ot){Dt.fileHash=ot;var ct=ut._getCheckoutpoint(Dt);ut.options.localCheckpoint||ct||ut._getCheckoutpointFromCloud(Dt,function(yt){if(yt.UploadPoint){var wt=JSON.parse(yt.UploadPoint);wt.loaded!=1&&(Dt.checkpoint=wt.checkpoint,Dt.loaded=wt.loaded,Dt.videoId=yt.VideoId,ut._saveCheckoutpoint(Dt,wt.checkpoint))}},function(yt){try{if((yt=JSON.parse(yt))&&yt.Code=="InvalidParameter"&&yt.Message.indexOf("UserId")>0){ut._invalidUserId=!0;var wt=yt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(wt)}}catch(xt){console.log(xt)}})})}at&&(Dt.videoInfo=at?JSON.parse(at).Vod:{},Dt.userData=ge.default.encode(at)),Dt.ri=le.default.create(),this._uploadList.push(Dt),this._reportLog("20001",Dt,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(Dt)}catch(ot){console.log(ot)}return!0}},{key:"deleteFile",value:function(Je){return!!this.cancelFile(Je)&&(this._uploadList.splice(Je,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(Je){if(this.options,Je<0||Je>=this._uploadList.length)return!1;var mt=this._uploadList[Je];if(Je==this._curIndex&&mt.state==be.UPLOADSTATE.UPLOADING){mt.state=be.UPLOADSTATE.CANCELED;var gt=this._getCheckoutpoint(mt);gt&>.checkpoint&&(gt=gt.checkpoint),gt&&this._ossUpload.abort(mt),this._removeCheckoutpoint(mt),this.nextUpload()}else mt.state!=be.UPLOADSTATE.SUCCESS&&(mt.state=be.UPLOADSTATE.CANCELED);return this._reportLog("20008",mt),!0}},{key:"resumeFile",value:function(Je){if(this.options,Je<0||Je>=this._uploadList.length)return!1;var mt=this._uploadList[Je];return mt.state==be.UPLOADSTATE.CANCELED&&(mt.state=be.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(Je){return this._getCheckoutpoint({file:Je})}},{key:"startUpload",value:function(Je){if(this._retryCount=0,this.options,this._state==be.VODSTATE.START||this._state==be.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=be.VODSTATE.END);var mt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(mt),this._state=be.VODSTATE.START}},{key:"nextUpload",value:function(){var Je=this.options;if(this._state==be.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var mt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(mt)}else{this._state=be.VODSTATE.END;try{Je.onUploadEnd&&Je.onUploadEnd(mt)}catch(gt){console.log(gt)}}}},{key:"clear",value:function(Je){for(var mt=this.options,gt=0,Mt=0;Mt<this._uploadList.length;Mt++)mt.uploadList[Mt].state==be.UPLOADSTATE.SUCCESS&>++,this._uploadList[Mt].state==Je&&(mt.uploadList.splice(Mt,1),Mt--);mt.onClear&&mt.onClear(mt.uploadList.length,gt)}},{key:"stopUpload",value:function(){if((this._state==be.VODSTATE.START||this._state==be.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var Je=this._uploadList[this._curIndex];this._state=be.VODSTATE.STOP,Je.state=be.UPLOADSTATE.STOPED,this._changeState(Je,be.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(Je){var mt=this;if(!Je)return!1;var gt=JSON.parse(ge.default.decode(Je));return!!(gt.AccessKeyId&>.AccessKeySecret&>.SecurityToken&>.Expiration)&&mt.resumeUploadWithToken(gt.AccessKeyId,gt.AccessKeySecret,gt.SecurityToken,gt.Expiration)}},{key:"resumeUploadWithToken",value:function(Je,mt,gt,Mt){if(this.options,!(Je&&mt&>&&Mt)||this._state!=be.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var at="";return this._uploadList.length>this._curIndex&&(at=this._uploadList[this._curIndex]),at&&(this.init(Je,mt,gt,Mt),this._state=be.VODSTATE.START,this._ossUpload=null,this._uploadCore(at,at.retry),at.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Je,mt,gt){if(this._curIndex==-1||this._state!=be.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var Mt=this._uploadList[this._curIndex];Mt.object?this._refreshSTSTokenUpload(Mt,Je,mt,gt):this.setSTSToken(Mt,Je,mt,gt)}}},{key:"setSTSTokenDirectlyUpload",value:function(Je,mt,gt,Mt,at){if(!(mt&>&&Mt&&at))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var _t=Je;this.init(mt,gt,Mt,at),_t.endpoint=_t._endpoint,_t.bucket=_t._bucket,_t.object=_t._object,this._ossUpload=null,this._uploadCore(_t,Je.retry),Je.retry=!1}},{key:"setSTSToken",value:function(Je,mt,gt,Mt){if(!mt||!gt||!Mt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var at=Je.videoInfo,_t={accessKeyId:mt,securityToken:Mt,accessKeySecret:gt,fileName:Je.file.name,title:at.Title,requestId:Je.ri,region:this.options.region};at.ImageType&&(_t.imageType=at.ImageType),at.ImageExt&&(_t.imageExt=at.ImageExt),at.FileSize&&(_t.fileSize=at.FileSize),at.Description&&(_t.description=at.Description),at.CateId&&(_t.cateId=at.CateId),at.Tags&&(_t.tags=at.Tags),at.TemplateGroupId&&(_t.templateGroupId=at.TemplateGroupId),at.StorageLocation&&(_t.storageLocation=at.StorageLocation),at.CoverURL&&(_t.coverUrl=at.CoverURL),at.TransCodeMode&&(_t.transCodeMode=at.TransCodeMode),at.UserData&&(_t.userData=at.UserData);var ht=this,Dt="getUploadAuth";Je.videoId?(_t.videoId=Je.videoId,Dt="refreshUploadAuth"):Je.isImage&&(Dt="getImageUploadAuth"),ve.default[Dt](_t,function(ut){Je.videoId=ut.VideoId?ut.VideoId:Je.videoId,ht.setUploadAuthAndAddress(Je,ut.UploadAuth,ut.UploadAddress),ht._state=be.VODSTATE.START},function(ut){ht._error(Je,{name:ut.Code,code:ut.Code,message:ut.Message,requestId:ut.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Je,mt,gt,Mt){if(!Je||!mt||!gt)return!1;var at=JSON.parse(ge.default.decode(mt));if(!(at.AccessKeyId&&at.AccessKeySecret&&at.SecurityToken&&at.Expiration))return console.error("uploadauth is invalid"),!1;var _t={},ht=Je;if(gt){if(_t=JSON.parse(ge.default.decode(gt)),!_t.Endpoint||!_t.Bucket||!_t.FileName)return console.error("uploadAddress is invalid"),!1}else _t.Endpoint=ht.endpoint,_t.Bucket=ht.bucket,_t.FileName=ht.object;this._ut="vod",this._uploadWay="vod",this.options.region=at.Region||this.options.region,this.init(at.AccessKeyId,at.AccessKeySecret,at.SecurityToken,at.Expiration),ht.endpoint=ht._endpoint?ht._endpoint:_t.Endpoint,ht.bucket=ht._bucket?ht._bucket:_t.Bucket,ht.object=ht._object?ht._object:_t.FileName,ht.region=this.options.region,Mt&&(ht.videoId=Mt),this._ossUpload=null,this._uploadCore(ht,Je.retry),Je.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Je,mt,gt,Mt){if(!mt||!gt||!Mt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var at={accessKeyId:mt,securityToken:Mt,accessKeySecret:gt,videoId:Je.object,requestId:Je.ri,region:this.options.region},_t=this,ht="refreshUploadAuth";Je.isImage&&(ht="getImageUploadAuth"),ve.default[ht](at,function(Dt){_t.setUploadAuthAndAddress(Je,Dt.UploadAuth,UploadAddress),_t._state=be.VODSTATE.START},function(Dt){_t._error(Je,{name:Dt.Code,code:Dt.Code,message:Dt.Message,requestId:Dt.RequestId})})}},{key:"_upload",value:function(Je){var mt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],gt=this.options;if(Je.retry=mt,gt.onUploadstarted&&!mt)try{var Mt=this._getCheckoutpoint(Je);Mt&&Mt.state!=be.UPLOADSTATE.UPLOADING&&(Je.checkpoint=Mt,Je.videoId=Mt.videoId),gt.onUploadstarted(Je)}catch(at){console.log(at)}}},{key:"_uploadCore",value:function(Je){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(Je.state=be.UPLOADSTATE.UPLOADING,!this._ossUpload){Je.endpoint=Je.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var mt=this;this._ossUpload=new pe.default({bucket:Je.bucket,endpoint:Je.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(ut,ot){mt._error.call(mt,ut,ot)},oncomplete:function(ut,ot){mt._complete.call(mt,ut,ot)},onprogress:function(ut,ot,ct){mt._progress.call(mt,ut,ot,ct)}})}var gt=re.default.getFileType(Je.file.name),Mt=this._getCheckoutpoint(Je),at="",_t="";Mt&&Mt.checkpoint&&(_t=Mt.state,at=Mt.videoId,Mt=Mt.checkpoint),Mt&&at==Je.videoId&&_t!=be.UPLOADSTATE.UPLOADING&&(Mt.file=Je.file,Je.checkpoint=Mt,Mt.uploadId);var ht=this._adjustPartSize(Je);this._reportLog("20002",Je,{ft:gt,fs:Je.file.size,bu:Je.bucket,ok:Je.object,vid:Je.videoId||"",fn:Je.file.name,fw:null,fh:null,ps:ht});var Dt={headers:{"x-oss-notification":Je.userData?Je.userData:""},partSize:ht,parallel:this.options.parallel};this._ossUpload.upload(Je,Dt)}},{key:"_findUploadIndex",value:function(){for(var Je=-1,mt=0;mt<this._uploadList.length;mt++)if(this._uploadList[mt].state==be.UPLOADSTATE.INIT){Je=mt;break}return Je}},{key:"_error",value:function(Je,mt){if(mt.name=="cancel")try{this.options.onUploadCanceled(Je,mt)}catch(Mt){console.log(Mt)}else{if(mt.message.indexOf("InvalidAccessKeyIdError")>0||mt.name=="SignatureDoesNotMatchError"||mt.code=="SecurityTokenExpired"||mt.code=="InvalidSecurityToken.Expired"||mt.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=be.VODSTATE.EXPIRE,Je.state=be.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(Je,mt)}catch(Mt){console.log(Mt)}}return}if((mt.name=="RequestTimeoutError"||mt.name=="ConnectionTimeout"||mt.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var gt=this;return setTimeout(function(){gt._uploadCore(Je,!0)},1e3*gt._retryDuration),void this._retryCount++}mt.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Je),this._handleError(Je,mt)}}},{key:"_handleError",value:function(Je,mt){var gt=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],Mt=be.UPLOADSTATE.FAIlURE;if(Je.state!=be.UPLOADSTATE.CANCELED&&(Je.state=be.UPLOADSTATE.FAIlURE,this._state=be.VODSTATE.FAILURE,this.options.onUploadFailed&&mt&&mt.code&&mt.message))try{this.options.onUploadFailed(Je,mt.code,mt.message)}catch(_t){console.log(_t)}if(gt&&this._changeState(Je,Mt),this._reportLog("20006",Je,{code:mt.name,message:mt.message,requestId:mt.requestId,fs:Je.file.size,bu:Je.bucket,ok:Je.object,fn:Je.file.name}),this._reportLog("20004",Je,{requestId:mt.requestId,fs:Je.file.size,bu:Je.bucket,ok:Je.object,fn:Je.file.name}),Je.ri=le.default.create(),this._findUploadIndex()!=-1){var at=this;this._state=be.VODSTATE.START,setTimeout(function(){at.nextUpload()},100)}}},{key:"_complete",value:function(Je,mt){if(Je.state=be.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Je)}catch(at){console.log(at)}var gt=0;mt&&mt.res&&mt.res.headers&&(gt=mt.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Je);var Mt=this;setTimeout(function(){Mt.nextUpload()},100),this._retryCount=0,this._reportLog("20003",Je,{requestId:gt})}},{key:"_progress",value:function(Je,mt,gt){if(this.options.onUploadProgress)try{Je.loaded=mt.loaded,this.options.onUploadProgress(Je,mt.total,mt.loaded)}catch(ot){console.log(ot)}var Mt=mt.checkpoint,at=0;Mt&&(Je.checkpoint=Mt,this._saveCheckoutpoint(Je,Mt,be.UPLOADSTATE.UPLOADING),at=Mt.uploadId),this._retryCount=0;var _t=this._getPortNumber(Mt),ht=0;if(gt&>.headers&&(ht=gt.headers["x-oss-request-id"]),mt.loaded!=0&&this._reportLog("20007",Je,{pn:_t,requestId:ht}),mt.loaded!=1&&this._reportLog("20005",Je,{UploadId:at,pn:_t+1,pr:Je.retry?1:0,fs:Je.file.size,bu:Je.bucket,ok:Je.object,fn:Je.file.name}),!this._invalidUserId&&!Je.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var Dt={file:Je.file,checkpoint:mt,userId:this.options.userId,videoId:Je.videoId,region:this.options.region,fileHash:Je.fileHash};try{var ut=this;Ae.default.upload(Dt,function(){},function(ot){if((ot=JSON.parse(ot))&&ot.Code=="InvalidParameter"&&ot.Message.indexOf("UserId")>0){ut._invalidUserId=!0;var ct=ot.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ct)}})}catch(ot){console.log(ot)}}}},{key:"_getPortNumber",value:function(Je){if(Je){var mt=Je.doneParts;if(mt&&mt.length>0)return mt[mt.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(Je){var mt=this._getCheckoutpointKey(Je);ue.default.remove(mt)}},{key:"_getCheckoutpoint",value:function(Je){var mt=this._getCheckoutpointKey(Je),gt=ue.default.get(mt);if(gt)try{return JSON.parse(gt)}catch(Mt){}return""}},{key:"_saveCheckoutpoint",value:function(Je,mt,gt){if(mt){var Mt=this._getCheckoutpointKey(Je),at=Je.file,_t={fileName:at.name,lastModified:at.lastModified,size:at.size,object:Je.object,videoId:Je.videoId,bucket:Je.bucket,endpoint:Je.endpoint,checkpoint:mt,loaded:Je.loaded,state:gt};ue.default.set(Mt,JSON.stringify(_t))}}},{key:"_changeState",value:function(Je,mt){var gt=this._getCheckoutpoint(Je);gt&&((this._onbeforeunload=!0)&&(mt=be.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Je,gt.checkpoint,mt))}},{key:"_getCheckoutpointKey",value:function(Je){return"upload_"+Je.file.lastModified+"_"+Je.file.name+"_"+Je.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Je,mt,gt){var Mt={userId:this.options.userId,uploadInfoList:[{FileName:Je.file.name,FileSize:Je.file.size,FileCreateTime:Je.file.lastModified,FileHash:Je.fileHash}],region:this.options.region};Ae.default.get(Mt,function(at){mt(at)},gt)}},{key:"_reportLog",value:function(Je,mt,gt){gt||(gt={}),gt.ri=mt.ri,this._ut&&(gt.ut=this._ut),this._log.log(Je,gt)}},{key:"_initEvent",value:function(){var Je=this;window&&(window.onbeforeunload=function(mt){if(Je._onbeforeunload=!0,Je._curIndex!=-1&&Je._uploadList.length>Je._curIndex){var gt=Je._uploadList[Je._curIndex];Je._changeState(gt,be.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Je=0;Je<this._uploadList.length;Je++){var mt=this._uploadList[Je];mt.state!=be.UPLOADSTATE.FAIlURE&&mt.state!=be.UPLOADSTATE.STOPED||(mt.state=be.UPLOADSTATE.INIT)}this._state=be.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(Je){return Je.file.size/this.options.partSize>1e4?Je.file.size/9999:this.options.partSize}}]),qe}());Se.default=Ze},function(ke,Se,Be){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},Se.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(ke,Se,Be){"use strict";function Le(de){return de&&de.__esModule?de:{default:de}}function Ce(de,ge){if(!(de instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function de(ge,fe){for(var ue=0;ue<fe.length;ue++){var ee=fe[ue];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(ge,ee.key,ee)}}return function(ge,fe,ue){return fe&&de(ge.prototype,fe),ue&&de(ge,ue),ge}}(),be=Be(3),ye=Be(17),we=(Le(ye),Be(1)),pe=(Le(we),function(){function de(ge,fe){if(Ce(this,de),ge){this._config=ge,this.create(this._config),this._uploadInfo=null,this._callback={};var ue=function(){};this._callback.onerror=fe.onerror||ue,this._callback.oncomplete=fe.oncomplete||ue,this._callback.onprogress=fe.onprogress||ue}}return xe(de,[{key:"create",value:function(ge){if(ge.endpoint=ge.endpoint||this._config.endpoint,ge.bucket=ge.bucket||this._config.bucket,!(ge.AccessKeyId&&ge.AccessKeySecret&&ge.endpoint&&ge.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var fe={accessKeyId:ge.AccessKeyId,accessKeySecret:ge.AccessKeySecret,stsToken:ge.SecurityToken,endpoint:ge.endpoint||this._config.endpoint,bucket:ge.bucket||this._config.bucket,secure:!0,cname:ge.cname};ge.timeout&&(fe.timeout=ge.timeout),this.oss=new OSS.Wrapper(fe)}},{key:"abort",value:function(ge){if(ge.checkpoint){var fe=ge.checkpoint.uploadId;this.oss.abortMultipartUpload(ge.object,fe)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(ge,fe){this._uploadInfo=ge;var ue=this,ee=function(oe,re,ae){return function(le){ue._progress(oe,re,ae),le()}},z={parallel:fe.parallel||this._config.parallel||be.UPLOADDEFAULT.PARALLEL,partSize:fe.partSize||this._config.partSize||be.UPLOADDEFAULT.PARTSIZE,progress:ee};fe.headers&&(z.headers=fe.headers),ge.checkpoint&&(z.checkpoint=ge.checkpoint),ge.bucket||(this.oss.options.bucket=ge.bucket),ge.endpoint||(this.oss.options.endpoint=ge.endpoint),this.oss.multipartUpload(ge.object,ge.file,z).then(function(oe,re){ue._complete(oe)}).catch(function(oe){ue.oss.cancel&&(ue.oss&&ue.oss.isCancel()?console.log("oss is cancel as error"):ue.oss.cancel()),ue._error(oe)})}},{key:"header",value:function(ge,fe,ue){this.oss.get(ge.object).then(function(ee){fe(ee)}).catch(function(ee){ue(ee)})}},{key:"_progress",value:function(ge,fe,ue){this._callback.onprogress(this._uploadInfo,{loaded:ge,total:this._uploadInfo.file.size,checkpoint:fe},ue)}},{key:"_error",value:function(ge){this._callback.onerror(this._uploadInfo,ge)}},{key:"_complete",value:function(ge){this._callback.oncomplete(this._uploadInfo,ge)}}]),de}());Se.default=pe},function(ke,Se,Be){"use strict";function Le(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Le(this,be)}return Ce(be,null,[{key:"format",value:function(ye){if(arguments.length<2)return null;for(var we=arguments[1],pe=1;pe<arguments.length;pe++){var de=new RegExp("\\{"+(pe-1)+"\\}","gm");we=we.replace(de,arguments[pe+1])}return{code:ye,message:we}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),be}();Se.default=xe},function(ke,Se,Be){"use strict";(function(Le){function Ce(ye,we){if(!(ye instanceof we))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function ye(we,pe){for(var de=0;de<pe.length;de++){var ge=pe[de];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(we,ge.key,ge)}}return function(we,pe,de){return pe&&ye(we.prototype,pe),de&&ye(we,de),we}}(),be=function(){function ye(){Ce(this,ye)}return xe(ye,null,[{key:"encode",value:function(we){return new Le(we).toString("base64")}},{key:"decode",value:function(we){return new Le(we,"base64").toString()}}]),ye}();Se.default=be}).call(Se,Be(19).Buffer)},function(ke,Se,Be){"use strict";(function(Le){function Ce(){return be.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function xe(Ke,De){if(Ce()<De)throw new RangeError("Invalid typed array length");return be.TYPED_ARRAY_SUPPORT?(Ke=new Uint8Array(De),Ke.__proto__=be.prototype):(Ke===null&&(Ke=new be(De)),Ke.length=De),Ke}function be(Ke,De,ze){if(!(be.TYPED_ARRAY_SUPPORT||this instanceof be))return new be(Ke,De,ze);if(typeof Ke=="number"){if(typeof De=="string")throw new Error("If encoding is specified then the first argument must be a string");return de(this,Ke)}return ye(this,Ke,De,ze)}function ye(Ke,De,ze,$e){if(typeof De=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&De instanceof ArrayBuffer?ue(Ke,De,ze,$e):typeof De=="string"?ge(Ke,De,ze):ee(Ke,De)}function we(Ke){if(typeof Ke!="number")throw new TypeError('"size" argument must be a number');if(Ke<0)throw new RangeError('"size" argument must not be negative')}function pe(Ke,De,ze,$e){return we(De),De<=0?xe(Ke,De):ze!==void 0?typeof $e=="string"?xe(Ke,De).fill(ze,$e):xe(Ke,De).fill(ze):xe(Ke,De)}function de(Ke,De){if(we(De),Ke=xe(Ke,De<0?0:0|z(De)),!be.TYPED_ARRAY_SUPPORT)for(var ze=0;ze<De;++ze)Ke[ze]=0;return Ke}function ge(Ke,De,ze){if(typeof ze=="string"&&ze!==""||(ze="utf8"),!be.isEncoding(ze))throw new TypeError('"encoding" must be a valid string encoding');var $e=0|re(De,ze);Ke=xe(Ke,$e);var We=Ke.write(De,ze);return We!==$e&&(Ke=Ke.slice(0,We)),Ke}function fe(Ke,De){var ze=De.length<0?0:0|z(De.length);Ke=xe(Ke,ze);for(var $e=0;$e<ze;$e+=1)Ke[$e]=255&De[$e];return Ke}function ue(Ke,De,ze,$e){if(De.byteLength,ze<0||De.byteLength<ze)throw new RangeError("'offset' is out of bounds");if(De.byteLength<ze+($e||0))throw new RangeError("'length' is out of bounds");return De=ze===void 0&&$e===void 0?new Uint8Array(De):$e===void 0?new Uint8Array(De,ze):new Uint8Array(De,ze,$e),be.TYPED_ARRAY_SUPPORT?(Ke=De,Ke.__proto__=be.prototype):Ke=fe(Ke,De),Ke}function ee(Ke,De){if(be.isBuffer(De)){var ze=0|z(De.length);return Ke=xe(Ke,ze),Ke.length===0||De.copy(Ke,0,0,ze),Ke}if(De){if(typeof ArrayBuffer!="undefined"&&De.buffer instanceof ArrayBuffer||"length"in De)return typeof De.length!="number"||lt(De.length)?xe(Ke,0):fe(Ke,De);if(De.type==="Buffer"&&rt(De.data))return fe(Ke,De.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function z(Ke){if(Ke>=Ce())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce().toString(16)+" bytes");return 0|Ke}function oe(Ke){return+Ke!=Ke&&(Ke=0),be.alloc(+Ke)}function re(Ke,De){if(be.isBuffer(Ke))return Ke.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Ke)||Ke instanceof ArrayBuffer))return Ke.byteLength;typeof Ke!="string"&&(Ke=""+Ke);var ze=Ke.length;if(ze===0)return 0;for(var $e=!1;;)switch(De){case"ascii":case"latin1":case"binary":return ze;case"utf8":case"utf-8":case void 0:return jt(Ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ze;case"hex":return ze>>>1;case"base64":return Yt(Ke).length;default:if($e)return jt(Ke).length;De=(""+De).toLowerCase(),$e=!0}}function ae(Ke,De,ze){var $e=!1;if((De===void 0||De<0)&&(De=0),De>this.length||((ze===void 0||ze>this.length)&&(ze=this.length),ze<=0)||(ze>>>=0,De>>>=0,ze<=De))return"";for(Ke||(Ke="utf8");;)switch(Ke){case"hex":return _t(this,De,ze);case"utf8":case"utf-8":return mt(this,De,ze);case"ascii":return Mt(this,De,ze);case"latin1":case"binary":return at(this,De,ze);case"base64":return Je(this,De,ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,De,ze);default:if($e)throw new TypeError("Unknown encoding: "+Ke);Ke=(Ke+"").toLowerCase(),$e=!0}}function le(Ke,De,ze){var $e=Ke[De];Ke[De]=Ke[ze],Ke[ze]=$e}function me(Ke,De,ze,$e,We){if(Ke.length===0)return-1;if(typeof ze=="string"?($e=ze,ze=0):ze>2147483647?ze=2147483647:ze<-2147483648&&(ze=-2147483648),ze=+ze,isNaN(ze)&&(ze=We?0:Ke.length-1),ze<0&&(ze=Ke.length+ze),ze>=Ke.length){if(We)return-1;ze=Ke.length-1}else if(ze<0){if(!We)return-1;ze=0}if(typeof De=="string"&&(De=be.from(De,$e)),be.isBuffer(De))return De.length===0?-1:ve(Ke,De,ze,$e,We);if(typeof De=="number")return De&=255,be.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?We?Uint8Array.prototype.indexOf.call(Ke,De,ze):Uint8Array.prototype.lastIndexOf.call(Ke,De,ze):ve(Ke,[De],ze,$e,We);throw new TypeError("val must be string, number or Buffer")}function ve(Ke,De,ze,$e,We){function Ve(Sn,dn){return pt===1?Sn[dn]:Sn.readUInt16BE(dn*pt)}var pt=1,Lt=Ke.length,on=De.length;if($e!==void 0&&(($e=String($e).toLowerCase())==="ucs2"||$e==="ucs-2"||$e==="utf16le"||$e==="utf-16le")){if(Ke.length<2||De.length<2)return-1;pt=2,Lt/=2,on/=2,ze/=2}var Xt;if(We){var Rt=-1;for(Xt=ze;Xt<Lt;Xt++)if(Ve(Ke,Xt)===Ve(De,Rt===-1?0:Xt-Rt)){if(Rt===-1&&(Rt=Xt),Xt-Rt+1===on)return Rt*pt}else Rt!==-1&&(Xt-=Xt-Rt),Rt=-1}else for(ze+on>Lt&&(ze=Lt-on),Xt=ze;Xt>=0;Xt--){for(var fn=!0,En=0;En<on;En++)if(Ve(Ke,Xt+En)!==Ve(De,En)){fn=!1;break}if(fn)return Xt}return-1}function Pe(Ke,De,ze,$e){ze=Number(ze)||0;var We=Ke.length-ze;$e?($e=Number($e))>We&&($e=We):$e=We;var Ve=De.length;if(Ve%2!=0)throw new TypeError("Invalid hex string");$e>Ve/2&&($e=Ve/2);for(var pt=0;pt<$e;++pt){var Lt=parseInt(De.substr(2*pt,2),16);if(isNaN(Lt))return pt;Ke[ze+pt]=Lt}return pt}function Ae(Ke,De,ze,$e){return tn(jt(De,Ke.length-ze),Ke,ze,$e)}function Oe(Ke,De,ze,$e){return tn(mn(De),Ke,ze,$e)}function Ie(Ke,De,ze,$e){return Oe(Ke,De,ze,$e)}function Ze(Ke,De,ze,$e){return tn(Yt(De),Ke,ze,$e)}function qe(Ke,De,ze,$e){return tn(Ft(De,Ke.length-ze),Ke,ze,$e)}function Je(Ke,De,ze){return De===0&&ze===Ke.length?Ue.fromByteArray(Ke):Ue.fromByteArray(Ke.slice(De,ze))}function mt(Ke,De,ze){ze=Math.min(Ke.length,ze);for(var $e=[],We=De;We<ze;){var Ve=Ke[We],pt=null,Lt=Ve>239?4:Ve>223?3:Ve>191?2:1;if(We+Lt<=ze){var on,Xt,Rt,fn;switch(Lt){case 1:Ve<128&&(pt=Ve);break;case 2:on=Ke[We+1],(192&on)==128&&(fn=(31&Ve)<<6|63&on)>127&&(pt=fn);break;case 3:on=Ke[We+1],Xt=Ke[We+2],(192&on)==128&&(192&Xt)==128&&(fn=(15&Ve)<<12|(63&on)<<6|63&Xt)>2047&&(fn<55296||fn>57343)&&(pt=fn);break;case 4:on=Ke[We+1],Xt=Ke[We+2],Rt=Ke[We+3],(192&on)==128&&(192&Xt)==128&&(192&Rt)==128&&(fn=(15&Ve)<<18|(63&on)<<12|(63&Xt)<<6|63&Rt)>65535&&fn<1114112&&(pt=fn)}}pt===null?(pt=65533,Lt=1):pt>65535&&(pt-=65536,$e.push(pt>>>10&1023|55296),pt=56320|1023&pt),$e.push(pt),We+=Lt}return gt($e)}function gt(Ke){var De=Ke.length;if(De<=dt)return String.fromCharCode.apply(String,Ke);for(var ze="",$e=0;$e<De;)ze+=String.fromCharCode.apply(String,Ke.slice($e,$e+=dt));return ze}function Mt(Ke,De,ze){var $e="";ze=Math.min(Ke.length,ze);for(var We=De;We<ze;++We)$e+=String.fromCharCode(127&Ke[We]);return $e}function at(Ke,De,ze){var $e="";ze=Math.min(Ke.length,ze);for(var We=De;We<ze;++We)$e+=String.fromCharCode(Ke[We]);return $e}function _t(Ke,De,ze){var $e=Ke.length;(!De||De<0)&&(De=0),(!ze||ze<0||ze>$e)&&(ze=$e);for(var We="",Ve=De;Ve<ze;++Ve)We+=cn(Ke[Ve]);return We}function ht(Ke,De,ze){for(var $e=Ke.slice(De,ze),We="",Ve=0;Ve<$e.length;Ve+=2)We+=String.fromCharCode($e[Ve]+256*$e[Ve+1]);return We}function Dt(Ke,De,ze){if(Ke%1!=0||Ke<0)throw new RangeError("offset is not uint");if(Ke+De>ze)throw new RangeError("Trying to access beyond buffer length")}function ut(Ke,De,ze,$e,We,Ve){if(!be.isBuffer(Ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(De>We||De<Ve)throw new RangeError('"value" argument is out of bounds');if(ze+$e>Ke.length)throw new RangeError("Index out of range")}function ot(Ke,De,ze,$e){De<0&&(De=65535+De+1);for(var We=0,Ve=Math.min(Ke.length-ze,2);We<Ve;++We)Ke[ze+We]=(De&255<<8*($e?We:1-We))>>>8*($e?We:1-We)}function ct(Ke,De,ze,$e){De<0&&(De=4294967295+De+1);for(var We=0,Ve=Math.min(Ke.length-ze,4);We<Ve;++We)Ke[ze+We]=De>>>8*($e?We:3-We)&255}function yt(Ke,De,ze,$e,We,Ve){if(ze+$e>Ke.length)throw new RangeError("Index out of range");if(ze<0)throw new RangeError("Index out of range")}function wt(Ke,De,ze,$e,We){return We||yt(Ke,De,ze,4,34028234663852886e22,-34028234663852886e22),je.write(Ke,De,ze,$e,23,4),ze+4}function xt(Ke,De,ze,$e,We){return We||yt(Ke,De,ze,8,17976931348623157e292,-17976931348623157e292),je.write(Ke,De,ze,$e,52,8),ze+8}function zt(Ke){if(Ke=Ut(Ke).replace(tt,""),Ke.length<2)return"";for(;Ke.length%4!=0;)Ke+="=";return Ke}function Ut(Ke){return Ke.trim?Ke.trim():Ke.replace(/^\s+|\s+$/g,"")}function cn(Ke){return Ke<16?"0"+Ke.toString(16):Ke.toString(16)}function jt(Ke,De){De=De||1/0;for(var ze,$e=Ke.length,We=null,Ve=[],pt=0;pt<$e;++pt){if((ze=Ke.charCodeAt(pt))>55295&&ze<57344){if(!We){if(ze>56319){(De-=3)>-1&&Ve.push(239,191,189);continue}if(pt+1===$e){(De-=3)>-1&&Ve.push(239,191,189);continue}We=ze;continue}if(ze<56320){(De-=3)>-1&&Ve.push(239,191,189),We=ze;continue}ze=65536+(We-55296<<10|ze-56320)}else We&&(De-=3)>-1&&Ve.push(239,191,189);if(We=null,ze<128){if((De-=1)<0)break;Ve.push(ze)}else if(ze<2048){if((De-=2)<0)break;Ve.push(ze>>6|192,63&ze|128)}else if(ze<65536){if((De-=3)<0)break;Ve.push(ze>>12|224,ze>>6&63|128,63&ze|128)}else{if(!(ze<1114112))throw new Error("Invalid code point");if((De-=4)<0)break;Ve.push(ze>>18|240,ze>>12&63|128,ze>>6&63|128,63&ze|128)}}return Ve}function mn(Ke){for(var De=[],ze=0;ze<Ke.length;++ze)De.push(255&Ke.charCodeAt(ze));return De}function Ft(Ke,De){for(var ze,$e,We,Ve=[],pt=0;pt<Ke.length&&!((De-=2)<0);++pt)ze=Ke.charCodeAt(pt),$e=ze>>8,We=ze%256,Ve.push(We),Ve.push($e);return Ve}function Yt(Ke){return Ue.toByteArray(zt(Ke))}function tn(Ke,De,ze,$e){for(var We=0;We<$e&&!(We+ze>=De.length||We>=Ke.length);++We)De[We+ze]=Ke[We];return We}function lt(Ke){return Ke!==Ke}var Ue=Be(21),je=Be(22),rt=Be(23);Se.Buffer=be,Se.SlowBuffer=oe,Se.INSPECT_MAX_BYTES=50,be.TYPED_ARRAY_SUPPORT=Le.TYPED_ARRAY_SUPPORT!==void 0?Le.TYPED_ARRAY_SUPPORT:function(){try{var Ke=new Uint8Array(1);return Ke.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Ke.foo()===42&&typeof Ke.subarray=="function"&&Ke.subarray(1,1).byteLength===0}catch(De){return!1}}(),Se.kMaxLength=Ce(),be.poolSize=8192,be._augment=function(Ke){return Ke.__proto__=be.prototype,Ke},be.from=function(Ke,De,ze){return ye(null,Ke,De,ze)},be.TYPED_ARRAY_SUPPORT&&(be.prototype.__proto__=Uint8Array.prototype,be.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&be[Symbol.species]===be&&Object.defineProperty(be,Symbol.species,{value:null,configurable:!0})),be.alloc=function(Ke,De,ze){return pe(null,Ke,De,ze)},be.allocUnsafe=function(Ke){return de(null,Ke)},be.allocUnsafeSlow=function(Ke){return de(null,Ke)},be.isBuffer=function(Ke){return!(Ke==null||!Ke._isBuffer)},be.compare=function(Ke,De){if(!be.isBuffer(Ke)||!be.isBuffer(De))throw new TypeError("Arguments must be Buffers");if(Ke===De)return 0;for(var ze=Ke.length,$e=De.length,We=0,Ve=Math.min(ze,$e);We<Ve;++We)if(Ke[We]!==De[We]){ze=Ke[We],$e=De[We];break}return ze<$e?-1:$e<ze?1:0},be.isEncoding=function(Ke){switch(String(Ke).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}},be.concat=function(Ke,De){if(!rt(Ke))throw new TypeError('"list" argument must be an Array of Buffers');if(Ke.length===0)return be.alloc(0);var ze;if(De===void 0)for(De=0,ze=0;ze<Ke.length;++ze)De+=Ke[ze].length;var $e=be.allocUnsafe(De),We=0;for(ze=0;ze<Ke.length;++ze){var Ve=Ke[ze];if(!be.isBuffer(Ve))throw new TypeError('"list" argument must be an Array of Buffers');Ve.copy($e,We),We+=Ve.length}return $e},be.byteLength=re,be.prototype._isBuffer=!0,be.prototype.swap16=function(){var Ke=this.length;if(Ke%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var De=0;De<Ke;De+=2)le(this,De,De+1);return this},be.prototype.swap32=function(){var Ke=this.length;if(Ke%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var De=0;De<Ke;De+=4)le(this,De,De+3),le(this,De+1,De+2);return this},be.prototype.swap64=function(){var Ke=this.length;if(Ke%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var De=0;De<Ke;De+=8)le(this,De,De+7),le(this,De+1,De+6),le(this,De+2,De+5),le(this,De+3,De+4);return this},be.prototype.toString=function(){var Ke=0|this.length;return Ke===0?"":arguments.length===0?mt(this,0,Ke):ae.apply(this,arguments)},be.prototype.equals=function(Ke){if(!be.isBuffer(Ke))throw new TypeError("Argument must be a Buffer");return this===Ke||be.compare(this,Ke)===0},be.prototype.inspect=function(){var Ke="",De=Se.INSPECT_MAX_BYTES;return this.length>0&&(Ke=this.toString("hex",0,De).match(/.{2}/g).join(" "),this.length>De&&(Ke+=" ... ")),"<Buffer "+Ke+">"},be.prototype.compare=function(Ke,De,ze,$e,We){if(!be.isBuffer(Ke))throw new TypeError("Argument must be a Buffer");if(De===void 0&&(De=0),ze===void 0&&(ze=Ke?Ke.length:0),$e===void 0&&($e=0),We===void 0&&(We=this.length),De<0||ze>Ke.length||$e<0||We>this.length)throw new RangeError("out of range index");if($e>=We&&De>=ze)return 0;if($e>=We)return-1;if(De>=ze)return 1;if(De>>>=0,ze>>>=0,$e>>>=0,We>>>=0,this===Ke)return 0;for(var Ve=We-$e,pt=ze-De,Lt=Math.min(Ve,pt),on=this.slice($e,We),Xt=Ke.slice(De,ze),Rt=0;Rt<Lt;++Rt)if(on[Rt]!==Xt[Rt]){Ve=on[Rt],pt=Xt[Rt];break}return Ve<pt?-1:pt<Ve?1:0},be.prototype.includes=function(Ke,De,ze){return this.indexOf(Ke,De,ze)!==-1},be.prototype.indexOf=function(Ke,De,ze){return me(this,Ke,De,ze,!0)},be.prototype.lastIndexOf=function(Ke,De,ze){return me(this,Ke,De,ze,!1)},be.prototype.write=function(Ke,De,ze,$e){if(De===void 0)$e="utf8",ze=this.length,De=0;else if(ze===void 0&&typeof De=="string")$e=De,ze=this.length,De=0;else{if(!isFinite(De))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");De|=0,isFinite(ze)?(ze|=0,$e===void 0&&($e="utf8")):($e=ze,ze=void 0)}var We=this.length-De;if((ze===void 0||ze>We)&&(ze=We),Ke.length>0&&(ze<0||De<0)||De>this.length)throw new RangeError("Attempt to write outside buffer bounds");$e||($e="utf8");for(var Ve=!1;;)switch($e){case"hex":return Pe(this,Ke,De,ze);case"utf8":case"utf-8":return Ae(this,Ke,De,ze);case"ascii":return Oe(this,Ke,De,ze);case"latin1":case"binary":return Ie(this,Ke,De,ze);case"base64":return Ze(this,Ke,De,ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qe(this,Ke,De,ze);default:if(Ve)throw new TypeError("Unknown encoding: "+$e);$e=(""+$e).toLowerCase(),Ve=!0}},be.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var dt=4096;be.prototype.slice=function(Ke,De){var ze=this.length;Ke=~~Ke,De=De===void 0?ze:~~De,Ke<0?(Ke+=ze)<0&&(Ke=0):Ke>ze&&(Ke=ze),De<0?(De+=ze)<0&&(De=0):De>ze&&(De=ze),De<Ke&&(De=Ke);var $e;if(be.TYPED_ARRAY_SUPPORT)$e=this.subarray(Ke,De),$e.__proto__=be.prototype;else{var We=De-Ke;$e=new be(We,void 0);for(var Ve=0;Ve<We;++Ve)$e[Ve]=this[Ve+Ke]}return $e},be.prototype.readUIntLE=function(Ke,De,ze){Ke|=0,De|=0,ze||Dt(Ke,De,this.length);for(var $e=this[Ke],We=1,Ve=0;++Ve<De&&(We*=256);)$e+=this[Ke+Ve]*We;return $e},be.prototype.readUIntBE=function(Ke,De,ze){Ke|=0,De|=0,ze||Dt(Ke,De,this.length);for(var $e=this[Ke+--De],We=1;De>0&&(We*=256);)$e+=this[Ke+--De]*We;return $e},be.prototype.readUInt8=function(Ke,De){return De||Dt(Ke,1,this.length),this[Ke]},be.prototype.readUInt16LE=function(Ke,De){return De||Dt(Ke,2,this.length),this[Ke]|this[Ke+1]<<8},be.prototype.readUInt16BE=function(Ke,De){return De||Dt(Ke,2,this.length),this[Ke]<<8|this[Ke+1]},be.prototype.readUInt32LE=function(Ke,De){return De||Dt(Ke,4,this.length),(this[Ke]|this[Ke+1]<<8|this[Ke+2]<<16)+16777216*this[Ke+3]},be.prototype.readUInt32BE=function(Ke,De){return De||Dt(Ke,4,this.length),16777216*this[Ke]+(this[Ke+1]<<16|this[Ke+2]<<8|this[Ke+3])},be.prototype.readIntLE=function(Ke,De,ze){Ke|=0,De|=0,ze||Dt(Ke,De,this.length);for(var $e=this[Ke],We=1,Ve=0;++Ve<De&&(We*=256);)$e+=this[Ke+Ve]*We;return We*=128,$e>=We&&($e-=Math.pow(2,8*De)),$e},be.prototype.readIntBE=function(Ke,De,ze){Ke|=0,De|=0,ze||Dt(Ke,De,this.length);for(var $e=De,We=1,Ve=this[Ke+--$e];$e>0&&(We*=256);)Ve+=this[Ke+--$e]*We;return We*=128,Ve>=We&&(Ve-=Math.pow(2,8*De)),Ve},be.prototype.readInt8=function(Ke,De){return De||Dt(Ke,1,this.length),128&this[Ke]?-1*(255-this[Ke]+1):this[Ke]},be.prototype.readInt16LE=function(Ke,De){De||Dt(Ke,2,this.length);var ze=this[Ke]|this[Ke+1]<<8;return 32768&ze?4294901760|ze:ze},be.prototype.readInt16BE=function(Ke,De){De||Dt(Ke,2,this.length);var ze=this[Ke+1]|this[Ke]<<8;return 32768&ze?4294901760|ze:ze},be.prototype.readInt32LE=function(Ke,De){return De||Dt(Ke,4,this.length),this[Ke]|this[Ke+1]<<8|this[Ke+2]<<16|this[Ke+3]<<24},be.prototype.readInt32BE=function(Ke,De){return De||Dt(Ke,4,this.length),this[Ke]<<24|this[Ke+1]<<16|this[Ke+2]<<8|this[Ke+3]},be.prototype.readFloatLE=function(Ke,De){return De||Dt(Ke,4,this.length),je.read(this,Ke,!0,23,4)},be.prototype.readFloatBE=function(Ke,De){return De||Dt(Ke,4,this.length),je.read(this,Ke,!1,23,4)},be.prototype.readDoubleLE=function(Ke,De){return De||Dt(Ke,8,this.length),je.read(this,Ke,!0,52,8)},be.prototype.readDoubleBE=function(Ke,De){return De||Dt(Ke,8,this.length),je.read(this,Ke,!1,52,8)},be.prototype.writeUIntLE=function(Ke,De,ze,$e){Ke=+Ke,De|=0,ze|=0,!$e&&ut(this,Ke,De,ze,Math.pow(2,8*ze)-1,0);var We=1,Ve=0;for(this[De]=255&Ke;++Ve<ze&&(We*=256);)this[De+Ve]=Ke/We&255;return De+ze},be.prototype.writeUIntBE=function(Ke,De,ze,$e){Ke=+Ke,De|=0,ze|=0,!$e&&ut(this,Ke,De,ze,Math.pow(2,8*ze)-1,0);var We=ze-1,Ve=1;for(this[De+We]=255&Ke;--We>=0&&(Ve*=256);)this[De+We]=Ke/Ve&255;return De+ze},be.prototype.writeUInt8=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,1,255,0),be.TYPED_ARRAY_SUPPORT||(Ke=Math.floor(Ke)),this[De]=255&Ke,De+1},be.prototype.writeUInt16LE=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[De]=255&Ke,this[De+1]=Ke>>>8):ot(this,Ke,De,!0),De+2},be.prototype.writeUInt16BE=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[De]=Ke>>>8,this[De+1]=255&Ke):ot(this,Ke,De,!1),De+2},be.prototype.writeUInt32LE=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[De+3]=Ke>>>24,this[De+2]=Ke>>>16,this[De+1]=Ke>>>8,this[De]=255&Ke):ct(this,Ke,De,!0),De+4},be.prototype.writeUInt32BE=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[De]=Ke>>>24,this[De+1]=Ke>>>16,this[De+2]=Ke>>>8,this[De+3]=255&Ke):ct(this,Ke,De,!1),De+4},be.prototype.writeIntLE=function(Ke,De,ze,$e){if(Ke=+Ke,De|=0,!$e){var We=Math.pow(2,8*ze-1);ut(this,Ke,De,ze,We-1,-We)}var Ve=0,pt=1,Lt=0;for(this[De]=255&Ke;++Ve<ze&&(pt*=256);)Ke<0&&Lt===0&&this[De+Ve-1]!==0&&(Lt=1),this[De+Ve]=(Ke/pt>>0)-Lt&255;return De+ze},be.prototype.writeIntBE=function(Ke,De,ze,$e){if(Ke=+Ke,De|=0,!$e){var We=Math.pow(2,8*ze-1);ut(this,Ke,De,ze,We-1,-We)}var Ve=ze-1,pt=1,Lt=0;for(this[De+Ve]=255&Ke;--Ve>=0&&(pt*=256);)Ke<0&&Lt===0&&this[De+Ve+1]!==0&&(Lt=1),this[De+Ve]=(Ke/pt>>0)-Lt&255;return De+ze},be.prototype.writeInt8=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,1,127,-128),be.TYPED_ARRAY_SUPPORT||(Ke=Math.floor(Ke)),Ke<0&&(Ke=255+Ke+1),this[De]=255&Ke,De+1},be.prototype.writeInt16LE=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[De]=255&Ke,this[De+1]=Ke>>>8):ot(this,Ke,De,!0),De+2},be.prototype.writeInt16BE=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[De]=Ke>>>8,this[De+1]=255&Ke):ot(this,Ke,De,!1),De+2},be.prototype.writeInt32LE=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,4,2147483647,-2147483648),be.TYPED_ARRAY_SUPPORT?(this[De]=255&Ke,this[De+1]=Ke>>>8,this[De+2]=Ke>>>16,this[De+3]=Ke>>>24):ct(this,Ke,De,!0),De+4},be.prototype.writeInt32BE=function(Ke,De,ze){return Ke=+Ke,De|=0,ze||ut(this,Ke,De,4,2147483647,-2147483648),Ke<0&&(Ke=4294967295+Ke+1),be.TYPED_ARRAY_SUPPORT?(this[De]=Ke>>>24,this[De+1]=Ke>>>16,this[De+2]=Ke>>>8,this[De+3]=255&Ke):ct(this,Ke,De,!1),De+4},be.prototype.writeFloatLE=function(Ke,De,ze){return wt(this,Ke,De,!0,ze)},be.prototype.writeFloatBE=function(Ke,De,ze){return wt(this,Ke,De,!1,ze)},be.prototype.writeDoubleLE=function(Ke,De,ze){return xt(this,Ke,De,!0,ze)},be.prototype.writeDoubleBE=function(Ke,De,ze){return xt(this,Ke,De,!1,ze)},be.prototype.copy=function(Ke,De,ze,$e){if(ze||(ze=0),$e||$e===0||($e=this.length),De>=Ke.length&&(De=Ke.length),De||(De=0),$e>0&&$e<ze&&($e=ze),$e===ze||Ke.length===0||this.length===0)return 0;if(De<0)throw new RangeError("targetStart out of bounds");if(ze<0||ze>=this.length)throw new RangeError("sourceStart out of bounds");if($e<0)throw new RangeError("sourceEnd out of bounds");$e>this.length&&($e=this.length),Ke.length-De<$e-ze&&($e=Ke.length-De+ze);var We,Ve=$e-ze;if(this===Ke&&ze<De&&De<$e)for(We=Ve-1;We>=0;--We)Ke[We+De]=this[We+ze];else if(Ve<1e3||!be.TYPED_ARRAY_SUPPORT)for(We=0;We<Ve;++We)Ke[We+De]=this[We+ze];else Uint8Array.prototype.set.call(Ke,this.subarray(ze,ze+Ve),De);return Ve},be.prototype.fill=function(Ke,De,ze,$e){if(typeof Ke=="string"){if(typeof De=="string"?($e=De,De=0,ze=this.length):typeof ze=="string"&&($e=ze,ze=this.length),Ke.length===1){var We=Ke.charCodeAt(0);We<256&&(Ke=We)}if($e!==void 0&&typeof $e!="string")throw new TypeError("encoding must be a string");if(typeof $e=="string"&&!be.isEncoding($e))throw new TypeError("Unknown encoding: "+$e)}else typeof Ke=="number"&&(Ke&=255);if(De<0||this.length<De||this.length<ze)throw new RangeError("Out of range index");if(ze<=De)return this;De>>>=0,ze=ze===void 0?this.length:ze>>>0,Ke||(Ke=0);var Ve;if(typeof Ke=="number")for(Ve=De;Ve<ze;++Ve)this[Ve]=Ke;else{var pt=be.isBuffer(Ke)?Ke:jt(new be(Ke,$e).toString()),Lt=pt.length;for(Ve=0;Ve<ze-De;++Ve)this[Ve+De]=pt[Ve%Lt]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(Se,Be(20))},function(ke,Se){var Be;Be=function(){return this}();try{Be=Be||Function("return this")()||(0,eval)("this")}catch(Le){typeof window=="object"&&(Be=window)}ke.exports=Be},function(ke,Se,Be){"use strict";function Le(z){var oe=z.length;if(oe%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return z[oe-2]==="="?2:z[oe-1]==="="?1:0}function Ce(z){return 3*z.length/4-Le(z)}function xe(z){var oe,re,ae,le,me,ve=z.length;le=Le(z),me=new ge(3*ve/4-le),re=le>0?ve-4:ve;var Pe=0;for(oe=0;oe<re;oe+=4)ae=de[z.charCodeAt(oe)]<<18|de[z.charCodeAt(oe+1)]<<12|de[z.charCodeAt(oe+2)]<<6|de[z.charCodeAt(oe+3)],me[Pe++]=ae>>16&255,me[Pe++]=ae>>8&255,me[Pe++]=255&ae;return le===2?(ae=de[z.charCodeAt(oe)]<<2|de[z.charCodeAt(oe+1)]>>4,me[Pe++]=255&ae):le===1&&(ae=de[z.charCodeAt(oe)]<<10|de[z.charCodeAt(oe+1)]<<4|de[z.charCodeAt(oe+2)]>>2,me[Pe++]=ae>>8&255,me[Pe++]=255&ae),me}function be(z){return pe[z>>18&63]+pe[z>>12&63]+pe[z>>6&63]+pe[63&z]}function ye(z,oe,re){for(var ae,le=[],me=oe;me<re;me+=3)ae=(z[me]<<16)+(z[me+1]<<8)+z[me+2],le.push(be(ae));return le.join("")}function we(z){for(var oe,re=z.length,ae=re%3,le="",me=[],ve=0,Pe=re-ae;ve<Pe;ve+=16383)me.push(ye(z,ve,ve+16383>Pe?Pe:ve+16383));return ae===1?(oe=z[re-1],le+=pe[oe>>2],le+=pe[oe<<4&63],le+="=="):ae===2&&(oe=(z[re-2]<<8)+z[re-1],le+=pe[oe>>10],le+=pe[oe>>4&63],le+=pe[oe<<2&63],le+="="),me.push(le),me.join("")}Se.byteLength=Ce,Se.toByteArray=xe,Se.fromByteArray=we;for(var pe=[],de=[],ge=typeof Uint8Array!="undefined"?Uint8Array:Array,fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue=0,ee=fe.length;ue<ee;++ue)pe[ue]=fe[ue],de[fe.charCodeAt(ue)]=ue;de[45]=62,de[95]=63},function(ke,Se){Se.read=function(Be,Le,Ce,xe,be){var ye,we,pe=8*be-xe-1,de=(1<<pe)-1,ge=de>>1,fe=-7,ue=Ce?be-1:0,ee=Ce?-1:1,z=Be[Le+ue];for(ue+=ee,ye=z&(1<<-fe)-1,z>>=-fe,fe+=pe;fe>0;ye=256*ye+Be[Le+ue],ue+=ee,fe-=8);for(we=ye&(1<<-fe)-1,ye>>=-fe,fe+=xe;fe>0;we=256*we+Be[Le+ue],ue+=ee,fe-=8);if(ye===0)ye=1-ge;else{if(ye===de)return we?NaN:1/0*(z?-1:1);we+=Math.pow(2,xe),ye-=ge}return(z?-1:1)*we*Math.pow(2,ye-xe)},Se.write=function(Be,Le,Ce,xe,be,ye){var we,pe,de,ge=8*ye-be-1,fe=(1<<ge)-1,ue=fe>>1,ee=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,z=xe?0:ye-1,oe=xe?1:-1,re=Le<0||Le===0&&1/Le<0?1:0;for(Le=Math.abs(Le),isNaN(Le)||Le===1/0?(pe=isNaN(Le)?1:0,we=fe):(we=Math.floor(Math.log(Le)/Math.LN2),Le*(de=Math.pow(2,-we))<1&&(we--,de*=2),Le+=we+ue>=1?ee/de:ee*Math.pow(2,1-ue),Le*de>=2&&(we++,de/=2),we+ue>=fe?(pe=0,we=fe):we+ue>=1?(pe=(Le*de-1)*Math.pow(2,be),we+=ue):(pe=Le*Math.pow(2,ue-1)*Math.pow(2,be),we=0));be>=8;Be[Ce+z]=255&pe,z+=oe,pe/=256,be-=8);for(we=we<<be|pe,ge+=be;ge>0;Be[Ce+z]=255&we,z+=oe,we/=256,ge-=8);Be[Ce+z-oe]|=128*re}},function(ke,Se){var Be={}.toString;ke.exports=Array.isArray||function(Le){return Be.call(Le)=="[object Array]"}},function(ke,Se,Be){"use strict";function Le(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Le(this,be)}return Ce(be,null,[{key:"set",value:function(ye,we){try{window.localStorage&&localStorage.setItem(ye,we)}catch(pe){window[ye+"_localStorage"]=we}}},{key:"get",value:function(ye){try{if(window.localStorage)return localStorage.getItem(ye)}catch(we){return window[ye+"_localStorage"]}return""}},{key:"remove",value:function(ye){try{window.localStorage&&localStorage.removeItem(ye)}catch(we){delete window[ye+"_localStorage"]}}}]),be}();Se.default=xe},function(ke,Se,Be){"use strict";function Le(be,ye){if(!(be instanceof ye))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function be(ye,we){for(var pe=0;pe<we.length;pe++){var de=we[pe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ye,de.key,de)}}return function(ye,we,pe){return we&&be(ye.prototype,we),pe&&be(ye,pe),ye}}(),xe=function(){function be(){Le(this,be)}return Ce(be,null,[{key:"get",value:function(ye){for(var we=ye+"",pe=document.cookie.split(";"),de=0;de<pe.length;de++){var ge=pe[de].trim();if(ge.indexOf(we)==0)return unescape(ge.substring(we.length+1,ge.length))}return""}},{key:"set",value:function(ye,we,pe){var de=new Date;de.setTime(de.getTime()+24*pe*60*60*1e3);var ge="expires="+de.toGMTString();document.cookie=ye+"="+escape(we)+"; "+ge}}]),be}();Se.default=xe},function(ke,Se,Be){"use strict";function Le(ge){return ge&&ge.__esModule?ge:{default:ge}}function Ce(ge,fe){if(!(ge instanceof fe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function ge(fe,ue){for(var ee=0;ee<ue.length;ee++){var z=ue[ee];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(fe,z.key,z)}}return function(fe,ue,ee){return ue&&ge(fe.prototype,ue),ee&&ge(fe,ee),fe}}(),be=Be(8),ye=Le(be),we=Be(9),pe=Le(we),de=function(){function ge(){Ce(this,ge)}return xe(ge,null,[{key:"refreshUploadAuth",value:function(fe,ue,ee){var z=(pe.default.randomUUID(),pe.default.randomUUID()),oe={AccessKeyId:fe.accessKeyId,SecurityToken:fe.securityToken,Action:"RefreshUploadVideo",VideoId:fe.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:z,RequestId:fe.requestId},re=pe.default.makeUTF8sort(oe,"=","&")+"&Signature="+pe.default.aliyunEncodeURI(pe.default.makeChangeSiga(oe,fe.accessKeySecret)),ae="https://vod."+fe.region+".aliyuncs.com/?"+re;ye.default.get(ae,function(me){var me=JSON.parse(me);ue&&ue(me)},function(le){if(ee){var me=JSON.parse(le);ee(me)}})}},{key:"getUploadAuth",value:function(fe,ue,ee){var z=(pe.default.randomUUID(),pe.default.randomUUID()),oe={AccessKeyId:fe.accessKeyId,SecurityToken:fe.securityToken,Action:"CreateUploadVideo",Title:fe.title,FileName:fe.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:z,RequestId:fe.requestId};fe.fileSize&&(oe.FileSize=fe.fileSize),fe.description&&(oe.Description=fe.description),fe.cateId&&(oe.CateId=fe.cateId),fe.tags&&(oe.Tags=fe.tags),fe.templateGroupId&&(oe.TemplateGroupId=fe.templateGroupId),fe.storageLocation&&(oe.StorageLocation=fe.storageLocation),fe.coverUrl&&(oe.CoverURL=fe.coverUrl),fe.transCodeMode&&(oe.TransCodeMode=fe.transCodeMode),fe.userData&&(oe.UserData=JSON.stringify(fe.userData));var re=pe.default.makeUTF8sort(oe,"=","&")+"&Signature="+pe.default.aliyunEncodeURI(pe.default.makeChangeSiga(oe,fe.accessKeySecret)),ae="https://vod."+fe.region+".aliyuncs.com/?"+re;ye.default.get(ae,function(le){try{le=JSON.parse(le)}catch(me){if(ee)return void ee({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}ue&&ue(le)},function(le){if(ee){var me={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{me=JSON.parse(le)}catch(ve){}ee(me)}})}},{key:"getImageUploadAuth",value:function(fe,ue,ee){var z=(pe.default.randomUUID(),pe.default.randomUUID()),oe={AccessKeyId:fe.accessKeyId,SecurityToken:fe.securityToken,Action:"CreateUploadImage",ImageType:fe.imageType?fe.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:z,RequestId:fe.requestId};fe.title&&(oe.Title=fe.title),fe.imageExt&&(oe.ImageExt=fe.imageExt),fe.tags&&(oe.Tags=fe.tags),fe.storageLocation&&(oe.StorageLocation=fe.storageLocation);var re=pe.default.makeUTF8sort(oe,"=","&")+"&Signature="+pe.default.aliyunEncodeURI(pe.default.makeChangeSiga(oe,fe.accessKeySecret)),ae="https://vod."+fe.region+".aliyuncs.com/?"+re;ye.default.get(ae,function(le){le=JSON.parse(le),ue&&ue(le)},function(le){if(ee){var me=JSON.parse(le);ee(me)}})}}]),ge}();Se.default=de},function(ke,Se,Be){(function(Le,Ce,xe){ke.exports=Se=Ce(Be(0),Be(28),Be(29))})(0,function(Le){return Le.HmacSHA1})},function(ke,Se,Be){(function(Le,Ce){ke.exports=Se=Ce(Be(0))})(0,function(Le){return function(){var Ce=Le,xe=Ce.lib,be=xe.WordArray,ye=xe.Hasher,we=Ce.algo,pe=[],de=we.SHA1=ye.extend({_doReset:function(){this._hash=new be.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(ge,fe){for(var ue=this._hash.words,ee=ue[0],z=ue[1],oe=ue[2],re=ue[3],ae=ue[4],le=0;le<80;le++){if(le<16)pe[le]=0|ge[fe+le];else{var me=pe[le-3]^pe[le-8]^pe[le-14]^pe[le-16];pe[le]=me<<1|me>>>31}var ve=(ee<<5|ee>>>27)+ae+pe[le];ve+=le<20?1518500249+(z&oe|~z&re):le<40?1859775393+(z^oe^re):le<60?(z&oe|z&re|oe&re)-1894007588:(z^oe^re)-899497514,ae=re,re=oe,oe=z<<30|z>>>2,z=ee,ee=ve}ue[0]=ue[0]+ee|0,ue[1]=ue[1]+z|0,ue[2]=ue[2]+oe|0,ue[3]=ue[3]+re|0,ue[4]=ue[4]+ae|0},_doFinalize:function(){var ge=this._data,fe=ge.words,ue=8*this._nDataBytes,ee=8*ge.sigBytes;return fe[ee>>>5]|=128<<24-ee%32,fe[14+(ee+64>>>9<<4)]=Math.floor(ue/4294967296),fe[15+(ee+64>>>9<<4)]=ue,ge.sigBytes=4*fe.length,this._process(),this._hash},clone:function(){var ge=ye.clone.call(this);return ge._hash=this._hash.clone(),ge}});Ce.SHA1=ye._createHelper(de),Ce.HmacSHA1=ye._createHmacHelper(de)}(),Le.SHA1})},function(ke,Se,Be){(function(Le,Ce){ke.exports=Se=Ce(Be(0))})(0,function(Le){(function(){var Ce=Le,xe=Ce.lib,be=xe.Base,ye=Ce.enc,we=ye.Utf8,pe=Ce.algo;pe.HMAC=be.extend({init:function(de,ge){de=this._hasher=new de.init,typeof ge=="string"&&(ge=we.parse(ge));var fe=de.blockSize,ue=4*fe;ge.sigBytes>ue&&(ge=de.finalize(ge)),ge.clamp();for(var ee=this._oKey=ge.clone(),z=this._iKey=ge.clone(),oe=ee.words,re=z.words,ae=0;ae<fe;ae++)oe[ae]^=1549556828,re[ae]^=909522486;ee.sigBytes=z.sigBytes=ue,this.reset()},reset:function(){var de=this._hasher;de.reset(),de.update(this._iKey)},update:function(de){return this._hasher.update(de),this},finalize:function(de){var ge=this._hasher,fe=ge.finalize(de);return ge.reset(),ge.finalize(this._oKey.clone().concat(fe))}})})()})},function(ke,Se,Be){(function(Le,Ce){ke.exports=Se=Ce(Be(0))})(0,function(Le){return function(){function Ce(pe,de,ge){for(var fe=[],ue=0,ee=0;ee<de;ee++)if(ee%4){var z=ge[pe.charCodeAt(ee-1)]<<ee%4*2,oe=ge[pe.charCodeAt(ee)]>>>6-ee%4*2;fe[ue>>>2]|=(z|oe)<<24-ue%4*8,ue++}return ye.create(fe,ue)}var xe=Le,be=xe.lib,ye=be.WordArray,we=xe.enc;we.Base64={stringify:function(pe){var de=pe.words,ge=pe.sigBytes,fe=this._map;pe.clamp();for(var ue=[],ee=0;ee<ge;ee+=3)for(var z=de[ee>>>2]>>>24-ee%4*8&255,oe=de[ee+1>>>2]>>>24-(ee+1)%4*8&255,re=de[ee+2>>>2]>>>24-(ee+2)%4*8&255,ae=z<<16|oe<<8|re,le=0;le<4&&ee+.75*le<ge;le++)ue.push(fe.charAt(ae>>>6*(3-le)&63));var me=fe.charAt(64);if(me)for(;ue.length%4;)ue.push(me);return ue.join("")},parse:function(pe){var de=pe.length,ge=this._map,fe=this._reverseMap;if(!fe){fe=this._reverseMap=[];for(var ue=0;ue<ge.length;ue++)fe[ge.charCodeAt(ue)]=ue}var ee=ge.charAt(64);if(ee){var z=pe.indexOf(ee);z!==-1&&(de=z)}return Ce(pe,de,fe)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),Le.enc.Base64})},function(ke,Se,Be){"use strict";function Le(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}function Ce(Pe,Ae){if(!(Pe instanceof Ae))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function Pe(Ae,Oe){for(var Ie=0;Ie<Oe.length;Ie++){var Ze=Oe[Ie];Ze.enumerable=Ze.enumerable||!1,Ze.configurable=!0,"value"in Ze&&(Ze.writable=!0),Object.defineProperty(Ae,Ze.key,Ze)}}return function(Ae,Oe,Ie){return Oe&&Pe(Ae.prototype,Oe),Ie&&Pe(Ae,Ie),Ae}}(),be=Be(8),ye=Le(be),we=Be(7),pe=Le(we),de=Be(4),ge=Le(de),fe=Be(6),ue=Le(fe),ee=Be(1),z=Le(ee),oe=Be(9),re=Le(oe),ae=Be(2),le=Be(11),me=Be(10),ve=function(){function Pe(){Ce(this,Pe)}return xe(Pe,null,[{key:"getAuthInfo",value:function(Ae,Oe,Ie){var Ze=Ae+"|f#Ylm&^1TppeRhLg|"+Ie;return Oe&&(Ze=Ae+"|"+Oe+"|f#Ylm&^1TppeRhLg|"+Ie),ae(me.parse(Ze)).toString(le)}},{key:"upload",value:function(Ae,Oe,Ie){var Ze=z.default.ISODateString(new Date),qe=Math.floor(new Date().valueOf()/1e3),Je=ge.default.getClientId();Je=ge.default.setClientId(Je);var mt=Pe.getAuthInfo(Ae.userId,Je,qe),gt=re.default.randomUUID(),Mt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:pe.default.browser.name+(pe.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:qe,Timestamp:Ze,AuthInfo:mt,FileName:Ae.file.name,FileSize:Ae.file.size,FileCreateTime:Ae.file.lastModified,FileHash:Ae.fileHash,UploadId:Ae.checkpoint.checkpoint.uploadId,PartSize:Ae.checkpoint.checkpoint.partSize,DonePartsCount:Ae.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(Ae.checkpoint),UploadRatio:Ae.checkpoint.loaded,UserId:Ae.userId,VideoId:Ae.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:gt};Je&&(Mt.ClientId=Je);var at=re.default.makeUTF8sort(Mt,"=","&")+"&Signature="+re.default.aliyunEncodeURI(re.default.makeChangeSiga(Mt,Ae.accessKeySecret)),_t="https://vod."+Ae.region+".aliyuncs.com/?"+at;ye.default.get(_t,function(ht){Oe&&Oe()},function(ht){ht&&(Ie(ht),console.log(ht))})}},{key:"get",value:function(Ae,Oe,Ie){var Ze=z.default.ISODateString(new Date),qe=Math.floor(new Date().valueOf()/1e3),Je=ge.default.getClientId(),mt=Pe.getAuthInfo(Ae.userId,Je,qe),gt=re.default.randomUUID(),Mt={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:pe.default.browser.name+(pe.default.browser.version||""),AppVersion:ue.default.version,AuthTimestamp:qe,Timestamp:Ze,AuthInfo:mt,UserId:Ae.userId,UploadInfoList:JSON.stringify(Ae.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:gt};Je&&(Mt.ClientId=Je);var at=re.default.makeUTF8sort(Mt,"=","&")+"&Signature="+re.default.aliyunEncodeURI(re.default.makeChangeSiga(Mt,Ae.accessKeySecret)),_t="https://vod."+Ae.region+".aliyuncs.com/?"+at;ye.default.get(_t,function(ht){var Dt={},ut=Je;ht=ht?JSON.parse(ht):{},ht.UploadProgress&&ht.UploadProgress.UploadProgressList&&ht.UploadProgress.UploadProgressList.length>0&&(Dt=ht.UploadProgress.UploadProgressList[0],ut=Dt.ClientId),ge.default.setClientId(ut),Oe&&Oe(Dt)},function(ht){ht&&(Ie(ht),console.log(ht))})}}]),Pe}();Se.default=ve},function(ke,Se,Be){"use strict";function Le(we,pe){if(!(we instanceof pe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var Ce=function(){function we(pe,de){for(var ge=0;ge<de.length;ge++){var fe=de[ge];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(pe,fe.key,fe)}}return function(pe,de,ge){return de&&we(pe.prototype,de),ge&&we(pe,ge),pe}}(),xe=Be(2),be=Be(33),ye=(Be(11),function(){function we(){Le(this,we)}return Ce(we,null,[{key:"getMd5",value:function(pe,de,ge){var fe=new FileReader;fe.onload=function(z){try{if(z&&z.target){var oe=xe(be.parse(z.target.result)),re=oe.toString();de(re)}}catch(ae){console.log(ae)}},fe.onerror=function(z){console.log(z),errorCallback(z)};var ue=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,ee=ue.call(pe,0,1024);fe.readAsBinaryString(ee)}}]),we}());Se.default=ye},function(ke,Se,Be){(function(Le,Ce){ke.exports=Se=Ce(Be(0))})(0,function(Le){return Le.enc.Latin1})}])},99498:function(xn,un,Re){(function(ke){ke(Re(89780))})(function(ke){ke.defineOption("placeholder","",function(ye,we,pe){var de=pe&&pe!=ke.Init;if(we&&!de)ye.on("blur",Ce),ye.on("change",xe),ye.on("swapDoc",xe),ke.on(ye.getInputField(),"compositionupdate",ye.state.placeholderCompose=function(){Le(ye)}),xe(ye);else if(!we&&de){ye.off("blur",Ce),ye.off("change",xe),ye.off("swapDoc",xe),ke.off(ye.getInputField(),"compositionupdate",ye.state.placeholderCompose),Se(ye);var ge=ye.getWrapperElement();ge.className=ge.className.replace(" CodeMirror-empty","")}we&&!ye.hasFocus()&&Ce(ye)});function Se(ye){ye.state.placeholder&&(ye.state.placeholder.parentNode.removeChild(ye.state.placeholder),ye.state.placeholder=null)}function Be(ye){Se(ye);var we=ye.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=ye.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var pe=ye.getOption("placeholder");typeof pe=="string"&&(pe=document.createTextNode(pe)),we.appendChild(pe),ye.display.lineSpace.insertBefore(we,ye.display.lineSpace.firstChild)}function Le(ye){setTimeout(function(){var we=!1,pe=ye.getInputField();pe.nodeName=="TEXTAREA"?we=!pe.value:ye.lineCount()==1&&(we=!/[^\u200b]/.test(pe.querySelector(".CodeMirror-line").textContent)),we?Be(ye):Se(ye)},20)}function Ce(ye){be(ye)&&Be(ye)}function xe(ye){var we=ye.getWrapperElement(),pe=be(ye);we.className=we.className.replace(" CodeMirror-empty","")+(pe?" CodeMirror-empty":""),pe?Be(ye):Se(ye)}function be(ye){return ye.lineCount()===1&&ye.getLine(0)===""}})},25717:function(xn,un,Re){(function(ke){ke(Re(89780))})(function(ke){var Se={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Be=ke.Pos;ke.defineOption("autoCloseBrackets",!1,function(ee,z,oe){oe&&oe!=ke.Init&&(ee.removeKeyMap(Ce),ee.state.closeBrackets=null),z&&(xe(Le(z,"pairs")),ee.state.closeBrackets=z,ee.addKeyMap(Ce))});function Le(ee,z){return z=="pairs"&&typeof ee=="string"?ee:typeof ee=="object"&&ee[z]!=null?ee[z]:Se[z]}var Ce={Backspace:we,Enter:pe};function xe(ee){for(var z=0;z<ee.length;z++){var oe=ee.charAt(z),re="'"+oe+"'";Ce[re]||(Ce[re]=be(oe))}}xe(Se.pairs+"`");function be(ee){return function(z){return ge(z,ee)}}function ye(ee){var z=ee.state.closeBrackets;if(!z||z.override)return z;var oe=ee.getModeAt(ee.getCursor());return oe.closeBrackets||z}function we(ee){var z=ye(ee);if(!z||ee.getOption("disableInput"))return ke.Pass;for(var oe=Le(z,"pairs"),re=ee.listSelections(),ae=0;ae<re.length;ae++){if(!re[ae].empty())return ke.Pass;var le=fe(ee,re[ae].head);if(!le||oe.indexOf(le)%2!=0)return ke.Pass}for(var ae=re.length-1;ae>=0;ae--){var me=re[ae].head;ee.replaceRange("",Be(me.line,me.ch-1),Be(me.line,me.ch+1),"+delete")}}function pe(ee){var z=ye(ee),oe=z&&Le(z,"explode");if(!oe||ee.getOption("disableInput"))return ke.Pass;for(var re=ee.listSelections(),ae=0;ae<re.length;ae++){if(!re[ae].empty())return ke.Pass;var le=fe(ee,re[ae].head);if(!le||oe.indexOf(le)%2!=0)return ke.Pass}ee.operation(function(){var me=ee.lineSeparator()||`
|
|
|
`;ee.replaceSelection(me+me,null),ee.execCommand("goCharLeft"),re=ee.listSelections();for(var ve=0;ve<re.length;ve++){var Pe=re[ve].head.line;ee.indentLine(Pe,null,!0),ee.indentLine(Pe+1,null,!0)}})}function de(ee){var z=ke.cmpPos(ee.anchor,ee.head)>0;return{anchor:new Be(ee.anchor.line,ee.anchor.ch+(z?-1:1)),head:new Be(ee.head.line,ee.head.ch+(z?1:-1))}}function ge(ee,z){var oe=ye(ee);if(!oe||ee.getOption("disableInput"))return ke.Pass;var re=Le(oe,"pairs"),ae=re.indexOf(z);if(ae==-1)return ke.Pass;for(var le=Le(oe,"closeBefore"),me=Le(oe,"triples"),ve=re.charAt(ae+1)==z,Pe=ee.listSelections(),Ae=ae%2==0,Oe,Ie=0;Ie<Pe.length;Ie++){var Ze=Pe[Ie],qe=Ze.head,Je,mt=ee.getRange(qe,Be(qe.line,qe.ch+1));if(Ae&&!Ze.empty())Je="surround";else if((ve||!Ae)&&mt==z)ve&&ue(ee,qe)?Je="both":me.indexOf(z)>=0&&ee.getRange(qe,Be(qe.line,qe.ch+3))==z+z+z?Je="skipThree":Je="skip";else if(ve&&qe.ch>1&&me.indexOf(z)>=0&&ee.getRange(Be(qe.line,qe.ch-2),qe)==z+z){if(qe.ch>2&&/\bstring/.test(ee.getTokenTypeAt(Be(qe.line,qe.ch-2))))return ke.Pass;Je="addFour"}else if(ve){var gt=qe.ch==0?" ":ee.getRange(Be(qe.line,qe.ch-1),qe);if(!ke.isWordChar(mt)&>!=z&&!ke.isWordChar(gt))Je="both";else return ke.Pass}else if(Ae&&(mt.length===0||/\s/.test(mt)||le.indexOf(mt)>-1))Je="both";else return ke.Pass;if(!Oe)Oe=Je;else if(Oe!=Je)return ke.Pass}var Mt=ae%2?re.charAt(ae-1):z,at=ae%2?z:re.charAt(ae+1);ee.operation(function(){if(Oe=="skip")ee.execCommand("goCharRight");else if(Oe=="skipThree")for(var _t=0;_t<3;_t++)ee.execCommand("goCharRight");else if(Oe=="surround"){for(var ht=ee.getSelections(),_t=0;_t<ht.length;_t++)ht[_t]=Mt+ht[_t]+at;ee.replaceSelections(ht,"around"),ht=ee.listSelections().slice();for(var _t=0;_t<ht.length;_t++)ht[_t]=de(ht[_t]);ee.setSelections(ht)}else Oe=="both"?(ee.replaceSelection(Mt+at,null),ee.triggerElectric(Mt+at),ee.execCommand("goCharLeft")):Oe=="addFour"&&(ee.replaceSelection(Mt+Mt+Mt+Mt,"before"),ee.execCommand("goCharRight"))})}function fe(ee,z){var oe=ee.getRange(Be(z.line,z.ch-1),Be(z.line,z.ch+1));return oe.length==2?oe:null}function ue(ee,z){var oe=ee.getTokenAt(Be(z.line,z.ch+1));return/\bstring/.test(oe.type)&&oe.start==z.ch&&(z.ch==0||!/\bstring/.test(ee.getTokenTypeAt(z)))}})},6313:function(xn,un,Re){(function(ke){ke(Re(89780),Re(32855))})(function(ke){ke.defineOption("autoCloseTags",!1,function(we,pe,de){if(de!=ke.Init&&de&&we.removeKeyMap("autoCloseTags"),!!pe){var ge={name:"autoCloseTags"};(typeof pe!="object"||pe.whenClosing!==!1)&&(ge["'/'"]=function(fe){return xe(fe)}),(typeof pe!="object"||pe.whenOpening!==!1)&&(ge["'>'"]=function(fe){return Le(fe)}),we.addKeyMap(ge)}});var Se=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Be=["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 Le(we){if(we.getOption("disableInput"))return ke.Pass;for(var pe=we.listSelections(),de=[],ge=we.getOption("autoCloseTags"),fe=0;fe<pe.length;fe++){if(!pe[fe].empty())return ke.Pass;var ue=pe[fe].head,ee=we.getTokenAt(ue),z=ke.innerMode(we.getMode(),ee.state),oe=z.state,re=z.mode.xmlCurrentTag&&z.mode.xmlCurrentTag(oe),ae=re&&re.name;if(!ae)return ke.Pass;var le=z.mode.configuration=="html",me=typeof ge=="object"&&ge.dontCloseTags||le&&Se,ve=typeof ge=="object"&&ge.indentTags||le&&Be;ee.end>ue.ch&&(ae=ae.slice(0,ae.length-ee.end+ue.ch));var Pe=ae.toLowerCase();if(!ae||ee.type=="string"&&(ee.end!=ue.ch||!/[\"\']/.test(ee.string.charAt(ee.string.length-1))||ee.string.length==1)||ee.type=="tag"&&re.close||ee.string.indexOf("/")==ue.ch-ee.start-1||me&&be(me,Pe)>-1||ye(we,z.mode.xmlCurrentContext&&z.mode.xmlCurrentContext(oe)||[],ae,ue,!0))return ke.Pass;var Ae=typeof ge=="object"&&ge.emptyTags;if(Ae&&be(Ae,ae)>-1){de[fe]={text:"/>",newPos:ke.Pos(ue.line,ue.ch+2)};continue}var Oe=ve&&be(ve,Pe)>-1;de[fe]={indent:Oe,text:">"+(Oe?`
|
|
|
|
|
|
`:"")+"</"+ae+">",newPos:Oe?ke.Pos(ue.line+1,0):ke.Pos(ue.line,ue.ch+1)}}for(var Ie=typeof ge=="object"&&ge.dontIndentOnAutoClose,fe=pe.length-1;fe>=0;fe--){var Ze=de[fe];we.replaceRange(Ze.text,pe[fe].head,pe[fe].anchor,"+insert");var qe=we.listSelections().slice(0);qe[fe]={head:Ze.newPos,anchor:Ze.newPos},we.setSelections(qe),!Ie&&Ze.indent&&(we.indentLine(Ze.newPos.line,null,!0),we.indentLine(Ze.newPos.line+1,null,!0))}}function Ce(we,pe){for(var de=we.listSelections(),ge=[],fe=pe?"/":"</",ue=we.getOption("autoCloseTags"),ee=typeof ue=="object"&&ue.dontIndentOnSlash,z=0;z<de.length;z++){if(!de[z].empty())return ke.Pass;var oe=de[z].head,re=we.getTokenAt(oe),ae=ke.innerMode(we.getMode(),re.state),le=ae.state;if(pe&&(re.type=="string"||re.string.charAt(0)!="<"||re.start!=oe.ch-1))return ke.Pass;var me,ve=ae.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(ve&&ae.mode.name=="javascript")me=fe+"script";else if(ve&&ae.mode.name=="css")me=fe+"style";else{var Pe=ae.mode.xmlCurrentContext&&ae.mode.xmlCurrentContext(le);if(!Pe||Pe.length&&ye(we,Pe,Pe[Pe.length-1],oe))return ke.Pass;me=fe+Pe[Pe.length-1]}we.getLine(oe.line).charAt(re.end)!=">"&&(me+=">"),ge[z]=me}if(we.replaceSelections(ge),de=we.listSelections(),!ee)for(var z=0;z<de.length;z++)(z==de.length-1||de[z].head.line<de[z+1].head.line)&&we.indentLine(de[z].head.line)}function xe(we){return we.getOption("disableInput")?ke.Pass:Ce(we,!0)}ke.commands.closeTag=function(we){return Ce(we)};function be(we,pe){if(we.indexOf)return we.indexOf(pe);for(var de=0,ge=we.length;de<ge;++de)if(we[de]==pe)return de;return-1}function ye(we,pe,de,ge,fe){if(!ke.scanForClosingTag)return!1;var ue=Math.min(we.lastLine()+1,ge.line+500),ee=ke.scanForClosingTag(we,ge,null,ue);if(!ee||ee.tag!=de)return!1;for(var z=fe?1:0,oe=pe.length-1;oe>=0&&pe[oe]==de;oe--)++z;ge=ee.to;for(var oe=1;oe<z;oe++){var re=ke.scanForClosingTag(we,ge,null,ue);if(!re||re.tag!=de)return!1;ge=re.to}return!0}})},32855:function(xn,un,Re){(function(ke){ke(Re(89780))})(function(ke){"use strict";var Se=ke.Pos;function Be(oe,re){return oe.line-re.line||oe.ch-re.ch}var Le="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",Ce=Le+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",xe=new RegExp("<(/?)(["+Le+"]["+Ce+"]*)","g");function be(oe,re,ae,le){this.line=re,this.ch=ae,this.cm=oe,this.text=oe.getLine(re),this.min=le?Math.max(le.from,oe.firstLine()):oe.firstLine(),this.max=le?Math.min(le.to-1,oe.lastLine()):oe.lastLine()}function ye(oe,re){var ae=oe.cm.getTokenTypeAt(Se(oe.line,re));return ae&&/\btag\b/.test(ae)}function we(oe){if(!(oe.line>=oe.max))return oe.ch=0,oe.text=oe.cm.getLine(++oe.line),!0}function pe(oe){if(!(oe.line<=oe.min))return oe.text=oe.cm.getLine(--oe.line),oe.ch=oe.text.length,!0}function de(oe){for(;;){var re=oe.text.indexOf(">",oe.ch);if(re==-1){if(we(oe))continue;return}if(!ye(oe,re+1)){oe.ch=re+1;continue}var ae=oe.text.lastIndexOf("/",re),le=ae>-1&&!/\S/.test(oe.text.slice(ae+1,re));return oe.ch=re+1,le?"selfClose":"regular"}}function ge(oe){for(;;){var re=oe.ch?oe.text.lastIndexOf("<",oe.ch-1):-1;if(re==-1){if(pe(oe))continue;return}if(!ye(oe,re+1)){oe.ch=re;continue}xe.lastIndex=re,oe.ch=re;var ae=xe.exec(oe.text);if(ae&&ae.index==re)return ae}}function fe(oe){for(;;){xe.lastIndex=oe.ch;var re=xe.exec(oe.text);if(!re){if(we(oe))continue;return}if(!ye(oe,re.index+1)){oe.ch=re.index+1;continue}return oe.ch=re.index+re[0].length,re}}function ue(oe){for(;;){var re=oe.ch?oe.text.lastIndexOf(">",oe.ch-1):-1;if(re==-1){if(pe(oe))continue;return}if(!ye(oe,re+1)){oe.ch=re;continue}var ae=oe.text.lastIndexOf("/",re),le=ae>-1&&!/\S/.test(oe.text.slice(ae+1,re));return oe.ch=re+1,le?"selfClose":"regular"}}function ee(oe,re){for(var ae=[];;){var le=fe(oe),me,ve=oe.line,Pe=oe.ch-(le?le[0].length:0);if(!le||!(me=de(oe)))return;if(me!="selfClose")if(le[1]){for(var Ae=ae.length-1;Ae>=0;--Ae)if(ae[Ae]==le[2]){ae.length=Ae;break}if(Ae<0&&(!re||re==le[2]))return{tag:le[2],from:Se(ve,Pe),to:Se(oe.line,oe.ch)}}else ae.push(le[2])}}function z(oe,re){for(var ae=[];;){var le=ue(oe);if(!le)return;if(le=="selfClose"){ge(oe);continue}var me=oe.line,ve=oe.ch,Pe=ge(oe);if(!Pe)return;if(Pe[1])ae.push(Pe[2]);else{for(var Ae=ae.length-1;Ae>=0;--Ae)if(ae[Ae]==Pe[2]){ae.length=Ae;break}if(Ae<0&&(!re||re==Pe[2]))return{tag:Pe[2],from:Se(oe.line,oe.ch),to:Se(me,ve)}}}}ke.registerHelper("fold","xml",function(oe,re){for(var ae=new be(oe,re.line,0);;){var le=fe(ae);if(!le||ae.line!=re.line)return;var me=de(ae);if(!me)return;if(!le[1]&&me!="selfClose"){var ve=Se(ae.line,ae.ch),Pe=ee(ae,le[2]);return Pe&&Be(Pe.from,ve)>0?{from:ve,to:Pe.from}:null}}}),ke.findMatchingTag=function(oe,re,ae){var le=new be(oe,re.line,re.ch,ae);if(!(le.text.indexOf(">")==-1&&le.text.indexOf("<")==-1)){var me=de(le),ve=me&&Se(le.line,le.ch),Pe=me&&ge(le);if(!(!me||!Pe||Be(le,re)>0)){var Ae={from:Se(le.line,le.ch),to:ve,tag:Pe[2]};return me=="selfClose"?{open:Ae,close:null,at:"open"}:Pe[1]?{open:z(le,Pe[2]),close:Ae,at:"close"}:(le=new be(oe,ve.line,ve.ch,ae),{open:Ae,close:ee(le,Pe[2]),at:"open"})}}},ke.findEnclosingTag=function(oe,re,ae,le){for(var me=new be(oe,re.line,re.ch,ae);;){var ve=z(me,le);if(!ve)break;var Pe=new be(oe,re.line,re.ch,ae),Ae=ee(Pe,ve.tag);if(Ae)return{open:ve,close:Ae}}},ke.scanForClosingTag=function(oe,re,ae,le){var me=new be(oe,re.line,re.ch,le?{from:0,to:le}:null);return ee(me,ae)}})},89780:function(xn){(function(un,Re){xn.exports=Re()})(this,function(){"use strict";var un=navigator.userAgent,Re=navigator.platform,ke=/gecko\/\d/i.test(un),Se=/MSIE \d/.test(un),Be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(un),Le=/Edge\/(\d+)/.exec(un),Ce=Se||Be||Le,xe=Ce&&(Se?document.documentMode||6:+(Le||Be)[1]),be=!Le&&/WebKit\//.test(un),ye=be&&/Qt\/\d+\.\d+/.test(un),we=!Le&&/Chrome\//.test(un),pe=/Opera\//.test(un),de=/Apple Computer/.test(navigator.vendor),ge=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(un),fe=/PhantomJS/.test(un),ue=!Le&&/AppleWebKit/.test(un)&&/Mobile\/\w+/.test(un),ee=/Android/.test(un),z=ue||ee||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(un),oe=ue||/Mac/.test(Re),re=/\bCrOS\b/.test(un),ae=/win/i.test(Re),le=pe&&un.match(/Version\/(\d*\.\d*)/);le&&(le=Number(le[1])),le&&le>=15&&(pe=!1,be=!0);var me=oe&&(ye||pe&&(le==null||le<12.11)),ve=ke||Ce&&xe>=9;function Pe(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var Ae=function(ie,ce){var Te=ie.className,Me=Pe(ce).exec(Te);if(Me){var Fe=Te.slice(Me.index+Me[0].length);ie.className=Te.slice(0,Me.index)+(Fe?Me[1]+Fe:"")}};function Oe(ie){for(var ce=ie.childNodes.length;ce>0;--ce)ie.removeChild(ie.firstChild);return ie}function Ie(ie,ce){return Oe(ie).appendChild(ce)}function Ze(ie,ce,Te,Me){var Fe=document.createElement(ie);if(Te&&(Fe.className=Te),Me&&(Fe.style.cssText=Me),typeof ce=="string")Fe.appendChild(document.createTextNode(ce));else if(ce)for(var it=0;it<ce.length;++it)Fe.appendChild(ce[it]);return Fe}function qe(ie,ce,Te,Me){var Fe=Ze(ie,ce,Te,Me);return Fe.setAttribute("role","presentation"),Fe}var Je;document.createRange?Je=function(ie,ce,Te,Me){var Fe=document.createRange();return Fe.setEnd(Me||ie,Te),Fe.setStart(ie,ce),Fe}:Je=function(ie,ce,Te){var Me=document.body.createTextRange();try{Me.moveToElementText(ie.parentNode)}catch(Fe){return Me}return Me.collapse(!0),Me.moveEnd("character",Te),Me.moveStart("character",ce),Me};function mt(ie,ce){if(ce.nodeType==3&&(ce=ce.parentNode),ie.contains)return ie.contains(ce);do if(ce.nodeType==11&&(ce=ce.host),ce==ie)return!0;while(ce=ce.parentNode)}function gt(){var ie;try{ie=document.activeElement}catch(ce){ie=document.body||null}for(;ie&&ie.shadowRoot&&ie.shadowRoot.activeElement;)ie=ie.shadowRoot.activeElement;return ie}function Mt(ie,ce){var Te=ie.className;Pe(ce).test(Te)||(ie.className+=(Te?" ":"")+ce)}function at(ie,ce){for(var Te=ie.split(" "),Me=0;Me<Te.length;Me++)Te[Me]&&!Pe(Te[Me]).test(ce)&&(ce+=" "+Te[Me]);return ce}var _t=function(ie){ie.select()};ue?_t=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:Ce&&(_t=function(ie){try{ie.select()}catch(ce){}});function ht(ie){var ce=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ce)}}function Dt(ie,ce,Te){ce||(ce={});for(var Me in ie)ie.hasOwnProperty(Me)&&(Te!==!1||!ce.hasOwnProperty(Me))&&(ce[Me]=ie[Me]);return ce}function ut(ie,ce,Te,Me,Fe){ce==null&&(ce=ie.search(/[^\s\u00a0]/),ce==-1&&(ce=ie.length));for(var it=Me||0,vt=Fe||0;;){var Et=ie.indexOf(" ",it);if(Et<0||Et>=ce)return vt+(ce-it);vt+=Et-it,vt+=Te-vt%Te,it=Et+1}}var ot=function(){this.id=null,this.f=null,this.time=0,this.handler=ht(this.onTimeout,this)};ot.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},ot.prototype.set=function(ie,ce){this.f=ce;var Te=+new Date+ie;(!this.id||Te<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=Te)};function ct(ie,ce){for(var Te=0;Te<ie.length;++Te)if(ie[Te]==ce)return Te;return-1}var yt=50,wt={toString:function(){return"CodeMirror.Pass"}},xt={scroll:!1},zt={origin:"*mouse"},Ut={origin:"+move"};function cn(ie,ce,Te){for(var Me=0,Fe=0;;){var it=ie.indexOf(" ",Me);it==-1&&(it=ie.length);var vt=it-Me;if(it==ie.length||Fe+vt>=ce)return Me+Math.min(vt,ce-Fe);if(Fe+=it-Me,Fe+=Te-Fe%Te,Me=it+1,Fe>=ce)return Me}}var jt=[""];function mn(ie){for(;jt.length<=ie;)jt.push(Ft(jt)+" ");return jt[ie]}function Ft(ie){return ie[ie.length-1]}function Yt(ie,ce){for(var Te=[],Me=0;Me<ie.length;Me++)Te[Me]=ce(ie[Me],Me);return Te}function tn(ie,ce,Te){for(var Me=0,Fe=Te(ce);Me<ie.length&&Te(ie[Me])<=Fe;)Me++;ie.splice(Me,0,ce)}function lt(){}function Ue(ie,ce){var Te;return Object.create?Te=Object.create(ie):(lt.prototype=ie,Te=new lt),ce&&Dt(ce,Te),Te}var je=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function rt(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||je.test(ie))}function dt(ie,ce){return ce?ce.source.indexOf("\\w")>-1&&rt(ie)?!0:ce.test(ie):rt(ie)}function tt(ie){for(var ce in ie)if(ie.hasOwnProperty(ce)&&ie[ce])return!1;return!0}var Ke=/[\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 De(ie){return ie.charCodeAt(0)>=768&&Ke.test(ie)}function ze(ie,ce,Te){for(;(Te<0?ce>0:ce<ie.length)&&De(ie.charAt(ce));)ce+=Te;return ce}function $e(ie,ce,Te){for(var Me=ce>Te?-1:1;;){if(ce==Te)return ce;var Fe=(ce+Te)/2,it=Me<0?Math.ceil(Fe):Math.floor(Fe);if(it==ce)return ie(it)?ce:Te;ie(it)?Te=it:ce=it+Me}}function We(ie,ce,Te,Me){if(!ie)return Me(ce,Te,"ltr",0);for(var Fe=!1,it=0;it<ie.length;++it){var vt=ie[it];(vt.from<Te&&vt.to>ce||ce==Te&&vt.to==ce)&&(Me(Math.max(vt.from,ce),Math.min(vt.to,Te),vt.level==1?"rtl":"ltr",it),Fe=!0)}Fe||Me(ce,Te,"ltr")}var Ve=null;function pt(ie,ce,Te){var Me;Ve=null;for(var Fe=0;Fe<ie.length;++Fe){var it=ie[Fe];if(it.from<ce&&it.to>ce)return Fe;it.to==ce&&(it.from!=it.to&&Te=="before"?Me=Fe:Ve=Fe),it.from==ce&&(it.from!=it.to&&Te!="before"?Me=Fe:Ve=Fe)}return Me!=null?Me:Ve}var Lt=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Te(Bt){return Bt<=247?ie.charAt(Bt):1424<=Bt&&Bt<=1524?"R":1536<=Bt&&Bt<=1785?ce.charAt(Bt-1536):1774<=Bt&&Bt<=2220?"r":8192<=Bt&&Bt<=8203?"w":Bt==8204?"b":"L"}var Me=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Fe=/[stwN]/,it=/[LRr]/,vt=/[Lb1n]/,Et=/[1n]/;function Pt(Bt,gn,Gt){this.level=Bt,this.from=gn,this.to=Gt}return function(Bt,gn){var Gt=gn=="ltr"?"L":"R";if(Bt.length==0||gn=="ltr"&&!Me.test(Bt))return!1;for(var Tn=Bt.length,bn=[],fi=0;fi<Tn;++fi)bn.push(Te(Bt.charCodeAt(fi)));for(var wi=0,Oi=Gt;wi<Tn;++wi){var er=bn[wi];er=="m"?bn[wi]=Oi:Oi=er}for(var br=0,hr=Gt;br<Tn;++br){var Ir=bn[br];Ir=="1"&&hr=="r"?bn[br]="n":it.test(Ir)&&(hr=Ir,Ir=="r"&&(bn[br]="R"))}for(var ao=1,lr=bn[0];ao<Tn-1;++ao){var Bo=bn[ao];Bo=="+"&&lr=="1"&&bn[ao+1]=="1"?bn[ao]="1":Bo==","&&lr==bn[ao+1]&&(lr=="1"||lr=="n")&&(bn[ao]=lr),lr=Bo}for(var Fs=0;Fs<Tn;++Fs){var Ea=bn[Fs];if(Ea==",")bn[Fs]="N";else if(Ea=="%"){var Js=void 0;for(Js=Fs+1;Js<Tn&&bn[Js]=="%";++Js);for(var Pl=Fs&&bn[Fs-1]=="!"||Js<Tn&&bn[Js]=="1"?"1":"N",ol=Fs;ol<Js;++ol)bn[ol]=Pl;Fs=Js-1}}for(var wa=0,Dl=Gt;wa<Tn;++wa){var Xa=bn[wa];Dl=="L"&&Xa=="1"?bn[wa]="L":it.test(Xa)&&(Dl=Xa)}for(var _a=0;_a<Tn;++_a)if(Fe.test(bn[_a])){var os=void 0;for(os=_a+1;os<Tn&&Fe.test(bn[os]);++os);for(var ra=(_a?bn[_a-1]:Gt)=="L",Da=(os<Tn?bn[os]:Gt)=="L",Ja=ra==Da?ra?"L":"R":Gt,Tu=_a;Tu<os;++Tu)bn[Tu]=Ja;_a=os-1}for(var Qs=[],cu,ua=0;ua<Tn;)if(vt.test(bn[ua])){var Zd=ua;for(++ua;ua<Tn&&vt.test(bn[ua]);++ua);Qs.push(new Pt(0,Zd,ua))}else{var Jl=ua,Ol=Qs.length,Cl=gn=="rtl"?1:0;for(++ua;ua<Tn&&bn[ua]!="L";++ua);for(var bs=Jl;bs<ua;)if(Et.test(bn[bs])){Jl<bs&&(Qs.splice(Ol,0,new Pt(1,Jl,bs)),Ol+=Cl);var Oa=bs;for(++bs;bs<ua&&Et.test(bn[bs]);++bs);Qs.splice(Ol,0,new Pt(2,Oa,bs)),Ol+=Cl,Jl=bs}else++bs;Jl<ua&&Qs.splice(Ol,0,new Pt(1,Jl,ua))}return gn=="ltr"&&(Qs[0].level==1&&(cu=Bt.match(/^\s+/))&&(Qs[0].from=cu[0].length,Qs.unshift(new Pt(0,0,cu[0].length))),Ft(Qs).level==1&&(cu=Bt.match(/\s+$/))&&(Ft(Qs).to-=cu[0].length,Qs.push(new Pt(0,Tn-cu[0].length,Tn)))),gn=="rtl"?Qs.reverse():Qs}}();function on(ie,ce){var Te=ie.order;return Te==null&&(Te=ie.order=Lt(ie.text,ce)),Te}var Xt=[],Rt=function(ie,ce,Te){if(ie.addEventListener)ie.addEventListener(ce,Te,!1);else if(ie.attachEvent)ie.attachEvent("on"+ce,Te);else{var Me=ie._handlers||(ie._handlers={});Me[ce]=(Me[ce]||Xt).concat(Te)}};function fn(ie,ce){return ie._handlers&&ie._handlers[ce]||Xt}function En(ie,ce,Te){if(ie.removeEventListener)ie.removeEventListener(ce,Te,!1);else if(ie.detachEvent)ie.detachEvent("on"+ce,Te);else{var Me=ie._handlers,Fe=Me&&Me[ce];if(Fe){var it=ct(Fe,Te);it>-1&&(Me[ce]=Fe.slice(0,it).concat(Fe.slice(it+1)))}}}function Sn(ie,ce){var Te=fn(ie,ce);if(Te.length)for(var Me=Array.prototype.slice.call(arguments,2),Fe=0;Fe<Te.length;++Fe)Te[Fe].apply(null,Me)}function dn(ie,ce,Te){return typeof ce=="string"&&(ce={type:ce,preventDefault:function(){this.defaultPrevented=!0}}),Sn(ie,Te||ce.type,ie,ce),Qn(ce)||ce.codemirrorIgnore}function Zn(ie){var ce=ie._handlers&&ie._handlers.cursorActivity;if(ce)for(var Te=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),Me=0;Me<ce.length;++Me)ct(Te,ce[Me])==-1&&Te.push(ce[Me])}function vn(ie,ce){return fn(ie,ce).length>0}function Wn(ie){ie.prototype.on=function(ce,Te){Rt(this,ce,Te)},ie.prototype.off=function(ce,Te){En(this,ce,Te)}}function ri(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function Ni(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function Qn(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function ki(ie){ri(ie),Ni(ie)}function Hi(ie){return ie.target||ie.srcElement}function Gi(ie){var ce=ie.which;return ce==null&&(ie.button&1?ce=1:ie.button&2?ce=3:ie.button&4&&(ce=2)),oe&&ie.ctrlKey&&ce==1&&(ce=3),ce}var qi=function(){if(Ce&&xe<9)return!1;var ie=Ze("div");return"draggable"in ie||"dragDrop"in ie}(),Pr;function gr(ie){if(Pr==null){var ce=Ze("span","\u200B");Ie(ie,Ze("span",[ce,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(Pr=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(Ce&&xe<8))}var Te=Pr?Ze("span","\u200B"):Ze("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Te.setAttribute("cm-text",""),Te}var Ri;function Vi(ie){if(Ri!=null)return Ri;var ce=Ie(ie,document.createTextNode("A\u062EA")),Te=Je(ce,0,1).getBoundingClientRect(),Me=Je(ce,1,2).getBoundingClientRect();return Oe(ie),!Te||Te.left==Te.right?!1:Ri=Me.right-Te.right<3}var sr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(ie){for(var ce=0,Te=[],Me=ie.length;ce<=Me;){var Fe=ie.indexOf(`
|
|
|
`,ce);Fe==-1&&(Fe=ie.length);var it=ie.slice(ce,ie.charAt(Fe-1)=="\r"?Fe-1:Fe),vt=it.indexOf("\r");vt!=-1?(Te.push(it.slice(0,vt)),ce+=vt+1):(Te.push(it),ce=Fe+1)}return Te}:function(ie){return ie.split(/\r\n?|\n/)},Qe=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(ce){return!1}}:function(ie){var ce;try{ce=ie.ownerDocument.selection.createRange()}catch(Te){}return!ce||ce.parentElement()!=ie?!1:ce.compareEndPoints("StartToEnd",ce)!=0},Ti=function(){var ie=Ze("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),ei=null;function Ii(ie){if(ei!=null)return ei;var ce=Ie(ie,Ze("span","x")),Te=ce.getBoundingClientRect(),Me=Je(ce,0,1).getBoundingClientRect();return ei=Math.abs(Te.left-Me.left)>1}var mr={},cr={};function ir(ie,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),mr[ie]=ce}function po(ie,ce){cr[ie]=ce}function Vn(ie){if(typeof ie=="string"&&cr.hasOwnProperty(ie))ie=cr[ie];else if(ie&&typeof ie.name=="string"&&cr.hasOwnProperty(ie.name)){var ce=cr[ie.name];typeof ce=="string"&&(ce={name:ce}),ie=Ue(ce,ie),ie.name=ce.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return Vn("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return Vn("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function He(ie,ce){ce=Vn(ce);var Te=mr[ce.name];if(!Te)return He(ie,"text/plain");var Me=Te(ie,ce);if(Xe.hasOwnProperty(ce.name)){var Fe=Xe[ce.name];for(var it in Fe)Fe.hasOwnProperty(it)&&(Me.hasOwnProperty(it)&&(Me["_"+it]=Me[it]),Me[it]=Fe[it])}if(Me.name=ce.name,ce.helperType&&(Me.helperType=ce.helperType),ce.modeProps)for(var vt in ce.modeProps)Me[vt]=ce.modeProps[vt];return Me}var Xe={};function nt(ie,ce){var Te=Xe.hasOwnProperty(ie)?Xe[ie]:Xe[ie]={};Dt(ce,Te)}function bt(ie,ce){if(ce===!0)return ce;if(ie.copyState)return ie.copyState(ce);var Te={};for(var Me in ce){var Fe=ce[Me];Fe instanceof Array&&(Fe=Fe.concat([])),Te[Me]=Fe}return Te}function Nt(ie,ce){for(var Te;ie.innerMode&&(Te=ie.innerMode(ce),!(!Te||Te.mode==ie));)ce=Te.state,ie=Te.mode;return Te||{mode:ie,state:ce}}function sn(ie,ce,Te){return ie.startState?ie.startState(ce,Te):!0}var Zt=function(ie,ce,Te){this.pos=this.start=0,this.string=ie,this.tabSize=ce||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Te};Zt.prototype.eol=function(){return this.pos>=this.string.length},Zt.prototype.sol=function(){return this.pos==this.lineStart},Zt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Zt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Zt.prototype.eat=function(ie){var ce=this.string.charAt(this.pos),Te;if(typeof ie=="string"?Te=ce==ie:Te=ce&&(ie.test?ie.test(ce):ie(ce)),Te)return++this.pos,ce},Zt.prototype.eatWhile=function(ie){for(var ce=this.pos;this.eat(ie););return this.pos>ce},Zt.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},Zt.prototype.skipToEnd=function(){this.pos=this.string.length},Zt.prototype.skipTo=function(ie){var ce=this.string.indexOf(ie,this.pos);if(ce>-1)return this.pos=ce,!0},Zt.prototype.backUp=function(ie){this.pos-=ie},Zt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ut(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ut(this.string,this.lineStart,this.tabSize):0)},Zt.prototype.indentation=function(){return ut(this.string,null,this.tabSize)-(this.lineStart?ut(this.string,this.lineStart,this.tabSize):0)},Zt.prototype.match=function(ie,ce,Te){if(typeof ie=="string"){var Me=function(vt){return Te?vt.toLowerCase():vt},Fe=this.string.substr(this.pos,ie.length);if(Me(Fe)==Me(ie))return ce!==!1&&(this.pos+=ie.length),!0}else{var it=this.string.slice(this.pos).match(ie);return it&&it.index>0?null:(it&&ce!==!1&&(this.pos+=it[0].length),it)}},Zt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Zt.prototype.hideFirstChars=function(ie,ce){this.lineStart+=ie;try{return ce()}finally{this.lineStart-=ie}},Zt.prototype.lookAhead=function(ie){var ce=this.lineOracle;return ce&&ce.lookAhead(ie)},Zt.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function _n(ie,ce){if(ce-=ie.first,ce<0||ce>=ie.size)throw new Error("There is no line "+(ce+ie.first)+" in the document.");for(var Te=ie;!Te.lines;)for(var Me=0;;++Me){var Fe=Te.children[Me],it=Fe.chunkSize();if(ce<it){Te=Fe;break}ce-=it}return Te.lines[ce]}function Kt(ie,ce,Te){var Me=[],Fe=ce.line;return ie.iter(ce.line,Te.line+1,function(it){var vt=it.text;Fe==Te.line&&(vt=vt.slice(0,Te.ch)),Fe==ce.line&&(vt=vt.slice(ce.ch)),Me.push(vt),++Fe}),Me}function qt(ie,ce,Te){var Me=[];return ie.iter(ce,Te,function(Fe){Me.push(Fe.text)}),Me}function Hn(ie,ce){var Te=ce-ie.height;if(Te)for(var Me=ie;Me;Me=Me.parent)Me.height+=Te}function kt(ie){if(ie.parent==null)return null;for(var ce=ie.parent,Te=ct(ce.lines,ie),Me=ce.parent;Me;ce=Me,Me=Me.parent)for(var Fe=0;Me.children[Fe]!=ce;++Fe)Te+=Me.children[Fe].chunkSize();return Te+ce.first}function ln(ie,ce){var Te=ie.first;e:do{for(var Me=0;Me<ie.children.length;++Me){var Fe=ie.children[Me],it=Fe.height;if(ce<it){ie=Fe;continue e}ce-=it,Te+=Fe.chunkSize()}return Te}while(!ie.lines);for(var vt=0;vt<ie.lines.length;++vt){var Et=ie.lines[vt],Pt=Et.height;if(ce<Pt)break;ce-=Pt}return Te+vt}function An(ie,ce){return ce>=ie.first&&ce<ie.first+ie.size}function jn(ie,ce){return String(ie.lineNumberFormatter(ce+ie.firstLineNumber))}function Qt(ie,ce,Te){if(Te===void 0&&(Te=null),!(this instanceof Qt))return new Qt(ie,ce,Te);this.line=ie,this.ch=ce,this.sticky=Te}function rn(ie,ce){return ie.line-ce.line||ie.ch-ce.ch}function Pn(ie,ce){return ie.sticky==ce.sticky&&rn(ie,ce)==0}function Dn(ie){return Qt(ie.line,ie.ch)}function oi(ie,ce){return rn(ie,ce)<0?ce:ie}function ai(ie,ce){return rn(ie,ce)<0?ie:ce}function Gn(ie,ce){return Math.max(ie.first,Math.min(ce,ie.first+ie.size-1))}function Bn(ie,ce){if(ce.line<ie.first)return Qt(ie.first,0);var Te=ie.first+ie.size-1;return ce.line>Te?Qt(Te,_n(ie,Te).text.length):bi(ce,_n(ie,ce.line).text.length)}function bi(ie,ce){var Te=ie.ch;return Te==null||Te>ce?Qt(ie.line,ce):Te<0?Qt(ie.line,0):ie}function Ei(ie,ce){for(var Te=[],Me=0;Me<ce.length;Me++)Te[Me]=Bn(ie,ce[Me]);return Te}var Di=function(ie,ce){this.state=ie,this.lookAhead=ce},yn=function(ie,ce,Te,Me){this.state=ce,this.doc=ie,this.line=Te,this.maxLookAhead=Me||0,this.baseTokens=null,this.baseTokenPos=1};yn.prototype.lookAhead=function(ie){var ce=this.doc.getLine(this.line+ie);return ce!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ce},yn.prototype.baseToken=function(ie){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=ie;)this.baseTokenPos+=2;var ce=this.baseTokens[this.baseTokenPos+1];return{type:ce&&ce.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-ie}},yn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},yn.fromSaved=function(ie,ce,Te){return ce instanceof Di?new yn(ie,bt(ie.mode,ce.state),Te,ce.lookAhead):new yn(ie,bt(ie.mode,ce),Te)},yn.prototype.save=function(ie){var ce=ie!==!1?bt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Di(ce,this.maxLookAhead):ce};function Tr(ie,ce,Te,Me){var Fe=[ie.state.modeGen],it={};dr(ie,ce.text,ie.doc.mode,Te,function(Bt,gn){return Fe.push(Bt,gn)},it,Me);for(var vt=Te.state,Et=function(Bt){Te.baseTokens=Fe;var gn=ie.state.overlays[Bt],Gt=1,Tn=0;Te.state=!0,dr(ie,ce.text,gn.mode,Te,function(bn,fi){for(var wi=Gt;Tn<bn;){var Oi=Fe[Gt];Oi>bn&&Fe.splice(Gt,1,bn,Fe[Gt+1],Oi),Gt+=2,Tn=Math.min(bn,Oi)}if(fi)if(gn.opaque)Fe.splice(wi,Gt-wi,bn,"overlay "+fi),Gt=wi+2;else for(;wi<Gt;wi+=2){var er=Fe[wi+1];Fe[wi+1]=(er?er+" ":"")+"overlay "+fi}},it),Te.state=vt,Te.baseTokens=null,Te.baseTokenPos=1},Pt=0;Pt<ie.state.overlays.length;++Pt)Et(Pt);return{styles:Fe,classes:it.bgClass||it.textClass?it:null}}function ur(ie,ce,Te){if(!ce.styles||ce.styles[0]!=ie.state.modeGen){var Me=wr(ie,kt(ce)),Fe=ce.text.length>ie.options.maxHighlightLength&&bt(ie.doc.mode,Me.state),it=Tr(ie,ce,Me);Fe&&(Me.state=Fe),ce.stateAfter=Me.save(!Fe),ce.styles=it.styles,it.classes?ce.styleClasses=it.classes:ce.styleClasses&&(ce.styleClasses=null),Te===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ce.styles}function wr(ie,ce,Te){var Me=ie.doc,Fe=ie.display;if(!Me.mode.startState)return new yn(Me,!0,ce);var it=ar(ie,ce,Te),vt=it>Me.first&&_n(Me,it-1).stateAfter,Et=vt?yn.fromSaved(Me,vt,it):new yn(Me,sn(Me.mode),it);return Me.iter(it,ce,function(Pt){pn(ie,Pt.text,Et);var Bt=Et.line;Pt.stateAfter=Bt==ce-1||Bt%5==0||Bt>=Fe.viewFrom&&Bt<Fe.viewTo?Et.save():null,Et.nextLine()}),Te&&(Me.modeFrontier=Et.line),Et}function pn(ie,ce,Te,Me){var Fe=ie.doc.mode,it=new Zt(ce,ie.options.tabSize,Te);for(it.start=it.pos=Me||0,ce==""&&$n(Fe,Te.state);!it.eol();)yi(Fe,it,Te.state),it.start=it.pos}function $n(ie,ce){if(ie.blankLine)return ie.blankLine(ce);if(ie.innerMode){var Te=Nt(ie,ce);if(Te.mode.blankLine)return Te.mode.blankLine(Te.state)}}function yi(ie,ce,Te,Me){for(var Fe=0;Fe<10;Fe++){Me&&(Me[0]=Nt(ie,Te).mode);var it=ie.token(ce,Te);if(ce.pos>ce.start)return it}throw new Error("Mode "+ie.name+" failed to advance stream.")}var Mi=function(ie,ce,Te){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ce||null,this.state=Te};function mi(ie,ce,Te,Me){var Fe=ie.doc,it=Fe.mode,vt;ce=Bn(Fe,ce);var Et=_n(Fe,ce.line),Pt=wr(ie,ce.line,Te),Bt=new Zt(Et.text,ie.options.tabSize,Pt),gn;for(Me&&(gn=[]);(Me||Bt.pos<ce.ch)&&!Bt.eol();)Bt.start=Bt.pos,vt=yi(it,Bt,Pt.state),Me&&gn.push(new Mi(Bt,vt,bt(Fe.mode,Pt.state)));return Me?gn:new Mi(Bt,vt,Pt.state)}function Li(ie,ce){if(ie)for(;;){var Te=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Te)break;ie=ie.slice(0,Te.index)+ie.slice(Te.index+Te[0].length);var Me=Te[1]?"bgClass":"textClass";ce[Me]==null?ce[Me]=Te[2]:new RegExp("(?:^|\\s)"+Te[2]+"(?:$|\\s)").test(ce[Me])||(ce[Me]+=" "+Te[2])}return ie}function dr(ie,ce,Te,Me,Fe,it,vt){var Et=Te.flattenSpans;Et==null&&(Et=ie.options.flattenSpans);var Pt=0,Bt=null,gn=new Zt(ce,ie.options.tabSize,Me),Gt,Tn=ie.options.addModeClass&&[null];for(ce==""&&Li($n(Te,Me.state),it);!gn.eol();){if(gn.pos>ie.options.maxHighlightLength?(Et=!1,vt&&pn(ie,ce,Me,gn.pos),gn.pos=ce.length,Gt=null):Gt=Li(yi(Te,gn,Me.state,Tn),it),Tn){var bn=Tn[0].name;bn&&(Gt="m-"+(Gt?bn+" "+Gt:bn))}if(!Et||Bt!=Gt){for(;Pt<gn.start;)Pt=Math.min(gn.start,Pt+5e3),Fe(Pt,Bt);Bt=Gt}gn.start=gn.pos}for(;Pt<gn.pos;){var fi=Math.min(gn.pos,Pt+5e3);Fe(fi,Bt),Pt=fi}}function ar(ie,ce,Te){for(var Me,Fe,it=ie.doc,vt=Te?-1:ce-(ie.doc.mode.innerMode?1e3:100),Et=ce;Et>vt;--Et){if(Et<=it.first)return it.first;var Pt=_n(it,Et-1),Bt=Pt.stateAfter;if(Bt&&(!Te||Et+(Bt instanceof Di?Bt.lookAhead:0)<=it.modeFrontier))return Et;var gn=ut(Pt.text,null,ie.options.tabSize);(Fe==null||Me>gn)&&(Fe=Et-1,Me=gn)}return Fe}function vr(ie,ce){if(ie.modeFrontier=Math.min(ie.modeFrontier,ce),!(ie.highlightFrontier<ce-10)){for(var Te=ie.first,Me=ce-1;Me>Te;Me--){var Fe=_n(ie,Me).stateAfter;if(Fe&&(!(Fe instanceof Di)||Me+Fe.lookAhead<ce)){Te=Me+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,Te)}}var Cr=!1,Ln=!1;function Yr(){Cr=!0}function Mn(){Ln=!0}function Ai(ie,ce,Te){this.marker=ie,this.from=ce,this.to=Te}function zi(ie,ce){if(ie)for(var Te=0;Te<ie.length;++Te){var Me=ie[Te];if(Me.marker==ce)return Me}}function Xi(ie,ce){for(var Te,Me=0;Me<ie.length;++Me)ie[Me]!=ce&&(Te||(Te=[])).push(ie[Me]);return Te}function lo(ie,ce){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ce]):[ce],ce.marker.attachLine(ie)}function oo(ie,ce,Te){var Me;if(ie)for(var Fe=0;Fe<ie.length;++Fe){var it=ie[Fe],vt=it.marker,Et=it.from==null||(vt.inclusiveLeft?it.from<=ce:it.from<ce);if(Et||it.from==ce&&vt.type=="bookmark"&&(!Te||!it.marker.insertLeft)){var Pt=it.to==null||(vt.inclusiveRight?it.to>=ce:it.to>ce);(Me||(Me=[])).push(new Ai(vt,it.from,Pt?null:it.to))}}return Me}function qr(ie,ce,Te){var Me;if(ie)for(var Fe=0;Fe<ie.length;++Fe){var it=ie[Fe],vt=it.marker,Et=it.to==null||(vt.inclusiveRight?it.to>=ce:it.to>ce);if(Et||it.from==ce&&vt.type=="bookmark"&&(!Te||it.marker.insertLeft)){var Pt=it.from==null||(vt.inclusiveLeft?it.from<=ce:it.from<ce);(Me||(Me=[])).push(new Ai(vt,Pt?null:it.from-ce,it.to==null?null:it.to-ce))}}return Me}function uo(ie,ce){if(ce.full)return null;var Te=An(ie,ce.from.line)&&_n(ie,ce.from.line).markedSpans,Me=An(ie,ce.to.line)&&_n(ie,ce.to.line).markedSpans;if(!Te&&!Me)return null;var Fe=ce.from.ch,it=ce.to.ch,vt=rn(ce.from,ce.to)==0,Et=oo(Te,Fe,vt),Pt=qr(Me,it,vt),Bt=ce.text.length==1,gn=Ft(ce.text).length+(Bt?Fe:0);if(Et)for(var Gt=0;Gt<Et.length;++Gt){var Tn=Et[Gt];if(Tn.to==null){var bn=zi(Pt,Tn.marker);bn?Bt&&(Tn.to=bn.to==null?null:bn.to+gn):Tn.to=Fe}}if(Pt)for(var fi=0;fi<Pt.length;++fi){var wi=Pt[fi];if(wi.to!=null&&(wi.to+=gn),wi.from==null){var Oi=zi(Et,wi.marker);Oi||(wi.from=gn,Bt&&(Et||(Et=[])).push(wi))}else wi.from+=gn,Bt&&(Et||(Et=[])).push(wi)}Et&&(Et=an(Et)),Pt&&Pt!=Et&&(Pt=an(Pt));var er=[Et];if(!Bt){var br=ce.text.length-2,hr;if(br>0&&Et)for(var Ir=0;Ir<Et.length;++Ir)Et[Ir].to==null&&(hr||(hr=[])).push(new Ai(Et[Ir].marker,null,null));for(var ao=0;ao<br;++ao)er.push(hr);er.push(Pt)}return er}function an(ie){for(var ce=0;ce<ie.length;++ce){var Te=ie[ce];Te.from!=null&&Te.from==Te.to&&Te.marker.clearWhenEmpty!==!1&&ie.splice(ce--,1)}return ie.length?ie:null}function kn(ie,ce,Te){var Me=null;if(ie.iter(ce.line,Te.line+1,function(bn){if(bn.markedSpans)for(var fi=0;fi<bn.markedSpans.length;++fi){var wi=bn.markedSpans[fi].marker;wi.readOnly&&(!Me||ct(Me,wi)==-1)&&(Me||(Me=[])).push(wi)}}),!Me)return null;for(var Fe=[{from:ce,to:Te}],it=0;it<Me.length;++it)for(var vt=Me[it],Et=vt.find(0),Pt=0;Pt<Fe.length;++Pt){var Bt=Fe[Pt];if(!(rn(Bt.to,Et.from)<0||rn(Bt.from,Et.to)>0)){var gn=[Pt,1],Gt=rn(Bt.from,Et.from),Tn=rn(Bt.to,Et.to);(Gt<0||!vt.inclusiveLeft&&!Gt)&&gn.push({from:Bt.from,to:Et.from}),(Tn>0||!vt.inclusiveRight&&!Tn)&&gn.push({from:Et.to,to:Bt.to}),Fe.splice.apply(Fe,gn),Pt+=gn.length-3}}return Fe}function hn(ie){var ce=ie.markedSpans;if(ce){for(var Te=0;Te<ce.length;++Te)ce[Te].marker.detachLine(ie);ie.markedSpans=null}}function ft(ie,ce){if(ce){for(var Te=0;Te<ce.length;++Te)ce[Te].marker.attachLine(ie);ie.markedSpans=ce}}function Yn(ie){return ie.inclusiveLeft?-1:0}function Un(ie){return ie.inclusiveRight?1:0}function ni(ie,ce){var Te=ie.lines.length-ce.lines.length;if(Te!=0)return Te;var Me=ie.find(),Fe=ce.find(),it=rn(Me.from,Fe.from)||Yn(ie)-Yn(ce);if(it)return-it;var vt=rn(Me.to,Fe.to)||Un(ie)-Un(ce);return vt||ce.id-ie.id}function li(ie,ce){var Te=Ln&&ie.markedSpans,Me;if(Te)for(var Fe=void 0,it=0;it<Te.length;++it)Fe=Te[it],Fe.marker.collapsed&&(ce?Fe.from:Fe.to)==null&&(!Me||ni(Me,Fe.marker)<0)&&(Me=Fe.marker);return Me}function vi(ie){return li(ie,!0)}function On(ie){return li(ie,!1)}function Jn(ie,ce){var Te=Ln&&ie.markedSpans,Me;if(Te)for(var Fe=0;Fe<Te.length;++Fe){var it=Te[Fe];it.marker.collapsed&&(it.from==null||it.from<ce)&&(it.to==null||it.to>ce)&&(!Me||ni(Me,it.marker)<0)&&(Me=it.marker)}return Me}function qn(ie,ce,Te,Me,Fe){var it=_n(ie,ce),vt=Ln&&it.markedSpans;if(vt)for(var Et=0;Et<vt.length;++Et){var Pt=vt[Et];if(Pt.marker.collapsed){var Bt=Pt.marker.find(0),gn=rn(Bt.from,Te)||Yn(Pt.marker)-Yn(Fe),Gt=rn(Bt.to,Me)||Un(Pt.marker)-Un(Fe);if(!(gn>=0&&Gt<=0||gn<=0&&Gt>=0)&&(gn<=0&&(Pt.marker.inclusiveRight&&Fe.inclusiveLeft?rn(Bt.to,Te)>=0:rn(Bt.to,Te)>0)||gn>=0&&(Pt.marker.inclusiveRight&&Fe.inclusiveLeft?rn(Bt.from,Me)<=0:rn(Bt.from,Me)<0)))return!0}}}function ti(ie){for(var ce;ce=vi(ie);)ie=ce.find(-1,!0).line;return ie}function ii(ie){for(var ce;ce=On(ie);)ie=ce.find(1,!0).line;return ie}function Fi(ie){for(var ce,Te;ce=On(ie);)ie=ce.find(1,!0).line,(Te||(Te=[])).push(ie);return Te}function Si(ie,ce){var Te=_n(ie,ce),Me=ti(Te);return Te==Me?ce:kt(Me)}function di(ie,ce){if(ce>ie.lastLine())return ce;var Te=_n(ie,ce),Me;if(!Cn(ie,Te))return ce;for(;Me=On(Te);)Te=Me.find(1,!0).line;return kt(Te)+1}function Cn(ie,ce){var Te=Ln&&ce.markedSpans;if(Te){for(var Me=void 0,Fe=0;Fe<Te.length;++Fe)if(Me=Te[Fe],!!Me.marker.collapsed){if(Me.from==null)return!0;if(!Me.marker.widgetNode&&Me.from==0&&Me.marker.inclusiveLeft&&pi(ie,ce,Me))return!0}}}function pi(ie,ce,Te){if(Te.to==null){var Me=Te.marker.find(1,!0);return pi(ie,Me.line,zi(Me.line.markedSpans,Te.marker))}if(Te.marker.inclusiveRight&&Te.to==ce.text.length)return!0;for(var Fe=void 0,it=0;it<ce.markedSpans.length;++it)if(Fe=ce.markedSpans[it],Fe.marker.collapsed&&!Fe.marker.widgetNode&&Fe.from==Te.to&&(Fe.to==null||Fe.to!=Te.from)&&(Fe.marker.inclusiveLeft||Te.marker.inclusiveRight)&&pi(ie,ce,Fe))return!0}function Ui(ie){ie=ti(ie);for(var ce=0,Te=ie.parent,Me=0;Me<Te.lines.length;++Me){var Fe=Te.lines[Me];if(Fe==ie)break;ce+=Fe.height}for(var it=Te.parent;it;Te=it,it=Te.parent)for(var vt=0;vt<it.children.length;++vt){var Et=it.children[vt];if(Et==Te)break;ce+=Et.height}return ce}function xr(ie){if(ie.height==0)return 0;for(var ce=ie.text.length,Te,Me=ie;Te=vi(Me);){var Fe=Te.find(0,!0);Me=Fe.from.line,ce+=Fe.from.ch-Fe.to.ch}for(Me=ie;Te=On(Me);){var it=Te.find(0,!0);ce-=Me.text.length-it.from.ch,Me=it.to.line,ce+=Me.text.length-it.to.ch}return ce}function pr(ie){var ce=ie.display,Te=ie.doc;ce.maxLine=_n(Te,Te.first),ce.maxLineLength=xr(ce.maxLine),ce.maxLineChanged=!0,Te.iter(function(Me){var Fe=xr(Me);Fe>ce.maxLineLength&&(ce.maxLineLength=Fe,ce.maxLine=Me)})}var Er=function(ie,ce,Te){this.text=ie,ft(this,ce),this.height=Te?Te(this):1};Er.prototype.lineNo=function(){return kt(this)},Wn(Er);function Ar(ie,ce,Te,Me){ie.text=ce,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),hn(ie),ft(ie,Te);var Fe=Me?Me(ie):1;Fe!=ie.height&&Hn(ie,Fe)}function Lr(ie){ie.parent=null,hn(ie)}var co={},so={};function es(ie,ce){if(!ie||/^\s*$/.test(ie))return null;var Te=ce.addModeClass?so:co;return Te[ie]||(Te[ie]=ie.replace(/\S+/g,"cm-$&"))}function nn(ie,ce){var Te=qe("span",null,null,be?"padding-right: .1px":null),Me={pre:qe("pre",[Te],"CodeMirror-line"),content:Te,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ce.measure={};for(var Fe=0;Fe<=(ce.rest?ce.rest.length:0);Fe++){var it=Fe?ce.rest[Fe-1]:ce.line,vt=void 0;Me.pos=0,Me.addToken=Vr,Vi(ie.display.measure)&&(vt=on(it,ie.doc.direction))&&(Me.addToken=Mr(Me.addToken,vt)),Me.map=[];var Et=ce!=ie.display.externalMeasured&&kt(it);Oo(it,Me,ur(ie,it,Et)),it.styleClasses&&(it.styleClasses.bgClass&&(Me.bgClass=at(it.styleClasses.bgClass,Me.bgClass||"")),it.styleClasses.textClass&&(Me.textClass=at(it.styleClasses.textClass,Me.textClass||""))),Me.map.length==0&&Me.map.push(0,0,Me.content.appendChild(gr(ie.display.measure))),Fe==0?(ce.measure.map=Me.map,ce.measure.cache={}):((ce.measure.maps||(ce.measure.maps=[])).push(Me.map),(ce.measure.caches||(ce.measure.caches=[])).push({}))}if(be){var Pt=Me.content.lastChild;(/\bcm-tab\b/.test(Pt.className)||Pt.querySelector&&Pt.querySelector(".cm-tab"))&&(Me.content.className="cm-tab-wrap-hack")}return Sn(ie,"renderLine",ie,ce.line,Me.pre),Me.pre.className&&(Me.textClass=at(Me.pre.className,Me.textClass||"")),Me}function Fr(ie){var ce=Ze("span","\u2022","cm-invalidchar");return ce.title="\\u"+ie.charCodeAt(0).toString(16),ce.setAttribute("aria-label",ce.title),ce}function Vr(ie,ce,Te,Me,Fe,it,vt){if(ce){var Et=ie.splitSpaces?rr(ce,ie.trailingSpace):ce,Pt=ie.cm.state.specialChars,Bt=!1,gn;if(!Pt.test(ce))ie.col+=ce.length,gn=document.createTextNode(Et),ie.map.push(ie.pos,ie.pos+ce.length,gn),Ce&&xe<9&&(Bt=!0),ie.pos+=ce.length;else{gn=document.createDocumentFragment();for(var Gt=0;;){Pt.lastIndex=Gt;var Tn=Pt.exec(ce),bn=Tn?Tn.index-Gt:ce.length-Gt;if(bn){var fi=document.createTextNode(Et.slice(Gt,Gt+bn));Ce&&xe<9?gn.appendChild(Ze("span",[fi])):gn.appendChild(fi),ie.map.push(ie.pos,ie.pos+bn,fi),ie.col+=bn,ie.pos+=bn}if(!Tn)break;Gt+=bn+1;var wi=void 0;if(Tn[0]==" "){var Oi=ie.cm.options.tabSize,er=Oi-ie.col%Oi;wi=gn.appendChild(Ze("span",mn(er),"cm-tab")),wi.setAttribute("role","presentation"),wi.setAttribute("cm-text"," "),ie.col+=er}else Tn[0]=="\r"||Tn[0]==`
|
|
|
`?(wi=gn.appendChild(Ze("span",Tn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),wi.setAttribute("cm-text",Tn[0]),ie.col+=1):(wi=ie.cm.options.specialCharPlaceholder(Tn[0]),wi.setAttribute("cm-text",Tn[0]),Ce&&xe<9?gn.appendChild(Ze("span",[wi])):gn.appendChild(wi),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,wi),ie.pos++}}if(ie.trailingSpace=Et.charCodeAt(ce.length-1)==32,Te||Me||Fe||Bt||it||vt){var br=Te||"";Me&&(br+=Me),Fe&&(br+=Fe);var hr=Ze("span",[gn],br,it);if(vt)for(var Ir in vt)vt.hasOwnProperty(Ir)&&Ir!="style"&&Ir!="class"&&hr.setAttribute(Ir,vt[Ir]);return ie.content.appendChild(hr)}ie.content.appendChild(gn)}}function rr(ie,ce){if(ie.length>1&&!/ /.test(ie))return ie;for(var Te=ce,Me="",Fe=0;Fe<ie.length;Fe++){var it=ie.charAt(Fe);it==" "&&Te&&(Fe==ie.length-1||ie.charCodeAt(Fe+1)==32)&&(it="\xA0"),Me+=it,Te=it==" "}return Me}function Mr(ie,ce){return function(Te,Me,Fe,it,vt,Et,Pt){Fe=Fe?Fe+" cm-force-border":"cm-force-border";for(var Bt=Te.pos,gn=Bt+Me.length;;){for(var Gt=void 0,Tn=0;Tn<ce.length&&(Gt=ce[Tn],!(Gt.to>Bt&&Gt.from<=Bt));Tn++);if(Gt.to>=gn)return ie(Te,Me,Fe,it,vt,Et,Pt);ie(Te,Me.slice(0,Gt.to-Bt),Fe,it,null,Et,Pt),it=null,Me=Me.slice(Gt.to-Bt),Bt=Gt.to}}}function tr(ie,ce,Te,Me){var Fe=!Me&&Te.widgetNode;Fe&&ie.map.push(ie.pos,ie.pos+ce,Fe),!Me&&ie.cm.display.input.needsContentAttribute&&(Fe||(Fe=ie.content.appendChild(document.createElement("span"))),Fe.setAttribute("cm-marker",Te.id)),Fe&&(ie.cm.display.input.setUneditable(Fe),ie.content.appendChild(Fe)),ie.pos+=ce,ie.trailingSpace=!1}function Oo(ie,ce,Te){var Me=ie.markedSpans,Fe=ie.text,it=0;if(!Me){for(var vt=1;vt<Te.length;vt+=2)ce.addToken(ce,Fe.slice(it,it=Te[vt]),es(Te[vt+1],ce.cm.options));return}for(var Et=Fe.length,Pt=0,Bt=1,gn="",Gt,Tn,bn=0,fi,wi,Oi,er,br;;){if(bn==Pt){fi=wi=Oi=Tn="",br=null,er=null,bn=1/0;for(var hr=[],Ir=void 0,ao=0;ao<Me.length;++ao){var lr=Me[ao],Bo=lr.marker;if(Bo.type=="bookmark"&&lr.from==Pt&&Bo.widgetNode)hr.push(Bo);else if(lr.from<=Pt&&(lr.to==null||lr.to>Pt||Bo.collapsed&&lr.to==Pt&&lr.from==Pt)){if(lr.to!=null&&lr.to!=Pt&&bn>lr.to&&(bn=lr.to,wi=""),Bo.className&&(fi+=" "+Bo.className),Bo.css&&(Tn=(Tn?Tn+";":"")+Bo.css),Bo.startStyle&&lr.from==Pt&&(Oi+=" "+Bo.startStyle),Bo.endStyle&&lr.to==bn&&(Ir||(Ir=[])).push(Bo.endStyle,lr.to),Bo.title&&((br||(br={})).title=Bo.title),Bo.attributes)for(var Fs in Bo.attributes)(br||(br={}))[Fs]=Bo.attributes[Fs];Bo.collapsed&&(!er||ni(er.marker,Bo)<0)&&(er=lr)}else lr.from>Pt&&bn>lr.from&&(bn=lr.from)}if(Ir)for(var Ea=0;Ea<Ir.length;Ea+=2)Ir[Ea+1]==bn&&(wi+=" "+Ir[Ea]);if(!er||er.from==Pt)for(var Js=0;Js<hr.length;++Js)tr(ce,0,hr[Js]);if(er&&(er.from||0)==Pt){if(tr(ce,(er.to==null?Et+1:er.to)-Pt,er.marker,er.from==null),er.to==null)return;er.to==Pt&&(er=!1)}}if(Pt>=Et)break;for(var Pl=Math.min(Et,bn);;){if(gn){var ol=Pt+gn.length;if(!er){var wa=ol>Pl?gn.slice(0,Pl-Pt):gn;ce.addToken(ce,wa,Gt?Gt+fi:fi,Oi,Pt+wa.length==bn?wi:"",Tn,br)}if(ol>=Pl){gn=gn.slice(Pl-Pt),Pt=Pl;break}Pt=ol,Oi=""}gn=Fe.slice(it,it=Te[Bt++]),Gt=es(Te[Bt++],ce.cm.options)}}}function fo(ie,ce,Te){this.line=ce,this.rest=Fi(ce),this.size=this.rest?kt(Ft(this.rest))-Te+1:1,this.node=this.text=null,this.hidden=Cn(ie,ce)}function Br(ie,ce,Te){for(var Me=[],Fe,it=ce;it<Te;it=Fe){var vt=new fo(ie.doc,_n(ie.doc,it),it);Fe=it+vt.size,Me.push(vt)}return Me}var Qr=null;function $s(ie){Qr?Qr.ops.push(ie):ie.ownsGroup=Qr={ops:[ie],delayedCallbacks:[]}}function us(ie){var ce=ie.delayedCallbacks,Te=0;do{for(;Te<ce.length;Te++)ce[Te].call(null);for(var Me=0;Me<ie.ops.length;Me++){var Fe=ie.ops[Me];if(Fe.cursorActivityHandlers)for(;Fe.cursorActivityCalled<Fe.cursorActivityHandlers.length;)Fe.cursorActivityHandlers[Fe.cursorActivityCalled++].call(null,Fe.cm)}}while(Te<ce.length)}function ha(ie,ce){var Te=ie.ownsGroup;if(Te)try{us(Te)}finally{Qr=null,ce(Te)}}var ea=null;function Qi(ie,ce){var Te=fn(ie,ce);if(Te.length){var Me=Array.prototype.slice.call(arguments,2),Fe;Qr?Fe=Qr.delayedCallbacks:ea?Fe=ea:(Fe=ea=[],setTimeout(To,0));for(var it=function(Et){Fe.push(function(){return Te[Et].apply(null,Me)})},vt=0;vt<Te.length;++vt)it(vt)}}function To(){var ie=ea;ea=null;for(var ce=0;ce<ie.length;++ce)ie[ce]()}function as(ie,ce,Te,Me){for(var Fe=0;Fe<ce.changes.length;Fe++){var it=ce.changes[Fe];it=="text"?zn(ie,ce):it=="gutter"?Gr(ie,ce,Te,Me):it=="class"?or(ie,ce):it=="widget"&&Zo(ie,ce,Me)}ce.changes=null}function Os(ie){return ie.node==ie.text&&(ie.node=Ze("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),Ce&&xe<8&&(ie.node.style.zIndex=2)),ie.node}function Hr(ie,ce){var Te=ce.bgClass?ce.bgClass+" "+(ce.line.bgClass||""):ce.line.bgClass;if(Te&&(Te+=" CodeMirror-linebackground"),ce.background)Te?ce.background.className=Te:(ce.background.parentNode.removeChild(ce.background),ce.background=null);else if(Te){var Me=Os(ce);ce.background=Me.insertBefore(Ze("div",null,Te),Me.firstChild),ie.display.input.setUneditable(ce.background)}}function zr(ie,ce){var Te=ie.display.externalMeasured;return Te&&Te.line==ce.line?(ie.display.externalMeasured=null,ce.measure=Te.measure,Te.built):nn(ie,ce)}function zn(ie,ce){var Te=ce.text.className,Me=zr(ie,ce);ce.text==ce.node&&(ce.node=Me.pre),ce.text.parentNode.replaceChild(Me.pre,ce.text),ce.text=Me.pre,Me.bgClass!=ce.bgClass||Me.textClass!=ce.textClass?(ce.bgClass=Me.bgClass,ce.textClass=Me.textClass,or(ie,ce)):Te&&(ce.text.className=Te)}function or(ie,ce){Hr(ie,ce),ce.line.wrapClass?Os(ce).className=ce.line.wrapClass:ce.node!=ce.text&&(ce.node.className="");var Te=ce.textClass?ce.textClass+" "+(ce.line.textClass||""):ce.line.textClass;ce.text.className=Te||""}function Gr(ie,ce,Te,Me){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 Fe=Os(ce);ce.gutterBackground=Ze("div",null,"CodeMirror-gutter-background "+ce.line.gutterClass,"left: "+(ie.options.fixedGutter?Me.fixedPos:-Me.gutterTotalWidth)+"px; width: "+Me.gutterTotalWidth+"px"),ie.display.input.setUneditable(ce.gutterBackground),Fe.insertBefore(ce.gutterBackground,ce.text)}var it=ce.line.gutterMarkers;if(ie.options.lineNumbers||it){var vt=Os(ce),Et=ce.gutter=Ze("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?Me.fixedPos:-Me.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(Et),vt.insertBefore(Et,ce.text),ce.line.gutterClass&&(Et.className+=" "+ce.line.gutterClass),ie.options.lineNumbers&&(!it||!it["CodeMirror-linenumbers"])&&(ce.lineNumber=Et.appendChild(Ze("div",jn(ie.options,Te),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Me.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),it)for(var Pt=0;Pt<ie.display.gutterSpecs.length;++Pt){var Bt=ie.display.gutterSpecs[Pt].className,gn=it.hasOwnProperty(Bt)&&it[Bt];gn&&Et.appendChild(Ze("div",[gn],"CodeMirror-gutter-elt","left: "+Me.gutterLeft[Bt]+"px; width: "+Me.gutterWidth[Bt]+"px"))}}}function Zo(ie,ce,Te){ce.alignable&&(ce.alignable=null);for(var Me=Pe("CodeMirror-linewidget"),Fe=ce.node.firstChild,it=void 0;Fe;Fe=it)it=Fe.nextSibling,Me.test(Fe.className)&&ce.node.removeChild(Fe);Vs(ie,ce,Te)}function aa(ie,ce,Te,Me){var Fe=zr(ie,ce);return ce.text=ce.node=Fe.pre,Fe.bgClass&&(ce.bgClass=Fe.bgClass),Fe.textClass&&(ce.textClass=Fe.textClass),or(ie,ce),Gr(ie,ce,Te,Me),Vs(ie,ce,Me),ce.node}function Vs(ie,ce,Te){if(_r(ie,ce.line,ce,Te,!0),ce.rest)for(var Me=0;Me<ce.rest.length;Me++)_r(ie,ce.rest[Me],ce,Te,!1)}function _r(ie,ce,Te,Me,Fe){if(ce.widgets)for(var it=Os(Te),vt=0,Et=ce.widgets;vt<Et.length;++vt){var Pt=Et[vt],Bt=Ze("div",[Pt.node],"CodeMirror-linewidget"+(Pt.className?" "+Pt.className:""));Pt.handleMouseEvents||Bt.setAttribute("cm-ignore-events","true"),Es(Pt,Bt,Te,Me),ie.display.input.setUneditable(Bt),Fe&&Pt.above?it.insertBefore(Bt,Te.gutter||Te.text):it.appendChild(Bt),Qi(Pt,"redraw")}}function Es(ie,ce,Te,Me){if(ie.noHScroll){(Te.alignable||(Te.alignable=[])).push(ce);var Fe=Me.wrapperWidth;ce.style.left=Me.fixedPos+"px",ie.coverGutter||(Fe-=Me.gutterTotalWidth,ce.style.paddingLeft=Me.gutterTotalWidth+"px"),ce.style.width=Fe+"px"}ie.coverGutter&&(ce.style.zIndex=5,ce.style.position="relative",ie.noHScroll||(ce.style.marginLeft=-Me.gutterTotalWidth+"px"))}function xs(ie){if(ie.height!=null)return ie.height;var ce=ie.doc.cm;if(!ce)return 0;if(!mt(document.body,ie.node)){var Te="position: relative;";ie.coverGutter&&(Te+="margin-left: -"+ce.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(Te+="width: "+ce.display.wrapper.clientWidth+"px;"),Ie(ce.display.measure,Ze("div",[ie.node],null,Te))}return ie.height=ie.node.parentNode.offsetHeight}function fs(ie,ce){for(var Te=Hi(ce);Te!=ie.wrapper;Te=Te.parentNode)if(!Te||Te.nodeType==1&&Te.getAttribute("cm-ignore-events")=="true"||Te.parentNode==ie.sizer&&Te!=ie.mover)return!0}function jo(ie){return ie.lineSpace.offsetTop}function ta(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function Pa(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ce=Ie(ie.measure,Ze("pre","x","CodeMirror-line-like")),Te=window.getComputedStyle?window.getComputedStyle(ce):ce.currentStyle,Me={left:parseInt(Te.paddingLeft),right:parseInt(Te.paddingRight)};return!isNaN(Me.left)&&!isNaN(Me.right)&&(ie.cachedPaddingH=Me),Me}function Xo(ie){return yt-ie.display.nativeBarWidth}function Sa(ie){return ie.display.scroller.clientWidth-Xo(ie)-ie.display.barWidth}function Wa(ie){return ie.display.scroller.clientHeight-Xo(ie)-ie.display.barHeight}function xu(ie,ce,Te){var Me=ie.options.lineWrapping,Fe=Me&&Sa(ie);if(!ce.measure.heights||Me&&ce.measure.width!=Fe){var it=ce.measure.heights=[];if(Me){ce.measure.width=Fe;for(var vt=ce.text.firstChild.getClientRects(),Et=0;Et<vt.length-1;Et++){var Pt=vt[Et],Bt=vt[Et+1];Math.abs(Pt.bottom-Bt.bottom)>2&&it.push((Pt.bottom+Bt.top)/2-Te.top)}}it.push(Te.bottom-Te.top)}}function hs(ie,ce,Te){if(ie.line==ce)return{map:ie.measure.map,cache:ie.measure.cache};for(var Me=0;Me<ie.rest.length;Me++)if(ie.rest[Me]==ce)return{map:ie.measure.maps[Me],cache:ie.measure.caches[Me]};for(var Fe=0;Fe<ie.rest.length;Fe++)if(kt(ie.rest[Fe])>Te)return{map:ie.measure.maps[Fe],cache:ie.measure.caches[Fe],before:!0}}function tl(ie,ce){ce=ti(ce);var Te=kt(ce),Me=ie.display.externalMeasured=new fo(ie.doc,ce,Te);Me.lineN=Te;var Fe=Me.built=nn(ie,Me);return Me.text=Fe.pre,Ie(ie.display.lineMeasure,Fe.pre),Me}function zu(ie,ce,Te,Me){return nl(ie,Tl(ie,ce),Te,Me)}function wu(ie,ce){if(ce>=ie.display.viewFrom&&ce<ie.display.viewTo)return ie.display.view[Is(ie,ce)];var Te=ie.display.externalMeasured;if(Te&&ce>=Te.lineN&&ce<Te.lineN+Te.size)return Te}function Tl(ie,ce){var Te=kt(ce),Me=wu(ie,Te);Me&&!Me.text?Me=null:Me&&Me.changes&&(as(ie,Me,Te,Gu(ie)),ie.curOp.forceUpdate=!0),Me||(Me=tl(ie,ce));var Fe=hs(Me,ce,Te);return{line:ce,view:Me,rect:null,map:Fe.map,cache:Fe.cache,before:Fe.before,hasHeights:!1}}function nl(ie,ce,Te,Me,Fe){ce.before&&(Te=-1);var it=Te+(Me||""),vt;return ce.cache.hasOwnProperty(it)?vt=ce.cache[it]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(xu(ie,ce.view,ce.rect),ce.hasHeights=!0),vt=Ts(ie,ce,Te,Me),vt.bogus||(ce.cache[it]=vt)),{left:vt.left,right:vt.right,top:Fe?vt.rtop:vt.top,bottom:Fe?vt.rbottom:vt.bottom}}var ru={left:0,right:0,top:0,bottom:0};function eh(ie,ce,Te){for(var Me,Fe,it,vt,Et,Pt,Bt=0;Bt<ie.length;Bt+=3)if(Et=ie[Bt],Pt=ie[Bt+1],ce<Et?(Fe=0,it=1,vt="left"):ce<Pt?(Fe=ce-Et,it=Fe+1):(Bt==ie.length-3||ce==Pt&&ie[Bt+3]>ce)&&(it=Pt-Et,Fe=it-1,ce>=Pt&&(vt="right")),Fe!=null){if(Me=ie[Bt+2],Et==Pt&&Te==(Me.insertLeft?"left":"right")&&(vt=Te),Te=="left"&&Fe==0)for(;Bt&&ie[Bt-2]==ie[Bt-3]&&ie[Bt-1].insertLeft;)Me=ie[(Bt-=3)+2],vt="left";if(Te=="right"&&Fe==Pt-Et)for(;Bt<ie.length-3&&ie[Bt+3]==ie[Bt+4]&&!ie[Bt+5].insertLeft;)Me=ie[(Bt+=3)+2],vt="right";break}return{node:Me,start:Fe,end:it,collapse:vt,coverStart:Et,coverEnd:Pt}}function Hl(ie,ce){var Te=ru;if(ce=="left")for(var Me=0;Me<ie.length&&(Te=ie[Me]).left==Te.right;Me++);else for(var Fe=ie.length-1;Fe>=0&&(Te=ie[Fe]).left==Te.right;Fe--);return Te}function Ts(ie,ce,Te,Me){var Fe=eh(ce.map,Te,Me),it=Fe.node,vt=Fe.start,Et=Fe.end,Pt=Fe.collapse,Bt;if(it.nodeType==3){for(var gn=0;gn<4;gn++){for(;vt&&De(ce.line.text.charAt(Fe.coverStart+vt));)--vt;for(;Fe.coverStart+Et<Fe.coverEnd&&De(ce.line.text.charAt(Fe.coverStart+Et));)++Et;if(Ce&&xe<9&&vt==0&&Et==Fe.coverEnd-Fe.coverStart?Bt=it.parentNode.getBoundingClientRect():Bt=Hl(Je(it,vt,Et).getClientRects(),Me),Bt.left||Bt.right||vt==0)break;Et=vt,vt=vt-1,Pt="right"}Ce&&xe<11&&(Bt=Uu(ie.display.measure,Bt))}else{vt>0&&(Pt=Me="right");var Gt;ie.options.lineWrapping&&(Gt=it.getClientRects()).length>1?Bt=Gt[Me=="right"?Gt.length-1:0]:Bt=it.getBoundingClientRect()}if(Ce&&xe<9&&!vt&&(!Bt||!Bt.left&&!Bt.right)){var Tn=it.parentNode.getClientRects()[0];Tn?Bt={left:Tn.left,right:Tn.left+su(ie.display),top:Tn.top,bottom:Tn.bottom}:Bt=ru}for(var bn=Bt.top-ce.rect.top,fi=Bt.bottom-ce.rect.top,wi=(bn+fi)/2,Oi=ce.view.measure.heights,er=0;er<Oi.length-1&&!(wi<Oi[er]);er++);var br=er?Oi[er-1]:0,hr=Oi[er],Ir={left:(Pt=="right"?Bt.right:Bt.left)-ce.rect.left,right:(Pt=="left"?Bt.left:Bt.right)-ce.rect.left,top:br,bottom:hr};return!Bt.left&&!Bt.right&&(Ir.bogus=!0),ie.options.singleCursorHeightPerLine||(Ir.rtop=bn,Ir.rbottom=fi),Ir}function Uu(ie,ce){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ii(ie))return ce;var Te=screen.logicalXDPI/screen.deviceXDPI,Me=screen.logicalYDPI/screen.deviceYDPI;return{left:ce.left*Te,right:ce.right*Te,top:ce.top*Me,bottom:ce.bottom*Me}}function th(ie){if(ie.measure&&(ie.measure.cache={},ie.measure.heights=null,ie.rest))for(var ce=0;ce<ie.rest.length;ce++)ie.measure.caches[ce]={}}function _u(ie){ie.display.externalMeasure=null,Oe(ie.display.lineMeasure);for(var ce=0;ce<ie.display.view.length;ce++)th(ie.display.view[ce])}function ou(ie){_u(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function ga(){return we&&ee?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ma(){return we&&ee?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function As(ie){var ce=0;if(ie.widgets)for(var Te=0;Te<ie.widgets.length;++Te)ie.widgets[Te].above&&(ce+=xs(ie.widgets[Te]));return ce}function zs(ie,ce,Te,Me,Fe){if(!Fe){var it=As(ce);Te.top+=it,Te.bottom+=it}if(Me=="line")return Te;Me||(Me="local");var vt=Ui(ce);if(Me=="local"?vt+=jo(ie.display):vt-=ie.display.viewOffset,Me=="page"||Me=="window"){var Et=ie.display.lineSpace.getBoundingClientRect();vt+=Et.top+(Me=="window"?0:ma());var Pt=Et.left+(Me=="window"?0:ga());Te.left+=Pt,Te.right+=Pt}return Te.top+=vt,Te.bottom+=vt,Te}function zo(ie,ce,Te){if(Te=="div")return ce;var Me=ce.left,Fe=ce.top;if(Te=="page")Me-=ga(),Fe-=ma();else if(Te=="local"||!Te){var it=ie.display.sizer.getBoundingClientRect();Me+=it.left,Fe+=it.top}var vt=ie.display.lineSpace.getBoundingClientRect();return{left:Me-vt.left,top:Fe-vt.top}}function io(ie,ce,Te,Me,Fe){return Me||(Me=_n(ie.doc,ce.line)),zs(ie,Me,zu(ie,Me,ce.ch,Fe),Te)}function yo(ie,ce,Te,Me,Fe,it){Me=Me||_n(ie.doc,ce.line),Fe||(Fe=Tl(ie,Me));function vt(fi,wi){var Oi=nl(ie,Fe,fi,wi?"right":"left",it);return wi?Oi.left=Oi.right:Oi.right=Oi.left,zs(ie,Me,Oi,Te)}var Et=on(Me,ie.doc.direction),Pt=ce.ch,Bt=ce.sticky;if(Pt>=Me.text.length?(Pt=Me.text.length,Bt="before"):Pt<=0&&(Pt=0,Bt="after"),!Et)return vt(Bt=="before"?Pt-1:Pt,Bt=="before");function gn(fi,wi,Oi){var er=Et[wi],br=er.level==1;return vt(Oi?fi-1:fi,br!=Oi)}var Gt=pt(Et,Pt,Bt),Tn=Ve,bn=gn(Pt,Gt,Bt=="before");return Tn!=null&&(bn.other=gn(Pt,Tn,Bt!="before")),bn}function Us(ie,ce){var Te=0;ce=Bn(ie.doc,ce),ie.options.lineWrapping||(Te=su(ie.display)*ce.ch);var Me=_n(ie.doc,ce.line),Fe=Ui(Me)+jo(ie.display);return{left:Te,right:Te,top:Fe,bottom:Fe+Me.height}}function Ls(ie,ce,Te,Me,Fe){var it=Qt(ie,ce,Te);return it.xRel=Fe,Me&&(it.outside=Me),it}function Ns(ie,ce,Te){var Me=ie.doc;if(Te+=ie.display.viewOffset,Te<0)return Ls(Me.first,0,null,-1,-1);var Fe=ln(Me,Te),it=Me.first+Me.size-1;if(Fe>it)return Ls(Me.first+Me.size-1,_n(Me,it).text.length,null,1,1);ce<0&&(ce=0);for(var vt=_n(Me,Fe);;){var Et=Rn(ie,vt,Fe,ce,Te),Pt=Jn(vt,Et.ch+(Et.xRel>0||Et.outside>0?1:0));if(!Pt)return Et;var Bt=Pt.find(1);if(Bt.line==Fe)return Bt;vt=_n(Me,Fe=Bt.line)}}function ji(ie,ce,Te,Me){Me-=As(ce);var Fe=ce.text.length,it=$e(function(vt){return nl(ie,Te,vt-1).bottom<=Me},Fe,0);return Fe=$e(function(vt){return nl(ie,Te,vt).top>Me},it,Fe),{begin:it,end:Fe}}function Za(ie,ce,Te,Me){Te||(Te=Tl(ie,ce));var Fe=zs(ie,ce,nl(ie,Te,Me),"line").top;return ji(ie,ce,Te,Fe)}function Wt(ie,ce,Te,Me){return ie.bottom<=Te?!1:ie.top>Te?!0:(Me?ie.left:ie.right)>ce}function Rn(ie,ce,Te,Me,Fe){Fe-=Ui(ce);var it=Tl(ie,ce),vt=As(ce),Et=0,Pt=ce.text.length,Bt=!0,gn=on(ce,ie.doc.direction);if(gn){var Gt=(ie.options.lineWrapping?Hu:Gl)(ie,ce,Te,it,gn,Me,Fe);Bt=Gt.level!=1,Et=Bt?Gt.from:Gt.to-1,Pt=Bt?Gt.to:Gt.from-1}var Tn=null,bn=null,fi=$e(function(ao){var lr=nl(ie,it,ao);return lr.top+=vt,lr.bottom+=vt,Wt(lr,Me,Fe,!1)?(lr.top<=Fe&&lr.left<=Me&&(Tn=ao,bn=lr),!0):!1},Et,Pt),wi,Oi,er=!1;if(bn){var br=Me-bn.left<bn.right-Me,hr=br==Bt;fi=Tn+(hr?0:1),Oi=hr?"after":"before",wi=br?bn.left:bn.right}else{!Bt&&(fi==Pt||fi==Et)&&fi++,Oi=fi==0?"after":fi==ce.text.length?"before":nl(ie,it,fi-(Bt?1:0)).bottom+vt<=Fe==Bt?"after":"before";var Ir=yo(ie,Qt(Te,fi,Oi),"line",ce,it);wi=Ir.left,er=Fe<Ir.top?-1:Fe>=Ir.bottom?1:0}return fi=ze(ce.text,fi,1),Ls(Te,fi,Oi,er,Me-wi)}function Gl(ie,ce,Te,Me,Fe,it,vt){var Et=$e(function(Gt){var Tn=Fe[Gt],bn=Tn.level!=1;return Wt(yo(ie,Qt(Te,bn?Tn.to:Tn.from,bn?"before":"after"),"line",ce,Me),it,vt,!0)},0,Fe.length-1),Pt=Fe[Et];if(Et>0){var Bt=Pt.level!=1,gn=yo(ie,Qt(Te,Bt?Pt.from:Pt.to,Bt?"after":"before"),"line",ce,Me);Wt(gn,it,vt,!0)&&gn.top>vt&&(Pt=Fe[Et-1])}return Pt}function Hu(ie,ce,Te,Me,Fe,it,vt){var Et=ji(ie,ce,Me,vt),Pt=Et.begin,Bt=Et.end;/\s/.test(ce.text.charAt(Bt-1))&&Bt--;for(var gn=null,Gt=null,Tn=0;Tn<Fe.length;Tn++){var bn=Fe[Tn];if(!(bn.from>=Bt||bn.to<=Pt)){var fi=bn.level!=1,wi=nl(ie,Me,fi?Math.min(Bt,bn.to)-1:Math.max(Pt,bn.from)).right,Oi=wi<it?it-wi+1e9:wi-it;(!gn||Gt>Oi)&&(gn=bn,Gt=Oi)}}return gn||(gn=Fe[Fe.length-1]),gn.from<Pt&&(gn={from:Pt,to:gn.to,level:gn.level}),gn.to>Bt&&(gn={from:gn.from,to:Bt,level:gn.level}),gn}var Hs;function cl(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(Hs==null){Hs=Ze("pre",null,"CodeMirror-line-like");for(var ce=0;ce<49;++ce)Hs.appendChild(document.createTextNode("x")),Hs.appendChild(Ze("br"));Hs.appendChild(document.createTextNode("x"))}Ie(ie.measure,Hs);var Te=Hs.offsetHeight/50;return Te>3&&(ie.cachedTextHeight=Te),Oe(ie.measure),Te||1}function su(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ce=Ze("span","xxxxxxxxxx"),Te=Ze("pre",[ce],"CodeMirror-line-like");Ie(ie.measure,Te);var Me=ce.getBoundingClientRect(),Fe=(Me.right-Me.left)/10;return Fe>2&&(ie.cachedCharWidth=Fe),Fe||10}function Gu(ie){for(var ce=ie.display,Te={},Me={},Fe=ce.gutters.clientLeft,it=ce.gutters.firstChild,vt=0;it;it=it.nextSibling,++vt){var Et=ie.display.gutterSpecs[vt].className;Te[Et]=it.offsetLeft+it.clientLeft+Fe,Me[Et]=it.clientWidth}return{fixedPos:bu(ce),gutterTotalWidth:ce.gutters.offsetWidth,gutterLeft:Te,gutterWidth:Me,wrapperWidth:ce.wrapper.clientWidth}}function bu(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function ps(ie){var ce=cl(ie.display),Te=ie.options.lineWrapping,Me=Te&&Math.max(5,ie.display.scroller.clientWidth/su(ie.display)-3);return function(Fe){if(Cn(ie.doc,Fe))return 0;var it=0;if(Fe.widgets)for(var vt=0;vt<Fe.widgets.length;vt++)Fe.widgets[vt].height&&(it+=Fe.widgets[vt].height);return Te?it+(Math.ceil(Fe.text.length/Me)||1)*ce:it+ce}}function Rr(ie){var ce=ie.doc,Te=ps(ie);ce.iter(function(Me){var Fe=Te(Me);Fe!=Me.height&&Hn(Me,Fe)})}function va(ie,ce,Te,Me){var Fe=ie.display;if(!Te&&Hi(ce).getAttribute("cm-not-content")=="true")return null;var it,vt,Et=Fe.lineSpace.getBoundingClientRect();try{it=ce.clientX-Et.left,vt=ce.clientY-Et.top}catch(Gt){return null}var Pt=Ns(ie,it,vt),Bt;if(Me&&Pt.xRel>0&&(Bt=_n(ie.doc,Pt.line).text).length==Pt.ch){var gn=ut(Bt,Bt.length,ie.options.tabSize)-Bt.length;Pt=Qt(Pt.line,Math.max(0,Math.round((it-Pa(ie.display).left)/su(ie.display))-gn))}return Pt}function Is(ie,ce){if(ce>=ie.display.viewTo||(ce-=ie.display.viewFrom,ce<0))return null;for(var Te=ie.display.view,Me=0;Me<Te.length;Me++)if(ce-=Te[Me].size,ce<0)return Me}function gs(ie,ce,Te,Me){ce==null&&(ce=ie.doc.first),Te==null&&(Te=ie.doc.first+ie.doc.size),Me||(Me=0);var Fe=ie.display;if(Me&&Te<Fe.viewTo&&(Fe.updateLineNumbers==null||Fe.updateLineNumbers>ce)&&(Fe.updateLineNumbers=ce),ie.curOp.viewChanged=!0,ce>=Fe.viewTo)Ln&&Si(ie.doc,ce)<Fe.viewTo&&ws(ie);else if(Te<=Fe.viewFrom)Ln&&di(ie.doc,Te+Me)>Fe.viewFrom?ws(ie):(Fe.viewFrom+=Me,Fe.viewTo+=Me);else if(ce<=Fe.viewFrom&&Te>=Fe.viewTo)ws(ie);else if(ce<=Fe.viewFrom){var it=Ta(ie,Te,Te+Me,1);it?(Fe.view=Fe.view.slice(it.index),Fe.viewFrom=it.lineN,Fe.viewTo+=Me):ws(ie)}else if(Te>=Fe.viewTo){var vt=Ta(ie,ce,ce,-1);vt?(Fe.view=Fe.view.slice(0,vt.index),Fe.viewTo=vt.lineN):ws(ie)}else{var Et=Ta(ie,ce,ce,-1),Pt=Ta(ie,Te,Te+Me,1);Et&&Pt?(Fe.view=Fe.view.slice(0,Et.index).concat(Br(ie,Et.lineN,Pt.lineN)).concat(Fe.view.slice(Pt.index)),Fe.viewTo+=Me):ws(ie)}var Bt=Fe.externalMeasured;Bt&&(Te<Bt.lineN?Bt.lineN+=Me:ce<Bt.lineN+Bt.size&&(Fe.externalMeasured=null))}function $r(ie,ce,Te){ie.curOp.viewChanged=!0;var Me=ie.display,Fe=ie.display.externalMeasured;if(Fe&&ce>=Fe.lineN&&ce<Fe.lineN+Fe.size&&(Me.externalMeasured=null),!(ce<Me.viewFrom||ce>=Me.viewTo)){var it=Me.view[Is(ie,ce)];if(it.node!=null){var vt=it.changes||(it.changes=[]);ct(vt,Te)==-1&&vt.push(Te)}}}function ws(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Ta(ie,ce,Te,Me){var Fe=Is(ie,ce),it,vt=ie.display.view;if(!Ln||Te==ie.doc.first+ie.doc.size)return{index:Fe,lineN:Te};for(var Et=ie.display.viewFrom,Pt=0;Pt<Fe;Pt++)Et+=vt[Pt].size;if(Et!=ce){if(Me>0){if(Fe==vt.length-1)return null;it=Et+vt[Fe].size-ce,Fe++}else it=Et-ce;ce+=it,Te+=it}for(;Si(ie.doc,Te)!=Te;){if(Fe==(Me<0?0:vt.length-1))return null;Te+=Me*vt[Fe-(Me<0?1:0)].size,Fe+=Me}return{index:Fe,lineN:Te}}function Jo(ie,ce,Te){var Me=ie.display,Fe=Me.view;Fe.length==0||ce>=Me.viewTo||Te<=Me.viewFrom?(Me.view=Br(ie,ce,Te),Me.viewFrom=ce):(Me.viewFrom>ce?Me.view=Br(ie,ce,Me.viewFrom).concat(Me.view):Me.viewFrom<ce&&(Me.view=Me.view.slice(Is(ie,ce))),Me.viewFrom=ce,Me.viewTo<Te?Me.view=Me.view.concat(Br(ie,Me.viewTo,Te)):Me.viewTo>Te&&(Me.view=Me.view.slice(0,Is(ie,Te)))),Me.viewTo=Te}function Va(ie){for(var ce=ie.display.view,Te=0,Me=0;Me<ce.length;Me++){var Fe=ce[Me];!Fe.hidden&&(!Fe.node||Fe.changes)&&++Te}return Te}function na(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function Pu(ie,ce){ce===void 0&&(ce=!0);for(var Te=ie.doc,Me={},Fe=Me.cursors=document.createDocumentFragment(),it=Me.selection=document.createDocumentFragment(),vt=0;vt<Te.sel.ranges.length;vt++)if(!(!ce&&vt==Te.sel.primIndex)){var Et=Te.sel.ranges[vt];if(!(Et.from().line>=ie.display.viewTo||Et.to().line<ie.display.viewFrom)){var Pt=Et.empty();(Pt||ie.options.showCursorWhenSelecting)&&Io(ie,Et.head,Fe),Pt||Ro(ie,Et,it)}}return Me}function Io(ie,ce,Te){var Me=yo(ie,ce,"div",null,null,!ie.options.singleCursorHeightPerLine),Fe=Te.appendChild(Ze("div","\xA0","CodeMirror-cursor"));if(Fe.style.left=Me.left+"px",Fe.style.top=Me.top+"px",Fe.style.height=Math.max(0,Me.bottom-Me.top)*ie.options.cursorHeight+"px",Me.other){var it=Te.appendChild(Ze("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));it.style.display="",it.style.left=Me.other.left+"px",it.style.top=Me.other.top+"px",it.style.height=(Me.other.bottom-Me.other.top)*.85+"px"}}function ca(ie,ce){return ie.top-ce.top||ie.left-ce.left}function Ro(ie,ce,Te){var Me=ie.display,Fe=ie.doc,it=document.createDocumentFragment(),vt=Pa(ie.display),Et=vt.left,Pt=Math.max(Me.sizerWidth,Sa(ie)-Me.sizer.offsetLeft)-vt.right,Bt=Fe.direction=="ltr";function gn(hr,Ir,ao,lr){Ir<0&&(Ir=0),Ir=Math.round(Ir),lr=Math.round(lr),it.appendChild(Ze("div",null,"CodeMirror-selected","position: absolute; left: "+hr+`px;
|
|
|
top: `+Ir+"px; width: "+(ao==null?Pt-hr:ao)+`px;
|
|
|
height: `+(lr-Ir)+"px"))}function Gt(hr,Ir,ao){var lr=_n(Fe,hr),Bo=lr.text.length,Fs,Ea;function Js(wa,Dl){return io(ie,Qt(hr,wa),"div",lr,Dl)}function Pl(wa,Dl,Xa){var _a=Za(ie,lr,null,wa),os=Dl=="ltr"==(Xa=="after")?"left":"right",ra=Xa=="after"?_a.begin:_a.end-(/\s/.test(lr.text.charAt(_a.end-1))?2:1);return Js(ra,os)[os]}var ol=on(lr,Fe.direction);return We(ol,Ir||0,ao==null?Bo:ao,function(wa,Dl,Xa,_a){var os=Xa=="ltr",ra=Js(wa,os?"left":"right"),Da=Js(Dl-1,os?"right":"left"),Ja=Ir==null&&wa==0,Tu=ao==null&&Dl==Bo,Qs=_a==0,cu=!ol||_a==ol.length-1;if(Da.top-ra.top<=3){var ua=(Bt?Ja:Tu)&&Qs,Zd=(Bt?Tu:Ja)&&cu,Jl=ua?Et:(os?ra:Da).left,Ol=Zd?Pt:(os?Da:ra).right;gn(Jl,ra.top,Ol-Jl,ra.bottom)}else{var Cl,bs,Oa,hh;os?(Cl=Bt&&Ja&&Qs?Et:ra.left,bs=Bt?Pt:Pl(wa,Xa,"before"),Oa=Bt?Et:Pl(Dl,Xa,"after"),hh=Bt&&Tu&&cu?Pt:Da.right):(Cl=Bt?Pl(wa,Xa,"before"):Et,bs=!Bt&&Ja&&Qs?Pt:ra.right,Oa=!Bt&&Tu&&cu?Et:Da.left,hh=Bt?Pl(Dl,Xa,"after"):Pt),gn(Cl,ra.top,bs-Cl,ra.bottom),ra.bottom<Da.top&&gn(Et,ra.bottom,null,Da.top),gn(Oa,Da.top,hh-Oa,Da.bottom)}(!Fs||ca(ra,Fs)<0)&&(Fs=ra),ca(Da,Fs)<0&&(Fs=Da),(!Ea||ca(ra,Ea)<0)&&(Ea=ra),ca(Da,Ea)<0&&(Ea=Da)}),{start:Fs,end:Ea}}var Tn=ce.from(),bn=ce.to();if(Tn.line==bn.line)Gt(Tn.line,Tn.ch,bn.ch);else{var fi=_n(Fe,Tn.line),wi=_n(Fe,bn.line),Oi=ti(fi)==ti(wi),er=Gt(Tn.line,Tn.ch,Oi?fi.text.length+1:null).end,br=Gt(bn.line,Oi?0:null,bn.ch).start;Oi&&(er.top<br.top-2?(gn(er.right,er.top,null,er.bottom),gn(Et,br.top,br.left,br.bottom)):gn(er.right,er.top,br.left-er.right,er.bottom)),er.bottom<br.top&&gn(Et,er.bottom,null,br.top)}Te.appendChild(it)}function ns(ie){if(ie.state.focused){var ce=ie.display;clearInterval(ce.blinker);var Te=!0;ce.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ce.blinker=setInterval(function(){ie.hasFocus()||nh(ie),ce.cursorDiv.style.visibility=(Te=!Te)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ce.cursorDiv.style.visibility="hidden")}}function qo(ie){ie.state.focused||(ie.display.input.focus(),Ao(ie))}function cs(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,nh(ie))},100)}function Ao(ie,ce){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(Sn(ie,"focus",ie,ce),ie.state.focused=!0,Mt(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),be&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),ns(ie))}function nh(ie,ce){ie.state.delayingBlurEvent||(ie.state.focused&&(Sn(ie,"blur",ie,ce),ie.state.focused=!1,Ae(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Nr(ie){for(var ce=ie.display,Te=ce.lineDiv.offsetTop,Me=0;Me<ce.view.length;Me++){var Fe=ce.view[Me],it=ie.options.lineWrapping,vt=void 0,Et=0;if(!Fe.hidden){if(Ce&&xe<8){var Pt=Fe.node.offsetTop+Fe.node.offsetHeight;vt=Pt-Te,Te=Pt}else{var Bt=Fe.node.getBoundingClientRect();vt=Bt.bottom-Bt.top,!it&&Fe.text.firstChild&&(Et=Fe.text.firstChild.getBoundingClientRect().right-Bt.left-1)}var gn=Fe.line.height-vt;if((gn>.005||gn<-.005)&&(Hn(Fe.line,vt),vc(Fe.line),Fe.rest))for(var Gt=0;Gt<Fe.rest.length;Gt++)vc(Fe.rest[Gt]);if(Et>ie.display.sizerWidth){var Tn=Math.ceil(Et/su(ie.display));Tn>ie.display.maxLineLength&&(ie.display.maxLineLength=Tn,ie.display.maxLine=Fe.line,ie.display.maxLineChanged=!0)}}}}function vc(ie){if(ie.widgets)for(var ce=0;ce<ie.widgets.length;++ce){var Te=ie.widgets[ce],Me=Te.node.parentNode;Me&&(Te.height=Me.offsetHeight)}}function _o(ie,ce,Te){var Me=Te&&Te.top!=null?Math.max(0,Te.top):ie.scroller.scrollTop;Me=Math.floor(Me-jo(ie));var Fe=Te&&Te.bottom!=null?Te.bottom:Me+ie.wrapper.clientHeight,it=ln(ce,Me),vt=ln(ce,Fe);if(Te&&Te.ensure){var Et=Te.ensure.from.line,Pt=Te.ensure.to.line;Et<it?(it=Et,vt=ln(ce,Ui(_n(ce,Et))+ie.wrapper.clientHeight)):Math.min(Pt,ce.lastLine())>=vt&&(it=ln(ce,Ui(_n(ce,Pt))-ie.wrapper.clientHeight),vt=Pt)}return{from:it,to:Math.max(vt,it+1)}}function Gh(ie,ce){if(!dn(ie,"scrollCursorIntoView")){var Te=ie.display,Me=Te.sizer.getBoundingClientRect(),Fe=null;if(ce.top+Me.top<0?Fe=!0:ce.bottom+Me.top>(window.innerHeight||document.documentElement.clientHeight)&&(Fe=!1),Fe!=null&&!fe){var it=Ze("div","\u200B",null,`position: absolute;
|
|
|
top: `+(ce.top-Te.viewOffset-jo(ie.display))+`px;
|
|
|
height: `+(ce.bottom-ce.top+Xo(ie)+Te.barHeight)+`px;
|
|
|
left: `+ce.left+"px; width: "+Math.max(2,ce.right-ce.left)+"px;");ie.display.lineSpace.appendChild(it),it.scrollIntoView(Fe),ie.display.lineSpace.removeChild(it)}}}function Cu(ie,ce,Te,Me){Me==null&&(Me=0);var Fe;!ie.options.lineWrapping&&ce==Te&&(ce=ce.ch?Qt(ce.line,ce.sticky=="before"?ce.ch-1:ce.ch,"after"):ce,Te=ce.sticky=="before"?Qt(ce.line,ce.ch+1,"before"):ce);for(var it=0;it<5;it++){var vt=!1,Et=yo(ie,ce),Pt=!Te||Te==ce?Et:yo(ie,Te);Fe={left:Math.min(Et.left,Pt.left),top:Math.min(Et.top,Pt.top)-Me,right:Math.max(Et.left,Pt.left),bottom:Math.max(Et.bottom,Pt.bottom)+Me};var Bt=Wh(ie,Fe),gn=ie.doc.scrollTop,Gt=ie.doc.scrollLeft;if(Bt.scrollTop!=null&&(wl(ie,Bt.scrollTop),Math.abs(ie.doc.scrollTop-gn)>1&&(vt=!0)),Bt.scrollLeft!=null&&(Zl(ie,Bt.scrollLeft),Math.abs(ie.doc.scrollLeft-Gt)>1&&(vt=!0)),!vt)break}return Fe}function ih(ie,ce){var Te=Wh(ie,ce);Te.scrollTop!=null&&wl(ie,Te.scrollTop),Te.scrollLeft!=null&&Zl(ie,Te.scrollLeft)}function Wh(ie,ce){var Te=ie.display,Me=cl(ie.display);ce.top<0&&(ce.top=0);var Fe=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:Te.scroller.scrollTop,it=Wa(ie),vt={};ce.bottom-ce.top>it&&(ce.bottom=ce.top+it);var Et=ie.doc.height+ta(Te),Pt=ce.top<Me,Bt=ce.bottom>Et-Me;if(ce.top<Fe)vt.scrollTop=Pt?0:ce.top;else if(ce.bottom>Fe+it){var gn=Math.min(ce.top,(Bt?Et:ce.bottom)-it);gn!=Fe&&(vt.scrollTop=gn)}var Gt=ie.options.fixedGutter?0:Te.gutters.offsetWidth,Tn=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:Te.scroller.scrollLeft-Gt,bn=Sa(ie)-Te.gutters.offsetWidth,fi=ce.right-ce.left>bn;return fi&&(ce.right=ce.left+bn),ce.left<10?vt.scrollLeft=0:ce.left<Tn?vt.scrollLeft=Math.max(0,ce.left+Gt-(fi?0:10)):ce.right>bn+Tn-3&&(vt.scrollLeft=ce.right+(fi?0:10)-bn),vt}function Ph(ie,ce){ce!=null&&(xl(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ce)}function Wl(ie){xl(ie);var ce=ie.getCursor();ie.curOp.scrollToPos={from:ce,to:ce,margin:ie.options.cursorScrollMargin}}function Kr(ie,ce,Te){(ce!=null||Te!=null)&&xl(ie),ce!=null&&(ie.curOp.scrollLeft=ce),Te!=null&&(ie.curOp.scrollTop=Te)}function Ho(ie,ce){xl(ie),ie.curOp.scrollToPos=ce}function xl(ie){var ce=ie.curOp.scrollToPos;if(ce){ie.curOp.scrollToPos=null;var Te=Us(ie,ce.from),Me=Us(ie,ce.to);Ch(ie,Te,Me,ce.margin)}}function Ch(ie,ce,Te,Me){var Fe=Wh(ie,{left:Math.min(ce.left,Te.left),top:Math.min(ce.top,Te.top)-Me,right:Math.max(ce.right,Te.right),bottom:Math.max(ce.bottom,Te.bottom)+Me});Kr(ie,Fe.scrollLeft,Fe.scrollTop)}function wl(ie,ce){Math.abs(ie.doc.scrollTop-ce)<2||(ke||Mo(ie,{top:ce}),Eh(ie,ce,!0),ke&&Mo(ie),xi(ie,100))}function Eh(ie,ce,Te){ce=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ce)),!(ie.display.scroller.scrollTop==ce&&!Te)&&(ie.doc.scrollTop=ce,ie.display.scrollbars.setScrollTop(ce),ie.display.scroller.scrollTop!=ce&&(ie.display.scroller.scrollTop=ce))}function Zl(ie,ce,Te,Me){ce=Math.max(0,Math.min(ce,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((Te?ce==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ce)<2)&&!Me)&&(ie.doc.scrollLeft=ce,Ko(ie),ie.display.scroller.scrollLeft!=ce&&(ie.display.scroller.scrollLeft=ce),ie.display.scrollbars.setScrollLeft(ce))}function mo(ie){var ce=ie.display,Te=ce.gutters.offsetWidth,Me=Math.round(ie.doc.height+ta(ie.display));return{clientHeight:ce.scroller.clientHeight,viewHeight:ce.wrapper.clientHeight,scrollWidth:ce.scroller.scrollWidth,clientWidth:ce.scroller.clientWidth,viewWidth:ce.wrapper.clientWidth,barLeft:ie.options.fixedGutter?Te:0,docHeight:Me,scrollHeight:Me+Xo(ie)+ce.barHeight,nativeBarWidth:ce.nativeBarWidth,gutterWidth:Te}}var Dr=function(ie,ce,Te){this.cm=Te;var Me=this.vert=Ze("div",[Ze("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Fe=this.horiz=Ze("div",[Ze("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Me.tabIndex=Fe.tabIndex=-1,ie(Me),ie(Fe),Rt(Me,"scroll",function(){Me.clientHeight&&ce(Me.scrollTop,"vertical")}),Rt(Fe,"scroll",function(){Fe.clientWidth&&ce(Fe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ce&&xe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(ie){var ce=ie.scrollWidth>ie.clientWidth+1,Te=ie.scrollHeight>ie.clientHeight+1,Me=ie.nativeBarWidth;if(Te){this.vert.style.display="block",this.vert.style.bottom=ce?Me+"px":"0";var Fe=ie.viewHeight-(ce?Me:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+Fe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ce){this.horiz.style.display="block",this.horiz.style.right=Te?Me+"px":"0",this.horiz.style.left=ie.barLeft+"px";var it=ie.viewWidth-ie.barLeft-(Te?Me:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+it)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(Me==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Te?Me:0,bottom:ce?Me:0}},Dr.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dr.prototype.zeroWidthHack=function(){var ie=oe&&!ge?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ot,this.disableVert=new ot},Dr.prototype.enableZeroWidthBar=function(ie,ce,Te){ie.style.pointerEvents="auto";function Me(){var Fe=ie.getBoundingClientRect(),it=Te=="vert"?document.elementFromPoint(Fe.right-1,(Fe.top+Fe.bottom)/2):document.elementFromPoint((Fe.right+Fe.left)/2,Fe.bottom-1);it!=ie?ie.style.pointerEvents="none":ce.set(1e3,Me)}ce.set(1e3,Me)},Dr.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var No=function(){};No.prototype.update=function(){return{bottom:0,right:0}},No.prototype.setScrollLeft=function(){},No.prototype.setScrollTop=function(){},No.prototype.clear=function(){};function ya(ie,ce){ce||(ce=mo(ie));var Te=ie.display.barWidth,Me=ie.display.barHeight;ls(ie,ce);for(var Fe=0;Fe<4&&Te!=ie.display.barWidth||Me!=ie.display.barHeight;Fe++)Te!=ie.display.barWidth&&ie.options.lineWrapping&&Nr(ie),ls(ie,mo(ie)),Te=ie.display.barWidth,Me=ie.display.barHeight}function ls(ie,ce){var Te=ie.display,Me=Te.scrollbars.update(ce);Te.sizer.style.paddingRight=(Te.barWidth=Me.right)+"px",Te.sizer.style.paddingBottom=(Te.barHeight=Me.bottom)+"px",Te.heightForcer.style.borderBottom=Me.bottom+"px solid transparent",Me.right&&Me.bottom?(Te.scrollbarFiller.style.display="block",Te.scrollbarFiller.style.height=Me.bottom+"px",Te.scrollbarFiller.style.width=Me.right+"px"):Te.scrollbarFiller.style.display="",Me.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(Te.gutterFiller.style.display="block",Te.gutterFiller.style.height=Me.bottom+"px",Te.gutterFiller.style.width=ce.gutterWidth+"px"):Te.gutterFiller.style.display=""}var Wu={native:Dr,null:No};function au(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&Ae(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new Wu[ie.options.scrollbarStyle](function(ce){ie.display.wrapper.insertBefore(ce,ie.display.scrollbarFiller),Rt(ce,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ce.setAttribute("cm-not-content","true")},function(ce,Te){Te=="horizontal"?Zl(ie,ce):wl(ie,ce)},ie),ie.display.scrollbars.addClass&&Mt(ie.display.wrapper,ie.display.scrollbars.addClass)}var Eu=0;function Ka(ie){ie.curOp={cm:ie,viewChanged:!1,startHeight:ie.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:++Eu},$s(ie.curOp)}function Vl(ie){var ce=ie.curOp;ce&&ha(ce,function(Te){for(var Me=0;Me<Te.ops.length;Me++)Te.ops[Me].cm.curOp=null;vp(Te)})}function vp(ie){for(var ce=ie.ops,Te=0;Te<ce.length;Te++)yp(ce[Te]);for(var Me=0;Me<ce.length;Me++)Sp(ce[Me]);for(var Fe=0;Fe<ce.length;Fe++)gf(ce[Fe]);for(var it=0;it<ce.length;it++)Ot(ce[it]);for(var vt=0;vt<ce.length;vt++)Vt(ce[vt])}function yp(ie){var ce=ie.cm,Te=ce.display;$i(ce),ie.updateMaxLine&&pr(ce),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<Te.viewFrom||ie.scrollToPos.to.line>=Te.viewTo)||Te.maxLineChanged&&ce.options.lineWrapping,ie.update=ie.mustUpdate&&new Pi(ce,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function Sp(ie){ie.updatedDisplay=ie.mustUpdate&&Go(ie.cm,ie.update)}function gf(ie){var ce=ie.cm,Te=ce.display;ie.updatedDisplay&&Nr(ce),ie.barMeasure=mo(ce),Te.maxLineChanged&&!ce.options.lineWrapping&&(ie.adjustWidthTo=zu(ce,Te.maxLine,Te.maxLine.text.length).left+3,ce.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(Te.scroller.clientWidth,Te.sizer.offsetLeft+ie.adjustWidthTo+Xo(ce)+ce.display.barWidth),ie.maxScrollLeft=Math.max(0,Te.sizer.offsetLeft+ie.adjustWidthTo-Sa(ce))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=Te.input.prepareSelection())}function Ot(ie){var ce=ie.cm;ie.adjustWidthTo!=null&&(ce.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ce.doc.scrollLeft&&Zl(ce,Math.min(ce.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ce.display.maxLineChanged=!1);var Te=ie.focus&&ie.focus==gt();ie.preparedSelection&&ce.display.input.showSelection(ie.preparedSelection,Te),(ie.updatedDisplay||ie.startHeight!=ce.doc.height)&&ya(ce,ie.barMeasure),ie.updatedDisplay&&ho(ce,ie.barMeasure),ie.selectionChanged&&ns(ce),ce.state.focused&&ie.updateInput&&ce.display.input.reset(ie.typing),Te&&qo(ie.cm)}function Vt(ie){var ce=ie.cm,Te=ce.display,Me=ce.doc;if(ie.updatedDisplay&&Ki(ce,ie.update),Te.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(Te.wheelStartX=Te.wheelStartY=null),ie.scrollTop!=null&&Eh(ce,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&Zl(ce,ie.scrollLeft,!0,!0),ie.scrollToPos){var Fe=Cu(ce,Bn(Me,ie.scrollToPos.from),Bn(Me,ie.scrollToPos.to),ie.scrollToPos.margin);Gh(ce,Fe)}var it=ie.maybeHiddenMarkers,vt=ie.maybeUnhiddenMarkers;if(it)for(var Et=0;Et<it.length;++Et)it[Et].lines.length||Sn(it[Et],"hide");if(vt)for(var Pt=0;Pt<vt.length;++Pt)vt[Pt].lines.length&&Sn(vt[Pt],"unhide");Te.wrapper.offsetHeight&&(Me.scrollTop=ce.display.scroller.scrollTop),ie.changeObjs&&Sn(ce,"changes",ce,ie.changeObjs),ie.update&&ie.update.finish()}function Jt(ie,ce){if(ie.curOp)return ce();Ka(ie);try{return ce()}finally{Vl(ie)}}function Wi(ie,ce){return function(){if(ie.curOp)return ce.apply(ie,arguments);Ka(ie);try{return ce.apply(ie,arguments)}finally{Vl(ie)}}}function _i(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Ka(this);try{return ie.apply(this,arguments)}finally{Vl(this)}}}function hi(ie){return function(){var ce=this.cm;if(!ce||ce.curOp)return ie.apply(this,arguments);Ka(ce);try{return ie.apply(this,arguments)}finally{Vl(ce)}}}function xi(ie,ce){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ce,ht(ui,ie))}function ui(ie){var ce=ie.doc;if(!(ce.highlightFrontier>=ie.display.viewTo)){var Te=+new Date+ie.options.workTime,Me=wr(ie,ce.highlightFrontier),Fe=[];ce.iter(Me.line,Math.min(ce.first+ce.size,ie.display.viewTo+500),function(it){if(Me.line>=ie.display.viewFrom){var vt=it.styles,Et=it.text.length>ie.options.maxHighlightLength?bt(ce.mode,Me.state):null,Pt=Tr(ie,it,Me,!0);Et&&(Me.state=Et),it.styles=Pt.styles;var Bt=it.styleClasses,gn=Pt.classes;gn?it.styleClasses=gn:Bt&&(it.styleClasses=null);for(var Gt=!vt||vt.length!=it.styles.length||Bt!=gn&&(!Bt||!gn||Bt.bgClass!=gn.bgClass||Bt.textClass!=gn.textClass),Tn=0;!Gt&&Tn<vt.length;++Tn)Gt=vt[Tn]!=it.styles[Tn];Gt&&Fe.push(Me.line),it.stateAfter=Me.save(),Me.nextLine()}else it.text.length<=ie.options.maxHighlightLength&&pn(ie,it.text,Me),it.stateAfter=Me.line%5==0?Me.save():null,Me.nextLine();if(+new Date>Te)return xi(ie,ie.options.workDelay),!0}),ce.highlightFrontier=Me.line,ce.modeFrontier=Math.max(ce.modeFrontier,Me.line),Fe.length&&Jt(ie,function(){for(var it=0;it<Fe.length;it++)$r(ie,Fe[it],"text")})}}var Pi=function(ie,ce,Te){var Me=ie.display;this.viewport=ce,this.visible=_o(Me,ie.doc,ce),this.editorIsHidden=!Me.wrapper.offsetWidth,this.wrapperHeight=Me.wrapper.clientHeight,this.wrapperWidth=Me.wrapper.clientWidth,this.oldDisplayWidth=Sa(ie),this.force=Te,this.dims=Gu(ie),this.events=[]};Pi.prototype.signal=function(ie,ce){vn(ie,ce)&&this.events.push(arguments)},Pi.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)Sn.apply(null,this.events[ie])};function $i(ie){var ce=ie.display;!ce.scrollbarsClipped&&ce.scroller.offsetWidth&&(ce.nativeBarWidth=ce.scroller.offsetWidth-ce.scroller.clientWidth,ce.heightForcer.style.height=Xo(ie)+"px",ce.sizer.style.marginBottom=-ce.nativeBarWidth+"px",ce.sizer.style.borderRightWidth=Xo(ie)+"px",ce.scrollbarsClipped=!0)}function bo(ie){if(ie.hasFocus())return null;var ce=gt();if(!ce||!mt(ie.display.lineDiv,ce))return null;var Te={activeElt:ce};if(window.getSelection){var Me=window.getSelection();Me.anchorNode&&Me.extend&&mt(ie.display.lineDiv,Me.anchorNode)&&(Te.anchorNode=Me.anchorNode,Te.anchorOffset=Me.anchorOffset,Te.focusNode=Me.focusNode,Te.focusOffset=Me.focusOffset)}return Te}function Sr(ie){if(!(!ie||!ie.activeElt||ie.activeElt==gt())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&mt(document.body,ie.anchorNode)&&mt(document.body,ie.focusNode))){var ce=window.getSelection(),Te=document.createRange();Te.setEnd(ie.anchorNode,ie.anchorOffset),Te.collapse(!1),ce.removeAllRanges(),ce.addRange(Te),ce.extend(ie.focusNode,ie.focusOffset)}}function Go(ie,ce){var Te=ie.display,Me=ie.doc;if(ce.editorIsHidden)return ws(ie),!1;if(!ce.force&&ce.visible.from>=Te.viewFrom&&ce.visible.to<=Te.viewTo&&(Te.updateLineNumbers==null||Te.updateLineNumbers>=Te.viewTo)&&Te.renderedView==Te.view&&Va(ie)==0)return!1;Po(ie)&&(ws(ie),ce.dims=Gu(ie));var Fe=Me.first+Me.size,it=Math.max(ce.visible.from-ie.options.viewportMargin,Me.first),vt=Math.min(Fe,ce.visible.to+ie.options.viewportMargin);Te.viewFrom<it&&it-Te.viewFrom<20&&(it=Math.max(Me.first,Te.viewFrom)),Te.viewTo>vt&&Te.viewTo-vt<20&&(vt=Math.min(Fe,Te.viewTo)),Ln&&(it=Si(ie.doc,it),vt=di(ie.doc,vt));var Et=it!=Te.viewFrom||vt!=Te.viewTo||Te.lastWrapHeight!=ce.wrapperHeight||Te.lastWrapWidth!=ce.wrapperWidth;Jo(ie,it,vt),Te.viewOffset=Ui(_n(ie.doc,Te.viewFrom)),ie.display.mover.style.top=Te.viewOffset+"px";var Pt=Va(ie);if(!Et&&Pt==0&&!ce.force&&Te.renderedView==Te.view&&(Te.updateLineNumbers==null||Te.updateLineNumbers>=Te.viewTo))return!1;var Bt=bo(ie);return Pt>4&&(Te.lineDiv.style.display="none"),Xr(ie,Te.updateLineNumbers,ce.dims),Pt>4&&(Te.lineDiv.style.display=""),Te.renderedView=Te.view,Sr(Bt),Oe(Te.cursorDiv),Oe(Te.selectionDiv),Te.gutters.style.height=Te.sizer.style.minHeight=0,Et&&(Te.lastWrapHeight=ce.wrapperHeight,Te.lastWrapWidth=ce.wrapperWidth,xi(ie,400)),Te.updateLineNumbers=null,!0}function Ki(ie,ce){for(var Te=ce.viewport,Me=!0;;Me=!1){if(!Me||!ie.options.lineWrapping||ce.oldDisplayWidth==Sa(ie)){if(Te&&Te.top!=null&&(Te={top:Math.min(ie.doc.height+ta(ie.display)-Wa(ie),Te.top)}),ce.visible=_o(ie.display,ie.doc,Te),ce.visible.from>=ie.display.viewFrom&&ce.visible.to<=ie.display.viewTo)break}else Me&&(ce.visible=_o(ie.display,ie.doc,Te));if(!Go(ie,ce))break;Nr(ie);var Fe=mo(ie);na(ie),ya(ie,Fe),ho(ie,Fe),ce.force=!1}ce.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ce.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function Mo(ie,ce){var Te=new Pi(ie,ce);if(Go(ie,Te)){Nr(ie),Ki(ie,Te);var Me=mo(ie);na(ie),ya(ie,Me),ho(ie,Me),Te.finish()}}function Xr(ie,ce,Te){var Me=ie.display,Fe=ie.options.lineNumbers,it=Me.lineDiv,vt=it.firstChild;function Et(fi){var wi=fi.nextSibling;return be&&oe&&ie.display.currentWheelTarget==fi?fi.style.display="none":fi.parentNode.removeChild(fi),wi}for(var Pt=Me.view,Bt=Me.viewFrom,gn=0;gn<Pt.length;gn++){var Gt=Pt[gn];if(!Gt.hidden)if(!Gt.node||Gt.node.parentNode!=it){var Tn=aa(ie,Gt,Bt,Te);it.insertBefore(Tn,vt)}else{for(;vt!=Gt.node;)vt=Et(vt);var bn=Fe&&ce!=null&&ce<=Bt&&Gt.lineNumber;Gt.changes&&(ct(Gt.changes,"gutter")>-1&&(bn=!1),as(ie,Gt,Bt,Te)),bn&&(Oe(Gt.lineNumber),Gt.lineNumber.appendChild(document.createTextNode(jn(ie.options,Bt)))),vt=Gt.node.nextSibling}Bt+=Gt.size}for(;vt;)vt=Et(vt)}function rs(ie){var ce=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ce+"px"}function ho(ie,ce){ie.display.sizer.style.minHeight=ce.docHeight+"px",ie.display.heightForcer.style.top=ce.docHeight+"px",ie.display.gutters.style.height=ce.docHeight+ie.display.barHeight+Xo(ie)+"px"}function Ko(ie){var ce=ie.display,Te=ce.view;if(!(!ce.alignWidgets&&(!ce.gutters.firstChild||!ie.options.fixedGutter))){for(var Me=bu(ce)-ce.scroller.scrollLeft+ie.doc.scrollLeft,Fe=ce.gutters.offsetWidth,it=Me+"px",vt=0;vt<Te.length;vt++)if(!Te[vt].hidden){ie.options.fixedGutter&&(Te[vt].gutter&&(Te[vt].gutter.style.left=it),Te[vt].gutterBackground&&(Te[vt].gutterBackground.style.left=it));var Et=Te[vt].alignable;if(Et)for(var Pt=0;Pt<Et.length;Pt++)Et[Pt].style.left=it}ie.options.fixedGutter&&(ce.gutters.style.left=Me+Fe+"px")}}function Po(ie){if(!ie.options.lineNumbers)return!1;var ce=ie.doc,Te=jn(ie.options,ce.first+ce.size-1),Me=ie.display;if(Te.length!=Me.lineNumChars){var Fe=Me.measure.appendChild(Ze("div",[Ze("div",Te)],"CodeMirror-linenumber CodeMirror-gutter-elt")),it=Fe.firstChild.offsetWidth,vt=Fe.offsetWidth-it;return Me.lineGutter.style.width="",Me.lineNumInnerWidth=Math.max(it,Me.lineGutter.offsetWidth-vt)+1,Me.lineNumWidth=Me.lineNumInnerWidth+vt,Me.lineNumChars=Me.lineNumInnerWidth?Te.length:-1,Me.lineGutter.style.width=Me.lineNumWidth+"px",rs(ie.display),!0}return!1}function Ur(ie,ce){for(var Te=[],Me=!1,Fe=0;Fe<ie.length;Fe++){var it=ie[Fe],vt=null;if(typeof it!="string"&&(vt=it.style,it=it.className),it=="CodeMirror-linenumbers")if(ce)Me=!0;else continue;Te.push({className:it,style:vt})}return ce&&!Me&&Te.push({className:"CodeMirror-linenumbers",style:null}),Te}function Yo(ie){var ce=ie.gutters,Te=ie.gutterSpecs;Oe(ce),ie.lineGutter=null;for(var Me=0;Me<Te.length;++Me){var Fe=Te[Me],it=Fe.className,vt=Fe.style,Et=ce.appendChild(Ze("div",null,"CodeMirror-gutter "+it));vt&&(Et.style.cssText=vt),it=="CodeMirror-linenumbers"&&(ie.lineGutter=Et,Et.style.width=(ie.lineNumWidth||1)+"px")}ce.style.display=Te.length?"":"none",rs(ie)}function Zi(ie){Yo(ie.display),gs(ie),Ko(ie)}function ts(ie,ce,Te,Me){var Fe=this;this.input=Te,Fe.scrollbarFiller=Ze("div",null,"CodeMirror-scrollbar-filler"),Fe.scrollbarFiller.setAttribute("cm-not-content","true"),Fe.gutterFiller=Ze("div",null,"CodeMirror-gutter-filler"),Fe.gutterFiller.setAttribute("cm-not-content","true"),Fe.lineDiv=qe("div",null,"CodeMirror-code"),Fe.selectionDiv=Ze("div",null,null,"position: relative; z-index: 1"),Fe.cursorDiv=Ze("div",null,"CodeMirror-cursors"),Fe.measure=Ze("div",null,"CodeMirror-measure"),Fe.lineMeasure=Ze("div",null,"CodeMirror-measure"),Fe.lineSpace=qe("div",[Fe.measure,Fe.lineMeasure,Fe.selectionDiv,Fe.cursorDiv,Fe.lineDiv],null,"position: relative; outline: none");var it=qe("div",[Fe.lineSpace],"CodeMirror-lines");Fe.mover=Ze("div",[it],null,"position: relative"),Fe.sizer=Ze("div",[Fe.mover],"CodeMirror-sizer"),Fe.sizerWidth=null,Fe.heightForcer=Ze("div",null,null,"position: absolute; height: "+yt+"px; width: 1px;"),Fe.gutters=Ze("div",null,"CodeMirror-gutters"),Fe.lineGutter=null,Fe.scroller=Ze("div",[Fe.sizer,Fe.heightForcer,Fe.gutters],"CodeMirror-scroll"),Fe.scroller.setAttribute("tabIndex","-1"),Fe.wrapper=Ze("div",[Fe.scrollbarFiller,Fe.gutterFiller,Fe.scroller],"CodeMirror"),Ce&&xe<8&&(Fe.gutters.style.zIndex=-1,Fe.scroller.style.paddingRight=0),!be&&!(ke&&z)&&(Fe.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(Fe.wrapper):ie(Fe.wrapper)),Fe.viewFrom=Fe.viewTo=ce.first,Fe.reportedViewFrom=Fe.reportedViewTo=ce.first,Fe.view=[],Fe.renderedView=null,Fe.externalMeasured=null,Fe.viewOffset=0,Fe.lastWrapHeight=Fe.lastWrapWidth=0,Fe.updateLineNumbers=null,Fe.nativeBarWidth=Fe.barHeight=Fe.barWidth=0,Fe.scrollbarsClipped=!1,Fe.lineNumWidth=Fe.lineNumInnerWidth=Fe.lineNumChars=null,Fe.alignWidgets=!1,Fe.cachedCharWidth=Fe.cachedTextHeight=Fe.cachedPaddingH=null,Fe.maxLine=null,Fe.maxLineLength=0,Fe.maxLineChanged=!1,Fe.wheelDX=Fe.wheelDY=Fe.wheelStartX=Fe.wheelStartY=null,Fe.shift=!1,Fe.selForContextMenu=null,Fe.activeTouch=null,Fe.gutterSpecs=Ur(Me.gutters,Me.lineNumbers),Yo(Fe),Te.init(Fe)}var vo=0,Do=null;Ce?Do=-.53:ke?Do=15:we?Do=-.7:de&&(Do=-1/3);function Ks(ie){var ce=ie.wheelDeltaX,Te=ie.wheelDeltaY;return ce==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ce=ie.detail),Te==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?Te=ie.detail:Te==null&&(Te=ie.wheelDelta),{x:ce,y:Te}}function fr(ie){var ce=Ks(ie);return ce.x*=Do,ce.y*=Do,ce}function Fo(ie,ce){var Te=Ks(ce),Me=Te.x,Fe=Te.y,it=ie.display,vt=it.scroller,Et=vt.scrollWidth>vt.clientWidth,Pt=vt.scrollHeight>vt.clientHeight;if(Me&&Et||Fe&&Pt){if(Fe&&oe&&be){e:for(var Bt=ce.target,gn=it.view;Bt!=vt;Bt=Bt.parentNode)for(var Gt=0;Gt<gn.length;Gt++)if(gn[Gt].node==Bt){ie.display.currentWheelTarget=Bt;break e}}if(Me&&!ke&&!pe&&Do!=null){Fe&&Pt&&wl(ie,Math.max(0,vt.scrollTop+Fe*Do)),Zl(ie,Math.max(0,vt.scrollLeft+Me*Do)),(!Fe||Fe&&Pt)&&ri(ce),it.wheelStartX=null;return}if(Fe&&Do!=null){var Tn=Fe*Do,bn=ie.doc.scrollTop,fi=bn+it.wrapper.clientHeight;Tn<0?bn=Math.max(0,bn+Tn-50):fi=Math.min(ie.doc.height,fi+Tn+50),Mo(ie,{top:bn,bottom:fi})}vo<20&&(it.wheelStartX==null?(it.wheelStartX=vt.scrollLeft,it.wheelStartY=vt.scrollTop,it.wheelDX=Me,it.wheelDY=Fe,setTimeout(function(){if(it.wheelStartX!=null){var wi=vt.scrollLeft-it.wheelStartX,Oi=vt.scrollTop-it.wheelStartY,er=Oi&&it.wheelDY&&Oi/it.wheelDY||wi&&it.wheelDX&&wi/it.wheelDX;it.wheelStartX=it.wheelStartY=null,er&&(Do=(Do*vo+er)/(vo+1),++vo)}},200)):(it.wheelDX+=Me,it.wheelDY+=Fe))}}var Co=function(ie,ce){this.ranges=ie,this.primIndex=ce};Co.prototype.primary=function(){return this.ranges[this.primIndex]},Co.prototype.equals=function(ie){if(ie==this)return!0;if(ie.primIndex!=this.primIndex||ie.ranges.length!=this.ranges.length)return!1;for(var ce=0;ce<this.ranges.length;ce++){var Te=this.ranges[ce],Me=ie.ranges[ce];if(!Pn(Te.anchor,Me.anchor)||!Pn(Te.head,Me.head))return!1}return!0},Co.prototype.deepCopy=function(){for(var ie=[],ce=0;ce<this.ranges.length;ce++)ie[ce]=new Or(Dn(this.ranges[ce].anchor),Dn(this.ranges[ce].head));return new Co(ie,this.primIndex)},Co.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Co.prototype.contains=function(ie,ce){ce||(ce=ie);for(var Te=0;Te<this.ranges.length;Te++){var Me=this.ranges[Te];if(rn(ce,Me.from())>=0&&rn(ie,Me.to())<=0)return Te}return-1};var Or=function(ie,ce){this.anchor=ie,this.head=ce};Or.prototype.from=function(){return ai(this.anchor,this.head)},Or.prototype.to=function(){return oi(this.anchor,this.head)},Or.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Jr(ie,ce,Te){var Me=ie&&ie.options.selectionsMayTouch,Fe=ce[Te];ce.sort(function(Tn,bn){return rn(Tn.from(),bn.from())}),Te=ct(ce,Fe);for(var it=1;it<ce.length;it++){var vt=ce[it],Et=ce[it-1],Pt=rn(Et.to(),vt.from());if(Me&&!vt.empty()?Pt>0:Pt>=0){var Bt=ai(Et.from(),vt.from()),gn=oi(Et.to(),vt.to()),Gt=Et.empty()?vt.from()==vt.head:Et.from()==Et.head;it<=Te&&--Te,ce.splice(--it,2,new Or(Gt?gn:Bt,Gt?Bt:gn))}}return new Co(ce,Te)}function Uo(ie,ce){return new Co([new Or(ie,ce||ie)],0)}function Zr(ie){return ie.text?Qt(ie.from.line+ie.text.length-1,Ft(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function Aa(ie,ce){if(rn(ie,ce.from)<0)return ie;if(rn(ie,ce.to)<=0)return Zr(ce);var Te=ie.line+ce.text.length-(ce.to.line-ce.from.line)-1,Me=ie.ch;return ie.line==ce.to.line&&(Me+=Zr(ce).ch-ce.to.ch),Qt(Te,Me)}function Ys(ie,ce){for(var Te=[],Me=0;Me<ie.sel.ranges.length;Me++){var Fe=ie.sel.ranges[Me];Te.push(new Or(Aa(Fe.anchor,ce),Aa(Fe.head,ce)))}return Jr(ie.cm,Te,ie.sel.primIndex)}function il(ie,ce,Te){return ie.line==ce.line?Qt(Te.line,ie.ch-ce.ch+Te.ch):Qt(Te.line+(ie.line-ce.line),ie.ch)}function Lu(ie,ce,Te){for(var Me=[],Fe=Qt(ie.first,0),it=Fe,vt=0;vt<ce.length;vt++){var Et=ce[vt],Pt=il(Et.from,Fe,it),Bt=il(Zr(Et),Fe,it);if(Fe=Et.to,it=Bt,Te=="around"){var gn=ie.sel.ranges[vt],Gt=rn(gn.head,gn.anchor)<0;Me[vt]=new Or(Gt?Bt:Pt,Gt?Pt:Bt)}else Me[vt]=new Or(Pt,Pt)}return new Co(Me,ie.sel.primIndex)}function ro(ie){ie.doc.mode=He(ie.options,ie.doc.modeOption),Mu(ie)}function Mu(ie){ie.doc.iter(function(ce){ce.stateAfter&&(ce.stateAfter=null),ce.styles&&(ce.styles=null)}),ie.doc.modeFrontier=ie.doc.highlightFrontier=ie.doc.first,xi(ie,100),ie.state.modeGen++,ie.curOp&&gs(ie)}function So(ie,ce){return ce.from.ch==0&&ce.to.ch==0&&Ft(ce.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Qo(ie,ce,Te,Me){function Fe(br){return Te?Te[br]:null}function it(br,hr,Ir){Ar(br,hr,Ir,Me),Qi(br,"change",br,ce)}function vt(br,hr){for(var Ir=[],ao=br;ao<hr;++ao)Ir.push(new Er(Bt[ao],Fe(ao),Me));return Ir}var Et=ce.from,Pt=ce.to,Bt=ce.text,gn=_n(ie,Et.line),Gt=_n(ie,Pt.line),Tn=Ft(Bt),bn=Fe(Bt.length-1),fi=Pt.line-Et.line;if(ce.full)ie.insert(0,vt(0,Bt.length)),ie.remove(Bt.length,ie.size-Bt.length);else if(So(ie,ce)){var wi=vt(0,Bt.length-1);it(Gt,Gt.text,bn),fi&&ie.remove(Et.line,fi),wi.length&&ie.insert(Et.line,wi)}else if(gn==Gt)if(Bt.length==1)it(gn,gn.text.slice(0,Et.ch)+Tn+gn.text.slice(Pt.ch),bn);else{var Oi=vt(1,Bt.length-1);Oi.push(new Er(Tn+gn.text.slice(Pt.ch),bn,Me)),it(gn,gn.text.slice(0,Et.ch)+Bt[0],Fe(0)),ie.insert(Et.line+1,Oi)}else if(Bt.length==1)it(gn,gn.text.slice(0,Et.ch)+Bt[0]+Gt.text.slice(Pt.ch),Fe(0)),ie.remove(Et.line+1,fi);else{it(gn,gn.text.slice(0,Et.ch)+Bt[0],Fe(0)),it(Gt,Tn+Gt.text.slice(Pt.ch),bn);var er=vt(1,Bt.length-1);fi>1&&ie.remove(Et.line+1,fi-1),ie.insert(Et.line+1,er)}Qi(ie,"change",ie,ce)}function Rs(ie,ce,Te){function Me(Fe,it,vt){if(Fe.linked)for(var Et=0;Et<Fe.linked.length;++Et){var Pt=Fe.linked[Et];if(Pt.doc!=it){var Bt=vt&&Pt.sharedHist;Te&&!Bt||(ce(Pt.doc,Bt),Me(Pt.doc,Fe,Bt))}}}Me(ie,null,!0)}function ku(ie,ce){if(ce.cm)throw new Error("This document is already in use.");ie.doc=ce,ce.cm=ie,Rr(ie),ro(ie),Na(ie),ie.options.lineWrapping||pr(ie),ie.options.mode=ce.modeOption,gs(ie)}function Na(ie){(ie.doc.direction=="rtl"?Mt:Ae)(ie.display.lineDiv,"CodeMirror-rtl")}function $c(ie){Jt(ie,function(){Na(ie),gs(ie)})}function dl(ie){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=ie||1}function ia(ie,ce){var Te={from:Dn(ce.from),to:Zr(ce),text:Kt(ie,ce.from,ce.to)};return la(ie,Te,ce.from.line,ce.to.line+1),Rs(ie,function(Me){return la(Me,Te,ce.from.line,ce.to.line+1)},!0),Te}function Kl(ie){for(;ie.length;){var ce=Ft(ie);if(ce.ranges)ie.pop();else break}}function yc(ie,ce){if(ce)return Kl(ie.done),Ft(ie.done);if(ie.done.length&&!Ft(ie.done).ranges)return Ft(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),Ft(ie.done)}function Sc(ie,ce,Te,Me){var Fe=ie.history;Fe.undone.length=0;var it=+new Date,vt,Et;if((Fe.lastOp==Me||Fe.lastOrigin==ce.origin&&ce.origin&&(ce.origin.charAt(0)=="+"&&Fe.lastModTime>it-(ie.cm?ie.cm.options.historyEventDelay:500)||ce.origin.charAt(0)=="*"))&&(vt=yc(Fe,Fe.lastOp==Me)))Et=Ft(vt.changes),rn(ce.from,ce.to)==0&&rn(ce.from,Et.to)==0?Et.to=Zr(ce):vt.changes.push(ia(ie,ce));else{var Pt=Ft(Fe.done);for((!Pt||!Pt.ranges)&&Ds(ie.sel,Fe.done),vt={changes:[ia(ie,ce)],generation:Fe.generation},Fe.done.push(vt);Fe.done.length>Fe.undoDepth;)Fe.done.shift(),Fe.done[0].ranges||Fe.done.shift()}Fe.done.push(Te),Fe.generation=++Fe.maxGeneration,Fe.lastModTime=Fe.lastSelTime=it,Fe.lastOp=Fe.lastSelOp=Me,Fe.lastOrigin=Fe.lastSelOrigin=ce.origin,Et||Sn(ie,"historyAdded")}function Td(ie,ce,Te,Me){var Fe=ce.charAt(0);return Fe=="*"||Fe=="+"&&Te.ranges.length==Me.ranges.length&&Te.somethingSelected()==Me.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function xo(ie,ce,Te,Me){var Fe=ie.history,it=Me&&Me.origin;Te==Fe.lastSelOp||it&&Fe.lastSelOrigin==it&&(Fe.lastModTime==Fe.lastSelTime&&Fe.lastOrigin==it||Td(ie,it,Ft(Fe.done),ce))?Fe.done[Fe.done.length-1]=ce:Ds(ce,Fe.done),Fe.lastSelTime=+new Date,Fe.lastSelOrigin=it,Fe.lastSelOp=Te,Me&&Me.clearRedo!==!1&&Kl(Fe.undone)}function Ds(ie,ce){var Te=Ft(ce);Te&&Te.ranges&&Te.equals(ie)||ce.push(ie)}function la(ie,ce,Te,Me){var Fe=ce["spans_"+ie.id],it=0;ie.iter(Math.max(ie.first,Te),Math.min(ie.first+ie.size,Me),function(vt){vt.markedSpans&&((Fe||(Fe=ce["spans_"+ie.id]={}))[it]=vt.markedSpans),++it})}function Gs(ie){if(!ie)return null;for(var ce,Te=0;Te<ie.length;++Te)ie[Te].marker.explicitlyCleared?ce||(ce=ie.slice(0,Te)):ce&&ce.push(ie[Te]);return ce?ce.length?ce:null:ie}function Ss(ie,ce){var Te=ce["spans_"+ie.id];if(!Te)return null;for(var Me=[],Fe=0;Fe<ce.text.length;++Fe)Me.push(Gs(Te[Fe]));return Me}function Yl(ie,ce){var Te=Ss(ie,ce),Me=uo(ie,ce);if(!Te)return Me;if(!Me)return Te;for(var Fe=0;Fe<Te.length;++Fe){var it=Te[Fe],vt=Me[Fe];if(it&&vt)e:for(var Et=0;Et<vt.length;++Et){for(var Pt=vt[Et],Bt=0;Bt<it.length;++Bt)if(it[Bt].marker==Pt.marker)continue e;it.push(Pt)}else vt&&(Te[Fe]=vt)}return Te}function _l(ie,ce,Te){for(var Me=[],Fe=0;Fe<ie.length;++Fe){var it=ie[Fe];if(it.ranges){Me.push(Te?Co.prototype.deepCopy.call(it):it);continue}var vt=it.changes,Et=[];Me.push({changes:Et});for(var Pt=0;Pt<vt.length;++Pt){var Bt=vt[Pt],gn=void 0;if(Et.push({from:Bt.from,to:Bt.to,text:Bt.text}),ce)for(var Gt in Bt)(gn=Gt.match(/^spans_(\d+)$/))&&ct(ce,Number(gn[1]))>-1&&(Ft(Et)[Gt]=Bt[Gt],delete Bt[Gt])}}return Me}function rh(ie,ce,Te,Me){if(Me){var Fe=ie.anchor;if(Te){var it=rn(ce,Fe)<0;it!=rn(Te,Fe)<0?(Fe=ce,ce=Te):it!=rn(ce,Te)<0&&(ce=Te)}return new Or(Fe,ce)}else return new Or(Te||ce,ce)}function Lh(ie,ce,Te,Me,Fe){Fe==null&&(Fe=ie.cm&&(ie.cm.display.shift||ie.extend)),rl(ie,new Co([rh(ie.sel.primary(),ce,Te,Fe)],0),Me)}function oh(ie,ce,Te){for(var Me=[],Fe=ie.cm&&(ie.cm.display.shift||ie.extend),it=0;it<ie.sel.ranges.length;it++)Me[it]=rh(ie.sel.ranges[it],ce[it],null,Fe);var vt=Jr(ie.cm,Me,ie.sel.primIndex);rl(ie,vt,Te)}function sh(ie,ce,Te,Me){var Fe=ie.sel.ranges.slice(0);Fe[ce]=Te,rl(ie,Jr(ie.cm,Fe,ie.sel.primIndex),Me)}function lu(ie,ce,Te,Me){rl(ie,Uo(ce,Te),Me)}function mf(ie,ce,Te){var Me={ranges:ce.ranges,update:function(Fe){this.ranges=[];for(var it=0;it<Fe.length;it++)this.ranges[it]=new Or(Bn(ie,Fe[it].anchor),Bn(ie,Fe[it].head))},origin:Te&&Te.origin};return Sn(ie,"beforeSelectionChange",ie,Me),ie.cm&&Sn(ie.cm,"beforeSelectionChange",ie.cm,Me),Me.ranges!=ce.ranges?Jr(ie.cm,Me.ranges,Me.ranges.length-1):ce}function vf(ie,ce,Te){var Me=ie.history.done,Fe=Ft(Me);Fe&&Fe.ranges?(Me[Me.length-1]=ce,xc(ie,ce,Te)):rl(ie,ce,Te)}function rl(ie,ce,Te){xc(ie,ce,Te),xo(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,Te)}function xc(ie,ce,Te){(vn(ie,"beforeSelectionChange")||ie.cm&&vn(ie.cm,"beforeSelectionChange"))&&(ce=mf(ie,ce,Te));var Me=Te&&Te.bias||(rn(ce.primary().head,ie.sel.primary().head)<0?-1:1);xp(ie,Nd(ie,ce,Me,!0)),!(Te&&Te.scroll===!1)&&ie.cm&&Wl(ie.cm)}function xp(ie,ce){ce.equals(ie.sel)||(ie.sel=ce,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,Zn(ie.cm)),Qi(ie,"cursorActivity",ie))}function Ad(ie){xp(ie,Nd(ie,ie.sel,null,!1))}function Nd(ie,ce,Te,Me){for(var Fe,it=0;it<ce.ranges.length;it++){var vt=ce.ranges[it],Et=ce.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[it],Pt=Dd(ie,vt.anchor,Et&&Et.anchor,Te,Me),Bt=Dd(ie,vt.head,Et&&Et.head,Te,Me);(Fe||Pt!=vt.anchor||Bt!=vt.head)&&(Fe||(Fe=ce.ranges.slice(0,it)),Fe[it]=new Or(Pt,Bt))}return Fe?Jr(ie.cm,Fe,ce.primIndex):ce}function Mh(ie,ce,Te,Me,Fe){var it=_n(ie,ce.line);if(it.markedSpans)for(var vt=0;vt<it.markedSpans.length;++vt){var Et=it.markedSpans[vt],Pt=Et.marker,Bt="selectLeft"in Pt?!Pt.selectLeft:Pt.inclusiveLeft,gn="selectRight"in Pt?!Pt.selectRight:Pt.inclusiveRight;if((Et.from==null||(Bt?Et.from<=ce.ch:Et.from<ce.ch))&&(Et.to==null||(gn?Et.to>=ce.ch:Et.to>ce.ch))){if(Fe&&(Sn(Pt,"beforeCursorEnter"),Pt.explicitlyCleared))if(it.markedSpans){--vt;continue}else break;if(!Pt.atomic)continue;if(Te){var Gt=Pt.find(Me<0?1:-1),Tn=void 0;if((Me<0?gn:Bt)&&(Gt=wp(ie,Gt,-Me,Gt&&Gt.line==ce.line?it:null)),Gt&&Gt.line==ce.line&&(Tn=rn(Gt,Te))&&(Me<0?Tn<0:Tn>0))return Mh(ie,Gt,ce,Me,Fe)}var bn=Pt.find(Me<0?-1:1);return(Me<0?Bt:gn)&&(bn=wp(ie,bn,Me,bn.line==ce.line?it:null)),bn?Mh(ie,bn,ce,Me,Fe):null}}return ce}function Dd(ie,ce,Te,Me,Fe){var it=Me||1,vt=Mh(ie,ce,Te,it,Fe)||!Fe&&Mh(ie,ce,Te,it,!0)||Mh(ie,ce,Te,-it,Fe)||!Fe&&Mh(ie,ce,Te,-it,!0);return vt||(ie.cantEdit=!0,Qt(ie.first,0))}function wp(ie,ce,Te,Me){return Te<0&&ce.ch==0?ce.line>ie.first?Bn(ie,Qt(ce.line-1)):null:Te>0&&ce.ch==(Me||_n(ie,ce.line)).text.length?ce.line<ie.first+ie.size-1?Qt(ce.line+1,0):null:new Qt(ce.line,ce.ch+Te)}function da(ie){ie.setSelection(Qt(ie.firstLine(),0),Qt(ie.lastLine()),xt)}function Od(ie,ce,Te){var Me={canceled:!1,from:ce.from,to:ce.to,text:ce.text,origin:ce.origin,cancel:function(){return Me.canceled=!0}};return Te&&(Me.update=function(Fe,it,vt,Et){Fe&&(Me.from=Bn(ie,Fe)),it&&(Me.to=Bn(ie,it)),vt&&(Me.text=vt),Et!==void 0&&(Me.origin=Et)}),Sn(ie,"beforeChange",ie,Me),ie.cm&&Sn(ie.cm,"beforeChange",ie.cm,Me),Me.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:Me.from,to:Me.to,text:Me.text,origin:Me.origin}}function Zh(ie,ce,Te){if(ie.cm){if(!ie.cm.curOp)return Wi(ie.cm,Zh)(ie,ce,Te);if(ie.cm.state.suppressEdits)return}if(!((vn(ie,"beforeChange")||ie.cm&&vn(ie.cm,"beforeChange"))&&(ce=Od(ie,ce,!0),!ce))){var Me=Cr&&!Te&&kn(ie,ce.from,ce.to);if(Me)for(var Fe=Me.length-1;Fe>=0;--Fe)wc(ie,{from:Me[Fe].from,to:Me[Fe].to,text:Fe?[""]:ce.text,origin:ce.origin});else wc(ie,ce)}}function wc(ie,ce){if(!(ce.text.length==1&&ce.text[0]==""&&rn(ce.from,ce.to)==0)){var Te=Ys(ie,ce);Sc(ie,ce,Te,ie.cm?ie.cm.curOp.id:NaN),ed(ie,ce,Te,uo(ie,ce));var Me=[];Rs(ie,function(Fe,it){!it&&ct(Me,Fe.history)==-1&&(bp(Fe.history,ce),Me.push(Fe.history)),ed(Fe,ce,null,uo(Fe,ce))})}}function Id(ie,ce,Te){var Me=ie.cm&&ie.cm.state.suppressEdits;if(!(Me&&!Te)){for(var Fe=ie.history,it,vt=ie.sel,Et=ce=="undo"?Fe.done:Fe.undone,Pt=ce=="undo"?Fe.undone:Fe.done,Bt=0;Bt<Et.length&&(it=Et[Bt],!(Te?it.ranges&&!it.equals(ie.sel):!it.ranges));Bt++);if(Bt!=Et.length){for(Fe.lastOrigin=Fe.lastSelOrigin=null;;)if(it=Et.pop(),it.ranges){if(Ds(it,Pt),Te&&!it.equals(ie.sel)){rl(ie,it,{clearRedo:!1});return}vt=it}else if(Me){Et.push(it);return}else break;var gn=[];Ds(vt,Pt),Pt.push({changes:gn,generation:Fe.generation}),Fe.generation=it.generation||++Fe.maxGeneration;for(var Gt=vn(ie,"beforeChange")||ie.cm&&vn(ie.cm,"beforeChange"),Tn=function(wi){var Oi=it.changes[wi];if(Oi.origin=ce,Gt&&!Od(ie,Oi,!1))return Et.length=0,{};gn.push(ia(ie,Oi));var er=wi?Ys(ie,Oi):Ft(Et);ed(ie,Oi,er,Yl(ie,Oi)),!wi&&ie.cm&&ie.cm.scrollIntoView({from:Oi.from,to:Zr(Oi)});var br=[];Rs(ie,function(hr,Ir){!Ir&&ct(br,hr.history)==-1&&(bp(hr.history,Oi),br.push(hr.history)),ed(hr,Oi,null,Yl(hr,Oi))})},bn=it.changes.length-1;bn>=0;--bn){var fi=Tn(bn);if(fi)return fi.v}}}}function _p(ie,ce){if(ce!=0&&(ie.first+=ce,ie.sel=new Co(Yt(ie.sel.ranges,function(Fe){return new Or(Qt(Fe.anchor.line+ce,Fe.anchor.ch),Qt(Fe.head.line+ce,Fe.head.ch))}),ie.sel.primIndex),ie.cm)){gs(ie.cm,ie.first,ie.first-ce,ce);for(var Te=ie.cm.display,Me=Te.viewFrom;Me<Te.viewTo;Me++)$r(ie.cm,Me,"gutter")}}function ed(ie,ce,Te,Me){if(ie.cm&&!ie.cm.curOp)return Wi(ie.cm,ed)(ie,ce,Te,Me);if(ce.to.line<ie.first){_p(ie,ce.text.length-1-(ce.to.line-ce.from.line));return}if(!(ce.from.line>ie.lastLine())){if(ce.from.line<ie.first){var Fe=ce.text.length-1-(ie.first-ce.from.line);_p(ie,Fe),ce={from:Qt(ie.first,0),to:Qt(ce.to.line+Fe,ce.to.ch),text:[Ft(ce.text)],origin:ce.origin}}var it=ie.lastLine();ce.to.line>it&&(ce={from:ce.from,to:Qt(it,_n(ie,it).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=Kt(ie,ce.from,ce.to),Te||(Te=Ys(ie,ce)),ie.cm?Kg(ie.cm,ce,Me):Qo(ie,ce,Me),xc(ie,Te,xt),ie.cantEdit&&Dd(ie,Qt(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function Kg(ie,ce,Te){var Me=ie.doc,Fe=ie.display,it=ce.from,vt=ce.to,Et=!1,Pt=it.line;ie.options.lineWrapping||(Pt=kt(ti(_n(Me,it.line))),Me.iter(Pt,vt.line+1,function(bn){if(bn==Fe.maxLine)return Et=!0,!0})),Me.sel.contains(ce.from,ce.to)>-1&&Zn(ie),Qo(Me,ce,Te,ps(ie)),ie.options.lineWrapping||(Me.iter(Pt,it.line+ce.text.length,function(bn){var fi=xr(bn);fi>Fe.maxLineLength&&(Fe.maxLine=bn,Fe.maxLineLength=fi,Fe.maxLineChanged=!0,Et=!1)}),Et&&(ie.curOp.updateMaxLine=!0)),vr(Me,it.line),xi(ie,400);var Bt=ce.text.length-(vt.line-it.line)-1;ce.full?gs(ie):it.line==vt.line&&ce.text.length==1&&!So(ie.doc,ce)?$r(ie,it.line,"text"):gs(ie,it.line,vt.line+1,Bt);var gn=vn(ie,"changes"),Gt=vn(ie,"change");if(Gt||gn){var Tn={from:it,to:vt,text:ce.text,removed:ce.removed,origin:ce.origin};Gt&&Qi(ie,"change",ie,Tn),gn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(Tn)}ie.display.selForContextMenu=null}function _c(ie,ce,Te,Me,Fe){var it;Me||(Me=Te),rn(Me,Te)<0&&(it=[Me,Te],Te=it[0],Me=it[1]),typeof ce=="string"&&(ce=ie.splitLines(ce)),Zh(ie,{from:Te,to:Me,text:ce,origin:Fe})}function uu(ie,ce,Te,Me){Te<ie.line?ie.line+=Me:ce<ie.line&&(ie.line=ce,ie.ch=0)}function Yg(ie,ce,Te,Me){for(var Fe=0;Fe<ie.length;++Fe){var it=ie[Fe],vt=!0;if(it.ranges){it.copied||(it=ie[Fe]=it.deepCopy(),it.copied=!0);for(var Et=0;Et<it.ranges.length;Et++)uu(it.ranges[Et].anchor,ce,Te,Me),uu(it.ranges[Et].head,ce,Te,Me);continue}for(var Pt=0;Pt<it.changes.length;++Pt){var Bt=it.changes[Pt];if(Te<Bt.from.line)Bt.from=Qt(Bt.from.line+Me,Bt.from.ch),Bt.to=Qt(Bt.to.line+Me,Bt.to.ch);else if(ce<=Bt.to.line){vt=!1;break}}vt||(ie.splice(0,Fe+1),Fe=0)}}function bp(ie,ce){var Te=ce.from.line,Me=ce.to.line,Fe=ce.text.length-(Me-Te)-1;Yg(ie.done,Te,Me,Fe),Yg(ie.undone,Te,Me,Fe)}function bc(ie,ce,Te,Me){var Fe=ce,it=ce;return typeof ce=="number"?it=_n(ie,Gn(ie,ce)):Fe=kt(ce),Fe==null?null:(Me(it,Fe)&&ie.cm&&$r(ie.cm,Fe,Te),it)}function td(ie){this.lines=ie,this.parent=null;for(var ce=0,Te=0;Te<ie.length;++Te)ie[Te].parent=this,ce+=ie[Te].height;this.height=ce}td.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ce){for(var Te=ie,Me=ie+ce;Te<Me;++Te){var Fe=this.lines[Te];this.height-=Fe.height,Lr(Fe),Qi(Fe,"delete")}this.lines.splice(ie,ce)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ce,Te){this.height+=Te,this.lines=this.lines.slice(0,ie).concat(ce).concat(this.lines.slice(ie));for(var Me=0;Me<ce.length;++Me)ce[Me].parent=this},iterN:function(ie,ce,Te){for(var Me=ie+ce;ie<Me;++ie)if(Te(this.lines[ie]))return!0}};function Xs(ie){this.children=ie;for(var ce=0,Te=0,Me=0;Me<ie.length;++Me){var Fe=ie[Me];ce+=Fe.chunkSize(),Te+=Fe.height,Fe.parent=this}this.size=ce,this.height=Te,this.parent=null}Xs.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ce){this.size-=ce;for(var Te=0;Te<this.children.length;++Te){var Me=this.children[Te],Fe=Me.chunkSize();if(ie<Fe){var it=Math.min(ce,Fe-ie),vt=Me.height;if(Me.removeInner(ie,it),this.height-=vt-Me.height,Fe==it&&(this.children.splice(Te--,1),Me.parent=null),(ce-=it)==0)break;ie=0}else ie-=Fe}if(this.size-ce<25&&(this.children.length>1||!(this.children[0]instanceof td))){var Et=[];this.collapse(Et),this.children=[new td(Et)],this.children[0].parent=this}},collapse:function(ie){for(var ce=0;ce<this.children.length;++ce)this.children[ce].collapse(ie)},insertInner:function(ie,ce,Te){this.size+=ce.length,this.height+=Te;for(var Me=0;Me<this.children.length;++Me){var Fe=this.children[Me],it=Fe.chunkSize();if(ie<=it){if(Fe.insertInner(ie,ce,Te),Fe.lines&&Fe.lines.length>50){for(var vt=Fe.lines.length%25+25,Et=vt;Et<Fe.lines.length;){var Pt=new td(Fe.lines.slice(Et,Et+=25));Fe.height-=Pt.height,this.children.splice(++Me,0,Pt),Pt.parent=this}Fe.lines=Fe.lines.slice(0,vt),this.maybeSpill()}break}ie-=it}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ce=ie.children.splice(ie.children.length-5,5),Te=new Xs(ce);if(ie.parent){ie.size-=Te.size,ie.height-=Te.height;var Fe=ct(ie.parent.children,ie);ie.parent.children.splice(Fe+1,0,Te)}else{var Me=new Xs(ie.children);Me.parent=ie,ie.children=[Me,Te],ie=Me}Te.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ce,Te){for(var Me=0;Me<this.children.length;++Me){var Fe=this.children[Me],it=Fe.chunkSize();if(ie<it){var vt=Math.min(ce,it-ie);if(Fe.iterN(ie,vt,Te))return!0;if((ce-=vt)==0)break;ie=0}else ie-=it}}};var kh=function(ie,ce,Te){if(Te)for(var Me in Te)Te.hasOwnProperty(Me)&&(this[Me]=Te[Me]);this.doc=ie,this.node=ce};kh.prototype.clear=function(){var ie=this.doc.cm,ce=this.line.widgets,Te=this.line,Me=kt(Te);if(!(Me==null||!ce)){for(var Fe=0;Fe<ce.length;++Fe)ce[Fe]==this&&ce.splice(Fe--,1);ce.length||(Te.widgets=null);var it=xs(this);Hn(Te,Math.max(0,Te.height-it)),ie&&(Jt(ie,function(){Xg(ie,Te,-it),$r(ie,Me,"widget")}),Qi(ie,"lineWidgetCleared",ie,this,Me))}},kh.prototype.changed=function(){var ie=this,ce=this.height,Te=this.doc.cm,Me=this.line;this.height=null;var Fe=xs(this)-ce;Fe&&(Cn(this.doc,Me)||Hn(Me,Me.height+Fe),Te&&Jt(Te,function(){Te.curOp.forceUpdate=!0,Xg(Te,Me,Fe),Qi(Te,"lineWidgetChanged",Te,ie,kt(Me))}))},Wn(kh);function Xg(ie,ce,Te){Ui(ce)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Ph(ie,Te)}function yf(ie,ce,Te,Me){var Fe=new kh(ie,Te,Me),it=ie.cm;return it&&Fe.noHScroll&&(it.display.alignWidgets=!0),bc(ie,ce,"widget",function(vt){var Et=vt.widgets||(vt.widgets=[]);if(Fe.insertAt==null?Et.push(Fe):Et.splice(Math.min(Et.length-1,Math.max(0,Fe.insertAt)),0,Fe),Fe.line=vt,it&&!Cn(ie,vt)){var Pt=Ui(vt)<ie.scrollTop;Hn(vt,vt.height+xs(Fe)),Pt&&Ph(it,Fe.height),it.curOp.forceUpdate=!0}return!0}),it&&Qi(it,"lineWidgetAdded",it,Fe,typeof ce=="number"?ce:kt(ce)),Fe}var Jg=0,en=function(ie,ce){this.lines=[],this.type=ce,this.doc=ie,this.id=++Jg};en.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ce=ie&&!ie.curOp;if(ce&&Ka(ie),vn(this,"clear")){var Te=this.find();Te&&Qi(this,"clear",Te.from,Te.to)}for(var Me=null,Fe=null,it=0;it<this.lines.length;++it){var vt=this.lines[it],Et=zi(vt.markedSpans,this);ie&&!this.collapsed?$r(ie,kt(vt),"text"):ie&&(Et.to!=null&&(Fe=kt(vt)),Et.from!=null&&(Me=kt(vt))),vt.markedSpans=Xi(vt.markedSpans,Et),Et.from==null&&this.collapsed&&!Cn(this.doc,vt)&&ie&&Hn(vt,cl(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var Pt=0;Pt<this.lines.length;++Pt){var Bt=ti(this.lines[Pt]),gn=xr(Bt);gn>ie.display.maxLineLength&&(ie.display.maxLine=Bt,ie.display.maxLineLength=gn,ie.display.maxLineChanged=!0)}Me!=null&&ie&&this.collapsed&&gs(ie,Me,Fe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&Ad(ie.doc)),ie&&Qi(ie,"markerCleared",ie,this,Me,Fe),ce&&Vl(ie),this.parent&&this.parent.clear()}},en.prototype.find=function(ie,ce){ie==null&&this.type=="bookmark"&&(ie=1);for(var Te,Me,Fe=0;Fe<this.lines.length;++Fe){var it=this.lines[Fe],vt=zi(it.markedSpans,this);if(vt.from!=null&&(Te=Qt(ce?it:kt(it),vt.from),ie==-1))return Te;if(vt.to!=null&&(Me=Qt(ce?it:kt(it),vt.to),ie==1))return Me}return Te&&{from:Te,to:Me}},en.prototype.changed=function(){var ie=this,ce=this.find(-1,!0),Te=this,Me=this.doc.cm;!ce||!Me||Jt(Me,function(){var Fe=ce.line,it=kt(ce.line),vt=wu(Me,it);if(vt&&(th(vt),Me.curOp.selectionChanged=Me.curOp.forceUpdate=!0),Me.curOp.updateMaxLine=!0,!Cn(Te.doc,Fe)&&Te.height!=null){var Et=Te.height;Te.height=null;var Pt=xs(Te)-Et;Pt&&Hn(Fe,Fe.height+Pt)}Qi(Me,"markerChanged",Me,ie)})},en.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||ct(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},en.prototype.detachLine=function(ie){if(this.lines.splice(ct(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},Wn(en);function Pc(ie,ce,Te,Me,Fe){if(Me&&Me.shared)return qg(ie,ce,Te,Me,Fe);if(ie.cm&&!ie.cm.curOp)return Wi(ie.cm,Pc)(ie,ce,Te,Me,Fe);var it=new en(ie,Fe),vt=rn(ce,Te);if(Me&&Dt(Me,it,!1),vt>0||vt==0&&it.clearWhenEmpty!==!1)return it;if(it.replacedWith&&(it.collapsed=!0,it.widgetNode=qe("span",[it.replacedWith],"CodeMirror-widget"),Me.handleMouseEvents||it.widgetNode.setAttribute("cm-ignore-events","true"),Me.insertLeft&&(it.widgetNode.insertLeft=!0)),it.collapsed){if(qn(ie,ce.line,ce,Te,it)||ce.line!=Te.line&&qn(ie,Te.line,ce,Te,it))throw new Error("Inserting collapsed marker partially overlapping an existing one");Mn()}it.addToHistory&&Sc(ie,{from:ce,to:Te,origin:"markText"},ie.sel,NaN);var Et=ce.line,Pt=ie.cm,Bt;if(ie.iter(Et,Te.line+1,function(Gt){Pt&&it.collapsed&&!Pt.options.lineWrapping&&ti(Gt)==Pt.display.maxLine&&(Bt=!0),it.collapsed&&Et!=ce.line&&Hn(Gt,0),lo(Gt,new Ai(it,Et==ce.line?ce.ch:null,Et==Te.line?Te.ch:null)),++Et}),it.collapsed&&ie.iter(ce.line,Te.line+1,function(Gt){Cn(ie,Gt)&&Hn(Gt,0)}),it.clearOnEnter&&Rt(it,"beforeCursorEnter",function(){return it.clear()}),it.readOnly&&(Yr(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),it.collapsed&&(it.id=++Jg,it.atomic=!0),Pt){if(Bt&&(Pt.curOp.updateMaxLine=!0),it.collapsed)gs(Pt,ce.line,Te.line+1);else if(it.className||it.startStyle||it.endStyle||it.css||it.attributes||it.title)for(var gn=ce.line;gn<=Te.line;gn++)$r(Pt,gn,"text");it.atomic&&Ad(Pt.doc),Qi(Pt,"markerAdded",Pt,it)}return it}var ah=function(ie,ce){this.markers=ie,this.primary=ce;for(var Te=0;Te<ie.length;++Te)ie[Te].parent=this};ah.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();Qi(this,"clear")}},ah.prototype.find=function(ie,ce){return this.primary.find(ie,ce)},Wn(ah);function qg(ie,ce,Te,Me,Fe){Me=Dt(Me),Me.shared=!1;var it=[Pc(ie,ce,Te,Me,Fe)],vt=it[0],Et=Me.widgetNode;return Rs(ie,function(Pt){Et&&(Me.widgetNode=Et.cloneNode(!0)),it.push(Pc(Pt,Bn(Pt,ce),Bn(Pt,Te),Me,Fe));for(var Bt=0;Bt<Pt.linked.length;++Bt)if(Pt.linked[Bt].isParent)return;vt=Ft(it)}),new ah(it,vt)}function Pp(ie){return ie.findMarks(Qt(ie.first,0),ie.clipPos(Qt(ie.lastLine())),function(ce){return ce.parent})}function Qg(ie,ce){for(var Te=0;Te<ce.length;Te++){var Me=ce[Te],Fe=Me.find(),it=ie.clipPos(Fe.from),vt=ie.clipPos(Fe.to);if(rn(it,vt)){var Et=Pc(ie,it,vt,Me.primary,Me.primary.type);Me.markers.push(Et),Et.parent=Me}}}function Cp(ie){for(var ce=function(Me){var Fe=ie[Me],it=[Fe.primary.doc];Rs(Fe.primary.doc,function(Pt){return it.push(Pt)});for(var vt=0;vt<Fe.markers.length;vt++){var Et=Fe.markers[vt];ct(it,Et.doc)==-1&&(Et.parent=null,Fe.markers.splice(vt--,1))}},Te=0;Te<ie.length;Te++)ce(Te)}var tv=0,Ya=function(ie,ce,Te,Me,Fe){if(!(this instanceof Ya))return new Ya(ie,ce,Te,Me,Fe);Te==null&&(Te=0),Xs.call(this,[new td([new Er("",null)])]),this.first=Te,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Te;var it=Qt(Te,0);this.sel=Uo(it),this.history=new dl(null),this.id=++tv,this.modeOption=ce,this.lineSep=Me,this.direction=Fe=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Qo(this,{from:it,to:it,text:ie}),rl(this,Uo(it),xt)};Ya.prototype=Ue(Xs.prototype,{constructor:Ya,iter:function(ie,ce,Te){Te?this.iterN(ie-this.first,ce-ie,Te):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ce){for(var Te=0,Me=0;Me<ce.length;++Me)Te+=ce[Me].height;this.insertInner(ie-this.first,ce,Te)},remove:function(ie,ce){this.removeInner(ie-this.first,ce)},getValue:function(ie){var ce=qt(this,this.first,this.first+this.size);return ie===!1?ce:ce.join(ie||this.lineSeparator())},setValue:hi(function(ie){var ce=Qt(this.first,0),Te=this.first+this.size-1;Zh(this,{from:ce,to:Qt(Te,_n(this,Te).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&Kr(this.cm,0,0),rl(this,Uo(ce),xt)}),replaceRange:function(ie,ce,Te,Me){ce=Bn(this,ce),Te=Te?Bn(this,Te):ce,_c(this,ie,ce,Te,Me)},getRange:function(ie,ce,Te){var Me=Kt(this,Bn(this,ie),Bn(this,ce));return Te===!1?Me:Me.join(Te||this.lineSeparator())},getLine:function(ie){var ce=this.getLineHandle(ie);return ce&&ce.text},getLineHandle:function(ie){if(An(this,ie))return _n(this,ie)},getLineNumber:function(ie){return kt(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=_n(this,ie)),ti(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Bn(this,ie)},getCursor:function(ie){var ce=this.sel.primary(),Te;return ie==null||ie=="head"?Te=ce.head:ie=="anchor"?Te=ce.anchor:ie=="end"||ie=="to"||ie===!1?Te=ce.to():Te=ce.from(),Te},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:hi(function(ie,ce,Te){lu(this,Bn(this,typeof ie=="number"?Qt(ie,ce||0):ie),null,Te)}),setSelection:hi(function(ie,ce,Te){lu(this,Bn(this,ie),Bn(this,ce||ie),Te)}),extendSelection:hi(function(ie,ce,Te){Lh(this,Bn(this,ie),ce&&Bn(this,ce),Te)}),extendSelections:hi(function(ie,ce){oh(this,Ei(this,ie),ce)}),extendSelectionsBy:hi(function(ie,ce){var Te=Yt(this.sel.ranges,ie);oh(this,Ei(this,Te),ce)}),setSelections:hi(function(ie,ce,Te){if(ie.length){for(var Me=[],Fe=0;Fe<ie.length;Fe++)Me[Fe]=new Or(Bn(this,ie[Fe].anchor),Bn(this,ie[Fe].head));ce==null&&(ce=Math.min(ie.length-1,this.sel.primIndex)),rl(this,Jr(this.cm,Me,ce),Te)}}),addSelection:hi(function(ie,ce,Te){var Me=this.sel.ranges.slice(0);Me.push(new Or(Bn(this,ie),Bn(this,ce||ie))),rl(this,Jr(this.cm,Me,Me.length-1),Te)}),getSelection:function(ie){for(var ce=this.sel.ranges,Te,Me=0;Me<ce.length;Me++){var Fe=Kt(this,ce[Me].from(),ce[Me].to());Te=Te?Te.concat(Fe):Fe}return ie===!1?Te:Te.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ce=[],Te=this.sel.ranges,Me=0;Me<Te.length;Me++){var Fe=Kt(this,Te[Me].from(),Te[Me].to());ie!==!1&&(Fe=Fe.join(ie||this.lineSeparator())),ce[Me]=Fe}return ce},replaceSelection:function(ie,ce,Te){for(var Me=[],Fe=0;Fe<this.sel.ranges.length;Fe++)Me[Fe]=ie;this.replaceSelections(Me,ce,Te||"+input")},replaceSelections:hi(function(ie,ce,Te){for(var Me=[],Fe=this.sel,it=0;it<Fe.ranges.length;it++){var vt=Fe.ranges[it];Me[it]={from:vt.from(),to:vt.to(),text:this.splitLines(ie[it]),origin:Te}}for(var Et=ce&&ce!="end"&&Lu(this,Me,ce),Pt=Me.length-1;Pt>=0;Pt--)Zh(this,Me[Pt]);Et?vf(this,Et):this.cm&&Wl(this.cm)}),undo:hi(function(){Id(this,"undo")}),redo:hi(function(){Id(this,"redo")}),undoSelection:hi(function(){Id(this,"undo",!0)}),redoSelection:hi(function(){Id(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ce=0,Te=0,Me=0;Me<ie.done.length;Me++)ie.done[Me].ranges||++ce;for(var Fe=0;Fe<ie.undone.length;Fe++)ie.undone[Fe].ranges||++Te;return{undo:ce,redo:Te}},clearHistory:function(){var ie=this;this.history=new dl(this.history.maxGeneration),Rs(this,function(ce){return ce.history=ie.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(ie){return ie&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(ie){return this.history.generation==(ie||this.cleanGeneration)},getHistory:function(){return{done:_l(this.history.done),undone:_l(this.history.undone)}},setHistory:function(ie){var ce=this.history=new dl(this.history.maxGeneration);ce.done=_l(ie.done.slice(0),null,!0),ce.undone=_l(ie.undone.slice(0),null,!0)},setGutterMarker:hi(function(ie,ce,Te){return bc(this,ie,"gutter",function(Me){var Fe=Me.gutterMarkers||(Me.gutterMarkers={});return Fe[ce]=Te,!Te&&tt(Fe)&&(Me.gutterMarkers=null),!0})}),clearGutter:hi(function(ie){var ce=this;this.iter(function(Te){Te.gutterMarkers&&Te.gutterMarkers[ie]&&bc(ce,Te,"gutter",function(){return Te.gutterMarkers[ie]=null,tt(Te.gutterMarkers)&&(Te.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ce;if(typeof ie=="number"){if(!An(this,ie)||(ce=ie,ie=_n(this,ie),!ie))return null}else if(ce=kt(ie),ce==null)return null;return{line:ce,handle:ie,text:ie.text,gutterMarkers:ie.gutterMarkers,textClass:ie.textClass,bgClass:ie.bgClass,wrapClass:ie.wrapClass,widgets:ie.widgets}},addLineClass:hi(function(ie,ce,Te){return bc(this,ie,ce=="gutter"?"gutter":"class",function(Me){var Fe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass";if(!Me[Fe])Me[Fe]=Te;else{if(Pe(Te).test(Me[Fe]))return!1;Me[Fe]+=" "+Te}return!0})}),removeLineClass:hi(function(ie,ce,Te){return bc(this,ie,ce=="gutter"?"gutter":"class",function(Me){var Fe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass",it=Me[Fe];if(it)if(Te==null)Me[Fe]=null;else{var vt=it.match(Pe(Te));if(!vt)return!1;var Et=vt.index+vt[0].length;Me[Fe]=it.slice(0,vt.index)+(!vt.index||Et==it.length?"":" ")+it.slice(Et)||null}else return!1;return!0})}),addLineWidget:hi(function(ie,ce,Te){return yf(this,ie,ce,Te)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ce,Te){return Pc(this,Bn(this,ie),Bn(this,ce),Te,Te&&Te.type||"range")},setBookmark:function(ie,ce){var Te={replacedWith:ce&&(ce.nodeType==null?ce.widget:ce),insertLeft:ce&&ce.insertLeft,clearWhenEmpty:!1,shared:ce&&ce.shared,handleMouseEvents:ce&&ce.handleMouseEvents};return ie=Bn(this,ie),Pc(this,ie,ie,Te,"bookmark")},findMarksAt:function(ie){ie=Bn(this,ie);var ce=[],Te=_n(this,ie.line).markedSpans;if(Te)for(var Me=0;Me<Te.length;++Me){var Fe=Te[Me];(Fe.from==null||Fe.from<=ie.ch)&&(Fe.to==null||Fe.to>=ie.ch)&&ce.push(Fe.marker.parent||Fe.marker)}return ce},findMarks:function(ie,ce,Te){ie=Bn(this,ie),ce=Bn(this,ce);var Me=[],Fe=ie.line;return this.iter(ie.line,ce.line+1,function(it){var vt=it.markedSpans;if(vt)for(var Et=0;Et<vt.length;Et++){var Pt=vt[Et];!(Pt.to!=null&&Fe==ie.line&&ie.ch>=Pt.to||Pt.from==null&&Fe!=ie.line||Pt.from!=null&&Fe==ce.line&&Pt.from>=ce.ch)&&(!Te||Te(Pt.marker))&&Me.push(Pt.marker.parent||Pt.marker)}++Fe}),Me},getAllMarks:function(){var ie=[];return this.iter(function(ce){var Te=ce.markedSpans;if(Te)for(var Me=0;Me<Te.length;++Me)Te[Me].from!=null&&ie.push(Te[Me].marker)}),ie},posFromIndex:function(ie){var ce,Te=this.first,Me=this.lineSeparator().length;return this.iter(function(Fe){var it=Fe.text.length+Me;if(it>ie)return ce=ie,!0;ie-=it,++Te}),Bn(this,Qt(Te,ce))},indexFromPos:function(ie){ie=Bn(this,ie);var ce=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var Te=this.lineSeparator().length;return this.iter(this.first,ie.line,function(Me){ce+=Me.text.length+Te}),ce},copy:function(ie){var ce=new Ya(qt(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,ie&&(ce.history.undoDepth=this.history.undoDepth,ce.setHistory(this.getHistory())),ce},linkedDoc:function(ie){ie||(ie={});var ce=this.first,Te=this.first+this.size;ie.from!=null&&ie.from>ce&&(ce=ie.from),ie.to!=null&&ie.to<Te&&(Te=ie.to);var Me=new Ya(qt(this,ce,Te),ie.mode||this.modeOption,ce,this.lineSep,this.direction);return ie.sharedHist&&(Me.history=this.history),(this.linked||(this.linked=[])).push({doc:Me,sharedHist:ie.sharedHist}),Me.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],Qg(Me,Pp(this)),Me},unlinkDoc:function(ie){if(ie instanceof is&&(ie=ie.doc),this.linked)for(var ce=0;ce<this.linked.length;++ce){var Te=this.linked[ce];if(Te.doc==ie){this.linked.splice(ce,1),ie.unlinkDoc(this),Cp(Pp(this));break}}if(ie.history==this.history){var Me=[ie.id];Rs(ie,function(Fe){return Me.push(Fe.id)},!0),ie.history=new dl(null),ie.history.done=_l(this.history.done,Me),ie.history.undone=_l(this.history.undone,Me)}},iterLinkedDocs:function(ie){Rs(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):sr(ie)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:hi(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ce){return ce.order=null}),this.cm&&$c(this.cm))})}),Ya.prototype.eachLine=Ya.prototype.iter;var Rd=0;function Ep(ie){var ce=this;if(tm(ce),!(dn(ce,ie)||fs(ce.display,ie))){ri(ie),Ce&&(Rd=+new Date);var Te=va(ce,ie,!0),Me=ie.dataTransfer.files;if(!(!Te||ce.isReadOnly()))if(Me&&Me.length&&window.FileReader&&window.File)for(var Fe=Me.length,it=Array(Fe),vt=0,Et=function(){++vt==Fe&&Wi(ce,function(){Te=Bn(ce.doc,Te);var bn={from:Te,to:Te,text:ce.doc.splitLines(it.filter(function(fi){return fi!=null}).join(ce.doc.lineSeparator())),origin:"paste"};Zh(ce.doc,bn),vf(ce.doc,Uo(Bn(ce.doc,Te),Bn(ce.doc,Zr(bn))))})()},Pt=function(bn,fi){if(ce.options.allowDropFileTypes&&ct(ce.options.allowDropFileTypes,bn.type)==-1){Et();return}var wi=new FileReader;wi.onerror=function(){return Et()},wi.onload=function(){var Oi=wi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Oi)){Et();return}it[fi]=Oi,Et()},wi.readAsText(bn)},Bt=0;Bt<Me.length;Bt++)Pt(Me[Bt],Bt);else{if(ce.state.draggingText&&ce.doc.sel.contains(Te)>-1){ce.state.draggingText(ie),setTimeout(function(){return ce.display.input.focus()},20);return}try{var gn=ie.dataTransfer.getData("Text");if(gn){var Gt;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(Gt=ce.listSelections()),xc(ce.doc,Uo(Te,Te)),Gt)for(var Tn=0;Tn<Gt.length;++Tn)_c(ce.doc,"",Gt[Tn].anchor,Gt[Tn].head,"drag");ce.replaceSelection(gn,"around","paste"),ce.display.input.focus()}}catch(bn){}}}}function $g(ie,ce){if(Ce&&(!ie.state.draggingText||+new Date-Rd<100)){ki(ce);return}if(!(dn(ie,ce)||fs(ie.display,ce))&&(ce.dataTransfer.setData("Text",ie.getSelection()),ce.dataTransfer.effectAllowed="copyMove",ce.dataTransfer.setDragImage&&!de)){var Te=Ze("img",null,null,"position: fixed; left: 0; top: 0;");Te.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",pe&&(Te.width=Te.height=1,ie.display.wrapper.appendChild(Te),Te._top=Te.offsetTop),ce.dataTransfer.setDragImage(Te,0,0),pe&&Te.parentNode.removeChild(Te)}}function em(ie,ce){var Te=va(ie,ce);if(Te){var Me=document.createDocumentFragment();Io(ie,Te,Me),ie.display.dragCursor||(ie.display.dragCursor=Ze("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),Ie(ie.display.dragCursor,Me)}}function tm(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function nm(ie){if(document.getElementsByClassName){for(var ce=document.getElementsByClassName("CodeMirror"),Te=[],Me=0;Me<ce.length;Me++){var Fe=ce[Me].CodeMirror;Fe&&Te.push(Fe)}Te.length&&Te[0].operation(function(){for(var it=0;it<Te.length;it++)ie(Te[it])})}}var Lp=!1;function Xl(){Lp||(nd(),Lp=!0)}function nd(){var ie;Rt(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,nm(Mp)},100))}),Rt(window,"blur",function(){return nm(nh)})}function Mp(ie){var ce=ie.display;ce.cachedCharWidth=ce.cachedTextHeight=ce.cachedPaddingH=null,ce.scrollbarsClipped=!1,ie.setSize()}for(var lh={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"},Fd=0;Fd<10;Fd++)lh[Fd+48]=lh[Fd+96]=String(Fd);for(var Sf=65;Sf<=90;Sf++)lh[Sf]=String.fromCharCode(Sf);for(var Bd=1;Bd<=12;Bd++)lh[Bd+111]=lh[Bd+63235]="F"+Bd;var Al={};Al.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"},Al.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"},Al.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"},Al.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"]},Al.default=oe?Al.macDefault:Al.pcDefault;function kp(ie){var ce=ie.split(/-(?!$)/);ie=ce[ce.length-1];for(var Te,Me,Fe,it,vt=0;vt<ce.length-1;vt++){var Et=ce[vt];if(/^(cmd|meta|m)$/i.test(Et))it=!0;else if(/^a(lt)?$/i.test(Et))Te=!0;else if(/^(c|ctrl|control)$/i.test(Et))Me=!0;else if(/^s(hift)?$/i.test(Et))Fe=!0;else throw new Error("Unrecognized modifier name: "+Et)}return Te&&(ie="Alt-"+ie),Me&&(ie="Ctrl-"+ie),it&&(ie="Cmd-"+ie),Fe&&(ie="Shift-"+ie),ie}function Tp(ie){var ce={};for(var Te in ie)if(ie.hasOwnProperty(Te)){var Me=ie[Te];if(/^(name|fallthrough|(de|at)tach)$/.test(Te))continue;if(Me=="..."){delete ie[Te];continue}for(var Fe=Yt(Te.split(" "),kp),it=0;it<Fe.length;it++){var vt=void 0,Et=void 0;it==Fe.length-1?(Et=Fe.join(" "),vt=Me):(Et=Fe.slice(0,it+1).join(" "),vt="...");var Pt=ce[Et];if(!Pt)ce[Et]=vt;else if(Pt!=vt)throw new Error("Inconsistent bindings for "+Et)}delete ie[Te]}for(var Bt in ce)ie[Bt]=ce[Bt];return ie}function hu(ie,ce,Te,Me){ce=Cc(ce);var Fe=ce.call?ce.call(ie,Me):ce[ie];if(Fe===!1)return"nothing";if(Fe==="...")return"multi";if(Fe!=null&&Te(Fe))return"handled";if(ce.fallthrough){if(Object.prototype.toString.call(ce.fallthrough)!="[object Array]")return hu(ie,ce.fallthrough,Te,Me);for(var it=0;it<ce.fallthrough.length;it++){var vt=hu(ie,ce.fallthrough[it],Te,Me);if(vt)return vt}}}function id(ie){var ce=typeof ie=="string"?ie:lh[ie.keyCode];return ce=="Ctrl"||ce=="Alt"||ce=="Shift"||ce=="Mod"}function Ap(ie,ce,Te){var Me=ie;return ce.altKey&&Me!="Alt"&&(ie="Alt-"+ie),(me?ce.metaKey:ce.ctrlKey)&&Me!="Ctrl"&&(ie="Ctrl-"+ie),(me?ce.ctrlKey:ce.metaKey)&&Me!="Mod"&&(ie="Cmd-"+ie),!Te&&ce.shiftKey&&Me!="Shift"&&(ie="Shift-"+ie),ie}function im(ie,ce){if(pe&&ie.keyCode==34&&ie.char)return!1;var Te=lh[ie.keyCode];return Te==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(Te=ie.code),Ap(Te,ie,ce))}function Cc(ie){return typeof ie=="string"?Al[ie]:ie}function Nl(ie,ce){for(var Te=ie.doc.sel.ranges,Me=[],Fe=0;Fe<Te.length;Fe++){for(var it=ce(Te[Fe]);Me.length&&rn(it.from,Ft(Me).to)<=0;){var vt=Me.pop();if(rn(vt.from,it.from)<0){it.from=vt.from;break}}Me.push(it)}Jt(ie,function(){for(var Et=Me.length-1;Et>=0;Et--)_c(ie.doc,"",Me[Et].from,Me[Et].to,"+delete");Wl(ie)})}function Np(ie,ce,Te){var Me=ze(ie.text,ce+Te,Te);return Me<0||Me>ie.text.length?null:Me}function fa(ie,ce,Te){var Me=Np(ie,ce.ch,Te);return Me==null?null:new Qt(ce.line,Me,Te<0?"after":"before")}function jd(ie,ce,Te,Me,Fe){if(ie){ce.doc.direction=="rtl"&&(Fe=-Fe);var it=on(Te,ce.doc.direction);if(it){var vt=Fe<0?Ft(it):it[0],Et=Fe<0==(vt.level==1),Pt=Et?"after":"before",Bt;if(vt.level>0||ce.doc.direction=="rtl"){var gn=Tl(ce,Te);Bt=Fe<0?Te.text.length-1:0;var Gt=nl(ce,gn,Bt).top;Bt=$e(function(Tn){return nl(ce,gn,Tn).top==Gt},Fe<0==(vt.level==1)?vt.from:vt.to-1,Bt),Pt=="before"&&(Bt=Np(Te,Bt,1))}else Bt=Fe<0?vt.to:vt.from;return new Qt(Me,Bt,Pt)}}return new Qt(Me,Fe<0?Te.text.length:0,Fe<0?"before":"after")}function xf(ie,ce,Te,Me){var Fe=on(ce,ie.doc.direction);if(!Fe)return fa(ce,Te,Me);Te.ch>=ce.text.length?(Te.ch=ce.text.length,Te.sticky="before"):Te.ch<=0&&(Te.ch=0,Te.sticky="after");var it=pt(Fe,Te.ch,Te.sticky),vt=Fe[it];if(ie.doc.direction=="ltr"&&vt.level%2==0&&(Me>0?vt.to>Te.ch:vt.from<Te.ch))return fa(ce,Te,Me);var Et=function(er,br){return Np(ce,er instanceof Qt?er.ch:er,br)},Pt,Bt=function(er){return ie.options.lineWrapping?(Pt=Pt||Tl(ie,ce),Za(ie,ce,Pt,er)):{begin:0,end:ce.text.length}},gn=Bt(Te.sticky=="before"?Et(Te,-1):Te.ch);if(ie.doc.direction=="rtl"||vt.level==1){var Gt=vt.level==1==Me<0,Tn=Et(Te,Gt?1:-1);if(Tn!=null&&(Gt?Tn<=vt.to&&Tn<=gn.end:Tn>=vt.from&&Tn>=gn.begin)){var bn=Gt?"before":"after";return new Qt(Te.line,Tn,bn)}}var fi=function(er,br,hr){for(var Ir=function(Fs,Ea){return Ea?new Qt(Te.line,Et(Fs,1),"before"):new Qt(Te.line,Fs,"after")};er>=0&&er<Fe.length;er+=br){var ao=Fe[er],lr=br>0==(ao.level!=1),Bo=lr?hr.begin:Et(hr.end,-1);if(ao.from<=Bo&&Bo<ao.to||(Bo=lr?ao.from:Et(ao.to,-1),hr.begin<=Bo&&Bo<hr.end))return Ir(Bo,lr)}},wi=fi(it+Me,Me,gn);if(wi)return wi;var Oi=Me>0?gn.end:Et(gn.begin,-1);return Oi!=null&&!(Me>0&&Oi==ce.text.length)&&(wi=fi(Me>0?0:Fe.length-1,Me,Bt(Oi)),wi)?wi:null}var Vh={selectAll:da,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),xt)},killLine:function(ie){return Nl(ie,function(ce){if(ce.empty()){var Te=_n(ie.doc,ce.head.line).text.length;return ce.head.ch==Te&&ce.head.line<ie.lastLine()?{from:ce.head,to:Qt(ce.head.line+1,0)}:{from:ce.head,to:Qt(ce.head.line,Te)}}else return{from:ce.from(),to:ce.to()}})},deleteLine:function(ie){return Nl(ie,function(ce){return{from:Qt(ce.from().line,0),to:Bn(ie.doc,Qt(ce.to().line+1,0))}})},delLineLeft:function(ie){return Nl(ie,function(ce){return{from:Qt(ce.from().line,0),to:ce.from()}})},delWrappedLineLeft:function(ie){return Nl(ie,function(ce){var Te=ie.charCoords(ce.head,"div").top+5,Me=ie.coordsChar({left:0,top:Te},"div");return{from:Me,to:ce.from()}})},delWrappedLineRight:function(ie){return Nl(ie,function(ce){var Te=ie.charCoords(ce.head,"div").top+5,Me=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:Te},"div");return{from:ce.from(),to:Me}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(Qt(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(Qt(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ce){return rd(ie,ce.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ce){return Dp(ie,ce.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ce){return od(ie,ce.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ce){var Te=ie.cursorCoords(ce.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:Te},"div")},Ut)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ce){var Te=ie.cursorCoords(ce.head,"div").top+5;return ie.coordsChar({left:0,top:Te},"div")},Ut)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ce){var Te=ie.cursorCoords(ce.head,"div").top+5,Me=ie.coordsChar({left:0,top:Te},"div");return Me.ch<ie.getLine(Me.line).search(/\S/)?Dp(ie,ce.head):Me},Ut)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ce=[],Te=ie.listSelections(),Me=ie.options.tabSize,Fe=0;Fe<Te.length;Fe++){var it=Te[Fe].from(),vt=ut(ie.getLine(it.line),it.ch,Me);ce.push(mn(Me-vt%Me))}ie.replaceSelections(ce)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return Jt(ie,function(){for(var ce=ie.listSelections(),Te=[],Me=0;Me<ce.length;Me++)if(ce[Me].empty()){var Fe=ce[Me].head,it=_n(ie.doc,Fe.line).text;if(it){if(Fe.ch==it.length&&(Fe=new Qt(Fe.line,Fe.ch-1)),Fe.ch>0)Fe=new Qt(Fe.line,Fe.ch+1),ie.replaceRange(it.charAt(Fe.ch-1)+it.charAt(Fe.ch-2),Qt(Fe.line,Fe.ch-2),Fe,"+transpose");else if(Fe.line>ie.doc.first){var vt=_n(ie.doc,Fe.line-1).text;vt&&(Fe=new Qt(Fe.line,1),ie.replaceRange(it.charAt(0)+ie.doc.lineSeparator()+vt.charAt(vt.length-1),Qt(Fe.line-1,vt.length-1),Fe,"+transpose"))}}Te.push(new Or(Fe,Fe))}ie.setSelections(Te)})},newlineAndIndent:function(ie){return Jt(ie,function(){for(var ce=ie.listSelections(),Te=ce.length-1;Te>=0;Te--)ie.replaceRange(ie.doc.lineSeparator(),ce[Te].anchor,ce[Te].head,"+input");ce=ie.listSelections();for(var Me=0;Me<ce.length;Me++)ie.indentLine(ce[Me].from().line,null,!0);Wl(ie)})},openLine:function(ie){return ie.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function rd(ie,ce){var Te=_n(ie.doc,ce),Me=ti(Te);return Me!=Te&&(ce=kt(Me)),jd(!0,ie,Me,ce,1)}function od(ie,ce){var Te=_n(ie.doc,ce),Me=ii(Te);return Me!=Te&&(ce=kt(Me)),jd(!0,ie,Te,ce,-1)}function Dp(ie,ce){var Te=rd(ie,ce.line),Me=_n(ie.doc,Te.line),Fe=on(Me,ie.doc.direction);if(!Fe||Fe[0].level==0){var it=Math.max(Te.ch,Me.text.search(/\S/)),vt=ce.line==Te.line&&ce.ch<=it&&ce.ch;return Qt(Te.line,vt?0:it,Te.sticky)}return Te}function sd(ie,ce,Te){if(typeof ce=="string"&&(ce=Vh[ce],!ce))return!1;ie.display.input.ensurePolled();var Me=ie.display.shift,Fe=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),Te&&(ie.display.shift=!1),Fe=ce(ie)!=wt}finally{ie.display.shift=Me,ie.state.suppressEdits=!1}return Fe}function Op(ie,ce,Te){for(var Me=0;Me<ie.state.keyMaps.length;Me++){var Fe=hu(ce,ie.state.keyMaps[Me],Te,ie);if(Fe)return Fe}return ie.options.extraKeys&&hu(ce,ie.options.extraKeys,Te,ie)||hu(ce,ie.options.keyMap,Te,ie)}var uh=new ot;function Ec(ie,ce,Te,Me){var Fe=ie.state.keySeq;if(Fe){if(id(ce))return"handled";if(/\'$/.test(ce)?ie.state.keySeq=null:uh.set(50,function(){ie.state.keySeq==Fe&&(ie.state.keySeq=null,ie.display.input.reset())}),wf(ie,Fe+" "+ce,Te,Me))return!0}return wf(ie,ce,Te,Me)}function wf(ie,ce,Te,Me){var Fe=Op(ie,ce,Me);return Fe=="multi"&&(ie.state.keySeq=ce),Fe=="handled"&&Qi(ie,"keyHandled",ie,ce,Te),(Fe=="handled"||Fe=="multi")&&(ri(Te),ns(ie)),!!Fe}function _f(ie,ce){var Te=im(ce,!0);return Te?ce.shiftKey&&!ie.state.keySeq?Ec(ie,"Shift-"+Te,ce,function(Me){return sd(ie,Me,!0)})||Ec(ie,Te,ce,function(Me){if(typeof Me=="string"?/^go[A-Z]/.test(Me):Me.motion)return sd(ie,Me)}):Ec(ie,Te,ce,function(Me){return sd(ie,Me)}):!1}function bf(ie,ce,Te){return Ec(ie,"'"+Te+"'",ce,function(Me){return sd(ie,Me,!0)})}var Lc=null;function Ip(ie){var ce=this;if(!(ie.target&&ie.target!=ce.display.input.getField())&&(ce.curOp.focus=gt(),!dn(ce,ie))){Ce&&xe<11&&ie.keyCode==27&&(ie.returnValue=!1);var Te=ie.keyCode;ce.display.shift=Te==16||ie.shiftKey;var Me=_f(ce,ie);pe&&(Lc=Me?Te:null,!Me&&Te==88&&!Ti&&(oe?ie.metaKey:ie.ctrlKey)&&ce.replaceSelection("",null,"cut")),ke&&!oe&&!Me&&Te==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),Te==18&&!/\bCodeMirror-crosshair\b/.test(ce.display.lineDiv.className)&&Rp(ce)}}function Rp(ie){var ce=ie.display.lineDiv;Mt(ce,"CodeMirror-crosshair");function Te(Me){(Me.keyCode==18||!Me.altKey)&&(Ae(ce,"CodeMirror-crosshair"),En(document,"keyup",Te),En(document,"mouseover",Te))}Rt(document,"keyup",Te),Rt(document,"mouseover",Te)}function Fp(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),dn(this,ie)}function Zu(ie){var ce=this;if(!(ie.target&&ie.target!=ce.display.input.getField())&&!(fs(ce.display,ie)||dn(ce,ie)||ie.ctrlKey&&!ie.altKey||oe&&ie.metaKey)){var Te=ie.keyCode,Me=ie.charCode;if(pe&&Te==Lc){Lc=null,ri(ie);return}if(!(pe&&(!ie.which||ie.which<10)&&_f(ce,ie))){var Fe=String.fromCharCode(Me==null?Te:Me);Fe!="\b"&&(bf(ce,ie,Fe)||ce.display.input.onKeyPress(ie))}}}var rm=400,Bp=function(ie,ce,Te){this.time=ie,this.pos=ce,this.button=Te};Bp.prototype.compare=function(ie,ce,Te){return this.time+rm>ie&&rn(ce,this.pos)==0&&Te==this.button};var ad,Mc;function jp(ie,ce){var Te=+new Date;return Mc&&Mc.compare(Te,ie,ce)?(ad=Mc=null,"triple"):ad&&ad.compare(Te,ie,ce)?(Mc=new Bp(Te,ie,ce),ad=null,"double"):(ad=new Bp(Te,ie,ce),Mc=null,"single")}function Vu(ie){var ce=this,Te=ce.display;if(!(dn(ce,ie)||Te.activeTouch&&Te.input.supportsTouch())){if(Te.input.ensurePolled(),Te.shift=ie.shiftKey,fs(Te,ie)){be||(Te.scroller.draggable=!1,setTimeout(function(){return Te.scroller.draggable=!0},100));return}if(!Ef(ce,ie)){var Me=va(ce,ie),Fe=Gi(ie),it=Me?jp(Me,Fe):"single";window.focus(),Fe==1&&ce.state.selectingText&&ce.state.selectingText(ie),!(Me&&zp(ce,Fe,Me,it,ie))&&(Fe==1?Me?om(ce,Me,it,ie):Hi(ie)==Te.scroller&&ri(ie):Fe==2?(Me&&Lh(ce.doc,Me),setTimeout(function(){return Te.input.focus()},20)):Fe==3&&(ve?ce.display.input.onContextMenu(ie):cs(ce)))}}}function zp(ie,ce,Te,Me,Fe){var it="Click";return Me=="double"?it="Double"+it:Me=="triple"&&(it="Triple"+it),it=(ce==1?"Left":ce==2?"Middle":"Right")+it,Ec(ie,Ap(it,Fe),Fe,function(vt){if(typeof vt=="string"&&(vt=Vh[vt]),!vt)return!1;var Et=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),Et=vt(ie,Te)!=wt}finally{ie.state.suppressEdits=!1}return Et})}function Pf(ie,ce,Te){var Me=ie.getOption("configureMouse"),Fe=Me?Me(ie,ce,Te):{};if(Fe.unit==null){var it=re?Te.shiftKey&&Te.metaKey:Te.altKey;Fe.unit=it?"rectangle":ce=="single"?"char":ce=="double"?"word":"line"}return(Fe.extend==null||ie.doc.extend)&&(Fe.extend=ie.doc.extend||Te.shiftKey),Fe.addNew==null&&(Fe.addNew=oe?Te.metaKey:Te.ctrlKey),Fe.moveOnDrag==null&&(Fe.moveOnDrag=!(oe?Te.altKey:Te.ctrlKey)),Fe}function om(ie,ce,Te,Me){Ce?setTimeout(ht(qo,ie),0):ie.curOp.focus=gt();var Fe=Pf(ie,Te,Me),it=ie.doc.sel,vt;ie.options.dragDrop&&qi&&!ie.isReadOnly()&&Te=="single"&&(vt=it.contains(ce))>-1&&(rn((vt=it.ranges[vt]).from(),ce)<0||ce.xRel>0)&&(rn(vt.to(),ce)>0||ce.xRel<0)?Up(ie,Me,ce,Fe):nv(ie,Me,ce,Fe)}function Up(ie,ce,Te,Me){var Fe=ie.display,it=!1,vt=Wi(ie,function(Bt){be&&(Fe.scroller.draggable=!1),ie.state.draggingText=!1,En(Fe.wrapper.ownerDocument,"mouseup",vt),En(Fe.wrapper.ownerDocument,"mousemove",Et),En(Fe.scroller,"dragstart",Pt),En(Fe.scroller,"drop",vt),it||(ri(Bt),Me.addNew||Lh(ie.doc,Te,null,null,Me.extend),be&&!de||Ce&&xe==9?setTimeout(function(){Fe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Fe.input.focus()},20):Fe.input.focus())}),Et=function(Bt){it=it||Math.abs(ce.clientX-Bt.clientX)+Math.abs(ce.clientY-Bt.clientY)>=10},Pt=function(){return it=!0};be&&(Fe.scroller.draggable=!0),ie.state.draggingText=vt,vt.copy=!Me.moveOnDrag,Fe.scroller.dragDrop&&Fe.scroller.dragDrop(),Rt(Fe.wrapper.ownerDocument,"mouseup",vt),Rt(Fe.wrapper.ownerDocument,"mousemove",Et),Rt(Fe.scroller,"dragstart",Pt),Rt(Fe.scroller,"drop",vt),cs(ie),setTimeout(function(){return Fe.input.focus()},20)}function Hp(ie,ce,Te){if(Te=="char")return new Or(ce,ce);if(Te=="word")return ie.findWordAt(ce);if(Te=="line")return new Or(Qt(ce.line,0),Bn(ie.doc,Qt(ce.line+1,0)));var Me=Te(ie,ce);return new Or(Me.from,Me.to)}function nv(ie,ce,Te,Me){var Fe=ie.display,it=ie.doc;ri(ce);var vt,Et,Pt=it.sel,Bt=Pt.ranges;if(Me.addNew&&!Me.extend?(Et=it.sel.contains(Te),Et>-1?vt=Bt[Et]:vt=new Or(Te,Te)):(vt=it.sel.primary(),Et=it.sel.primIndex),Me.unit=="rectangle")Me.addNew||(vt=new Or(Te,Te)),Te=va(ie,ce,!0,!0),Et=-1;else{var gn=Hp(ie,Te,Me.unit);Me.extend?vt=rh(vt,gn.anchor,gn.head,Me.extend):vt=gn}Me.addNew?Et==-1?(Et=Bt.length,rl(it,Jr(ie,Bt.concat([vt]),Et),{scroll:!1,origin:"*mouse"})):Bt.length>1&&Bt[Et].empty()&&Me.unit=="char"&&!Me.extend?(rl(it,Jr(ie,Bt.slice(0,Et).concat(Bt.slice(Et+1)),0),{scroll:!1,origin:"*mouse"}),Pt=it.sel):sh(it,Et,vt,zt):(Et=0,rl(it,new Co([vt],0),zt),Pt=it.sel);var Gt=Te;function Tn(hr){if(rn(Gt,hr)!=0)if(Gt=hr,Me.unit=="rectangle"){for(var Ir=[],ao=ie.options.tabSize,lr=ut(_n(it,Te.line).text,Te.ch,ao),Bo=ut(_n(it,hr.line).text,hr.ch,ao),Fs=Math.min(lr,Bo),Ea=Math.max(lr,Bo),Js=Math.min(Te.line,hr.line),Pl=Math.min(ie.lastLine(),Math.max(Te.line,hr.line));Js<=Pl;Js++){var ol=_n(it,Js).text,wa=cn(ol,Fs,ao);Fs==Ea?Ir.push(new Or(Qt(Js,wa),Qt(Js,wa))):ol.length>wa&&Ir.push(new Or(Qt(Js,wa),Qt(Js,cn(ol,Ea,ao))))}Ir.length||Ir.push(new Or(Te,Te)),rl(it,Jr(ie,Pt.ranges.slice(0,Et).concat(Ir),Et),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(hr)}else{var Dl=vt,Xa=Hp(ie,hr,Me.unit),_a=Dl.anchor,os;rn(Xa.anchor,_a)>0?(os=Xa.head,_a=ai(Dl.from(),Xa.anchor)):(os=Xa.anchor,_a=oi(Dl.to(),Xa.head));var ra=Pt.ranges.slice(0);ra[Et]=sm(ie,new Or(Bn(it,_a),os)),rl(it,Jr(ie,ra,Et),zt)}}var bn=Fe.wrapper.getBoundingClientRect(),fi=0;function wi(hr){var Ir=++fi,ao=va(ie,hr,!0,Me.unit=="rectangle");if(ao)if(rn(ao,Gt)!=0){ie.curOp.focus=gt(),Tn(ao);var lr=_o(Fe,it);(ao.line>=lr.to||ao.line<lr.from)&&setTimeout(Wi(ie,function(){fi==Ir&&wi(hr)}),150)}else{var Bo=hr.clientY<bn.top?-20:hr.clientY>bn.bottom?20:0;Bo&&setTimeout(Wi(ie,function(){fi==Ir&&(Fe.scroller.scrollTop+=Bo,wi(hr))}),50)}}function Oi(hr){ie.state.selectingText=!1,fi=1/0,hr&&(ri(hr),Fe.input.focus()),En(Fe.wrapper.ownerDocument,"mousemove",er),En(Fe.wrapper.ownerDocument,"mouseup",br),it.history.lastSelOrigin=null}var er=Wi(ie,function(hr){hr.buttons===0||!Gi(hr)?Oi(hr):wi(hr)}),br=Wi(ie,Oi);ie.state.selectingText=br,Rt(Fe.wrapper.ownerDocument,"mousemove",er),Rt(Fe.wrapper.ownerDocument,"mouseup",br)}function sm(ie,ce){var Te=ce.anchor,Me=ce.head,Fe=_n(ie.doc,Te.line);if(rn(Te,Me)==0&&Te.sticky==Me.sticky)return ce;var it=on(Fe);if(!it)return ce;var vt=pt(it,Te.ch,Te.sticky),Et=it[vt];if(Et.from!=Te.ch&&Et.to!=Te.ch)return ce;var Pt=vt+(Et.from==Te.ch==(Et.level!=1)?0:1);if(Pt==0||Pt==it.length)return ce;var Bt;if(Me.line!=Te.line)Bt=(Me.line-Te.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var gn=pt(it,Me.ch,Me.sticky),Gt=gn-vt||(Me.ch-Te.ch)*(Et.level==1?-1:1);gn==Pt-1||gn==Pt?Bt=Gt<0:Bt=Gt>0}var Tn=it[Pt+(Bt?-1:0)],bn=Bt==(Tn.level==1),fi=bn?Tn.from:Tn.to,wi=bn?"after":"before";return Te.ch==fi&&Te.sticky==wi?ce:new Or(new Qt(Te.line,fi,wi),Me)}function Cf(ie,ce,Te,Me){var Fe,it;if(ce.touches)Fe=ce.touches[0].clientX,it=ce.touches[0].clientY;else try{Fe=ce.clientX,it=ce.clientY}catch(Tn){return!1}if(Fe>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;Me&&ri(ce);var vt=ie.display,Et=vt.lineDiv.getBoundingClientRect();if(it>Et.bottom||!vn(ie,Te))return Qn(ce);it-=Et.top-vt.viewOffset;for(var Pt=0;Pt<ie.display.gutterSpecs.length;++Pt){var Bt=vt.gutters.childNodes[Pt];if(Bt&&Bt.getBoundingClientRect().right>=Fe){var gn=ln(ie.doc,it),Gt=ie.display.gutterSpecs[Pt];return Sn(ie,Te,ie,gn,Gt.className,ce),Qn(ce)}}}function Ef(ie,ce){return Cf(ie,ce,"gutterClick",!0)}function Lf(ie,ce){fs(ie.display,ce)||am(ie,ce)||dn(ie,ce,"contextmenu")||ve||ie.display.input.onContextMenu(ce)}function am(ie,ce){return vn(ie,"gutterContextMenu")?Cf(ie,ce,"gutterContextMenu",!1):!1}function Mf(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ou(ie)}var Kh={toString:function(){return"CodeMirror.Init"}},Gp={},zd={};function lm(ie){var ce=ie.optionHandlers;function Te(Me,Fe,it,vt){ie.defaults[Me]=Fe,it&&(ce[Me]=vt?function(Et,Pt,Bt){Bt!=Kh&&it(Et,Pt,Bt)}:it)}ie.defineOption=Te,ie.Init=Kh,Te("value","",function(Me,Fe){return Me.setValue(Fe)},!0),Te("mode",null,function(Me,Fe){Me.doc.modeOption=Fe,ro(Me)},!0),Te("indentUnit",2,ro,!0),Te("indentWithTabs",!1),Te("smartIndent",!0),Te("tabSize",4,function(Me){Mu(Me),ou(Me),gs(Me)},!0),Te("lineSeparator",null,function(Me,Fe){if(Me.doc.lineSep=Fe,!!Fe){var it=[],vt=Me.doc.first;Me.doc.iter(function(Pt){for(var Bt=0;;){var gn=Pt.text.indexOf(Fe,Bt);if(gn==-1)break;Bt=gn+Fe.length,it.push(Qt(vt,gn))}vt++});for(var Et=it.length-1;Et>=0;Et--)_c(Me.doc,Fe,it[Et],Qt(it[Et].line,it[Et].ch+Fe.length))}}),Te("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Me,Fe,it){Me.state.specialChars=new RegExp(Fe.source+(Fe.test(" ")?"":"| "),"g"),it!=Kh&&Me.refresh()}),Te("specialCharPlaceholder",Fr,function(Me){return Me.refresh()},!0),Te("electricChars",!0),Te("inputStyle",z?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Te("spellcheck",!1,function(Me,Fe){return Me.getInputField().spellcheck=Fe},!0),Te("autocorrect",!1,function(Me,Fe){return Me.getInputField().autocorrect=Fe},!0),Te("autocapitalize",!1,function(Me,Fe){return Me.getInputField().autocapitalize=Fe},!0),Te("rtlMoveVisually",!ae),Te("wholeLineUpdateBefore",!0),Te("theme","default",function(Me){Mf(Me),Zi(Me)},!0),Te("keyMap","default",function(Me,Fe,it){var vt=Cc(Fe),Et=it!=Kh&&Cc(it);Et&&Et.detach&&Et.detach(Me,vt),vt.attach&&vt.attach(Me,Et||null)}),Te("extraKeys",null),Te("configureMouse",null),Te("lineWrapping",!1,um,!0),Te("gutters",[],function(Me,Fe){Me.display.gutterSpecs=Ur(Fe,Me.options.lineNumbers),Zi(Me)},!0),Te("fixedGutter",!0,function(Me,Fe){Me.display.gutters.style.left=Fe?bu(Me.display)+"px":"0",Me.refresh()},!0),Te("coverGutterNextToScrollbar",!1,function(Me){return ya(Me)},!0),Te("scrollbarStyle","native",function(Me){au(Me),ya(Me),Me.display.scrollbars.setScrollTop(Me.doc.scrollTop),Me.display.scrollbars.setScrollLeft(Me.doc.scrollLeft)},!0),Te("lineNumbers",!1,function(Me,Fe){Me.display.gutterSpecs=Ur(Me.options.gutters,Fe),Zi(Me)},!0),Te("firstLineNumber",1,Zi,!0),Te("lineNumberFormatter",function(Me){return Me},Zi,!0),Te("showCursorWhenSelecting",!1,na,!0),Te("resetSelectionOnContextMenu",!0),Te("lineWiseCopyCut",!0),Te("pasteLinesPerSelection",!0),Te("selectionsMayTouch",!1),Te("readOnly",!1,function(Me,Fe){Fe=="nocursor"&&(nh(Me),Me.display.input.blur()),Me.display.input.readOnlyChanged(Fe)}),Te("screenReaderLabel",null,function(Me,Fe){Fe=Fe===""?null:Fe,Me.display.input.screenReaderLabelChanged(Fe)}),Te("disableInput",!1,function(Me,Fe){Fe||Me.display.input.reset()},!0),Te("dragDrop",!0,kf),Te("allowDropFileTypes",null),Te("cursorBlinkRate",530),Te("cursorScrollMargin",0),Te("cursorHeight",1,na,!0),Te("singleCursorHeightPerLine",!0,na,!0),Te("workTime",100),Te("workDelay",100),Te("flattenSpans",!0,Mu,!0),Te("addModeClass",!1,Mu,!0),Te("pollInterval",100),Te("undoDepth",200,function(Me,Fe){return Me.doc.history.undoDepth=Fe}),Te("historyEventDelay",1250),Te("viewportMargin",10,function(Me){return Me.refresh()},!0),Te("maxHighlightLength",1e4,Mu,!0),Te("moveInputWithCursor",!0,function(Me,Fe){Fe||Me.display.input.resetPosition()}),Te("tabindex",null,function(Me,Fe){return Me.display.input.getField().tabIndex=Fe||""}),Te("autofocus",null),Te("direction","ltr",function(Me,Fe){return Me.doc.setDirection(Fe)},!0),Te("phrases",null)}function kf(ie,ce,Te){var Me=Te&&Te!=Kh;if(!ce!=!Me){var Fe=ie.display.dragFunctions,it=ce?Rt:En;it(ie.display.scroller,"dragstart",Fe.start),it(ie.display.scroller,"dragenter",Fe.enter),it(ie.display.scroller,"dragover",Fe.over),it(ie.display.scroller,"dragleave",Fe.leave),it(ie.display.scroller,"drop",Fe.drop)}}function um(ie){ie.options.lineWrapping?(Mt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(Ae(ie.display.wrapper,"CodeMirror-wrap"),pr(ie)),Rr(ie),gs(ie),ou(ie),setTimeout(function(){return ya(ie)},100)}function is(ie,ce){var Te=this;if(!(this instanceof is))return new is(ie,ce);this.options=ce=ce?Dt(ce):{},Dt(Gp,ce,!1);var Me=ce.value;typeof Me=="string"?Me=new Ya(Me,ce.mode,null,ce.lineSeparator,ce.direction):ce.mode&&(Me.modeOption=ce.mode),this.doc=Me;var Fe=new is.inputStyles[ce.inputStyle](this),it=this.display=new ts(ie,Me,Fe,ce);it.wrapper.CodeMirror=this,Mf(this),ce.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),au(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 ot,keySeq:null,specialChars:null},ce.autofocus&&!z&&it.input.focus(),Ce&&xe<11&&setTimeout(function(){return Te.display.input.reset(!0)},20),ld(this),Xl(),Ka(this),this.curOp.forceUpdate=!0,ku(this,Me),ce.autofocus&&!z||this.hasFocus()?setTimeout(function(){Te.hasFocus()&&!Te.state.focused&&Ao(Te)},20):nh(this);for(var vt in zd)zd.hasOwnProperty(vt)&&zd[vt](this,ce[vt],Kh);Po(this),ce.finishInit&&ce.finishInit(this);for(var Et=0;Et<kc.length;++Et)kc[Et](this);Vl(this),be&&ce.lineWrapping&&getComputedStyle(it.lineDiv).textRendering=="optimizelegibility"&&(it.lineDiv.style.textRendering="auto")}is.defaults=Gp,is.optionHandlers=zd;function ld(ie){var ce=ie.display;Rt(ce.scroller,"mousedown",Wi(ie,Vu)),Ce&&xe<11?Rt(ce.scroller,"dblclick",Wi(ie,function(Pt){if(!dn(ie,Pt)){var Bt=va(ie,Pt);if(!(!Bt||Ef(ie,Pt)||fs(ie.display,Pt))){ri(Pt);var gn=ie.findWordAt(Bt);Lh(ie.doc,gn.anchor,gn.head)}}})):Rt(ce.scroller,"dblclick",function(Pt){return dn(ie,Pt)||ri(Pt)}),Rt(ce.scroller,"contextmenu",function(Pt){return Lf(ie,Pt)}),Rt(ce.input.getField(),"contextmenu",function(Pt){ce.scroller.contains(Pt.target)||Lf(ie,Pt)});var Te,Me={end:0};function Fe(){ce.activeTouch&&(Te=setTimeout(function(){return ce.activeTouch=null},1e3),Me=ce.activeTouch,Me.end=+new Date)}function it(Pt){if(Pt.touches.length!=1)return!1;var Bt=Pt.touches[0];return Bt.radiusX<=1&&Bt.radiusY<=1}function vt(Pt,Bt){if(Bt.left==null)return!0;var gn=Bt.left-Pt.left,Gt=Bt.top-Pt.top;return gn*gn+Gt*Gt>20*20}Rt(ce.scroller,"touchstart",function(Pt){if(!dn(ie,Pt)&&!it(Pt)&&!Ef(ie,Pt)){ce.input.ensurePolled(),clearTimeout(Te);var Bt=+new Date;ce.activeTouch={start:Bt,moved:!1,prev:Bt-Me.end<=300?Me:null},Pt.touches.length==1&&(ce.activeTouch.left=Pt.touches[0].pageX,ce.activeTouch.top=Pt.touches[0].pageY)}}),Rt(ce.scroller,"touchmove",function(){ce.activeTouch&&(ce.activeTouch.moved=!0)}),Rt(ce.scroller,"touchend",function(Pt){var Bt=ce.activeTouch;if(Bt&&!fs(ce,Pt)&&Bt.left!=null&&!Bt.moved&&new Date-Bt.start<300){var gn=ie.coordsChar(ce.activeTouch,"page"),Gt;!Bt.prev||vt(Bt,Bt.prev)?Gt=new Or(gn,gn):!Bt.prev.prev||vt(Bt,Bt.prev.prev)?Gt=ie.findWordAt(gn):Gt=new Or(Qt(gn.line,0),Bn(ie.doc,Qt(gn.line+1,0))),ie.setSelection(Gt.anchor,Gt.head),ie.focus(),ri(Pt)}Fe()}),Rt(ce.scroller,"touchcancel",Fe),Rt(ce.scroller,"scroll",function(){ce.scroller.clientHeight&&(wl(ie,ce.scroller.scrollTop),Zl(ie,ce.scroller.scrollLeft,!0),Sn(ie,"scroll",ie))}),Rt(ce.scroller,"mousewheel",function(Pt){return Fo(ie,Pt)}),Rt(ce.scroller,"DOMMouseScroll",function(Pt){return Fo(ie,Pt)}),Rt(ce.wrapper,"scroll",function(){return ce.wrapper.scrollTop=ce.wrapper.scrollLeft=0}),ce.dragFunctions={enter:function(Pt){dn(ie,Pt)||ki(Pt)},over:function(Pt){dn(ie,Pt)||(em(ie,Pt),ki(Pt))},start:function(Pt){return $g(ie,Pt)},drop:Wi(ie,Ep),leave:function(Pt){dn(ie,Pt)||tm(ie)}};var Et=ce.input.getField();Rt(Et,"keyup",function(Pt){return Fp.call(ie,Pt)}),Rt(Et,"keydown",Wi(ie,Ip)),Rt(Et,"keypress",Wi(ie,Zu)),Rt(Et,"focus",function(Pt){return Ao(ie,Pt)}),Rt(Et,"blur",function(Pt){return nh(ie,Pt)})}var kc=[];is.defineInitHook=function(ie){return kc.push(ie)};function Ca(ie,ce,Te,Me){var Fe=ie.doc,it;Te==null&&(Te="add"),Te=="smart"&&(Fe.mode.indent?it=wr(ie,ce).state:Te="prev");var vt=ie.options.tabSize,Et=_n(Fe,ce),Pt=ut(Et.text,null,vt);Et.stateAfter&&(Et.stateAfter=null);var Bt=Et.text.match(/^\s*/)[0],gn;if(!Me&&!/\S/.test(Et.text))gn=0,Te="not";else if(Te=="smart"&&(gn=Fe.mode.indent(it,Et.text.slice(Bt.length),Et.text),gn==wt||gn>150)){if(!Me)return;Te="prev"}Te=="prev"?ce>Fe.first?gn=ut(_n(Fe,ce-1).text,null,vt):gn=0:Te=="add"?gn=Pt+ie.options.indentUnit:Te=="subtract"?gn=Pt-ie.options.indentUnit:typeof Te=="number"&&(gn=Pt+Te),gn=Math.max(0,gn);var Gt="",Tn=0;if(ie.options.indentWithTabs)for(var bn=Math.floor(gn/vt);bn;--bn)Tn+=vt,Gt+=" ";if(Tn<gn&&(Gt+=mn(gn-Tn)),Gt!=Bt)return _c(Fe,Gt,Qt(ce,0),Qt(ce,Bt.length),"+input"),Et.stateAfter=null,!0;for(var fi=0;fi<Fe.sel.ranges.length;fi++){var wi=Fe.sel.ranges[fi];if(wi.head.line==ce&&wi.head.ch<Bt.length){var Oi=Qt(ce,Bt.length);sh(Fe,fi,new Or(Oi,Oi));break}}}var bl=null;function Tc(ie){bl=ie}function Ud(ie,ce,Te,Me,Fe){var it=ie.doc;ie.display.shift=!1,Me||(Me=it.sel);var vt=+new Date-200,Et=Fe=="paste"||ie.state.pasteIncoming>vt,Pt=sr(ce),Bt=null;if(Et&&Me.ranges.length>1)if(bl&&bl.text.join(`
|
|
|
`)==ce){if(Me.ranges.length%bl.text.length==0){Bt=[];for(var gn=0;gn<bl.text.length;gn++)Bt.push(it.splitLines(bl.text[gn]))}}else Pt.length==Me.ranges.length&&ie.options.pasteLinesPerSelection&&(Bt=Yt(Pt,function(er){return[er]}));for(var Gt=ie.curOp.updateInput,Tn=Me.ranges.length-1;Tn>=0;Tn--){var bn=Me.ranges[Tn],fi=bn.from(),wi=bn.to();bn.empty()&&(Te&&Te>0?fi=Qt(fi.line,fi.ch-Te):ie.state.overwrite&&!Et?wi=Qt(wi.line,Math.min(_n(it,wi.line).text.length,wi.ch+Ft(Pt).length)):Et&&bl&&bl.lineWise&&bl.text.join(`
|
|
|
`)==Pt.join(`
|
|
|
`)&&(fi=wi=Qt(fi.line,0)));var Oi={from:fi,to:wi,text:Bt?Bt[Tn%Bt.length]:Pt,origin:Fe||(Et?"paste":ie.state.cutIncoming>vt?"cut":"+input")};Zh(ie.doc,Oi),Qi(ie,"inputRead",ie,Oi)}ce&&!Et&&Zp(ie,ce),Wl(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Gt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Wp(ie,ce){var Te=ie.clipboardData&&ie.clipboardData.getData("Text");if(Te)return ie.preventDefault(),!ce.isReadOnly()&&!ce.options.disableInput&&Jt(ce,function(){return Ud(ce,Te,0,null,"paste")}),!0}function Zp(ie,ce){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var Te=ie.doc.sel,Me=Te.ranges.length-1;Me>=0;Me--){var Fe=Te.ranges[Me];if(!(Fe.head.ch>100||Me&&Te.ranges[Me-1].head.line==Fe.head.line)){var it=ie.getModeAt(Fe.head),vt=!1;if(it.electricChars){for(var Et=0;Et<it.electricChars.length;Et++)if(ce.indexOf(it.electricChars.charAt(Et))>-1){vt=Ca(ie,Fe.head.line,"smart");break}}else it.electricInput&&it.electricInput.test(_n(ie.doc,Fe.head.line).text.slice(0,Fe.head.ch))&&(vt=Ca(ie,Fe.head.line,"smart"));vt&&Qi(ie,"electricInput",ie,Fe.head.line)}}}function Vp(ie){for(var ce=[],Te=[],Me=0;Me<ie.doc.sel.ranges.length;Me++){var Fe=ie.doc.sel.ranges[Me].head.line,it={anchor:Qt(Fe,0),head:Qt(Fe+1,0)};Te.push(it),ce.push(ie.getRange(it.anchor,it.head))}return{text:ce,ranges:Te}}function Kp(ie,ce,Te,Me){ie.setAttribute("autocorrect",Te?"":"off"),ie.setAttribute("autocapitalize",Me?"":"off"),ie.setAttribute("spellcheck",!!ce)}function Yp(){var ie=Ze("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ce=Ze("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return be?ie.style.width="1000px":ie.setAttribute("wrap","off"),ue&&(ie.style.border="1px solid black"),Kp(ie),ce}function Yh(ie){var ce=ie.optionHandlers,Te=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Me,Fe){var it=this.options,vt=it[Me];it[Me]==Fe&&Me!="mode"||(it[Me]=Fe,ce.hasOwnProperty(Me)&&Wi(this,ce[Me])(this,Fe,vt),Sn(this,"optionChange",this,Me))},getOption:function(Me){return this.options[Me]},getDoc:function(){return this.doc},addKeyMap:function(Me,Fe){this.state.keyMaps[Fe?"push":"unshift"](Cc(Me))},removeKeyMap:function(Me){for(var Fe=this.state.keyMaps,it=0;it<Fe.length;++it)if(Fe[it]==Me||Fe[it].name==Me)return Fe.splice(it,1),!0},addOverlay:_i(function(Me,Fe){var it=Me.token?Me:ie.getMode(this.options,Me);if(it.startState)throw new Error("Overlays may not be stateful.");tn(this.state.overlays,{mode:it,modeSpec:Me,opaque:Fe&&Fe.opaque,priority:Fe&&Fe.priority||0},function(vt){return vt.priority}),this.state.modeGen++,gs(this)}),removeOverlay:_i(function(Me){for(var Fe=this.state.overlays,it=0;it<Fe.length;++it){var vt=Fe[it].modeSpec;if(vt==Me||typeof Me=="string"&&vt.name==Me){Fe.splice(it,1),this.state.modeGen++,gs(this);return}}}),indentLine:_i(function(Me,Fe,it){typeof Fe!="string"&&typeof Fe!="number"&&(Fe==null?Fe=this.options.smartIndent?"smart":"prev":Fe=Fe?"add":"subtract"),An(this.doc,Me)&&Ca(this,Me,Fe,it)}),indentSelection:_i(function(Me){for(var Fe=this.doc.sel.ranges,it=-1,vt=0;vt<Fe.length;vt++){var Et=Fe[vt];if(Et.empty())Et.head.line>it&&(Ca(this,Et.head.line,Me,!0),it=Et.head.line,vt==this.doc.sel.primIndex&&Wl(this));else{var Pt=Et.from(),Bt=Et.to(),gn=Math.max(it,Pt.line);it=Math.min(this.lastLine(),Bt.line-(Bt.ch?0:1))+1;for(var Gt=gn;Gt<it;++Gt)Ca(this,Gt,Me);var Tn=this.doc.sel.ranges;Pt.ch==0&&Fe.length==Tn.length&&Tn[vt].from().ch>0&&sh(this.doc,vt,new Or(Pt,Tn[vt].to()),xt)}}}),getTokenAt:function(Me,Fe){return mi(this,Me,Fe)},getLineTokens:function(Me,Fe){return mi(this,Qt(Me),Fe,!0)},getTokenTypeAt:function(Me){Me=Bn(this.doc,Me);var Fe=ur(this,_n(this.doc,Me.line)),it=0,vt=(Fe.length-1)/2,Et=Me.ch,Pt;if(Et==0)Pt=Fe[2];else for(;;){var Bt=it+vt>>1;if((Bt?Fe[Bt*2-1]:0)>=Et)vt=Bt;else if(Fe[Bt*2+1]<Et)it=Bt+1;else{Pt=Fe[Bt*2+2];break}}var gn=Pt?Pt.indexOf("overlay "):-1;return gn<0?Pt:gn==0?null:Pt.slice(0,gn-1)},getModeAt:function(Me){var Fe=this.doc.mode;return Fe.innerMode?ie.innerMode(Fe,this.getTokenAt(Me).state).mode:Fe},getHelper:function(Me,Fe){return this.getHelpers(Me,Fe)[0]},getHelpers:function(Me,Fe){var it=[];if(!Te.hasOwnProperty(Fe))return it;var vt=Te[Fe],Et=this.getModeAt(Me);if(typeof Et[Fe]=="string")vt[Et[Fe]]&&it.push(vt[Et[Fe]]);else if(Et[Fe])for(var Pt=0;Pt<Et[Fe].length;Pt++){var Bt=vt[Et[Fe][Pt]];Bt&&it.push(Bt)}else Et.helperType&&vt[Et.helperType]?it.push(vt[Et.helperType]):vt[Et.name]&&it.push(vt[Et.name]);for(var gn=0;gn<vt._global.length;gn++){var Gt=vt._global[gn];Gt.pred(Et,this)&&ct(it,Gt.val)==-1&&it.push(Gt.val)}return it},getStateAfter:function(Me,Fe){var it=this.doc;return Me=Gn(it,Me==null?it.first+it.size-1:Me),wr(this,Me+1,Fe).state},cursorCoords:function(Me,Fe){var it,vt=this.doc.sel.primary();return Me==null?it=vt.head:typeof Me=="object"?it=Bn(this.doc,Me):it=Me?vt.from():vt.to(),yo(this,it,Fe||"page")},charCoords:function(Me,Fe){return io(this,Bn(this.doc,Me),Fe||"page")},coordsChar:function(Me,Fe){return Me=zo(this,Me,Fe||"page"),Ns(this,Me.left,Me.top)},lineAtHeight:function(Me,Fe){return Me=zo(this,{top:Me,left:0},Fe||"page").top,ln(this.doc,Me+this.display.viewOffset)},heightAtLine:function(Me,Fe,it){var vt=!1,Et;if(typeof Me=="number"){var Pt=this.doc.first+this.doc.size-1;Me<this.doc.first?Me=this.doc.first:Me>Pt&&(Me=Pt,vt=!0),Et=_n(this.doc,Me)}else Et=Me;return zs(this,Et,{top:0,left:0},Fe||"page",it||vt).top+(vt?this.doc.height-Ui(Et):0)},defaultTextHeight:function(){return cl(this.display)},defaultCharWidth:function(){return su(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Me,Fe,it,vt,Et){var Pt=this.display;Me=yo(this,Bn(this.doc,Me));var Bt=Me.bottom,gn=Me.left;if(Fe.style.position="absolute",Fe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Fe),Pt.sizer.appendChild(Fe),vt=="over")Bt=Me.top;else if(vt=="above"||vt=="near"){var Gt=Math.max(Pt.wrapper.clientHeight,this.doc.height),Tn=Math.max(Pt.sizer.clientWidth,Pt.lineSpace.clientWidth);(vt=="above"||Me.bottom+Fe.offsetHeight>Gt)&&Me.top>Fe.offsetHeight?Bt=Me.top-Fe.offsetHeight:Me.bottom+Fe.offsetHeight<=Gt&&(Bt=Me.bottom),gn+Fe.offsetWidth>Tn&&(gn=Tn-Fe.offsetWidth)}Fe.style.top=Bt+"px",Fe.style.left=Fe.style.right="",Et=="right"?(gn=Pt.sizer.clientWidth-Fe.offsetWidth,Fe.style.right="0px"):(Et=="left"?gn=0:Et=="middle"&&(gn=(Pt.sizer.clientWidth-Fe.offsetWidth)/2),Fe.style.left=gn+"px"),it&&ih(this,{left:gn,top:Bt,right:gn+Fe.offsetWidth,bottom:Bt+Fe.offsetHeight})},triggerOnKeyDown:_i(Ip),triggerOnKeyPress:_i(Zu),triggerOnKeyUp:Fp,triggerOnMouseDown:_i(Vu),execCommand:function(Me){if(Vh.hasOwnProperty(Me))return Vh[Me].call(null,this)},triggerElectric:_i(function(Me){Zp(this,Me)}),findPosH:function(Me,Fe,it,vt){var Et=1;Fe<0&&(Et=-1,Fe=-Fe);for(var Pt=Bn(this.doc,Me),Bt=0;Bt<Fe&&(Pt=Hd(this.doc,Pt,Et,it,vt),!Pt.hitSide);++Bt);return Pt},moveH:_i(function(Me,Fe){var it=this;this.extendSelectionsBy(function(vt){return it.display.shift||it.doc.extend||vt.empty()?Hd(it.doc,vt.head,Me,Fe,it.options.rtlMoveVisually):Me<0?vt.from():vt.to()},Ut)}),deleteH:_i(function(Me,Fe){var it=this.doc.sel,vt=this.doc;it.somethingSelected()?vt.replaceSelection("",null,"+delete"):Nl(this,function(Et){var Pt=Hd(vt,Et.head,Me,Fe,!1);return Me<0?{from:Pt,to:Et.head}:{from:Et.head,to:Pt}})}),findPosV:function(Me,Fe,it,vt){var Et=1,Pt=vt;Fe<0&&(Et=-1,Fe=-Fe);for(var Bt=Bn(this.doc,Me),gn=0;gn<Fe;++gn){var Gt=yo(this,Bt,"div");if(Pt==null?Pt=Gt.left:Gt.left=Pt,Bt=Xh(this,Gt,Et,it),Bt.hitSide)break}return Bt},moveV:_i(function(Me,Fe){var it=this,vt=this.doc,Et=[],Pt=!this.display.shift&&!vt.extend&&vt.sel.somethingSelected();if(vt.extendSelectionsBy(function(gn){if(Pt)return Me<0?gn.from():gn.to();var Gt=yo(it,gn.head,"div");gn.goalColumn!=null&&(Gt.left=gn.goalColumn),Et.push(Gt.left);var Tn=Xh(it,Gt,Me,Fe);return Fe=="page"&&gn==vt.sel.primary()&&Ph(it,io(it,Tn,"div").top-Gt.top),Tn},Ut),Et.length)for(var Bt=0;Bt<vt.sel.ranges.length;Bt++)vt.sel.ranges[Bt].goalColumn=Et[Bt]}),findWordAt:function(Me){var Fe=this.doc,it=_n(Fe,Me.line).text,vt=Me.ch,Et=Me.ch;if(it){var Pt=this.getHelper(Me,"wordChars");(Me.sticky=="before"||Et==it.length)&&vt?--vt:++Et;for(var Bt=it.charAt(vt),gn=dt(Bt,Pt)?function(Gt){return dt(Gt,Pt)}:/\s/.test(Bt)?function(Gt){return/\s/.test(Gt)}:function(Gt){return!/\s/.test(Gt)&&!dt(Gt)};vt>0&&gn(it.charAt(vt-1));)--vt;for(;Et<it.length&&gn(it.charAt(Et));)++Et}return new Or(Qt(Me.line,vt),Qt(Me.line,Et))},toggleOverwrite:function(Me){Me!=null&&Me==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Mt(this.display.cursorDiv,"CodeMirror-overwrite"):Ae(this.display.cursorDiv,"CodeMirror-overwrite"),Sn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==gt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:_i(function(Me,Fe){Kr(this,Me,Fe)}),getScrollInfo:function(){var Me=this.display.scroller;return{left:Me.scrollLeft,top:Me.scrollTop,height:Me.scrollHeight-Xo(this)-this.display.barHeight,width:Me.scrollWidth-Xo(this)-this.display.barWidth,clientHeight:Wa(this),clientWidth:Sa(this)}},scrollIntoView:_i(function(Me,Fe){Me==null?(Me={from:this.doc.sel.primary().head,to:null},Fe==null&&(Fe=this.options.cursorScrollMargin)):typeof Me=="number"?Me={from:Qt(Me,0),to:null}:Me.from==null&&(Me={from:Me,to:null}),Me.to||(Me.to=Me.from),Me.margin=Fe||0,Me.from.line!=null?Ho(this,Me):Ch(this,Me.from,Me.to,Me.margin)}),setSize:_i(function(Me,Fe){var it=this,vt=function(Pt){return typeof Pt=="number"||/^\d+$/.test(String(Pt))?Pt+"px":Pt};Me!=null&&(this.display.wrapper.style.width=vt(Me)),Fe!=null&&(this.display.wrapper.style.height=vt(Fe)),this.options.lineWrapping&&_u(this);var Et=this.display.viewFrom;this.doc.iter(Et,this.display.viewTo,function(Pt){if(Pt.widgets){for(var Bt=0;Bt<Pt.widgets.length;Bt++)if(Pt.widgets[Bt].noHScroll){$r(it,Et,"widget");break}}++Et}),this.curOp.forceUpdate=!0,Sn(this,"refresh",this)}),operation:function(Me){return Jt(this,Me)},startOperation:function(){return Ka(this)},endOperation:function(){return Vl(this)},refresh:_i(function(){var Me=this.display.cachedTextHeight;gs(this),this.curOp.forceUpdate=!0,ou(this),Kr(this,this.doc.scrollLeft,this.doc.scrollTop),rs(this.display),(Me==null||Math.abs(Me-cl(this.display))>.5||this.options.lineWrapping)&&Rr(this),Sn(this,"refresh",this)}),swapDoc:_i(function(Me){var Fe=this.doc;return Fe.cm=null,this.state.selectingText&&this.state.selectingText(),ku(this,Me),ou(this),this.display.input.reset(),Kr(this,Me.scrollLeft,Me.scrollTop),this.curOp.forceScroll=!0,Qi(this,"swapDoc",this,Fe),Fe}),phrase:function(Me){var Fe=this.options.phrases;return Fe&&Object.prototype.hasOwnProperty.call(Fe,Me)?Fe[Me]:Me},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}},Wn(ie),ie.registerHelper=function(Me,Fe,it){Te.hasOwnProperty(Me)||(Te[Me]=ie[Me]={_global:[]}),Te[Me][Fe]=it},ie.registerGlobalHelper=function(Me,Fe,it,vt){ie.registerHelper(Me,Fe,vt),Te[Me]._global.push({pred:it,val:vt})}}function Hd(ie,ce,Te,Me,Fe){var it=ce,vt=Te,Et=_n(ie,ce.line),Pt=Fe&&ie.direction=="rtl"?-Te:Te;function Bt(){var br=ce.line+Pt;return br<ie.first||br>=ie.first+ie.size?!1:(ce=new Qt(br,ce.ch,ce.sticky),Et=_n(ie,br))}function gn(br){var hr;if(Me=="codepoint"){var Ir=Et.text.charCodeAt(ce.ch+(Me>0?0:-1));isNaN(Ir)?hr=null:hr=new Qt(ce.line,Math.max(0,Math.min(Et.text.length,ce.ch+Te*(Ir>=55296&&Ir<56320?2:1))),-Te)}else Fe?hr=xf(ie.cm,Et,ce,Te):hr=fa(Et,ce,Te);if(hr==null)if(!br&&Bt())ce=jd(Fe,ie.cm,Et,ce.line,Pt);else return!1;else ce=hr;return!0}if(Me=="char"||Me=="codepoint")gn();else if(Me=="column")gn(!0);else if(Me=="word"||Me=="group")for(var Gt=null,Tn=Me=="group",bn=ie.cm&&ie.cm.getHelper(ce,"wordChars"),fi=!0;!(Te<0&&!gn(!fi));fi=!1){var wi=Et.text.charAt(ce.ch)||`
|
|
|
`,Oi=dt(wi,bn)?"w":Tn&&wi==`
|
|
|
`?"n":!Tn||/\s/.test(wi)?null:"p";if(Tn&&!fi&&!Oi&&(Oi="s"),Gt&&Gt!=Oi){Te<0&&(Te=1,gn(),ce.sticky="after");break}if(Oi&&(Gt=Oi),Te>0&&!gn(!fi))break}var er=Dd(ie,ce,it,vt,!0);return Pn(it,er)&&(er.hitSide=!0),er}function Xh(ie,ce,Te,Me){var Fe=ie.doc,it=ce.left,vt;if(Me=="page"){var Et=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Pt=Math.max(Et-.5*cl(ie.display),3);vt=(Te>0?ce.bottom:ce.top)+Te*Pt}else Me=="line"&&(vt=Te>0?ce.bottom+3:ce.top-3);for(var Bt;Bt=Ns(ie,it,vt),!!Bt.outside;){if(Te<0?vt<=0:vt>=Fe.height){Bt.hitSide=!0;break}vt+=Te*5}return Bt}var _s=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ot,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};_s.prototype.init=function(ie){var ce=this,Te=this,Me=Te.cm,Fe=Te.div=ie.lineDiv;Kp(Fe,Me.options.spellcheck,Me.options.autocorrect,Me.options.autocapitalize);function it(Et){for(var Pt=Et.target;Pt;Pt=Pt.parentNode){if(Pt==Fe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Pt.className))break}return!1}Rt(Fe,"paste",function(Et){!it(Et)||dn(Me,Et)||Wp(Et,Me)||xe<=11&&setTimeout(Wi(Me,function(){return ce.updateFromDOM()}),20)}),Rt(Fe,"compositionstart",function(Et){ce.composing={data:Et.data,done:!1}}),Rt(Fe,"compositionupdate",function(Et){ce.composing||(ce.composing={data:Et.data,done:!1})}),Rt(Fe,"compositionend",function(Et){ce.composing&&(Et.data!=ce.composing.data&&ce.readFromDOMSoon(),ce.composing.done=!0)}),Rt(Fe,"touchstart",function(){return Te.forceCompositionEnd()}),Rt(Fe,"input",function(){ce.composing||ce.readFromDOMSoon()});function vt(Et){if(!(!it(Et)||dn(Me,Et))){if(Me.somethingSelected())Tc({lineWise:!1,text:Me.getSelections()}),Et.type=="cut"&&Me.replaceSelection("",null,"cut");else if(Me.options.lineWiseCopyCut){var Pt=Vp(Me);Tc({lineWise:!0,text:Pt.text}),Et.type=="cut"&&Me.operation(function(){Me.setSelections(Pt.ranges,0,xt),Me.replaceSelection("",null,"cut")})}else return;if(Et.clipboardData){Et.clipboardData.clearData();var Bt=bl.text.join(`
|
|
|
`);if(Et.clipboardData.setData("Text",Bt),Et.clipboardData.getData("Text")==Bt){Et.preventDefault();return}}var gn=Yp(),Gt=gn.firstChild;Me.display.lineSpace.insertBefore(gn,Me.display.lineSpace.firstChild),Gt.value=bl.text.join(`
|
|
|
`);var Tn=document.activeElement;_t(Gt),setTimeout(function(){Me.display.lineSpace.removeChild(gn),Tn.focus(),Tn==Fe&&Te.showPrimarySelection()},50)}}Rt(Fe,"copy",vt),Rt(Fe,"cut",vt)},_s.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},_s.prototype.prepareSelection=function(){var ie=Pu(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},_s.prototype.showSelection=function(ie,ce){!ie||!this.cm.display.view.length||((ie.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},_s.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},_s.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ce=this.cm,Te=ce.doc.sel.primary(),Me=Te.from(),Fe=Te.to();if(ce.display.viewTo==ce.display.viewFrom||Me.line>=ce.display.viewTo||Fe.line<ce.display.viewFrom){ie.removeAllRanges();return}var it=Gd(ce,ie.anchorNode,ie.anchorOffset),vt=Gd(ce,ie.focusNode,ie.focusOffset);if(!(it&&!it.bad&&vt&&!vt.bad&&rn(ai(it,vt),Me)==0&&rn(oi(it,vt),Fe)==0)){var Et=ce.display.view,Pt=Me.line>=ce.display.viewFrom&&Tf(ce,Me)||{node:Et[0].measure.map[2],offset:0},Bt=Fe.line<ce.display.viewTo&&Tf(ce,Fe);if(!Bt){var gn=Et[Et.length-1].measure,Gt=gn.maps?gn.maps[gn.maps.length-1]:gn.map;Bt={node:Gt[Gt.length-1],offset:Gt[Gt.length-2]-Gt[Gt.length-3]}}if(!Pt||!Bt){ie.removeAllRanges();return}var Tn=ie.rangeCount&&ie.getRangeAt(0),bn;try{bn=Je(Pt.node,Pt.offset,Bt.offset,Bt.node)}catch(fi){}bn&&(!ke&&ce.state.focused?(ie.collapse(Pt.node,Pt.offset),bn.collapsed||(ie.removeAllRanges(),ie.addRange(bn))):(ie.removeAllRanges(),ie.addRange(bn)),Tn&&ie.anchorNode==null?ie.addRange(Tn):ke&&this.startGracePeriod()),this.rememberSelection()}},_s.prototype.startGracePeriod=function(){var ie=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){ie.gracePeriod=!1,ie.selectionChanged()&&ie.cm.operation(function(){return ie.cm.curOp.selectionChanged=!0})},20)},_s.prototype.showMultipleSelections=function(ie){Ie(this.cm.display.cursorDiv,ie.cursors),Ie(this.cm.display.selectionDiv,ie.selection)},_s.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},_s.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ce=ie.getRangeAt(0).commonAncestorContainer;return mt(this.div,ce)},_s.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},_s.prototype.blur=function(){this.div.blur()},_s.prototype.getField=function(){return this.div},_s.prototype.supportsTouch=function(){return!0},_s.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():Jt(this.cm,function(){return ie.cm.curOp.selectionChanged=!0});function ce(){ie.cm.state.focused&&(ie.pollSelection(),ie.polling.set(ie.cm.options.pollInterval,ce))}this.polling.set(this.cm.options.pollInterval,ce)},_s.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},_s.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ce=this.cm;if(ee&&we&&this.cm.display.gutterSpecs.length&&Xp(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Te=Gd(ce,ie.anchorNode,ie.anchorOffset),Me=Gd(ce,ie.focusNode,ie.focusOffset);Te&&Me&&Jt(ce,function(){rl(ce.doc,Uo(Te,Me),xt),(Te.bad||Me.bad)&&(ce.curOp.selectionChanged=!0)})}}},_s.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ce=ie.display,Te=ie.doc.sel.primary(),Me=Te.from(),Fe=Te.to();if(Me.ch==0&&Me.line>ie.firstLine()&&(Me=Qt(Me.line-1,_n(ie.doc,Me.line-1).length)),Fe.ch==_n(ie.doc,Fe.line).text.length&&Fe.line<ie.lastLine()&&(Fe=Qt(Fe.line+1,0)),Me.line<ce.viewFrom||Fe.line>ce.viewTo-1)return!1;var it,vt,Et;Me.line==ce.viewFrom||(it=Is(ie,Me.line))==0?(vt=kt(ce.view[0].line),Et=ce.view[0].node):(vt=kt(ce.view[it].line),Et=ce.view[it-1].node.nextSibling);var Pt=Is(ie,Fe.line),Bt,gn;if(Pt==ce.view.length-1?(Bt=ce.viewTo-1,gn=ce.lineDiv.lastChild):(Bt=kt(ce.view[Pt+1].line)-1,gn=ce.view[Pt+1].node.previousSibling),!Et)return!1;for(var Gt=ie.doc.splitLines(hd(ie,Et,gn,vt,Bt)),Tn=Kt(ie.doc,Qt(vt,0),Qt(Bt,_n(ie.doc,Bt).text.length));Gt.length>1&&Tn.length>1;)if(Ft(Gt)==Ft(Tn))Gt.pop(),Tn.pop(),Bt--;else if(Gt[0]==Tn[0])Gt.shift(),Tn.shift(),vt++;else break;for(var bn=0,fi=0,wi=Gt[0],Oi=Tn[0],er=Math.min(wi.length,Oi.length);bn<er&&wi.charCodeAt(bn)==Oi.charCodeAt(bn);)++bn;for(var br=Ft(Gt),hr=Ft(Tn),Ir=Math.min(br.length-(Gt.length==1?bn:0),hr.length-(Tn.length==1?bn:0));fi<Ir&&br.charCodeAt(br.length-fi-1)==hr.charCodeAt(hr.length-fi-1);)++fi;if(Gt.length==1&&Tn.length==1&&vt==Me.line)for(;bn&&bn>Me.ch&&br.charCodeAt(br.length-fi-1)==hr.charCodeAt(hr.length-fi-1);)bn--,fi++;Gt[Gt.length-1]=br.slice(0,br.length-fi).replace(/^\u200b+/,""),Gt[0]=Gt[0].slice(bn).replace(/\u200b+$/,"");var ao=Qt(vt,bn),lr=Qt(Bt,Tn.length?Ft(Tn).length-fi:0);if(Gt.length>1||Gt[0]||rn(ao,lr))return _c(ie.doc,Gt,ao,lr,"+input"),!0},_s.prototype.ensurePolled=function(){this.forceCompositionEnd()},_s.prototype.reset=function(){this.forceCompositionEnd()},_s.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},_s.prototype.readFromDOMSoon=function(){var ie=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(ie.readDOMTimeout=null,ie.composing)if(ie.composing.done)ie.composing=null;else return;ie.updateFromDOM()},80))},_s.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&Jt(this.cm,function(){return gs(ie.cm)})},_s.prototype.setUneditable=function(ie){ie.contentEditable="false"},_s.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||Wi(this.cm,Ud)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},_s.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},_s.prototype.onContextMenu=function(){},_s.prototype.resetPosition=function(){},_s.prototype.needsContentAttribute=!0;function Tf(ie,ce){var Te=wu(ie,ce.line);if(!Te||Te.hidden)return null;var Me=_n(ie.doc,ce.line),Fe=hs(Te,Me,ce.line),it=on(Me,ie.doc.direction),vt="left";if(it){var Et=pt(it,ce.ch);vt=Et%2?"right":"left"}var Pt=eh(Fe.map,ce.ch,vt);return Pt.offset=Pt.collapse=="right"?Pt.end:Pt.start,Pt}function Xp(ie){for(var ce=ie;ce;ce=ce.parentNode)if(/CodeMirror-gutter-wrapper/.test(ce.className))return!0;return!1}function ud(ie,ce){return ce&&(ie.bad=!0),ie}function hd(ie,ce,Te,Me,Fe){var it="",vt=!1,Et=ie.doc.lineSeparator(),Pt=!1;function Bt(bn){return function(fi){return fi.id==bn}}function gn(){vt&&(it+=Et,Pt&&(it+=Et),vt=Pt=!1)}function Gt(bn){bn&&(gn(),it+=bn)}function Tn(bn){if(bn.nodeType==1){var fi=bn.getAttribute("cm-text");if(fi){Gt(fi);return}var wi=bn.getAttribute("cm-marker"),Oi;if(wi){var er=ie.findMarks(Qt(Me,0),Qt(Fe+1,0),Bt(+wi));er.length&&(Oi=er[0].find(0))&&Gt(Kt(ie.doc,Oi.from,Oi.to).join(Et));return}if(bn.getAttribute("contenteditable")=="false")return;var br=/^(pre|div|p|li|table|br)$/i.test(bn.nodeName);if(!/^br$/i.test(bn.nodeName)&&bn.textContent.length==0)return;br&&gn();for(var hr=0;hr<bn.childNodes.length;hr++)Tn(bn.childNodes[hr]);/^(pre|p)$/i.test(bn.nodeName)&&(Pt=!0),br&&(vt=!0)}else bn.nodeType==3&&Gt(bn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Tn(ce),ce!=Te;)ce=ce.nextSibling,Pt=!1;return it}function Gd(ie,ce,Te){var Me;if(ce==ie.display.lineDiv){if(Me=ie.display.lineDiv.childNodes[Te],!Me)return ud(ie.clipPos(Qt(ie.display.viewTo-1)),!0);ce=null,Te=0}else for(Me=ce;;Me=Me.parentNode){if(!Me||Me==ie.display.lineDiv)return null;if(Me.parentNode&&Me.parentNode==ie.display.lineDiv)break}for(var Fe=0;Fe<ie.display.view.length;Fe++){var it=ie.display.view[Fe];if(it.node==Me)return hm(it,ce,Te)}}function hm(ie,ce,Te){var Me=ie.text.firstChild,Fe=!1;if(!ce||!mt(Me,ce))return ud(Qt(kt(ie.line),0),!0);if(ce==Me&&(Fe=!0,ce=Me.childNodes[Te],Te=0,!ce)){var it=ie.rest?Ft(ie.rest):ie.line;return ud(Qt(kt(it),it.text.length),Fe)}var vt=ce.nodeType==3?ce:null,Et=ce;for(!vt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(vt=ce.firstChild,Te&&(Te=vt.nodeValue.length));Et.parentNode!=Me;)Et=Et.parentNode;var Pt=ie.measure,Bt=Pt.maps;function gn(Oi,er,br){for(var hr=-1;hr<(Bt?Bt.length:0);hr++)for(var Ir=hr<0?Pt.map:Bt[hr],ao=0;ao<Ir.length;ao+=3){var lr=Ir[ao+2];if(lr==Oi||lr==er){var Bo=kt(hr<0?ie.line:ie.rest[hr]),Fs=Ir[ao]+br;return(br<0||lr!=Oi)&&(Fs=Ir[ao+(br?1:0)]),Qt(Bo,Fs)}}}var Gt=gn(vt,Et,Te);if(Gt)return ud(Gt,Fe);for(var Tn=Et.nextSibling,bn=vt?vt.nodeValue.length-Te:0;Tn;Tn=Tn.nextSibling){if(Gt=gn(Tn,Tn.firstChild,0),Gt)return ud(Qt(Gt.line,Gt.ch-bn),Fe);bn+=Tn.textContent.length}for(var fi=Et.previousSibling,wi=Te;fi;fi=fi.previousSibling){if(Gt=gn(fi,fi.firstChild,-1),Gt)return ud(Qt(Gt.line,Gt.ch+wi),Fe);wi+=fi.textContent.length}}var xa=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new ot,this.hasSelection=!1,this.composing=null};xa.prototype.init=function(ie){var ce=this,Te=this,Me=this.cm;this.createField(ie);var Fe=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),ue&&(Fe.style.width="0px"),Rt(Fe,"input",function(){Ce&&xe>=9&&ce.hasSelection&&(ce.hasSelection=null),Te.poll()}),Rt(Fe,"paste",function(vt){dn(Me,vt)||Wp(vt,Me)||(Me.state.pasteIncoming=+new Date,Te.fastPoll())});function it(vt){if(!dn(Me,vt)){if(Me.somethingSelected())Tc({lineWise:!1,text:Me.getSelections()});else if(Me.options.lineWiseCopyCut){var Et=Vp(Me);Tc({lineWise:!0,text:Et.text}),vt.type=="cut"?Me.setSelections(Et.ranges,null,xt):(Te.prevInput="",Fe.value=Et.text.join(`
|
|
|
`),_t(Fe))}else return;vt.type=="cut"&&(Me.state.cutIncoming=+new Date)}}Rt(Fe,"cut",it),Rt(Fe,"copy",it),Rt(ie.scroller,"paste",function(vt){if(!(fs(ie,vt)||dn(Me,vt))){if(!Fe.dispatchEvent){Me.state.pasteIncoming=+new Date,Te.focus();return}var Et=new Event("paste");Et.clipboardData=vt.clipboardData,Fe.dispatchEvent(Et)}}),Rt(ie.lineSpace,"selectstart",function(vt){fs(ie,vt)||ri(vt)}),Rt(Fe,"compositionstart",function(){var vt=Me.getCursor("from");Te.composing&&Te.composing.range.clear(),Te.composing={start:vt,range:Me.markText(vt,Me.getCursor("to"),{className:"CodeMirror-composing"})}}),Rt(Fe,"compositionend",function(){Te.composing&&(Te.poll(),Te.composing.range.clear(),Te.composing=null)})},xa.prototype.createField=function(ie){this.wrapper=Yp(),this.textarea=this.wrapper.firstChild},xa.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},xa.prototype.prepareSelection=function(){var ie=this.cm,ce=ie.display,Te=ie.doc,Me=Pu(ie);if(ie.options.moveInputWithCursor){var Fe=yo(ie,Te.sel.primary().head,"div"),it=ce.wrapper.getBoundingClientRect(),vt=ce.lineDiv.getBoundingClientRect();Me.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,Fe.top+vt.top-it.top)),Me.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,Fe.left+vt.left-it.left))}return Me},xa.prototype.showSelection=function(ie){var ce=this.cm,Te=ce.display;Ie(Te.cursorDiv,ie.cursors),Ie(Te.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},xa.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ce=this.cm;if(ce.somethingSelected()){this.prevInput="";var Te=ce.getSelection();this.textarea.value=Te,ce.state.focused&&_t(this.textarea),Ce&&xe>=9&&(this.hasSelection=Te)}else ie||(this.prevInput=this.textarea.value="",Ce&&xe>=9&&(this.hasSelection=null))}},xa.prototype.getField=function(){return this.textarea},xa.prototype.supportsTouch=function(){return!1},xa.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!z||gt()!=this.textarea))try{this.textarea.focus()}catch(ie){}},xa.prototype.blur=function(){this.textarea.blur()},xa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},xa.prototype.receivedFocus=function(){this.slowPoll()},xa.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},xa.prototype.fastPoll=function(){var ie=!1,ce=this;ce.pollingFast=!0;function Te(){var Me=ce.poll();!Me&&!ie?(ie=!0,ce.polling.set(60,Te)):(ce.pollingFast=!1,ce.slowPoll())}ce.polling.set(20,Te)},xa.prototype.poll=function(){var ie=this,ce=this.cm,Te=this.textarea,Me=this.prevInput;if(this.contextMenuPending||!ce.state.focused||Qe(Te)&&!Me&&!this.composing||ce.isReadOnly()||ce.options.disableInput||ce.state.keySeq)return!1;var Fe=Te.value;if(Fe==Me&&!ce.somethingSelected())return!1;if(Ce&&xe>=9&&this.hasSelection===Fe||oe&&/[\uf700-\uf7ff]/.test(Fe))return ce.display.input.reset(),!1;if(ce.doc.sel==ce.display.selForContextMenu){var it=Fe.charCodeAt(0);if(it==8203&&!Me&&(Me="\u200B"),it==8666)return this.reset(),this.cm.execCommand("undo")}for(var vt=0,Et=Math.min(Me.length,Fe.length);vt<Et&&Me.charCodeAt(vt)==Fe.charCodeAt(vt);)++vt;return Jt(ce,function(){Ud(ce,Fe.slice(vt),Me.length-vt,null,ie.composing?"*compose":null),Fe.length>1e3||Fe.indexOf(`
|
|
|
`)>-1?Te.value=ie.prevInput="":ie.prevInput=Fe,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ce.markText(ie.composing.start,ce.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},xa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},xa.prototype.onKeyPress=function(){Ce&&xe>=9&&(this.hasSelection=null),this.fastPoll()},xa.prototype.onContextMenu=function(ie){var ce=this,Te=ce.cm,Me=Te.display,Fe=ce.textarea;ce.contextMenuPending&&ce.contextMenuPending();var it=va(Te,ie),vt=Me.scroller.scrollTop;if(!it||pe)return;var Et=Te.options.resetSelectionOnContextMenu;Et&&Te.doc.sel.contains(it)==-1&&Wi(Te,rl)(Te.doc,Uo(it),xt);var Pt=Fe.style.cssText,Bt=ce.wrapper.style.cssText,gn=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",Fe.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(ie.clientY-gn.top-5)+"px; left: "+(ie.clientX-gn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(Ce?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Gt;be&&(Gt=window.scrollY),Me.input.focus(),be&&window.scrollTo(null,Gt),Me.input.reset(),Te.somethingSelected()||(Fe.value=ce.prevInput=" "),ce.contextMenuPending=bn,Me.selForContextMenu=Te.doc.sel,clearTimeout(Me.detectingSelectAll);function Tn(){if(Fe.selectionStart!=null){var wi=Te.somethingSelected(),Oi="\u200B"+(wi?Fe.value:"");Fe.value="\u21DA",Fe.value=Oi,ce.prevInput=wi?"":"\u200B",Fe.selectionStart=1,Fe.selectionEnd=Oi.length,Me.selForContextMenu=Te.doc.sel}}function bn(){if(ce.contextMenuPending==bn&&(ce.contextMenuPending=!1,ce.wrapper.style.cssText=Bt,Fe.style.cssText=Pt,Ce&&xe<9&&Me.scrollbars.setScrollTop(Me.scroller.scrollTop=vt),Fe.selectionStart!=null)){(!Ce||Ce&&xe<9)&&Tn();var wi=0,Oi=function(){Me.selForContextMenu==Te.doc.sel&&Fe.selectionStart==0&&Fe.selectionEnd>0&&ce.prevInput=="\u200B"?Wi(Te,da)(Te):wi++<10?Me.detectingSelectAll=setTimeout(Oi,500):(Me.selForContextMenu=null,Me.input.reset())};Me.detectingSelectAll=setTimeout(Oi,200)}}if(Ce&&xe>=9&&Tn(),ve){ki(ie);var fi=function(){En(window,"mouseup",fi),setTimeout(bn,20)};Rt(window,"mouseup",fi)}else setTimeout(bn,50)},xa.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},xa.prototype.setUneditable=function(){},xa.prototype.needsContentAttribute=!1;function cm(ie,ce){if(ce=ce?Dt(ce):{},ce.value=ie.value,!ce.tabindex&&ie.tabIndex&&(ce.tabindex=ie.tabIndex),!ce.placeholder&&ie.placeholder&&(ce.placeholder=ie.placeholder),ce.autofocus==null){var Te=gt();ce.autofocus=Te==ie||ie.getAttribute("autofocus")!=null&&Te==document.body}function Me(){ie.value=Et.getValue()}var Fe;if(ie.form&&(Rt(ie.form,"submit",Me),!ce.leaveSubmitMethodAlone)){var it=ie.form;Fe=it.submit;try{var vt=it.submit=function(){Me(),it.submit=Fe,it.submit(),it.submit=vt}}catch(Pt){}}ce.finishInit=function(Pt){Pt.save=Me,Pt.getTextArea=function(){return ie},Pt.toTextArea=function(){Pt.toTextArea=isNaN,Me(),ie.parentNode.removeChild(Pt.getWrapperElement()),ie.style.display="",ie.form&&(En(ie.form,"submit",Me),!ce.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=Fe))}},ie.style.display="none";var Et=is(function(Pt){return ie.parentNode.insertBefore(Pt,ie.nextSibling)},ce);return Et}function cd(ie){ie.off=En,ie.on=Rt,ie.wheelEventPixels=fr,ie.Doc=Ya,ie.splitLines=sr,ie.countColumn=ut,ie.findColumn=cn,ie.isWordChar=rt,ie.Pass=wt,ie.signal=Sn,ie.Line=Er,ie.changeEnd=Zr,ie.scrollbarModel=Wu,ie.Pos=Qt,ie.cmpPos=rn,ie.modes=mr,ie.mimeModes=cr,ie.resolveMode=Vn,ie.getMode=He,ie.modeExtensions=Xe,ie.extendMode=nt,ie.copyState=bt,ie.startState=sn,ie.innerMode=Nt,ie.commands=Vh,ie.keyMap=Al,ie.keyName=im,ie.isModifierKey=id,ie.lookupKey=hu,ie.normalizeKeyMap=Tp,ie.StringStream=Zt,ie.SharedTextMarker=ah,ie.TextMarker=en,ie.LineWidget=kh,ie.e_preventDefault=ri,ie.e_stopPropagation=Ni,ie.e_stop=ki,ie.addClass=Mt,ie.contains=mt,ie.rmClass=Ae,ie.keyNames=lh}lm(is),Yh(is);var Th="iter insert remove copy getEditor constructor".split(" ");for(var Wd in Ya.prototype)Ya.prototype.hasOwnProperty(Wd)&&ct(Th,Wd)<0&&(is.prototype[Wd]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Ya.prototype[Wd]));return Wn(Ya),is.inputStyles={textarea:xa,contenteditable:_s},is.defineMode=function(ie){!is.defaults.mode&&ie!="null"&&(is.defaults.mode=ie),ir.apply(this,arguments)},is.defineMIME=po,is.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),is.defineMIME("text/plain","null"),is.defineExtension=function(ie,ce){is.prototype[ie]=ce},is.defineDocExtension=function(ie,ce){Ya.prototype[ie]=ce},is.fromTextArea=cm,cd(is),is.version="5.58.2",is})},25419:function(xn,un,Re){(function(ke){ke(Re(89780),Re(15525),Re(98101))})(function(ke){"use strict";ke.defineMode("markdown",function(Se,Be){var Le=ke.getMode(Se,"text/html"),Ce=Le.name=="null";function xe(ut){if(ke.findModeByName){var ot=ke.findModeByName(ut);ot&&(ut=ot.mime||ot.mimes[0])}var ct=ke.getMode(Se,ut);return ct.name=="null"?null:ct}Be.highlightFormatting===void 0&&(Be.highlightFormatting=!1),Be.maxBlockquoteDepth===void 0&&(Be.maxBlockquoteDepth=0),Be.taskLists===void 0&&(Be.taskLists=!1),Be.strikethrough===void 0&&(Be.strikethrough=!1),Be.emoji===void 0&&(Be.emoji=!1),Be.fencedCodeBlockHighlighting===void 0&&(Be.fencedCodeBlockHighlighting=!0),Be.fencedCodeBlockDefaultMode===void 0&&(Be.fencedCodeBlockDefaultMode="text/plain"),Be.xml===void 0&&(Be.xml=!0),Be.tokenTypeOverrides===void 0&&(Be.tokenTypeOverrides={});var be={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 ye in be)be.hasOwnProperty(ye)&&Be.tokenTypeOverrides[ye]&&(be[ye]=Be.tokenTypeOverrides[ye]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,pe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,de=/^\[(x| )\](?=\s)/i,ge=Be.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,fe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ue=/^[^#!\[\]*_\\<>` "'(~:]+/,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]/,re=" ";function ae(ut,ot,ct){return ot.f=ot.inline=ct,ct(ut,ot)}function le(ut,ot,ct){return ot.f=ot.block=ct,ct(ut,ot)}function me(ut){return!ut||!/\S/.test(ut.string)}function ve(ut){if(ut.linkTitle=!1,ut.linkHref=!1,ut.linkText=!1,ut.em=!1,ut.strong=!1,ut.strikethrough=!1,ut.quote=0,ut.indentedCode=!1,ut.f==Ae){var ot=Ce;if(!ot){var ct=ke.innerMode(Le,ut.htmlState);ot=ct.mode.name=="xml"&&ct.state.tagStart===null&&!ct.state.context&&ct.state.tokenize.isInText}ot&&(ut.f=qe,ut.block=Pe,ut.htmlState=null)}return ut.trailingSpace=0,ut.trailingSpaceNewLine=!1,ut.prevLine=ut.thisLine,ut.thisLine={stream:null},null}function Pe(ut,ot){var ct=ut.column()===ot.indentation,yt=me(ot.prevLine.stream),wt=ot.indentedCode,xt=ot.prevLine.hr,zt=ot.list!==!1,Ut=(ot.listStack[ot.listStack.length-1]||0)+3;ot.indentedCode=!1;var cn=ot.indentation;if(ot.indentationDiff===null&&(ot.indentationDiff=ot.indentation,zt)){for(ot.list=null;cn<ot.listStack[ot.listStack.length-1];)ot.listStack.pop(),ot.listStack.length?ot.indentation=ot.listStack[ot.listStack.length-1]:ot.list=!1;ot.list!==!1&&(ot.indentationDiff=cn-ot.listStack[ot.listStack.length-1])}var jt=!yt&&!xt&&!ot.prevLine.header&&(!zt||!wt)&&!ot.prevLine.fencedCodeEnd,mn=(ot.list===!1||xt||yt)&&ot.indentation<=Ut&&ut.match(we),Ft=null;if(ot.indentationDiff>=4&&(wt||ot.prevLine.fencedCodeEnd||ot.prevLine.header||yt))return ut.skipToEnd(),ot.indentedCode=!0,be.code;if(ut.eatSpace())return null;if(ct&&ot.indentation<=Ut&&(Ft=ut.match(ge))&&Ft[1].length<=6)return ot.quote=0,ot.header=Ft[1].length,ot.thisLine.header=!0,Be.highlightFormatting&&(ot.formatting="header"),ot.f=ot.inline,Ie(ot);if(ot.indentation<=Ut&&ut.eat(">"))return ot.quote=ct?1:ot.quote+1,Be.highlightFormatting&&(ot.formatting="quote"),ut.eatSpace(),Ie(ot);if(!mn&&!ot.setext&&ct&&ot.indentation<=Ut&&(Ft=ut.match(pe))){var Yt=Ft[1]?"ol":"ul";return ot.indentation=cn+ut.current().length,ot.list=!0,ot.quote=0,ot.listStack.push(ot.indentation),ot.em=!1,ot.strong=!1,ot.code=!1,ot.strikethrough=!1,Be.taskLists&&ut.match(de,!1)&&(ot.taskList=!0),ot.f=ot.inline,Be.highlightFormatting&&(ot.formatting=["list","list-"+Yt]),Ie(ot)}else{if(ct&&ot.indentation<=Ut&&(Ft=ut.match(ee,!0)))return ot.quote=0,ot.fencedEndRE=new RegExp(Ft[1]+"+ *$"),ot.localMode=Be.fencedCodeBlockHighlighting&&xe(Ft[2]||Be.fencedCodeBlockDefaultMode),ot.localMode&&(ot.localState=ke.startState(ot.localMode)),ot.f=ot.block=Oe,Be.highlightFormatting&&(ot.formatting="code-block"),ot.code=-1,Ie(ot);if(ot.setext||(!jt||!zt)&&!ot.quote&&ot.list===!1&&!ot.code&&!mn&&!z.test(ut.string)&&(Ft=ut.lookAhead(1))&&(Ft=Ft.match(fe)))return ot.setext?(ot.header=ot.setext,ot.setext=0,ut.skipToEnd(),Be.highlightFormatting&&(ot.formatting="header")):(ot.header=Ft[0].charAt(0)=="="?1:2,ot.setext=ot.header),ot.thisLine.header=!0,ot.f=ot.inline,Ie(ot);if(mn)return ut.skipToEnd(),ot.hr=!0,ot.thisLine.hr=!0,be.hr;if(ut.peek()==="[")return ae(ut,ot,at)}return ae(ut,ot,ot.inline)}function Ae(ut,ot){var ct=Le.token(ut,ot.htmlState);if(!Ce){var yt=ke.innerMode(Le,ot.htmlState);(yt.mode.name=="xml"&&yt.state.tagStart===null&&!yt.state.context&&yt.state.tokenize.isInText||ot.md_inside&&ut.current().indexOf(">")>-1)&&(ot.f=qe,ot.block=Pe,ot.htmlState=null)}return ct}function Oe(ut,ot){var ct=ot.listStack[ot.listStack.length-1]||0,yt=ot.indentation<ct,wt=ct+3;if(ot.fencedEndRE&&ot.indentation<=wt&&(yt||ut.match(ot.fencedEndRE))){Be.highlightFormatting&&(ot.formatting="code-block");var xt;return yt||(xt=Ie(ot)),ot.localMode=ot.localState=null,ot.block=Pe,ot.f=qe,ot.fencedEndRE=null,ot.code=0,ot.thisLine.fencedCodeEnd=!0,yt?le(ut,ot,ot.block):xt}else return ot.localMode?ot.localMode.token(ut,ot.localState):(ut.skipToEnd(),be.code)}function Ie(ut){var ot=[];if(ut.formatting){ot.push(be.formatting),typeof ut.formatting=="string"&&(ut.formatting=[ut.formatting]);for(var ct=0;ct<ut.formatting.length;ct++)ot.push(be.formatting+"-"+ut.formatting[ct]),ut.formatting[ct]==="header"&&ot.push(be.formatting+"-"+ut.formatting[ct]+"-"+ut.header),ut.formatting[ct]==="quote"&&(!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=ut.quote?ot.push(be.formatting+"-"+ut.formatting[ct]+"-"+ut.quote):ot.push("error"))}if(ut.taskOpen)return ot.push("meta"),ot.length?ot.join(" "):null;if(ut.taskClosed)return ot.push("property"),ot.length?ot.join(" "):null;if(ut.linkHref?ot.push(be.linkHref,"url"):(ut.strong&&ot.push(be.strong),ut.em&&ot.push(be.em),ut.strikethrough&&ot.push(be.strikethrough),ut.emoji&&ot.push(be.emoji),ut.linkText&&ot.push(be.linkText),ut.code&&ot.push(be.code),ut.image&&ot.push(be.image),ut.imageAltText&&ot.push(be.imageAltText,"link"),ut.imageMarker&&ot.push(be.imageMarker)),ut.header&&ot.push(be.header,be.header+"-"+ut.header),ut.quote&&(ot.push(be.quote),!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=ut.quote?ot.push(be.quote+"-"+ut.quote):ot.push(be.quote+"-"+Be.maxBlockquoteDepth)),ut.list!==!1){var yt=(ut.listStack.length-1)%3;yt?yt===1?ot.push(be.list2):ot.push(be.list3):ot.push(be.list1)}return ut.trailingSpaceNewLine?ot.push("trailing-space-new-line"):ut.trailingSpace&&ot.push("trailing-space-"+(ut.trailingSpace%2?"a":"b")),ot.length?ot.join(" "):null}function Ze(ut,ot){if(ut.match(ue,!0))return Ie(ot)}function qe(ut,ot){var ct=ot.text(ut,ot);if(typeof ct!="undefined")return ct;if(ot.list)return ot.list=null,Ie(ot);if(ot.taskList){var yt=ut.match(de,!0)[1]===" ";return yt?ot.taskOpen=!0:ot.taskClosed=!0,Be.highlightFormatting&&(ot.formatting="task"),ot.taskList=!1,Ie(ot)}if(ot.taskOpen=!1,ot.taskClosed=!1,ot.header&&ut.match(/^#+$/,!0))return Be.highlightFormatting&&(ot.formatting="header"),Ie(ot);var wt=ut.next();if(ot.linkTitle){ot.linkTitle=!1;var xt=wt;wt==="("&&(xt=")"),xt=(xt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var zt="^\\s*(?:[^"+xt+"\\\\]+|\\\\\\\\|\\\\.)"+xt;if(ut.match(new RegExp(zt),!0))return be.linkHref}if(wt==="`"){var Ut=ot.formatting;Be.highlightFormatting&&(ot.formatting="code"),ut.eatWhile("`");var cn=ut.current().length;if(ot.code==0&&(!ot.quote||cn==1))return ot.code=cn,Ie(ot);if(cn==ot.code){var jt=Ie(ot);return ot.code=0,jt}else return ot.formatting=Ut,Ie(ot)}else if(ot.code)return Ie(ot);if(wt==="\\"&&(ut.next(),Be.highlightFormatting)){var mn=Ie(ot),Ft=be.formatting+"-escape";return mn?mn+" "+Ft:Ft}if(wt==="!"&&ut.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ot.imageMarker=!0,ot.image=!0,Be.highlightFormatting&&(ot.formatting="image"),Ie(ot);if(wt==="["&&ot.imageMarker&&ut.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ot.imageMarker=!1,ot.imageAltText=!0,Be.highlightFormatting&&(ot.formatting="image"),Ie(ot);if(wt==="]"&&ot.imageAltText){Be.highlightFormatting&&(ot.formatting="image");var mn=Ie(ot);return ot.imageAltText=!1,ot.image=!1,ot.inline=ot.f=mt,mn}if(wt==="["&&!ot.image)return ot.linkText&&ut.match(/^.*?\]/)||(ot.linkText=!0,Be.highlightFormatting&&(ot.formatting="link")),Ie(ot);if(wt==="]"&&ot.linkText){Be.highlightFormatting&&(ot.formatting="link");var mn=Ie(ot);return ot.linkText=!1,ot.inline=ot.f=ut.match(/\(.*?\)| ?\[.*?\]/,!1)?mt:qe,mn}if(wt==="<"&&ut.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ot.f=ot.inline=Je,Be.highlightFormatting&&(ot.formatting="link");var mn=Ie(ot);return mn?mn+=" ":mn="",mn+be.linkInline}if(wt==="<"&&ut.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ot.f=ot.inline=Je,Be.highlightFormatting&&(ot.formatting="link");var mn=Ie(ot);return mn?mn+=" ":mn="",mn+be.linkEmail}if(Be.xml&&wt==="<"&&ut.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Yt=ut.string.indexOf(">",ut.pos);if(Yt!=-1){var tn=ut.string.substring(ut.start,Yt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tn)&&(ot.md_inside=!0)}return ut.backUp(1),ot.htmlState=ke.startState(Le),le(ut,ot,Ae)}if(Be.xml&&wt==="<"&&ut.match(/^\/\w*?>/))return ot.md_inside=!1,"tag";if(wt==="*"||wt==="_"){for(var lt=1,Ue=ut.pos==1?" ":ut.string.charAt(ut.pos-2);lt<3&&ut.eat(wt);)lt++;var je=ut.peek()||" ",rt=!/\s/.test(je)&&(!oe.test(je)||/\s/.test(Ue)||oe.test(Ue)),dt=!/\s/.test(Ue)&&(!oe.test(Ue)||/\s/.test(je)||oe.test(je)),tt=null,Ke=null;if(lt%2&&(!ot.em&&rt&&(wt==="*"||!dt||oe.test(Ue))?tt=!0:ot.em==wt&&dt&&(wt==="*"||!rt||oe.test(je))&&(tt=!1)),lt>1&&(!ot.strong&&rt&&(wt==="*"||!dt||oe.test(Ue))?Ke=!0:ot.strong==wt&&dt&&(wt==="*"||!rt||oe.test(je))&&(Ke=!1)),Ke!=null||tt!=null){Be.highlightFormatting&&(ot.formatting=tt==null?"strong":Ke==null?"em":"strong em"),tt===!0&&(ot.em=wt),Ke===!0&&(ot.strong=wt);var jt=Ie(ot);return tt===!1&&(ot.em=!1),Ke===!1&&(ot.strong=!1),jt}}else if(wt===" "&&(ut.eat("*")||ut.eat("_"))){if(ut.peek()===" ")return Ie(ot);ut.backUp(1)}if(Be.strikethrough){if(wt==="~"&&ut.eatWhile(wt)){if(ot.strikethrough){Be.highlightFormatting&&(ot.formatting="strikethrough");var jt=Ie(ot);return ot.strikethrough=!1,jt}else if(ut.match(/^[^\s]/,!1))return ot.strikethrough=!0,Be.highlightFormatting&&(ot.formatting="strikethrough"),Ie(ot)}else if(wt===" "&&ut.match(/^~~/,!0)){if(ut.peek()===" ")return Ie(ot);ut.backUp(2)}}if(Be.emoji&&wt===":"&&ut.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ot.emoji=!0,Be.highlightFormatting&&(ot.formatting="emoji");var De=Ie(ot);return ot.emoji=!1,De}return wt===" "&&(ut.match(/^ +$/,!1)?ot.trailingSpace++:ot.trailingSpace&&(ot.trailingSpaceNewLine=!0)),Ie(ot)}function Je(ut,ot){var ct=ut.next();if(ct===">"){ot.f=ot.inline=qe,Be.highlightFormatting&&(ot.formatting="link");var yt=Ie(ot);return yt?yt+=" ":yt="",yt+be.linkInline}return ut.match(/^[^>]+/,!0),be.linkInline}function mt(ut,ot){if(ut.eatSpace())return null;var ct=ut.next();return ct==="("||ct==="["?(ot.f=ot.inline=Mt(ct==="("?")":"]"),Be.highlightFormatting&&(ot.formatting="link-string"),ot.linkHref=!0,Ie(ot)):"error"}var gt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Mt(ut){return function(ot,ct){var yt=ot.next();if(yt===ut){ct.f=ct.inline=qe,Be.highlightFormatting&&(ct.formatting="link-string");var wt=Ie(ct);return ct.linkHref=!1,wt}return ot.match(gt[ut]),ct.linkHref=!0,Ie(ct)}}function at(ut,ot){return ut.match(/^([^\]\\]|\\.)*\]:/,!1)?(ot.f=_t,ut.next(),Be.highlightFormatting&&(ot.formatting="link"),ot.linkText=!0,Ie(ot)):ae(ut,ot,qe)}function _t(ut,ot){if(ut.match(/^\]:/,!0)){ot.f=ot.inline=ht,Be.highlightFormatting&&(ot.formatting="link");var ct=Ie(ot);return ot.linkText=!1,ct}return ut.match(/^([^\]\\]|\\.)+/,!0),be.linkText}function ht(ut,ot){return ut.eatSpace()?null:(ut.match(/^[^\s]+/,!0),ut.peek()===void 0?ot.linkTitle=!0:ut.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ot.f=ot.inline=qe,be.linkHref+" url")}var Dt={startState:function(){return{f:Pe,prevLine:{stream:null},thisLine:{stream:null},block:Pe,htmlState:null,indentation:0,inline:qe,text:Ze,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(ut){return{f:ut.f,prevLine:ut.prevLine,thisLine:ut.thisLine,block:ut.block,htmlState:ut.htmlState&&ke.copyState(Le,ut.htmlState),indentation:ut.indentation,localMode:ut.localMode,localState:ut.localMode?ke.copyState(ut.localMode,ut.localState):null,inline:ut.inline,text:ut.text,formatting:!1,linkText:ut.linkText,linkTitle:ut.linkTitle,linkHref:ut.linkHref,code:ut.code,em:ut.em,strong:ut.strong,strikethrough:ut.strikethrough,emoji:ut.emoji,header:ut.header,setext:ut.setext,hr:ut.hr,taskList:ut.taskList,list:ut.list,listStack:ut.listStack.slice(0),quote:ut.quote,indentedCode:ut.indentedCode,trailingSpace:ut.trailingSpace,trailingSpaceNewLine:ut.trailingSpaceNewLine,md_inside:ut.md_inside,fencedEndRE:ut.fencedEndRE}},token:function(ut,ot){if(ot.formatting=!1,ut!=ot.thisLine.stream){if(ot.header=0,ot.hr=!1,ut.match(/^\s*$/,!0))return ve(ot),null;if(ot.prevLine=ot.thisLine,ot.thisLine={stream:ut},ot.taskList=!1,ot.trailingSpace=0,ot.trailingSpaceNewLine=!1,!ot.localState&&(ot.f=ot.block,ot.f!=Ae)){var ct=ut.match(/^\s*/,!0)[0].replace(/\t/g,re).length;if(ot.indentation=ct,ot.indentationDiff=null,ct>0)return null}}return ot.f(ut,ot)},innerMode:function(ut){return ut.block==Ae?{state:ut.htmlState,mode:Le}:ut.localState?{state:ut.localState,mode:ut.localMode}:{state:ut,mode:Dt}},indent:function(ut,ot,ct){return ut.block==Ae&&Le.indent?Le.indent(ut.htmlState,ot,ct):ut.localState&&ut.localMode.indent?ut.localMode.indent(ut.localState,ot,ct):ke.Pass},blankLine:ve,getType:Ie,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Dt},"xml"),ke.defineMIME("text/markdown","markdown"),ke.defineMIME("text/x-markdown","markdown")})},98101:function(xn,un,Re){(function(ke){ke(Re(89780))})(function(ke){"use strict";ke.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 Se=0;Se<ke.modeInfo.length;Se++){var Be=ke.modeInfo[Se];Be.mimes&&(Be.mime=Be.mimes[0])}ke.findModeByMIME=function(Le){Le=Le.toLowerCase();for(var Ce=0;Ce<ke.modeInfo.length;Ce++){var xe=ke.modeInfo[Ce];if(xe.mime==Le)return xe;if(xe.mimes){for(var be=0;be<xe.mimes.length;be++)if(xe.mimes[be]==Le)return xe}}if(/\+xml$/.test(Le))return ke.findModeByMIME("application/xml");if(/\+json$/.test(Le))return ke.findModeByMIME("application/json")},ke.findModeByExtension=function(Le){Le=Le.toLowerCase();for(var Ce=0;Ce<ke.modeInfo.length;Ce++){var xe=ke.modeInfo[Ce];if(xe.ext){for(var be=0;be<xe.ext.length;be++)if(xe.ext[be]==Le)return xe}}},ke.findModeByFileName=function(Le){for(var Ce=0;Ce<ke.modeInfo.length;Ce++){var xe=ke.modeInfo[Ce];if(xe.file&&xe.file.test(Le))return xe}var be=Le.lastIndexOf("."),ye=be>-1&&Le.substring(be+1,Le.length);if(ye)return ke.findModeByExtension(ye)},ke.findModeByName=function(Le){Le=Le.toLowerCase();for(var Ce=0;Ce<ke.modeInfo.length;Ce++){var xe=ke.modeInfo[Ce];if(xe.name.toLowerCase()==Le)return xe;if(xe.alias){for(var be=0;be<xe.alias.length;be++)if(xe.alias[be].toLowerCase()==Le)return xe}}}})},67549:function(xn,un,Re){(function(ke){ke(Re(89780))})(function(ke){"use strict";ke.defineMode("stex",function(Se,Be){"use strict";function Le(ue,ee){ue.cmdState.push(ee)}function Ce(ue){return ue.cmdState.length>0?ue.cmdState[ue.cmdState.length-1]:null}function xe(ue){var ee=ue.cmdState.pop();ee&&ee.closeBracket()}function be(ue){for(var ee=ue.cmdState,z=ee.length-1;z>=0;z--){var oe=ee[z];if(oe.name!="DEFAULT")return oe}return{styleIdentifier:function(){return null}}}function ye(ue,ee,z){return function(){this.name=ue,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 we={};we.importmodule=ye("importmodule","tag",["string","builtin"]),we.documentclass=ye("documentclass","tag",["","atom"]),we.usepackage=ye("usepackage","tag",["atom"]),we.begin=ye("begin","tag",["atom"]),we.end=ye("end","tag",["atom"]),we.label=ye("label","tag",["atom"]),we.ref=ye("ref","tag",["atom"]),we.eqref=ye("eqref","tag",["atom"]),we.cite=ye("cite","tag",["atom"]),we.bibitem=ye("bibitem","tag",["atom"]),we.Bibitem=ye("Bibitem","tag",["atom"]),we.RBibitem=ye("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function pe(ue,ee){ue.f=ee}function de(ue,ee){var z;if(ue.match(/^\\[a-zA-Z@]+/)){var oe=ue.current().slice(1);return z=we.hasOwnProperty(oe)?we[oe]:we.DEFAULT,z=new z,Le(ee,z),pe(ee,fe),z.style}if(ue.match(/^\\[$&%#{}_]/)||ue.match(/^\\[,;!\/\\]/))return"tag";if(ue.match("\\["))return pe(ee,function(ae,le){return ge(ae,le,"\\]")}),"keyword";if(ue.match("\\("))return pe(ee,function(ae,le){return ge(ae,le,"\\)")}),"keyword";if(ue.match("$$"))return pe(ee,function(ae,le){return ge(ae,le,"$$")}),"keyword";if(ue.match("$"))return pe(ee,function(ae,le){return ge(ae,le,"$")}),"keyword";var re=ue.next();if(re=="%")return ue.skipToEnd(),"comment";if(re=="}"||re=="]"){if(z=Ce(ee),z)z.closeBracket(re),pe(ee,fe);else return"error";return"bracket"}else return re=="{"||re=="["?(z=we.DEFAULT,z=new z,Le(ee,z),"bracket"):/\d/.test(re)?(ue.eatWhile(/[\w.%]/),"atom"):(ue.eatWhile(/[\w\-_]/),z=be(ee),z.name=="begin"&&(z.argument=ue.current()),z.styleIdentifier())}function ge(ue,ee,z){if(ue.eatSpace())return null;if(z&&ue.match(z))return pe(ee,de),"keyword";if(ue.match(/^\\[a-zA-Z@]+/))return"tag";if(ue.match(/^[a-zA-Z]+/))return"variable-2";if(ue.match(/^\\[$&%#{}_]/)||ue.match(/^\\[,;!\/]/)||ue.match(/^[\^_&]/))return"tag";if(ue.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ue.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var oe=ue.next();return oe=="{"||oe=="}"||oe=="["||oe=="]"||oe=="("||oe==")"?"bracket":oe=="%"?(ue.skipToEnd(),"comment"):"error"}function fe(ue,ee){var z=ue.peek(),oe;return z=="{"||z=="["?(oe=Ce(ee),oe.openBracket(z),ue.eat(z),pe(ee,de),"bracket"):/[ \t\r]/.test(z)?(ue.eat(z),null):(pe(ee,de),xe(ee),de(ue,ee))}return{startState:function(){var ue=Be.inMathMode?function(ee,z){return ge(ee,z)}:de;return{cmdState:[],f:ue}},copyState:function(ue){return{cmdState:ue.cmdState.slice(),f:ue.f}},token:function(ue,ee){return ee.f(ue,ee)},blankLine:function(ue){ue.f=de,ue.cmdState.length=0},lineComment:"%"}}),ke.defineMIME("text/x-stex","stex"),ke.defineMIME("text/x-latex","stex")})},15525:function(xn,un,Re){(function(ke){ke(Re(89780))})(function(ke){"use strict";var Se={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},Be={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ke.defineMode("xml",function(Le,Ce){var xe=Le.indentUnit,be={},ye=Ce.htmlMode?Se:Be;for(var we in ye)be[we]=ye[we];for(var we in Ce)be[we]=Ce[we];var pe,de;function ge(Je,mt){function gt(_t){return mt.tokenize=_t,_t(Je,mt)}var Mt=Je.next();if(Mt=="<")return Je.eat("!")?Je.eat("[")?Je.match("CDATA[")?gt(ee("atom","]]>")):null:Je.match("--")?gt(ee("comment","-->")):Je.match("DOCTYPE",!0,!0)?(Je.eatWhile(/[\w\._\-]/),gt(z(1))):null:Je.eat("?")?(Je.eatWhile(/[\w\._\-]/),mt.tokenize=ee("meta","?>"),"meta"):(pe=Je.eat("/")?"closeTag":"openTag",mt.tokenize=fe,"tag bracket");if(Mt=="&"){var at;return Je.eat("#")?Je.eat("x")?at=Je.eatWhile(/[a-fA-F\d]/)&&Je.eat(";"):at=Je.eatWhile(/[\d]/)&&Je.eat(";"):at=Je.eatWhile(/[\w\.\-:]/)&&Je.eat(";"),at?"atom":"error"}else return Je.eatWhile(/[^&<]/),null}ge.isInText=!0;function fe(Je,mt){var gt=Je.next();if(gt==">"||gt=="/"&&Je.eat(">"))return mt.tokenize=ge,pe=gt==">"?"endTag":"selfcloseTag","tag bracket";if(gt=="=")return pe="equals",null;if(gt=="<"){mt.tokenize=ge,mt.state=le,mt.tagName=mt.tagStart=null;var Mt=mt.tokenize(Je,mt);return Mt?Mt+" tag error":"tag error"}else return/[\'\"]/.test(gt)?(mt.tokenize=ue(gt),mt.stringStartCol=Je.column(),mt.tokenize(Je,mt)):(Je.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ue(Je){var mt=function(gt,Mt){for(;!gt.eol();)if(gt.next()==Je){Mt.tokenize=fe;break}return"string"};return mt.isInAttribute=!0,mt}function ee(Je,mt){return function(gt,Mt){for(;!gt.eol();){if(gt.match(mt)){Mt.tokenize=ge;break}gt.next()}return Je}}function z(Je){return function(mt,gt){for(var Mt;(Mt=mt.next())!=null;){if(Mt=="<")return gt.tokenize=z(Je+1),gt.tokenize(mt,gt);if(Mt==">")if(Je==1){gt.tokenize=ge;break}else return gt.tokenize=z(Je-1),gt.tokenize(mt,gt)}return"meta"}}function oe(Je,mt,gt){this.prev=Je.context,this.tagName=mt,this.indent=Je.indented,this.startOfLine=gt,(be.doNotIndent.hasOwnProperty(mt)||Je.context&&Je.context.noIndent)&&(this.noIndent=!0)}function re(Je){Je.context&&(Je.context=Je.context.prev)}function ae(Je,mt){for(var gt;;){if(!Je.context||(gt=Je.context.tagName,!be.contextGrabbers.hasOwnProperty(gt)||!be.contextGrabbers[gt].hasOwnProperty(mt)))return;re(Je)}}function le(Je,mt,gt){return Je=="openTag"?(gt.tagStart=mt.column(),me):Je=="closeTag"?ve:le}function me(Je,mt,gt){return Je=="word"?(gt.tagName=mt.current(),de="tag",Oe):be.allowMissingTagName&&Je=="endTag"?(de="tag bracket",Oe(Je,mt,gt)):(de="error",me)}function ve(Je,mt,gt){if(Je=="word"){var Mt=mt.current();return gt.context&>.context.tagName!=Mt&&be.implicitlyClosed.hasOwnProperty(gt.context.tagName)&&re(gt),gt.context&>.context.tagName==Mt||be.matchClosing===!1?(de="tag",Pe):(de="tag error",Ae)}else return be.allowMissingTagName&&Je=="endTag"?(de="tag bracket",Pe(Je,mt,gt)):(de="error",Ae)}function Pe(Je,mt,gt){return Je!="endTag"?(de="error",Pe):(re(gt),le)}function Ae(Je,mt,gt){return de="error",Pe(Je,mt,gt)}function Oe(Je,mt,gt){if(Je=="word")return de="attribute",Ie;if(Je=="endTag"||Je=="selfcloseTag"){var Mt=gt.tagName,at=gt.tagStart;return gt.tagName=gt.tagStart=null,Je=="selfcloseTag"||be.autoSelfClosers.hasOwnProperty(Mt)?ae(gt,Mt):(ae(gt,Mt),gt.context=new oe(gt,Mt,at==gt.indented)),le}return de="error",Oe}function Ie(Je,mt,gt){return Je=="equals"?Ze:(be.allowMissing||(de="error"),Oe(Je,mt,gt))}function Ze(Je,mt,gt){return Je=="string"?qe:Je=="word"&&be.allowUnquoted?(de="string",Oe):(de="error",Oe(Je,mt,gt))}function qe(Je,mt,gt){return Je=="string"?qe:Oe(Je,mt,gt)}return{startState:function(Je){var mt={tokenize:ge,state:le,indented:Je||0,tagName:null,tagStart:null,context:null};return Je!=null&&(mt.baseIndent=Je),mt},token:function(Je,mt){if(!mt.tagName&&Je.sol()&&(mt.indented=Je.indentation()),Je.eatSpace())return null;pe=null;var gt=mt.tokenize(Je,mt);return(gt||pe)&>!="comment"&&(de=null,mt.state=mt.state(pe||gt,Je,mt),de&&(gt=de=="error"?gt+" error":de)),gt},indent:function(Je,mt,gt){var Mt=Je.context;if(Je.tokenize.isInAttribute)return Je.tagStart==Je.indented?Je.stringStartCol+1:Je.indented+xe;if(Mt&&Mt.noIndent)return ke.Pass;if(Je.tokenize!=fe&&Je.tokenize!=ge)return gt?gt.match(/^(\s*)/)[0].length:0;if(Je.tagName)return be.multilineTagIndentPastTag!==!1?Je.tagStart+Je.tagName.length+2:Je.tagStart+xe*(be.multilineTagIndentFactor||1);if(be.alignCDATA&&/<!\[CDATA\[/.test(mt))return 0;var at=mt&&/^<(\/)?([\w_:\.-]*)/.exec(mt);if(at&&at[1])for(;Mt;)if(Mt.tagName==at[2]){Mt=Mt.prev;break}else if(be.implicitlyClosed.hasOwnProperty(Mt.tagName))Mt=Mt.prev;else break;else if(at)for(;Mt;){var _t=be.contextGrabbers[Mt.tagName];if(_t&&_t.hasOwnProperty(at[2]))Mt=Mt.prev;else break}for(;Mt&&Mt.prev&&!Mt.startOfLine;)Mt=Mt.prev;return Mt?Mt.indent+xe:Je.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:be.htmlMode?"html":"xml",helperType:be.htmlMode?"html":"xml",skipAttribute:function(Je){Je.state==Ze&&(Je.state=Oe)},xmlCurrentTag:function(Je){return Je.tagName?{name:Je.tagName,close:Je.type=="closeTag"}:null},xmlCurrentContext:function(Je){for(var mt=[],gt=Je.context;gt;gt=gt.prev)gt.tagName&&mt.push(gt.tagName);return mt.reverse()}}}),ke.defineMIME("text/xml","xml"),ke.defineMIME("application/xml","xml"),ke.mimeModes.hasOwnProperty("text/html")||ke.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function(xn,un,Re){var ke=Re(97671);(function(Se,Be){xn.exports=Be()})(this,function(){"use strict";function Se(ze){var $e=typeof ze;return ze!==null&&($e==="object"||$e==="function")}function Be(ze){return typeof ze=="function"}var Le=void 0;Array.isArray?Le=Array.isArray:Le=function(ze){return Object.prototype.toString.call(ze)==="[object Array]"};var Ce=Le,xe=0,be=void 0,ye=void 0,we=function($e,We){ve[xe]=$e,ve[xe+1]=We,xe+=2,xe===2&&(ye?ye(Pe):Oe())};function pe(ze){ye=ze}function de(ze){we=ze}var ge=typeof window!="undefined"?window:void 0,fe=ge||{},ue=fe.MutationObserver||fe.WebKitMutationObserver,ee=typeof self=="undefined"&&typeof ke!="undefined"&&{}.toString.call(ke)==="[object process]",z=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function oe(){return function(){return ke.nextTick(Pe)}}function re(){return typeof be!="undefined"?function(){be(Pe)}:me()}function ae(){var ze=0,$e=new ue(Pe),We=document.createTextNode("");return $e.observe(We,{characterData:!0}),function(){We.data=ze=++ze%2}}function le(){var ze=new MessageChannel;return ze.port1.onmessage=Pe,function(){return ze.port2.postMessage(0)}}function me(){var ze=setTimeout;return function(){return ze(Pe,1)}}var ve=new Array(1e3);function Pe(){for(var ze=0;ze<xe;ze+=2){var $e=ve[ze],We=ve[ze+1];$e(We),ve[ze]=void 0,ve[ze+1]=void 0}xe=0}function Ae(){try{var ze=Function("return this")().require("vertx");return be=ze.runOnLoop||ze.runOnContext,re()}catch($e){return me()}}var Oe=void 0;ee?Oe=oe():ue?Oe=ae():z?Oe=le():ge===void 0?Oe=Ae():Oe=me();function Ie(ze,$e){var We=this,Ve=new this.constructor(Je);Ve[qe]===void 0&&Yt(Ve);var pt=We._state;if(pt){var Lt=arguments[pt-1];we(function(){return cn(pt,Ve,Lt,We._result)})}else zt(We,Ve,ze,$e);return Ve}function Ze(ze){var $e=this;if(ze&&typeof ze=="object"&&ze.constructor===$e)return ze;var We=new $e(Je);return ct(We,ze),We}var qe=Math.random().toString(36).substring(2);function Je(){}var mt=void 0,gt=1,Mt=2;function at(){return new TypeError("You cannot resolve a promise with itself")}function _t(){return new TypeError("A promises callback cannot return that same promise.")}function ht(ze,$e,We,Ve){try{ze.call($e,We,Ve)}catch(pt){return pt}}function Dt(ze,$e,We){we(function(Ve){var pt=!1,Lt=ht(We,$e,function(on){pt||(pt=!0,$e!==on?ct(Ve,on):wt(Ve,on))},function(on){pt||(pt=!0,xt(Ve,on))},"Settle: "+(Ve._label||" unknown promise"));!pt&&Lt&&(pt=!0,xt(Ve,Lt))},ze)}function ut(ze,$e){$e._state===gt?wt(ze,$e._result):$e._state===Mt?xt(ze,$e._result):zt($e,void 0,function(We){return ct(ze,We)},function(We){return xt(ze,We)})}function ot(ze,$e,We){$e.constructor===ze.constructor&&We===Ie&&$e.constructor.resolve===Ze?ut(ze,$e):We===void 0?wt(ze,$e):Be(We)?Dt(ze,$e,We):wt(ze,$e)}function ct(ze,$e){if(ze===$e)xt(ze,at());else if(Se($e)){var We=void 0;try{We=$e.then}catch(Ve){xt(ze,Ve);return}ot(ze,$e,We)}else wt(ze,$e)}function yt(ze){ze._onerror&&ze._onerror(ze._result),Ut(ze)}function wt(ze,$e){ze._state===mt&&(ze._result=$e,ze._state=gt,ze._subscribers.length!==0&&we(Ut,ze))}function xt(ze,$e){ze._state===mt&&(ze._state=Mt,ze._result=$e,we(yt,ze))}function zt(ze,$e,We,Ve){var pt=ze._subscribers,Lt=pt.length;ze._onerror=null,pt[Lt]=$e,pt[Lt+gt]=We,pt[Lt+Mt]=Ve,Lt===0&&ze._state&&we(Ut,ze)}function Ut(ze){var $e=ze._subscribers,We=ze._state;if($e.length!==0){for(var Ve=void 0,pt=void 0,Lt=ze._result,on=0;on<$e.length;on+=3)Ve=$e[on],pt=$e[on+We],Ve?cn(We,Ve,pt,Lt):pt(Lt);ze._subscribers.length=0}}function cn(ze,$e,We,Ve){var pt=Be(We),Lt=void 0,on=void 0,Xt=!0;if(pt){try{Lt=We(Ve)}catch(Rt){Xt=!1,on=Rt}if($e===Lt){xt($e,_t());return}}else Lt=Ve;$e._state!==mt||(pt&&Xt?ct($e,Lt):Xt===!1?xt($e,on):ze===gt?wt($e,Lt):ze===Mt&&xt($e,Lt))}function jt(ze,$e){try{$e(function(Ve){ct(ze,Ve)},function(Ve){xt(ze,Ve)})}catch(We){xt(ze,We)}}var mn=0;function Ft(){return mn++}function Yt(ze){ze[qe]=mn++,ze._state=void 0,ze._result=void 0,ze._subscribers=[]}function tn(){return new Error("Array Methods must be provided an Array")}var lt=function(){function ze($e,We){this._instanceConstructor=$e,this.promise=new $e(Je),this.promise[qe]||Yt(this.promise),Ce(We)?(this.length=We.length,this._remaining=We.length,this._result=new Array(this.length),this.length===0?wt(this.promise,this._result):(this.length=this.length||0,this._enumerate(We),this._remaining===0&&wt(this.promise,this._result))):xt(this.promise,tn())}return ze.prototype._enumerate=function(We){for(var Ve=0;this._state===mt&&Ve<We.length;Ve++)this._eachEntry(We[Ve],Ve)},ze.prototype._eachEntry=function(We,Ve){var pt=this._instanceConstructor,Lt=pt.resolve;if(Lt===Ze){var on=void 0,Xt=void 0,Rt=!1;try{on=We.then}catch(En){Rt=!0,Xt=En}if(on===Ie&&We._state!==mt)this._settledAt(We._state,Ve,We._result);else if(typeof on!="function")this._remaining--,this._result[Ve]=We;else if(pt===Ke){var fn=new pt(Je);Rt?xt(fn,Xt):ot(fn,We,on),this._willSettleAt(fn,Ve)}else this._willSettleAt(new pt(function(En){return En(We)}),Ve)}else this._willSettleAt(Lt(We),Ve)},ze.prototype._settledAt=function(We,Ve,pt){var Lt=this.promise;Lt._state===mt&&(this._remaining--,We===Mt?xt(Lt,pt):this._result[Ve]=pt),this._remaining===0&&wt(Lt,this._result)},ze.prototype._willSettleAt=function(We,Ve){var pt=this;zt(We,void 0,function(Lt){return pt._settledAt(gt,Ve,Lt)},function(Lt){return pt._settledAt(Mt,Ve,Lt)})},ze}();function Ue(ze){return new lt(this,ze).promise}function je(ze){var $e=this;return Ce(ze)?new $e(function(We,Ve){for(var pt=ze.length,Lt=0;Lt<pt;Lt++)$e.resolve(ze[Lt]).then(We,Ve)}):new $e(function(We,Ve){return Ve(new TypeError("You must pass an array to race."))})}function rt(ze){var $e=this,We=new $e(Je);return xt(We,ze),We}function dt(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function tt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Ke=function(){function ze($e){this[qe]=Ft(),this._result=this._state=void 0,this._subscribers=[],Je!==$e&&(typeof $e!="function"&&dt(),this instanceof ze?jt(this,$e):tt())}return ze.prototype.catch=function(We){return this.then(null,We)},ze.prototype.finally=function(We){var Ve=this,pt=Ve.constructor;return Be(We)?Ve.then(function(Lt){return pt.resolve(We()).then(function(){return Lt})},function(Lt){return pt.resolve(We()).then(function(){throw Lt})}):Ve.then(We,We)},ze}();Ke.prototype.then=Ie,Ke.all=Ue,Ke.race=je,Ke.resolve=Ze,Ke.reject=rt,Ke._setScheduler=pe,Ke._setAsap=de,Ke._asap=we;function De(){var ze=void 0;if(typeof Re.g!="undefined")ze=Re.g;else if(typeof self!="undefined")ze=self;else try{ze=Function("return this")()}catch(Ve){throw new Error("polyfill failed because global object is unavailable in this environment")}var $e=ze.Promise;if($e){var We=null;try{We=Object.prototype.toString.call($e.resolve())}catch(Ve){}if(We==="[object Promise]"&&!$e.cast)return}ze.Promise=Ke}return Ke.polyfill=De,Ke.Promise=Ke,Ke})},86204:function(xn){"use strict";var un=typeof Reflect=="object"?Reflect:null,Re=un&&typeof un.apply=="function"?un.apply:function(le,me,ve){return Function.prototype.apply.call(le,me,ve)},ke;un&&typeof un.ownKeys=="function"?ke=un.ownKeys:Object.getOwnPropertySymbols?ke=function(le){return Object.getOwnPropertyNames(le).concat(Object.getOwnPropertySymbols(le))}:ke=function(le){return Object.getOwnPropertyNames(le)};function Se(ae){console&&console.warn&&console.warn(ae)}var Be=Number.isNaN||function(le){return le!==le};function Le(){Le.init.call(this)}xn.exports=Le,xn.exports.once=z,Le.EventEmitter=Le,Le.prototype._events=void 0,Le.prototype._eventsCount=0,Le.prototype._maxListeners=void 0;var Ce=10;function xe(ae){if(typeof ae!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ae)}Object.defineProperty(Le,"defaultMaxListeners",{enumerable:!0,get:function(){return Ce},set:function(ae){if(typeof ae!="number"||ae<0||Be(ae))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ae+".");Ce=ae}}),Le.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},Le.prototype.setMaxListeners=function(le){if(typeof le!="number"||le<0||Be(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 be(ae){return ae._maxListeners===void 0?Le.defaultMaxListeners:ae._maxListeners}Le.prototype.getMaxListeners=function(){return be(this)},Le.prototype.emit=function(le){for(var me=[],ve=1;ve<arguments.length;ve++)me.push(arguments[ve]);var Pe=le==="error",Ae=this._events;if(Ae!==void 0)Pe=Pe&&Ae.error===void 0;else if(!Pe)return!1;if(Pe){var Oe;if(me.length>0&&(Oe=me[0]),Oe instanceof Error)throw Oe;var Ie=new Error("Unhandled error."+(Oe?" ("+Oe.message+")":""));throw Ie.context=Oe,Ie}var Ze=Ae[le];if(Ze===void 0)return!1;if(typeof Ze=="function")Re(Ze,this,me);else for(var qe=Ze.length,Je=fe(Ze,qe),ve=0;ve<qe;++ve)Re(Je[ve],this,me);return!0};function ye(ae,le,me,ve){var Pe,Ae,Oe;if(xe(me),Ae=ae._events,Ae===void 0?(Ae=ae._events=Object.create(null),ae._eventsCount=0):(Ae.newListener!==void 0&&(ae.emit("newListener",le,me.listener?me.listener:me),Ae=ae._events),Oe=Ae[le]),Oe===void 0)Oe=Ae[le]=me,++ae._eventsCount;else if(typeof Oe=="function"?Oe=Ae[le]=ve?[me,Oe]:[Oe,me]:ve?Oe.unshift(me):Oe.push(me),Pe=be(ae),Pe>0&&Oe.length>Pe&&!Oe.warned){Oe.warned=!0;var Ie=new Error("Possible EventEmitter memory leak detected. "+Oe.length+" "+String(le)+" listeners added. Use emitter.setMaxListeners() to increase limit");Ie.name="MaxListenersExceededWarning",Ie.emitter=ae,Ie.type=le,Ie.count=Oe.length,Se(Ie)}return ae}Le.prototype.addListener=function(le,me){return ye(this,le,me,!1)},Le.prototype.on=Le.prototype.addListener,Le.prototype.prependListener=function(le,me){return ye(this,le,me,!0)};function we(){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 pe(ae,le,me){var ve={fired:!1,wrapFn:void 0,target:ae,type:le,listener:me},Pe=we.bind(ve);return Pe.listener=me,ve.wrapFn=Pe,Pe}Le.prototype.once=function(le,me){return xe(me),this.on(le,pe(this,le,me)),this},Le.prototype.prependOnceListener=function(le,me){return xe(me),this.prependListener(le,pe(this,le,me)),this},Le.prototype.removeListener=function(le,me){var ve,Pe,Ae,Oe,Ie;if(xe(me),Pe=this._events,Pe===void 0)return this;if(ve=Pe[le],ve===void 0)return this;if(ve===me||ve.listener===me)--this._eventsCount===0?this._events=Object.create(null):(delete Pe[le],Pe.removeListener&&this.emit("removeListener",le,ve.listener||me));else if(typeof ve!="function"){for(Ae=-1,Oe=ve.length-1;Oe>=0;Oe--)if(ve[Oe]===me||ve[Oe].listener===me){Ie=ve[Oe].listener,Ae=Oe;break}if(Ae<0)return this;Ae===0?ve.shift():ue(ve,Ae),ve.length===1&&(Pe[le]=ve[0]),Pe.removeListener!==void 0&&this.emit("removeListener",le,Ie||me)}return this},Le.prototype.off=Le.prototype.removeListener,Le.prototype.removeAllListeners=function(le){var me,ve,Pe;if(ve=this._events,ve===void 0)return this;if(ve.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ve[le]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ve[le]),this;if(arguments.length===0){var Ae=Object.keys(ve),Oe;for(Pe=0;Pe<Ae.length;++Pe)Oe=Ae[Pe],Oe!=="removeListener"&&this.removeAllListeners(Oe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(me=ve[le],typeof me=="function")this.removeListener(le,me);else if(me!==void 0)for(Pe=me.length-1;Pe>=0;Pe--)this.removeListener(le,me[Pe]);return this};function de(ae,le,me){var ve=ae._events;if(ve===void 0)return[];var Pe=ve[le];return Pe===void 0?[]:typeof Pe=="function"?me?[Pe.listener||Pe]:[Pe]:me?ee(Pe):fe(Pe,Pe.length)}Le.prototype.listeners=function(le){return de(this,le,!0)},Le.prototype.rawListeners=function(le){return de(this,le,!1)},Le.listenerCount=function(ae,le){return typeof ae.listenerCount=="function"?ae.listenerCount(le):ge.call(ae,le)},Le.prototype.listenerCount=ge;function ge(ae){var le=this._events;if(le!==void 0){var me=le[ae];if(typeof me=="function")return 1;if(me!==void 0)return me.length}return 0}Le.prototype.eventNames=function(){return this._eventsCount>0?ke(this._events):[]};function fe(ae,le){for(var me=new Array(le),ve=0;ve<le;++ve)me[ve]=ae[ve];return me}function ue(ae,le){for(;le+1<ae.length;le++)ae[le]=ae[le+1];ae.pop()}function ee(ae){for(var le=new Array(ae.length),me=0;me<le.length;++me)le[me]=ae[me].listener||ae[me];return le}function z(ae,le){return new Promise(function(me,ve){function Pe(Oe){ae.removeListener(le,Ae),ve(Oe)}function Ae(){typeof ae.removeListener=="function"&&ae.removeListener("error",Pe),me([].slice.call(arguments))}re(ae,le,Ae,{once:!0}),le!=="error"&&oe(ae,Pe,{once:!0})})}function oe(ae,le,me){typeof ae.on=="function"&&re(ae,"error",le,me)}function re(ae,le,me,ve){if(typeof ae.on=="function")ve.once?ae.once(le,me):ae.on(le,me);else if(typeof ae.addEventListener=="function")ae.addEventListener(le,function Pe(Ae){ve.once&&ae.removeEventListener(le,Pe),me(Ae)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ae)}},12378:function(xn,un,Re){"use strict";Re.d(un,{$u:function(){return we},BD:function(){return lt},E9:function(){return ye},FF:function(){return Pr},FJ:function(){return le},Hn:function(){return ae},KX:function(){return ve},NB:function(){return We},S0:function(){return Ft},UL:function(){return pe},Vk:function(){return re},Vm:function(){return pt},YI:function(){return Yt},ZA:function(){return Be},Zt:function(){return de},al:function(){return tt},bn:function(){return dt},bx:function(){return Ue},g2:function(){return tn},h1:function(){return Ze},hD:function(){return Wn},l4:function(){return xe},rU:function(){return Ve},s_:function(){return je},uz:function(){return $e},z6:function(){return ge}}),xn=Re.hmd(xn),function(){var Qe;function Ti(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function ei(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Ti(a)}}function Ii(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var mr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},cr;if(typeof Object.setPrototypeOf=="function")cr=Object.setPrototypeOf;else{var ir;e:{var po={a:!0},Vn={};try{Vn.__proto__=po,ir=Vn.a;break e}catch(a){}ir=!1}cr=ir?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var He=cr;function Xe(a,y){if(a.prototype=mr(y.prototype),a.prototype.constructor=a,He)He(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 nt=typeof Re.g!="undefined"&&Re.g!=null?Re.g:self,bt=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},Nt=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function sn(a,y){if(y){var x=nt;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&&Nt(x,a,{writable:!0,value:y})}}sn("Object.assign",function(a){return a||bt}),sn("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 Zt=typeof globalThis=="object"&&globalThis||typeof Re.g=="object"&&Re.g.global===Re.g&&Re.g||typeof self=="object"&&self.self===self&&self||{};Zt.requestAnimationFrame===void 0&&(Zt.setImmediate===void 0?Zt.requestAnimationFrame=function(a){Zt.setTimeout(a,0)}:Zt.requestAnimationFrame=Zt.setImmediate);function _n(){}function Kt(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Zt.clearTimeout(x),x=qt(function(){x=-1,a.apply(b,E)},y)}}function qt(a,y){return Zt.setTimeout(a,y)}function Hn(a){return Zt.document.createElement(a)}function kt(a){throw Error(a)}function ln(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),kt(a)}function An(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),kt(x+" is not in the range "+y+": "+a)}function jn(a){Zt.console&&Zt.console.log(a)}function Qt(a){return typeof a=="object"&&a!==null}function rn(a){return Array.isArray(a)||Zt.NodeList&&a instanceof Zt.NodeList||Zt.HTMLCollection&&a instanceof Zt.HTMLCollection}function Pn(a){return Array.prototype.slice.call(a)}function Dn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):kt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function oi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):kt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function ai(){var a=wr.pop();return a===void 0?[]:a}function Gn(a){a.length=0,wr.push(a)}function Bn(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(Qt(a)&&a.constructor)return Bn(a.constructor);return typeof a}function bi(a){var y=a;return Qt(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 Ei(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 Di(a,y,x){Object.defineProperty(_o.prototype,a,{get:y,set:x})}function yn(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 Tr=Zt.navigator!==void 0&&0<Zt.navigator.userAgent.indexOf("Trident/7"),ur=Zt.navigator!==void 0&&Zt.navigator.platform!==void 0&&Zt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,wr=[];Object.freeze([]),_n.className="Util",_n.Dx="32ab5ff3b26f42dc0ed90f21472913b5",_n.adym="gojs.net",_n.vfo="28e645fdb266",_n.className="Util";function pn(a,y,x){Ai(this),this.j=a,this.xa=y,this.o=x}pn.prototype.toString=function(){return"EnumValue."+this.xa};function $n(a,y){return y==null||y===""?null:a[y]}nt.Object.defineProperties(pn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),pn.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 Mi(){}Mi.className="PropertyCollection";var mi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Zt.console&&Zt.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"},nt.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 dr=null;Li.className="EmptyIterator",dr=new Li;function ar(a){this.key=-1,this.value=a}ar.prototype.reset=function(){this.key=-1},ar.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},ar.prototype.Ad=function(){return this.next()},ar.prototype.first=function(){return this.key=0,this.value},ar.prototype.any=function(a){return this.key=-1,a(this.value)},ar.prototype.all=function(a){return this.key=-1,a(this.value)},ar.prototype.each=function(a){return this.key=-1,a(this.value),this},ar.prototype.map=function(a){return new ar(a(this.value))},ar.prototype.filter=function(a){return a(this.value)?new ar(this.value):dr},ar.prototype.de=function(){this.value=null},ar.prototype.toString=function(){return"SingletonIterator("+this.value+")"},nt.Object.defineProperties(ar.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),ar.prototype.first=ar.prototype.first,ar.prototype.hasNext=ar.prototype.Ad,ar.prototype.next=ar.prototype.next,ar.prototype.reset=ar.prototype.reset,ar.className="SingletonIterator";function vr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}vr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},vr.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},vr.prototype.Ad=function(){return this.next()},vr.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},vr.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},vr.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},vr.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},vr.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&x.push(a(ne))}return a=new Ln,a.s=x,a.xb(),a.iterator},vr.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new Ln,a.s=x,a.xb(),a.iterator},vr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},vr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},nt.Object.defineProperties(vr.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}}}),vr.prototype.first=vr.prototype.first,vr.prototype.hasNext=vr.prototype.Ad,vr.prototype.next=vr.prototype.next,vr.prototype.reset=vr.prototype.reset,vr.className="ListIterator";function Cr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Cr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Cr.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)},Cr.prototype.Ad=function(){return this.next()},Cr.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},Cr.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},Cr.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},Cr.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},Cr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new Ln,a.s=x,a.xb(),a.iterator},Cr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new Ln,a.s=x,a.xb(),a.iterator},Cr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Cr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},nt.Object.defineProperties(Cr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Cr.prototype.first=Cr.prototype.first,Cr.prototype.hasNext=Cr.prototype.Ad,Cr.prototype.next=Cr.prototype.next,Cr.prototype.reset=Cr.prototype.reset,Cr.className="ListIteratorBackwards";function Ln(a){Ai(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&kt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Qe=Ln.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()#"+Xi(this)},Qe.add=function(a){return a===null?this:(this._isFrozen&&ln(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&&ln(this);var y=this.s;if(rn(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&&ln(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)&&An(a,"0 <= i < length",Ln,"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)&&An(a,"0 <= i < length",Ln,"setElt:i"),this._isFrozen&&ln(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&&ln(this);var a=this.s;return 0<a.length?a.pop():null},Ln.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},Ln.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},Ln.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Ln.prototype.map=function(a){for(var y=new Ln,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},Ln.prototype.filter=function(a){for(var y=new Ln,x=[],b=this.s,E=b.length,te=0;te<E;te++){var ne=b[te];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},Qe=Ln.prototype,Qe.Gb=function(a,y){0>a&&An(a,">= 0",Ln,"insertAt:i"),this._isFrozen&&ln(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&&ln(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)&&An(a,"0 <= i < length",Ln,"removeAt:i"),this._isFrozen&&ln(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&&ln(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},Ln.prototype.copy=function(){var a=new Ln,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Qe=Ln.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 Mn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Qe.sort=function(a){return this._isFrozen&&ln(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&&ln(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&An(y,"0 <= from < length",Ln,"sortRange:from"),te===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},Qe.reverse=function(){return this._isFrozen&&ln(this),this.s.reverse(),this.xb(),this},nt.Object.defineProperties(Ln.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return dr;var a=this.Sa;return a!==null?(a.reset(),a):new vr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return dr;var a=this.Hg;return a!==null?(a.reset(),a):new Cr(this)}}}),Ln.prototype.reverse=Ln.prototype.reverse,Ln.prototype.sortRange=Ln.prototype.zi,Ln.prototype.sort=Ln.prototype.sort,Ln.prototype.toSet=Ln.prototype.Iv,Ln.prototype.toArray=Ln.prototype.Fa,Ln.prototype.removeRange=Ln.prototype.removeRange,Ln.prototype.removeAt=Ln.prototype.mb,Ln.prototype.delete=Ln.prototype.delete,Ln.prototype.remove=Ln.prototype.remove,Ln.prototype.insertAt=Ln.prototype.Gb,Ln.prototype.pop=Ln.prototype.pop,Ln.prototype.last=Ln.prototype.jc,Ln.prototype.first=Ln.prototype.first,Ln.prototype.set=Ln.prototype.set,Ln.prototype.setElt=Ln.prototype.cd,Ln.prototype.get=Ln.prototype.get,Ln.prototype.elt=Ln.prototype.M,Ln.prototype.indexOf=Ln.prototype.indexOf,Ln.prototype.has=Ln.prototype.has,Ln.prototype.contains=Ln.prototype.contains,Ln.prototype.clear=Ln.prototype.clear,Ln.prototype.addAll=Ln.prototype.addAll,Ln.prototype.push=Ln.prototype.push,Ln.prototype.add=Ln.prototype.add,Ln.prototype.thaw=Ln.prototype.ka,Ln.prototype.freeze=Ln.prototype.freeze,Ln.className="List";function Yr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Yr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Yr.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)},Yr.prototype.Ad=function(){return this.next()},Yr.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},Yr.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},Yr.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},Yr.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},Yr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Yr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Yr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Yr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},nt.Object.defineProperties(Yr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Yr.prototype.first=Yr.prototype.first,Yr.prototype.hasNext=Yr.prototype.Ad,Yr.prototype.next=Yr.prototype.next,Yr.prototype.reset=Yr.prototype.reset,Yr.className="SetIterator";function Mn(a){Ai(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&kt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Qe=Mn.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()#"+Xi(this)},Qe.add=function(a){if(a===null)return this;this._isFrozen&&ln(this,a);var y=a;return Qt(a)&&(y=zi(a)),this.Tb[y]===void 0&&(this.Sb++,a=new an(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&&ln(this),rn(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 Qt(a)&&(y=Xi(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},Mn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Mn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Mn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Mn.prototype.map=function(a){for(var y=new Mn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Mn.prototype.filter=function(a){for(var y=new Mn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},Qe=Mn.prototype,Qe.remove=function(a){if(a===null)return!1;this._isFrozen&&ln(this,a);var y=a;if(Qt(a)&&(y=Xi(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&&ln(this),rn(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&&ln(this);var y=new Mn;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&&ln(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Mn.prototype.copy=function(){var a=new Mn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Mn.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},Mn.prototype.Hv=function(){var a=new Ln,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Ai(a){a.__gohashid=lo++}function zi(a){var y=a.__gohashid;return y===void 0&&(y=lo++,a.__gohashid=y),y}function Xi(a){return a.__gohashid}nt.Object.defineProperties(Mn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return dr;var a=this.Sa;return a!==null?(a.reset(),a):new Yr(this)}}}),Mn.prototype.toList=Mn.prototype.Hv,Mn.prototype.toArray=Mn.prototype.Fa,Mn.prototype.clear=Mn.prototype.clear,Mn.prototype.retainAll=Mn.prototype.pA,Mn.prototype.removeAll=Mn.prototype.hp,Mn.prototype.delete=Mn.prototype.delete,Mn.prototype.remove=Mn.prototype.remove,Mn.prototype.first=Mn.prototype.first,Mn.prototype.containsAny=Mn.prototype.Ty,Mn.prototype.containsAll=Mn.prototype.Sy,Mn.prototype.has=Mn.prototype.has,Mn.prototype.contains=Mn.prototype.contains,Mn.prototype.addAll=Mn.prototype.addAll,Mn.prototype.add=Mn.prototype.add,Mn.prototype.thaw=Mn.prototype.ka,Mn.prototype.freeze=Mn.prototype.freeze;var lo=1;Mn.className="Set",Mn.uniqueHash=Ai,Mn.hashIdUnique=zi,Mn.hashId=Xi;function oo(a){this.ma=a,this.qa=a.Ja,this.sa=null}oo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},oo.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)},oo.prototype.Ad=function(){return this.next()},oo.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},oo.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},oo.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},oo.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},oo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},oo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},oo.prototype.de=function(){this.value=this.key=null,this.qa=-1},oo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},nt.Object.defineProperties(oo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),oo.prototype.first=oo.prototype.first,oo.prototype.hasNext=oo.prototype.Ad,oo.prototype.next=oo.prototype.next,oo.prototype.reset=oo.prototype.reset,oo.className="MapKeySetIterator";function qr(a){Mn.call(this),Ai(this),this._isFrozen=!0,this.ma=a}Xe(qr,Mn),Qe=qr.prototype,Qe.freeze=function(){return this},Qe.ka=function(){return this},Qe.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Qe.add=function(){kt("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(){kt("This Set is read-only: "+this.toString())},Qe.delete=function(a){return this.remove(a)},Qe.clear=function(){kt("This Set is read-only: "+this.toString())},Qe.first=function(){var a=this.ma.ea;return a!==null?a.key:null},qr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},qr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},qr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},qr.prototype.map=function(a){for(var y=new Mn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},qr.prototype.filter=function(a){for(var y=new Mn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},qr.prototype.copy=function(){return new qr(this.ma)},qr.prototype.Iv=function(){var a=new Mn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},qr.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},qr.prototype.Hv=function(){var a=new Ln,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},nt.Object.defineProperties(qr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?dr:new oo(this.ma)}}}),qr.prototype.toList=qr.prototype.Hv,qr.prototype.toArray=qr.prototype.Fa,qr.prototype.toSet=qr.prototype.Iv,qr.prototype.first=qr.prototype.first,qr.prototype.clear=qr.prototype.clear,qr.prototype.delete=qr.prototype.delete,qr.prototype.remove=qr.prototype.remove,qr.prototype.has=qr.prototype.has,qr.prototype.contains=qr.prototype.contains,qr.prototype.add=qr.prototype.add,qr.prototype.thaw=qr.prototype.ka,qr.prototype.freeze=qr.prototype.freeze,qr.className="MapKeySet";function uo(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}uo.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},uo.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)},uo.prototype.Ad=function(){return this.next()},uo.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},uo.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},uo.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},uo.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},uo.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},uo.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},uo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},uo.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},nt.Object.defineProperties(uo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),uo.prototype.first=uo.prototype.first,uo.prototype.hasNext=uo.prototype.Ad,uo.prototype.next=uo.prototype.next,uo.prototype.reset=uo.prototype.reset,uo.className="MapValueSetIterator";function an(a,y){this.key=a,this.value=y,this.ll=this.va=null}an.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},an.className="KeyValuePair";function kn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}kn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},kn.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)},kn.prototype.Ad=function(){return this.next()},kn.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},kn.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},kn.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},kn.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},kn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},kn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},kn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},kn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},nt.Object.defineProperties(kn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),kn.prototype.first=kn.prototype.first,kn.prototype.hasNext=kn.prototype.Ad,kn.prototype.next=kn.prototype.next,kn.prototype.reset=kn.prototype.reset,kn.className="MapIterator";function hn(a){Ai(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"&&kt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Qe=hn.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()#"+Xi(this)},Qe.add=function(a,y){this._isFrozen&&ln(this,a);var x=a;Qt(a)&&(x=zi(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new an(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(rn(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 hn)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},hn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},hn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},hn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},hn.prototype.map=function(a){for(var y=new hn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},hn.prototype.filter=function(a){for(var y=new hn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Qe=hn.prototype,Qe.contains=function(a){var y=a;return Qt(a)&&(y=Xi(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 Qt(a)&&(y=Xi(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&&ln(this,a);var y=a;if(Qt(a)&&(y=Xi(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&&ln(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()},hn.prototype.copy=function(){var a=new hn,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},hn.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 an(E.key,E.value),x++}return y},hn.prototype.Lf=function(){return new qr(this)},nt.Object.defineProperties(hn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return dr;var a=this.Sa;return a!==null?(a.reset(),a):new kn(this)}},iteratorKeys:{get:function(){return 0>=this.count?dr:new oo(this)}},iteratorValues:{get:function(){if(0>=this.count)return dr;var a=this.jf;return a!==null?(a.reset(),a):new uo(this)}}}),hn.prototype.toKeySet=hn.prototype.Lf,hn.prototype.toArray=hn.prototype.Fa,hn.prototype.clear=hn.prototype.clear,hn.prototype.delete=hn.prototype.delete,hn.prototype.remove=hn.prototype.remove,hn.prototype.get=hn.prototype.get,hn.prototype.getValue=hn.prototype.I,hn.prototype.has=hn.prototype.has,hn.prototype.contains=hn.prototype.contains,hn.prototype.first=hn.prototype.first,hn.prototype.addAll=hn.prototype.addAll,hn.prototype.set=hn.prototype.set,hn.prototype.add=hn.prototype.add,hn.prototype.thaw=hn.prototype.ka,hn.prototype.freeze=hn.prototype.freeze,hn.className="Map";function ft(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):kt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Yn,Un,ni,li,vi;ft.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},ft.prototype.h=function(a,y){return this.x=a,this.y=y,this},ft.prototype.sg=function(a,y){return this.x=a,this.y=y,this},ft.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},ft.prototype.copy=function(){var a=new ft;return a.x=this.x,a.y=this.y,a},Qe=ft.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)&&kt("cannot thaw constant: "+this),this._isFrozen=!1,this};function On(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 ft(x,E)}return new ft}function Jn(a){return a.x.toString()+" "+a.y.toString()}Qe.toString=function(){return"Point("+this.x+","+this.y+")"},Qe.D=function(a){return a instanceof ft?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 Wt.B(this.x,a.x)&&Wt.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},ft.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=ft.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 qn(a.x-this.x,a.y-this.y)},Qe.direction=function(a,y){return qn(a-this.x,y-this.y)};function qn(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 Wt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Qe.fA=function(a,y,x,b){return Wt.qh(a,y,x,b,this.x,this.y,this),this},Qe.gA=function(a,y){return Wt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Qe.uA=function(a,y,x,b){return Wt.No(this.x,this.y,a,y,x,b,this),this},Qe.vA=function(a,y){return Wt.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 ti(a,y){return y.Cd(a),a}function ii(a,y,x,b,E,te){var ne=E-x,se=te-b,he=ne*ne+se*se;x-=a,b-=y;var _e=-x*ne-b*se;return 0>=_e||_e>=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 Fi(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Si(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)},ft.alloc=function(){var a=di.pop();return a===void 0?new ft:a},ft.allocAt=function(a,y){var x=di.pop();return x===void 0?new ft(a,y):(x.x=a,x.y=y,x)},ft.free=function(a){di.push(a)},ft.prototype.isReal=ft.prototype.w,ft.prototype.setSpot=ft.prototype.yi,ft.prototype.setRectSpot=ft.prototype.xi,ft.prototype.snapToGridPoint=ft.prototype.vA,ft.prototype.snapToGrid=ft.prototype.uA,ft.prototype.projectOntoLineSegmentPoint=ft.prototype.gA,ft.prototype.projectOntoLineSegment=ft.prototype.fA,ft.intersectingLineSegments=function(a,y,x,b,E,te,ne,se){return Wt.Rl(a,y,x,b,E,te,ne,se)},ft.prototype.compareWithLineSegmentPoint=ft.prototype.Ry,ft.compareWithLineSegment=function(a,y,x,b,E,te){return Wt.Fl(a,y,x,b,E,te)},ft.prototype.direction=ft.prototype.direction,ft.prototype.directionPoint=ft.prototype.ab,ft.prototype.normalize=ft.prototype.normalize,ft.prototype.distanceSquared=ft.prototype.zd,ft.prototype.distanceSquaredPoint=ft.prototype.Bf,ft.prototype.scale=ft.prototype.scale,ft.prototype.rotate=ft.prototype.rotate,ft.prototype.offset=ft.prototype.offset,ft.prototype.subtract=ft.prototype.re,ft.prototype.add=ft.prototype.add,ft.prototype.equalsApprox=ft.prototype.Xa,ft.prototype.equalTo=ft.prototype.hi,ft.prototype.equals=ft.prototype.D,ft.prototype.set=ft.prototype.set,ft.prototype.setTo=ft.prototype.sg;var di=[];ft.className="Point",ft.parse=On,ft.stringify=Jn,ft.distanceLineSegmentSquared=ii,ft.distanceSquared=Fi,ft.direction=Si,ft.Origin=Yn=new ft(0,0).ja(),ft.InfiniteTopLeft=Un=new ft(-1/0,-1/0).ja(),ft.InfiniteBottomRight=ni=new ft(1/0,1/0).ja(),ft.SixPoint=li=new ft(6,6).ja(),ft.NoPoint=vi=new ft(NaN,NaN).ja(),ft.parse=On,ft.stringify=Jn,ft.distanceLineSegmentSquared=ii,ft.distanceSquared=Fi,ft.direction=Si;function Cn(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):kt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var pi,Ui,xr,pr,Er,Ar,Lr;Cn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Cn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Cn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Cn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Cn.prototype.copy=function(){var a=new Cn;return a.width=this.width,a.height=this.height,a},Qe=Cn.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)&&kt("cannot thaw constant: "+this),this._isFrozen=!1,this};function co(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 Cn(x,E)}return new Cn}function so(a){return a.width.toString()+" "+a.height.toString()}Qe.toString=function(){return"Size("+this.width+","+this.height+")"},Qe.D=function(a){return a instanceof Cn?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 Wt.B(this.width,a.width)&&Wt.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)},Cn.alloc=function(){var a=es.pop();return a===void 0?new Cn:a},Cn.free=function(a){es.push(a)},Cn.prototype.isReal=Cn.prototype.w,Cn.prototype.inflate=Cn.prototype.Bc,Cn.prototype.equalsApprox=Cn.prototype.Xa,Cn.prototype.equalTo=Cn.prototype.hi,Cn.prototype.equals=Cn.prototype.D,Cn.prototype.set=Cn.prototype.set,Cn.prototype.setTo=Cn.prototype.sg;var es=[];Cn.className="Size",Cn.parse=co,Cn.stringify=so,Cn.ZeroSize=pi=new Cn(0,0).ja(),Cn.OneSize=Ui=new Cn(1,1).ja(),Cn.SixSize=xr=new Cn(6,6).ja(),Cn.EightSize=pr=new Cn(8,8).ja(),Cn.TenSize=Er=new Cn(10,10).ja(),Cn.InfiniteSize=Ar=new Cn(1/0,1/0).ja(),Cn.NoSize=Lr=new Cn(NaN,NaN).ja(),Cn.parse=co,Cn.stringify=so;function nn(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 ft?(x=a.x,a=a.y,y instanceof ft?(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 Cn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):kt("Incorrect second argument supplied to Rect constructor "+y)):kt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Qe=nn.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 Fr(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},nn.prototype.copy=function(){var a=new nn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Qe=nn.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)&&kt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Vr(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 nn(x,E,te,ne)}return new nn}function rr(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 nn?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 Wt.B(this.x,a.x)&&Wt.B(this.y,a.y)&&Wt.B(this.width,a.width)&&Wt.B(this.height,a.height)};function Mr(a,y){return Wt.$(a.x,y.x)&&Wt.$(a.y,y.y)&&Wt.$(a.width,y.width)&&Wt.$(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 tr(this,y,a,y,a)},Qe.Co=function(a){return tr(this,a.top,a.right,a.bottom,a.left)},Qe.Fv=function(a){return tr(this,-a.top,-a.right,-a.bottom,-a.left)},Qe.Hz=function(a,y,x,b){return tr(this,a,y,x,b)};function tr(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 Oo(this,a.x,a.y,a.width,a.height)},Qe.Uu=function(a,y,x,b){return Oo(this,a,y,x,b)};function Oo(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 fo(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 Br(this,a.x,a.y,0,0)},Qe.ed=function(a){return Br(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),Br(this,a,y,x,b)};function Br(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 Qr(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 $s(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},nn.alloc=function(){var a=ea.pop();return a===void 0?new nn:a},nn.allocAt=function(a,y,x,b){var E=ea.pop();return E===void 0?new nn(a,y,x,b):E.h(a,y,x,b)},nn.free=function(a){ea.push(a)},nt.Object.defineProperties(nn.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 ft(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Cn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new ft(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}}}),nn.prototype.isEmpty=nn.prototype.Mz,nn.prototype.isReal=nn.prototype.w,nn.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return Wt.Fx(a,y,x,b,E,te,ne,se)},nn.prototype.setSpot=nn.prototype.yi,nn.prototype.union=nn.prototype.Kv,nn.prototype.unionRect=nn.prototype.ed,nn.prototype.unionPoint=nn.prototype.Ye,nn.prototype.intersects=nn.prototype.Vu,nn.prototype.intersectsRect=nn.prototype.Yc,nn.prototype.intersect=nn.prototype.Uu,nn.prototype.intersectRect=nn.prototype.Ex,nn.prototype.grow=nn.prototype.Hz,nn.prototype.subtractMargin=nn.prototype.Fv,nn.prototype.addMargin=nn.prototype.Co,nn.prototype.inflate=nn.prototype.Bc,nn.prototype.offset=nn.prototype.offset,nn.prototype.contains=nn.prototype.contains,nn.prototype.containsRect=nn.prototype.Re,nn.prototype.containsPoint=nn.prototype.ca,nn.prototype.equalsApprox=nn.prototype.Xa,nn.prototype.equalTo=nn.prototype.hi,nn.prototype.equals=nn.prototype.D,nn.prototype.setSize=nn.prototype.tA,nn.prototype.setPoint=nn.prototype.dd,nn.prototype.set=nn.prototype.set,nn.prototype.setTo=nn.prototype.sg;var us=null,ha=null,ea=[];nn.className="Rect",nn.parse=Vr,nn.stringify=rr,nn.contains=Qr,nn.intersects=$s,nn.ZeroRect=us=new nn(0,0,0,0).ja(),nn.NoRect=ha=new nn(NaN,NaN,NaN,NaN).ja(),nn.parse=Vr,nn.stringify=rr,nn.contains=Qr,nn.intersects=$s;function Qi(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):kt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Qi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Qi.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Qi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Qi.prototype.copy=function(){var a=new Qi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Qe=Qi.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)&&kt("cannot thaw constant: "+this),this._isFrozen=!1,this};function To(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 Qi;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Qi(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Qi(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Qi(x,E):new Qi(x,E,te,ne)}return new Qi}function as(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 Qi?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 Wt.B(this.top,a.top)&&Wt.B(this.right,a.right)&&Wt.B(this.bottom,a.bottom)&&Wt.B(this.left,a.left)},Qe.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Qi.alloc=function(){var a=zr.pop();return a===void 0?new Qi:a},Qi.free=function(a){zr.push(a)},Qi.prototype.isReal=Qi.prototype.w,Qi.prototype.equalsApprox=Qi.prototype.Xa,Qi.prototype.equalTo=Qi.prototype.hi,Qi.prototype.equals=Qi.prototype.D,Qi.prototype.set=Qi.prototype.set,Qi.prototype.setTo=Qi.prototype.sg;var Os=null,Hr=null,zr=[];Qi.className="Margin",Qi.parse=To,Qi.stringify=as,Qi.ZeroMargin=Os=new Qi(0,0,0,0).ja(),Qi.TwoMargin=Hr=new Qi(2,2,2,2).ja(),Qi.parse=To,Qi.stringify=as;function zn(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var or,Gr,Zo,aa,Vs,_r,Es,xs,fs,jo,ta,Pa,Xo,Sa,Wa,xu,hs,tl,zu,wu,Tl,nl,ru,eh,Hl,Ts,Uu,th,_u,ou,ga,ma,As,zs,zo,io;zn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},zn.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},zn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},zn.prototype.copy=function(){var a=new zn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Qe=zn.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)&&kt("cannot thaw constant: "+this),this._isFrozen=!1,this};function yo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Us(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return or;if(a==="TopLeft")return Gr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Zo;if(a==="TopRight")return aa;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Vs;if(a==="Center")return _r;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Es;if(a==="BottomLeft")return xs;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return fs;if(a==="BottomRight")return jo;if(a==="TopSide")return ta;if(a==="LeftSide")return Pa;if(a==="RightSide")return Xo;if(a==="BottomSide")return Sa;if(a==="TopBottomSides")return Wa;if(a==="LeftRightSides")return xu;if(a==="TopLeftSides")return hs;if(a==="TopRightSides")return tl;if(a==="BottomLeftSides")return zu;if(a==="BottomRightSides")return wu;if(a==="NotTopSide")return Tl;if(a==="NotLeftSide")return nl;if(a==="NotRightSide")return ru;if(a==="NotBottomSide")return eh;if(a==="AllSides")return Hl;if(a==="Default")return Ts;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 zn(x,E,te,ne)}return new zn}function Ls(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(or)?"None":this.D(Gr)?"TopLeft":this.D(Zo)?"Top":this.D(aa)?"TopRight":this.D(Vs)?"Left":this.D(_r)?"Center":this.D(Es)?"Right":this.D(xs)?"BottomLeft":this.D(fs)?"Bottom":this.D(jo)?"BottomRight":this.D(ta)?"TopSide":this.D(Pa)?"LeftSide":this.D(Xo)?"RightSide":this.D(Sa)?"BottomSide":this.D(Wa)?"TopBottomSides":this.D(xu)?"LeftRightSides":this.D(hs)?"TopLeftSides":this.D(tl)?"TopRightSides":this.D(zu)?"BottomLeftSides":this.D(wu)?"BottomRightSides":this.D(Tl)?"NotTopSide":this.D(nl)?"NotLeftSide":this.D(ru)?"NotRightSide":this.D(eh)?"NotBottomSide":this.D(Hl)?"AllSides":this.D(Ts)?"Default":"None"},Qe.D=function(a){return a instanceof zn?(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 zn(.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(Uu))a=Pa;else if(a.D(th))a=Xo;else if(a.D(_u))a=ta;else if(a.D(ou))a=Sa;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},zn.alloc=function(){var a=Ns.pop();return a===void 0?new zn:a},zn.free=function(a){Ns.push(a)},zn.prototype.isDefault=zn.prototype.Xb,zn.prototype.isNone=zn.prototype.ys,zn.prototype.isSide=zn.prototype.$c,zn.prototype.isNoSpot=zn.prototype.Mc,zn.prototype.isSpot=zn.prototype.sb,zn.prototype.includesSide=zn.prototype.Hf,zn.prototype.opposite=zn.prototype.gv,zn.prototype.equals=zn.prototype.D,zn.prototype.set=zn.prototype.set,zn.prototype.setTo=zn.prototype.sg;var Ns=[];zn.className="Spot",zn.parse=Us,zn.stringify=Ls,zn.None=or=yo(new zn(0,0,0,0),0).ja(),zn.Default=Ts=yo(new zn(0,0,-1,0),-1).ja(),zn.TopLeft=Gr=new zn(0,0,0,0).ja(),zn.TopCenter=Zo=new zn(.5,0,0,0).ja(),zn.TopRight=aa=new zn(1,0,0,0).ja(),zn.LeftCenter=Vs=new zn(0,.5,0,0).ja(),zn.Center=_r=new zn(.5,.5,0,0).ja(),zn.RightCenter=Es=new zn(1,.5,0,0).ja(),zn.BottomLeft=xs=new zn(0,1,0,0).ja(),zn.BottomCenter=fs=new zn(.5,1,0,0).ja(),zn.BottomRight=jo=new zn(1,1,0,0).ja(),zn.MiddleTop=ga=Zo,zn.MiddleLeft=ma=Vs,zn.MiddleRight=As=Es,zn.MiddleBottom=zs=fs,zn.Top=_u=Zo,zn.Left=Uu=Vs,zn.Right=th=Es,zn.Bottom=ou=fs,zn.TopSide=ta=yo(new zn(0,0,1,1),1).ja(),zn.LeftSide=Pa=yo(new zn(0,0,1,2),1).ja(),zn.RightSide=Xo=yo(new zn(0,0,1,4),1).ja(),zn.BottomSide=Sa=yo(new zn(0,0,1,8),1).ja(),zn.TopBottomSides=Wa=yo(new zn(0,0,1,9),1).ja(),zn.LeftRightSides=xu=yo(new zn(0,0,1,6),1).ja(),zn.TopLeftSides=hs=yo(new zn(0,0,1,3),1).ja(),zn.TopRightSides=tl=yo(new zn(0,0,1,5),1).ja(),zn.BottomLeftSides=zu=yo(new zn(0,0,1,10),1).ja(),zn.BottomRightSides=wu=yo(new zn(0,0,1,12),1).ja(),zn.NotTopSide=Tl=yo(new zn(0,0,1,14),1).ja(),zn.NotLeftSide=nl=yo(new zn(0,0,1,13),1).ja(),zn.NotRightSide=ru=yo(new zn(0,0,1,11),1).ja(),zn.NotBottomSide=eh=yo(new zn(0,0,1,7),1).ja(),zn.AllSides=Hl=yo(new zn(0,0,1,15),1).ja(),zo=new zn(.156,.156).ja(),io=new zn(.844,.844).ja(),zn.parse=Us,zn.stringify=Ls;function ji(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}ji.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},ji.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},ji.prototype.copy=function(){var a=new ji;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},ji.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},ji.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},ji.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},ji.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},ji.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},ji.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},ji.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},ji.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=ji.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,_e=this.dx,Ee=this.dy,Ne=y*te+x*se+_e,Ge=y*ne+x*he+Ee,Ye=b*te+x*se+_e,et=b*ne+x*he+Ee;return x=y*te+E*se+_e,y=y*ne+E*he+Ee,te=b*te+E*se+_e,b=b*ne+E*he+Ee,E=Math.min(Ne,Ye),Ne=Math.max(Ne,Ye),Ye=Math.min(Ge,et),Ge=Math.max(Ge,et),E=Math.min(E,x),Ne=Math.max(Ne,x),Ye=Math.min(Ye,y),Ge=Math.max(Ge,y),E=Math.min(E,te),Ne=Math.max(Ne,te),Ye=Math.min(Ye,b),Ge=Math.max(Ge,b),a.h(E,Ye,Ne-E,Ge-Ye),a},ji.alloc=function(){var a=Za.pop();return a===void 0?new ji:a},ji.free=function(a){Za.push(a)},ji.prototype.transformRect=ji.prototype.pp,ji.prototype.transformPoint=ji.prototype.Ga,ji.prototype.scale=ji.prototype.scale,ji.prototype.translate=ji.prototype.translate,ji.prototype.rotate=ji.prototype.rotate,ji.prototype.invert=ji.prototype.Vj,ji.prototype.multiplyInverted=ji.prototype.bv,ji.prototype.multiply=ji.prototype.multiply,ji.prototype.reset=ji.prototype.reset,ji.prototype.isIdentity=ji.prototype.ws,ji.prototype.equals=ji.prototype.D,ji.prototype.setTransform=ji.prototype.setTransform,ji.prototype.set=ji.prototype.set;var Za=[];ji.className="Transform",ji.xF="54a702f3e53909c447824c6706603faf4c";var Wt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Wt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Wt.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,b,E,te,ne){if(0>=E&&(E=1e-6),a<x)var se=a,he=x;else se=x,he=a;if(y<b)var _e=y,Ee=b;else _e=b,Ee=y;if(a===x)return _e<=ne&&ne<=Ee&&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&&(Ee+=E,_e-=E,_e<=ne&&ne<=Ee))if(he-se>Ee-_e)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,_e,Ee,Ne){if(Wt.Yb(a,y,ne,se,Ne,x,b)&&Wt.Yb(a,y,ne,se,Ne,E,te))return Wt.Yb(a,y,ne,se,Ne,_e,Ee);var Ge=(a+x)/2,Ye=(y+b)/2,et=(x+E)/2,st=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ge+et)/2,x=(Ye+st)/2,et=(et+E)/2,st=(st+te)/2;var Ct=(b+et)/2,St=(x+st)/2;return Wt.cs(a,y,Ge,Ye,b,x,Ct,St,he,_e,Ee,Ne)||Wt.cs(Ct,St,et,st,E,te,ne,se,he,_e,Ee,Ne)},ax:function(a,y,x,b,E,te,ne,se,he){var _e=(x+E)/2,Ee=(b+te)/2;return he.h((((a+x)/2+_e)/2+(_e+(E+ne)/2)/2)/2,(((y+b)/2+Ee)/2+(Ee+(te+se)/2)/2)/2),he},My:function(a,y,x,b,E,te,ne,se){var he=(x+E)/2,_e=(b+te)/2;return Si(((a+x)/2+he)/2,((y+b)/2+_e)/2,(he+(E+ne)/2)/2,(_e+(te+se)/2)/2)},Dl:function(a,y,x,b,E,te,ne,se,he,_e){if(Wt.Yb(a,y,ne,se,he,x,b)&&Wt.Yb(a,y,ne,se,he,E,te))Br(_e,a,y,0,0),Br(_e,ne,se,0,0);else{var Ee=(a+x)/2,Ne=(y+b)/2,Ge=(x+E)/2,Ye=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ee+Ge)/2,x=(Ne+Ye)/2,Ge=(Ge+E)/2,Ye=(Ye+te)/2;var et=(b+Ge)/2,st=(x+Ye)/2;Wt.Dl(a,y,Ee,Ne,b,x,et,st,he,_e),Wt.Dl(et,st,Ge,Ye,E,te,ne,se,he,_e)}return _e},Qe:function(a,y,x,b,E,te,ne,se,he,_e){if(Wt.Yb(a,y,ne,se,he,x,b)&&Wt.Yb(a,y,ne,se,he,E,te))_e.length===0&&(_e.push(a),_e.push(y)),_e.push(ne),_e.push(se);else{var Ee=(a+x)/2,Ne=(y+b)/2,Ge=(x+E)/2,Ye=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ee+Ge)/2,x=(Ne+Ye)/2,Ge=(Ge+E)/2,Ye=(Ye+te)/2;var et=(b+Ge)/2,st=(x+Ye)/2;Wt.Qe(a,y,Ee,Ne,b,x,et,st,he,_e),Wt.Qe(et,st,Ge,Ye,E,te,ne,se,he,_e)}return _e},jv:function(a,y,x,b,E,te,ne,se,he,_e){if(Wt.Yb(a,y,E,te,_e,x,b))return Wt.Yb(a,y,E,te,_e,se,he);var Ee=(a+x)/2,Ne=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ge=(Ee+x)/2,Ye=(Ne+b)/2;return Wt.jv(a,y,Ee,Ne,Ge,Ye,ne,se,he,_e)||Wt.jv(Ge,Ye,x,b,E,te,ne,se,he,_e)},OA:function(a,y,x,b,E,te,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+te)/2)/2),ne},iv:function(a,y,x,b,E,te,ne,se){if(Wt.Yb(a,y,E,te,ne,x,b))Br(se,a,y,0,0),Br(se,E,te,0,0);else{var he=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ee=(he+x)/2,Ne=(_e+b)/2;Wt.iv(a,y,he,_e,Ee,Ne,ne,se),Wt.iv(Ee,Ne,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(Wt.Yb(a,y,E,te,ne,x,b))se.length===0&&(se.push(a),se.push(y)),se.push(E),se.push(te);else{var he=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ee=(he+x)/2,Ne=(_e+b)/2;Wt.ep(a,y,he,_e,Ee,Ne,ne,se),Wt.ep(Ee,Ne,x,b,E,te,ne,se)}return se},Eo:function(a,y,x,b,E,te,ne,se,he,_e,Ee,Ne,Ge,Ye){if(Wt.Yb(a,y,ne,se,Ge,x,b)&&Wt.Yb(a,y,ne,se,Ge,E,te))return!Wt.Rl(a,y,ne,se,he,_e,Ee,Ne)||(Ge=(a-ne)*(_e-Ne)-(y-se)*(he-Ee),Ge===0)?!1:(Ye.h(((a*se-y*ne)*(he-Ee)-(a-ne)*(he*Ne-_e*Ee))/Ge,((a*se-y*ne)*(_e-Ne)-(y-se)*(he*Ne-_e*Ee))/Ge),!0);var et=(a+x)/2,st=(y+b)/2,Ct=(x+E)/2,St=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(et+Ct)/2,x=(st+St)/2,Ct=(Ct+E)/2,St=(St+te)/2;var Tt=(b+Ct)/2,At=(x+St)/2,It=1/0,Ht=!1,$t=0,Kn=0;return Wt.Eo(a,y,et,st,b,x,Tt,At,he,_e,Ee,Ne,Ge,Ye)&&(a=(Ye.x-he)*(Ye.x-he)+(Ye.y-_e)*(Ye.y-_e),a<It&&(It=a,Ht=!0,$t=Ye.x,Kn=Ye.y)),Wt.Eo(Tt,At,Ct,St,E,te,ne,se,he,_e,Ee,Ne,Ge,Ye)&&(Ye.x-he)*(Ye.x-he)+(Ye.y-_e)*(Ye.y-_e)<It&&(Ht=!0,$t=Ye.x,Kn=Ye.y),Ht&&(Ye.x=$t,Ye.y=Kn),Ht},Fo:function(a,y,x,b,E,te,ne,se,he,_e,Ee,Ne,Ge){var Ye=0;if(Wt.Yb(a,y,ne,se,Ge,x,b)&&Wt.Yb(a,y,ne,se,Ge,E,te)){if(Ge=(a-ne)*(_e-Ne)-(y-se)*(he-Ee),Ge===0)return Ye;var et=((a*se-y*ne)*(he-Ee)-(a-ne)*(he*Ne-_e*Ee))/Ge,st=((a*se-y*ne)*(_e-Ne)-(y-se)*(he*Ne-_e*Ee))/Ge;if(et>=Ee)return Ye;if((he>Ee?he-Ee:Ee-he)<(_e>Ne?_e-Ne:Ne-_e)){if(y<se?(he=y,a=se):(he=se,a=y),st<he||st>a)return Ye}else if(a<ne?(he=a,a=ne):he=ne,et<he||et>a)return Ye;0<Ge?Ye++:0>Ge&&Ye--}else{et=(a+x)/2,st=(y+b)/2;var Ct=(x+E)/2,St=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(et+Ct)/2,x=(st+St)/2,Ct=(Ct+E)/2,St=(St+te)/2;var Tt=(b+Ct)/2,At=(x+St)/2;Ye+=Wt.Fo(a,y,et,st,b,x,Tt,At,he,_e,Ee,Ne,Ge),Ye+=Wt.Fo(Tt,At,Ct,St,E,te,ne,se,he,_e,Ee,Ne,Ge)}return Ye},qh:function(a,y,x,b,E,te,ne){return Wt.$(a,x)?(y<b?(x=y,y=b):x=b,te<x?(ne.h(a,x),!1):te>y?(ne.h(a,y),!1):(ne.h(a,te),!0)):Wt.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-te)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,te,ne,se,he){return Wt.B(a,x)&&Wt.B(y,b)?(he.h(a,y),!1):Wt.$(E,ne)?Wt.$(a,x)?(Wt.qh(a,y,x,b,E,te,he),!1):Wt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),Wt.$(a,x)?(x=se*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(he.h(a,E),!1):x>y?(he.h(a,y),!1):(he.h(a,x),!0)):(ne=(b-y)/(x-a),Wt.$(se,ne)?(Wt.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),Wt.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(he.h(b,y),!1):E>a?(he.h(a,y),!1):(he.h(E,y),!0)):Wt.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return Wt.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,te,ne,se,he,_e){function Ee(Ct,St){var Tt=(Ct-a)*(Ct-a)+(St-y)*(St-y);Tt<Ne&&(Ne=Tt,he.h(Ct,St))}var Ne=1/0;Ee(he.x,he.y);var Ge=0,Ye=0,et=0,st=0;if(E<ne?(Ge=E,Ye=ne):(Ge=ne,Ye=E),te<se?(et=E,st=ne):(et=ne,st=E),Ge=(Ye-Ge)/2+_e,_e=(st-et)/2+_e,E=(E+ne)/2,te=(te+se)/2,Ge===0||_e===0)return he;if(.5>(x>a?x-a:a-x)){if(Ge=1-(x-E)*(x-E)/(Ge*Ge),0>Ge)return he;Ge=Math.sqrt(Ge),b=-_e*Ge+te,Ee(x,_e*Ge+te),Ee(x,b)}else{if(x=(b-y)/(x-a),b=1/(Ge*Ge)+x*x/(_e*_e),se=2*x*(y-x*a)/(_e*_e)-2*x*te/(_e*_e)-2*E/(Ge*Ge),Ge=se*se-4*b*(2*x*a*te/(_e*_e)-2*y*te/(_e*_e)+te*te/(_e*_e)+E*E/(Ge*Ge)-1+(y-x*a)*(y-x*a)/(_e*_e)),0>Ge)return he;Ge=Math.sqrt(Ge),_e=(-se+Ge)/(2*b),Ee(_e,x*_e-x*a+y),Ge=(-se-Ge)/(2*b),Ee(Ge,x*Ge-x*a+y)}return he},Ff:function(a,y,x,b,E,te,ne,se,he){var _e=1e21,Ee=a,Ne=y;if(Wt.Ve(a,y,a,b,E,te,ne,se,he)){var Ge=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te);Ge<_e&&(_e=Ge,Ee=he.x,Ne=he.y)}return Wt.Ve(x,y,x,b,E,te,ne,se,he)&&(Ge=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),Ge<_e&&(_e=Ge,Ee=he.x,Ne=he.y)),Wt.Ve(a,y,x,y,E,te,ne,se,he)&&(y=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),y<_e&&(_e=y,Ee=he.x,Ne=he.y)),Wt.Ve(a,b,x,b,E,te,ne,se,he)&&(a=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),a<_e&&(_e=a,Ee=he.x,Ne=he.y)),he.h(Ee,Ne),1e21>_e},us:function(a,y,x){return Wt.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,se){var he=a+x,_e=y+b;return E===ne?(te<se?(ne=te,te=se):ne=se,a<=E&&E<=he&&ne<=_e&&te>=y):te===se?(E<ne?(se=E,E=ne):se=ne,y<=te&&te<=_e&&se<=he&&E>=a):!!(Qr(a,y,x,b,E,te)||Qr(a,y,x,b,ne,se)||Wt.Rl(a,y,he,y,E,te,ne,se)||Wt.Rl(he,y,he,_e,E,te,ne,se)||Wt.Rl(he,_e,a,_e,E,te,ne,se)||Wt.Rl(a,_e,a,y,E,te,ne,se))},Rl:function(a,y,x,b,E,te,ne,se){return a===x&&y===b&&E===ne&&te===se?a===E&&y===te:0>=Wt.Fl(a,y,x,b,E,te)*Wt.Fl(a,y,x,b,ne,se)&&0>=Wt.Fl(E,te,ne,se,a,y)*Wt.Fl(E,te,ne,se,x,b)},Fl:function(a,y,x,b,E,te){return x-=a,b-=y,a=E-a,y=te-y,te=a*b-y*x,te===0&&(te=a*x+y*b,0<te&&(te=(a-x)*x+(y-b)*b,0>te&&(te=0))),te},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,te){var ne=Math.PI;te||(b*=ne/180,E*=ne/180);var se=b>E?-1:1;te=[];var he=ne/2,_e=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return he=_e+se*Math.min(b,he),se=a+x*Math.cos(_e),_e=y+x*Math.sin(_e),a+=x*Math.cos(he),y+=x*Math.sin(he),x=(se+a)/2,he=(_e+y)/2,te.push([se,_e,x,he,x,he,a,y]),te;for(;1e-5<b;)E=_e+se*Math.min(b,he),te.push(Wt.Vy(x,_e,E,a,y)),b-=Math.abs(E-_e),_e=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,_e=ne*ne+he*he,Ee=_e+ne*ne+he*se;return _e=4/3*(Math.sqrt(2*_e*Ee)-Ee)/(ne*se-he*ne),se=ne-_e*he,ne=he+_e*ne,he=-ne,_e=te+y,te=Math.cos(_e),_e=Math.sin(_e),[b+a*Math.cos(y),E+a*Math.sin(y),b+se*te-ne*_e,E+se*_e+ne*te,b+se*te-he*_e,E+se*_e+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,_e=ne===0?x:b;return(ne===0?E:te)&&(_e=-_e),ne=se,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),Wt.az(he,ne===0?a:y,_e,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 _e=0;9999999999>_e&&(y=.5*(se+he),!(y===se||y===he));++_e){var Ee=a/(y+E),Ne=ne/(y+te);if(Ee=Ee*Ee+Ne*Ne-1,0<Ee)se=y;else if(0>Ee)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 Mi,um:new Mi,Mf:new Mi,Nf:0,vm:100};Wt.za=Wt.AA;function Rn(a){Ai(this),this.l=2,a===void 0&&(a=Rn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Rn.o?this.ee=new Ln:(Rn.V===null&&(Rn.V=new Ln().freeze()),this.ee=Rn.V),this.aq=this.ee.Ja,this.Ip=new nn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Gr,this.gg=jo,this.Rk=this.Sk=NaN,this.Uf=Tn}Rn.prototype.copy=function(){var a=new Rn;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===Rn.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},Rn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Rn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Rn.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},Rn.prototype.ka=function(){if(Object.isFrozen(this)&&kt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Rn.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},Rn.prototype.Xa=function(a){if(!(a instanceof Rn))return!1;if(this.type!==a.type)return this.type===Rn.j&&a.type===Rn.o?Gl(this,a):a.type===Rn.j&&this.type===Rn.o?Gl(a,this):!1;if(this.type===Rn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return Wt.B(this.startX,a.startX)&&Wt.B(this.startY,a.startY)&&Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY)};function Gl(a,y){return a.type!==Rn.j||y.type!==Rn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Wt.B(a.startX,y.startX)&&Wt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===$r&&Wt.B(a.endX,y.endX)&&Wt.B(a.endY,y.endY))))}Rn.ia=function(a){return a.toString()},Rn.prototype.qb=function(a){a.classType===Rn&&(this.type=a)},Rn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Rn.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 Rn.u:var y=new nn(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 Rn.F:if(y=new nn(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 Rn.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()}},Rn.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},Rn.parse=function(a,y){function x(){return st>=It-1?!0:_e[st+1].match(Ht)!==null}function b(){return st++,_e[st]}function E(Yi){var Bi=parseFloat(b()),Wr=parseFloat(b());Ct===Ct.toLowerCase()&&(Bi=At.x+Bi,Wr=At.y+Wr),Yi.h(Bi,Wr)}function te(){return E(At),At}function ne(){return E(Tt),Tt}function se(){var Yi=St.toLowerCase();return Yi!=="c"&&Yi!=="s"&&Yi!=="q"&&Yi!=="t"?At:new ft(2*At.x-Tt.x,2*At.y-Tt.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 _e=a.split(" ");for(a=0;a<_e.length;a++){var Ee=_e[a];if(Ee.match(/(\.[0-9]*)(\.)/gm)!==null){he=ai();for(var Ne="",Ge=!1,Ye=0;Ye<Ee.length;Ye++){var et=Ee[Ye];et!=="."||Ge?et==="."?(he.push(Ne),Ne="."):Ne+=et:(Ge=!0,Ne+=et)}for(he.push(Ne),_e.splice(a,1),Ee=0;Ee<he.length;Ee++)_e.splice(a+Ee,0,he[Ee]);a+=he.length-1,Gn(he)}}var st=-1,Ct="",St="";he=new ft(0,0);var Tt=new ft(0,0),At=new ft(0,0),It=_e.length;a=A1(null),Ge=Ne=Ee=!1,Ye=!0,et=null;for(var Ht=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(st>=It-1);)if(St=Ct,Ct=b(),Ct!=="")switch(Ct.toUpperCase()){case"X":Ye=!0,Ne=Ee=!1;break;case"M":for(et=te(),a.mc===null||Ye===!0?(Wf(a,et.x,et.y,Ee,!Ne,Ge),Ye=!1):a.moveTo(et.x,et.y),he.assign(At);!x();)et=te(),a.lineTo(et.x,et.y);break;case"L":for(;!x();)et=te(),a.lineTo(et.x,et.y);break;case"H":for(;!x();)At=new ft((Ct===Ct.toLowerCase()?At.x:0)+parseFloat(b()),At.y),a.lineTo(At.x,At.y);break;case"V":for(;!x();)At=new ft(At.x,(Ct===Ct.toLowerCase()?At.y:0)+parseFloat(b())),a.lineTo(At.x,At.y);break;case"C":for(;!x();){et=new ft,E(et);var $t=ne(),Kn=te();$h(a,et.x,et.y,$t.x,$t.y,Kn.x,Kn.y)}break;case"S":for(;!x();)et=se(),$t=ne(),Kn=te(),$h(a,et.x,et.y,$t.x,$t.y,Kn.x,Kn.y);break;case"Q":for(;!x();)et=ne(),$t=te(),Um(a,et.x,et.y,$t.x,$t.y);break;case"T":for(;!x();)Tt=et=se(),$t=te(),Um(a,et.x,et.y,$t.x,$t.y);break;case"B":for(;!x();){et=parseFloat(b()),$t=parseFloat(b()),Kn=parseFloat(b());var ci=parseFloat(b()),si=parseFloat(b()),In=si,wn=!1;x()||(In=parseFloat(b()),x()||(wn=parseFloat(b())!==0)),Ct===Ct.toLowerCase()&&(Kn+=At.x,ci+=At.y),a.arcTo(et,$t,Kn,ci,si,In,wn)}break;case"A":for(;!x();)et=Math.abs(parseFloat(b())),$t=Math.abs(parseFloat(b())),Kn=parseFloat(b()),si=ci=!1,wn=In=0,In=b(),In.length===1?(ci=!!parseFloat(In),si=!!parseFloat(b()),In=parseFloat(b())):In.length===2?(ci=!!parseFloat(In[0]),si=!!parseFloat(In[1]),In=parseFloat(b())):(ci=!!parseFloat(In[0]),si=!!parseFloat(In[1]),In=parseFloat(In.slice(2))),wn=parseFloat(b()),Ct===Ct.toLowerCase()&&(In=At.x+In,wn=At.y+wn),At.h(In,wn),bx(a,et,$t,Kn,ci,si,In,wn);break;case"Z":_x(a),At.assign(he);break;case"F":for(et="",$t=1;_e[st+$t];)if(_e[st+$t]==="0")Ge=!0,$t++;else if(_e[st+$t].match(/[Uu]/)!==null)$t++;else if(_e[st+$t].match(Ht)===null)$t++;else{et=_e[st+$t];break}et.match(/[Mm]/)?Ee=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(et="",$t=1;_e[st+$t];)if(_e[st+$t].match(/[Ff]/)!==null)$t++;else if(_e[st+$t].match(Ht)===null)$t++;else{et=_e[st+$t];break}et.match(/[Mm]/)?Ne=!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},Rn.Ha=function(a,y){for(var x=a.length,b=ft.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}ft.free(b)},Rn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Rn.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},Rn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Rn.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),Hu(this,a,!1),Br(a,0,0,0,0),a.freeze()},Rn.prototype.ix=function(){var a=new nn;return Hu(this,a,!0),a};function Hu(a,y,x){switch(a.type){case Rn.j:case Rn.u:case Rn.F:x?y.h(a.od,a.pd,0,0):Br(y,a.od,a.pd,0,0),Br(y,a.Dc,a.Ec,0,0);break;case Rn.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):Br(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,se=ne.length,he=te.startX,_e=te.startY,Ee=0;Ee<se;Ee++){var Ne=ne[Ee];switch(Ne.type){case $r:case gs:he=Ne.endX,_e=Ne.endY,Br(y,he,_e,0,0);break;case ws:Wt.Dl(he,_e,Ne.point1X,Ne.point1Y,Ne.point2X,Ne.point2Y,Ne.endX,Ne.endY,.5,y),he=Ne.endX,_e=Ne.endY;break;case Ta:Wt.iv(he,_e,Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY,.5,y),he=Ne.endX,_e=Ne.endY;break;case Jo:case Va:var Ge=Ne.type===Jo?va(Ne,te):Is(Ne,te,he,_e),Ye=Ge.length;if(Ye===0){he=Ne.type===Jo?Ne.centerX:Ne.endX,_e=Ne.type===Jo?Ne.centerY:Ne.endY,Br(y,he,_e,0,0);break}Ne=null;for(var et=0;et<Ye;et++)Ne=Ge[et],Wt.Dl(Ne[0],Ne[1],Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7],.5,y);Ne!==null&&(he=Ne[6],_e=Ne[7]);break;default:kt("Unknown Segment type: "+Ne.type)}}}break;default:kt("Unknown Geometry type: "+a.type)}}Rn.prototype.normalize=function(){this._isFrozen&&ln(this);var a=this.ix();return this.offset(-a.x,-a.y),new ft(-a.x,-a.y)},Rn.prototype.offset=function(a,y){return this._isFrozen&&ln(this),this.transform(1,0,0,1,a,y),this},Rn.prototype.scale=function(a,y){return this._isFrozen&&ln(this),this.transform(a,0,0,y,0,0),this},Rn.prototype.rotate=function(a,y,x){this._isFrozen&&ln(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=ji.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),ji.free(b),this},Qe=Rn.prototype,Qe.transform=function(a,y,x,b,E,te){switch(this.type){case Rn.j:case Rn.u:case Rn.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 Rn.o:for(var he=this.figures.s,_e=he.length,Ee=0;Ee<_e;Ee++){var Ne=he[Ee];ne=Ne.startX,se=Ne.startY,Ne.startX=ne*a+se*x+E,Ne.startY=ne*y+se*b+te,Ne=Ne.segments.s;for(var Ge=Ne.length,Ye=0;Ye<Ge;Ye++){var et=Ne[Ye];switch(et.type){case $r:case gs:ne=et.endX,se=et.endY,et.endX=ne*a+se*x+E,et.endY=ne*y+se*b+te;break;case ws:ne=et.point1X,se=et.point1Y,et.point1X=ne*a+se*x+E,et.point1Y=ne*y+se*b+te,ne=et.point2X,se=et.point2Y,et.point2X=ne*a+se*x+E,et.point2Y=ne*y+se*b+te,ne=et.endX,se=et.endY,et.endX=ne*a+se*x+E,et.endY=ne*y+se*b+te;break;case Ta:ne=et.point1X,se=et.point1Y,et.point1X=ne*a+se*x+E,et.point1Y=ne*y+se*b+te,ne=et.endX,se=et.endY,et.endX=ne*a+se*x+E,et.endY=ne*y+se*b+te;break;case Jo:ne=et.centerX,se=et.centerY,et.centerX=ne*a+se*x+E,et.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),et.startAngle+=ne),0>a&&(et.startAngle=180-et.startAngle,et.sweepAngle=-et.sweepAngle),0>b&&(et.startAngle=-et.startAngle,et.sweepAngle=-et.sweepAngle),et.radiusX*=Math.sqrt(a*a+x*x),et.radiusY!==void 0&&(et.radiusY*=Math.sqrt(y*y+b*b));break;case Va:if(ne=et.endX,se=et.endY,et.endX=ne*a+se*x+E,et.endY=ne*y+se*b+te,et.radiusX===0||et.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),et.xAxisRotation+=ne),0>a&&(et.xAxisRotation=180-et.xAxisRotation,et.isClockwiseArc=!et.isClockwiseArc),0>b&&(et.xAxisRotation=-et.xAxisRotation,et.isClockwiseArc=!et.isClockwiseArc),et.radiusX*=Math.sqrt(a*a+x*x),et.radiusY*=Math.sqrt(y*y+b*b);break;default:kt("Unknown Segment type: "+et.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 Rn.j:return Wt.Yb(x,b,E,te,y,a.x,a.y);case Rn.u:var ne=nn.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),nn.free(ne),a;case Rn.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 Rn.o:return Hs(this,a,y,!0,!1);default:return!1}};function Hs(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,se=0,he,_e,Ee,Ne,Ge=a.figures.s,Ye=Ge.length,et=0;et<Ye;et++){var st=Ge[et],Ct=!st.isEvenOdd;if(st.isFilled){if(b&&st.ca(te,y,x))return!0;var St=st.segments;he=st.startX,_e=st.startY;for(var Tt=he,At=_e,It=St.s,Ht=0;Ht<=St.length;Ht++){var $t=void 0;if(Ht!==St.length){$t=It[Ht];var Kn=$t.type;a=$t.endX,Ne=$t.endY}else Kn=$r,a=Tt,Ne=At;switch(Kn){case gs:if(Tt=cl(te,y,ne,y,he,_e,Tt,At),isNaN(Tt))return!0;se+=Tt,Tt=a,At=Ne;break;case $r:if(he=cl(te,y,ne,y,he,_e,a,Ne),isNaN(he))return!0;se+=he;break;case ws:Ee=Wt.Fo(he,_e,$t.point1X,$t.point1Y,$t.point2X,$t.point2Y,a,Ne,ne,y,te,y,.5),se+=Ee;break;case Ta:Ee=Wt.Fo(he,_e,(he+2*$t.point1X)/3,(_e+2*$t.point1Y)/3,(2*$t.point1X+a)/3,(2*$t.point1Y+Ne)/3,a,Ne,ne,y,te,y,.5),se+=Ee;break;case Jo:case Va:Kn=$t.type===Jo?va($t,st):Is($t,st,he,_e);var ci=Kn.length;if(ci===0){if(he=cl(te,y,ne,y,he,_e,$t.type===Jo?$t.centerX:$t.endX,$t.type===Jo?$t.centerY:$t.endY),isNaN(he))return!0;se+=he;break}$t=null;for(var si=0;si<ci;si++){if($t=Kn[si],si===0){if(Ee=cl(te,y,ne,y,he,_e,$t[0],$t[1]),isNaN(Ee))return!0;se+=Ee}Ee=Wt.Fo($t[0],$t[1],$t[2],$t[3],$t[4],$t[5],$t[6],$t[7],ne,y,te,y,.5),se+=Ee}$t!==null&&(a=$t[6],Ne=$t[7]);break;default:kt("Unknown Segment type: "+$t.type)}he=a,_e=Ne}if(Ct){if(se!==0)return!0}else if(se%2!==0)return!0;se=0}else if(st.ca(te,y,E?x:x+2))return!0}return!1}function cl(a,y,x,b,E,te,ne,se){if(Wt.Yb(E,te,ne,se,.05,a,y))return NaN;var he=(a-x)*(te-se);if(he===0)return 0;var _e=((a*b-y*x)*(E-ne)-(a-x)*(E*se-te*ne))/he;if(y=(a*b-y*x)*(te-se)/he,_e>=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(_e<E||_e>ne)return 0}else if(_e<ne||_e>E)return 0;return 0<he?1:-1}function su(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 ft),this.type===Rn.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],_e=he.length;for(a=0;a<_e;a++){var Ee=he[a];if(ne+Ee>=te)return b=te-ne,b=Ee===0?0:b/Ee,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+=Ee}}return y},Qe.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Rn.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 _e=se[a];if(te+_e>=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+=_e}}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===Rn.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],_e=he.length;for(a=0;a<_e;a++){var Ee=he[a];if(ne+Ee>=te)return b=te-ne,b=Ee===0?0:b/Ee,Ee=x[se],x=Ee[2*a],se=Ee[2*a+1],E=Ee[2*a+2],a=Ee[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+=Ee}}return y},Qe.xx=function(a){if(this.type===Rn.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=ft.alloc();return Wt.qh(y,x,b,E,te,a,se),a=se.x,te=se.y,ft.free(se),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Rn.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 _e=Math.min(ne,he,se,E);if(_e===se)return b/te;if(_e===he)return(y+a)/te;if(_e===E)return(2*y+x-b)/te;if(_e===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=ft.alloc(),E=1/0,se=ne=0,he=y.length;for(var Ee=_e=0,Ne=0;Ne<he;Ne++)for(var Ge=y[Ne],Ye=x[Ne],et=Ge.length,st=0;st<et;st+=2){var Ct=Ge[st],St=Ge[st+1];if(st!==0){Wt.qh(_e,Ee,Ct,St,a.x,a.y,b);var Tt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Tt<E&&(E=Tt,ne=se,ne+=Math.sqrt((b.x-_e)*(b.x-_e)+(b.y-Ee)*(b.y-Ee))),se+=Ye[(st-2)/2]}_e=Ct,Ee=St}return ft.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function Gu(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Rn.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===Rn.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===Rn.F){var te=new ps;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Rr(Jo);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=va(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var se=0;se<E;se++){var he=a[se];Wt.Qe(ne,te,he[2],he[3],he[4],he[5],he[6],he[7],.5,b),ne=he[6],te=he[7]}}y.push(b),x.push(bu(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 _e=E.segments.s,Ee=_e.length,Ne=0;Ne<Ee;Ne++){var Ge=_e[Ne];switch(Ge.type){case gs:4<=b.length&&(y.push(b),x.push(bu(b))),b=[],b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY,se=ne,he=te;break;case $r:b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY;break;case ws:Wt.Qe(ne,te,Ge.point1X,Ge.point1Y,Ge.point2X,Ge.point2Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case Ta:Wt.ep(ne,te,Ge.point1X,Ge.point1Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case Jo:var Ye=va(Ge,E),et=Ye.length;if(et===0){b.push(Ge.centerX),b.push(Ge.centerY),ne=Ge.centerX,te=Ge.centerY;break}for(var st=0;st<et;st++){var Ct=Ye[st];Wt.Qe(ne,te,Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7],.5,b),ne=Ct[6],te=Ct[7]}break;case Va:if(Ye=Is(Ge,E,ne,te),et=Ye.length,st=Ge.endX,Ct=Ge.endY,et===0){b.push(st),b.push(Ct),ne=st,te=Ct;break}for(st=0;st<et;st++)Ct=Ye[st],Wt.Qe(ne,te,Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7],.5,b),ne=Ct[6],te=Ct[7];break;default:kt("Segment not of valid type: "+Ge.type)}Ge.isClosed&&(b.push(se),b.push(he))}4<=b.length&&(y.push(b),x.push(bu(b)))}}}function bu(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(Fi(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&&ln(this),this.fg=new zn(a,y,E,te).freeze(),this.gg=new zn(x,b,ne,se).freeze(),this},nt.Object.defineProperties(Rn.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 Gu(this),this.tk}},flattenedLengths:{get:function(){return Gu(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Rn.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===Rn.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&&ln(this,a),this.na=a,a===Rn.o?this.ee=new Ln:(Rn.V===null&&(Rn.V=new Ln().freeze()),this.ee=Rn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&ln(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&ln(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&ln(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&ln(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&ln(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&ln(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&ln(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&ln(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Rn.prototype.setSpots=Rn.prototype.pm,Rn.prototype.add=Rn.prototype.add,Rn.prototype.getFractionForPoint=Rn.prototype.xx,Rn.prototype.getPointAndAngleAlongPath=Rn.prototype.Qu,Rn.prototype.getAngleAlongPath=Rn.prototype.wx,Rn.prototype.getPointAlongPath=Rn.prototype.Pu,Rn.prototype.containsPoint=Rn.prototype.ca,Rn.prototype.transform=Rn.prototype.transform,Rn.prototype.rotate=Rn.prototype.rotate,Rn.prototype.scale=Rn.prototype.scale,Rn.prototype.offset=Rn.prototype.offset,Rn.prototype.normalize=Rn.prototype.normalize,Rn.prototype.computeBoundsWithoutOrigin=Rn.prototype.ix,Rn.prototype.equalsApprox=Rn.prototype.Xa,Rn.className="Geometry",Rn.j=new pn(Rn,"Line",0),Rn.u=new pn(Rn,"Rectangle",1),Rn.F=new pn(Rn,"Ellipse",2),Rn.o=new pn(Rn,"Path",3),Rn.V=null,Rn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Rn.className="Geometry",Rn.stringify=Rn.ia,Rn.fillPath=Rn.nb,Rn.parse=Rn.parse,Rn.Line=Rn.j,Rn.Rectangle=Rn.u,Rn.Ellipse=Rn.F,Rn.Path=Rn.o;function ps(a,y,x,b,E){Ai(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Ln,this.sr=this.pl.Ja,this.fw=null}ps.prototype.copy=function(){var a=new ps;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,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=ps.prototype,Qe.Xa=function(a){if(!(a instanceof ps&&Wt.B(this.startX,a.startX)&&Wt.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},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,_e=0;_e<he;_e++){var Ee=se[_e];switch(Ee.type){case gs:te=Ee.endX,ne=Ee.endY,b=Ee.endX,E=Ee.endY;break;case $r:if(Wt.Yb(b,E,Ee.endX,Ee.endY,x,a,y))return!0;b=Ee.endX,E=Ee.endY;break;case ws:if(Wt.cs(b,E,Ee.point1X,Ee.point1Y,Ee.point2X,Ee.point2Y,Ee.endX,Ee.endY,.5,a,y,x))return!0;b=Ee.endX,E=Ee.endY;break;case Ta:if(Wt.jv(b,E,Ee.point1X,Ee.point1Y,Ee.endX,Ee.endY,.5,a,y,x))return!0;b=Ee.endX,E=Ee.endY;break;case Jo:case Va:var Ne=Ee.type===Jo?va(Ee,this):Is(Ee,this,b,E),Ge=Ne.length,Ye=Ee.type===Jo?Ee.centerX:Ee.endX,et=Ee.type===Jo?Ee.centerY:Ee.endY;if(Ge===0){if(Wt.Yb(b,E,Ye,et,x,a,y))return!0;b=Ye,E=et;break}for(Ye=null,et=0;et<Ge;et++)if(Ye=Ne[et],et===0&&Wt.Yb(b,E,Ye[0],Ye[1],x,a,y)||Wt.cs(Ye[0],Ye[1],Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,a,y,x))return!0;Ye!==null&&(b=Ye[6],E=Ye[7]);break;default:kt("Unknown Segment type: "+Ee.type)}if(Ee.isClosed&&(b!==te||E!==ne)&&Wt.Yb(b,E,te,ne,x,a,y))return!0}return!1},nt.Object.defineProperties(ps.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&ln(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&ln(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&ln(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&ln(this,a),this.pl=a,this._isInvalidBounds=!0}}}),ps.prototype.add=ps.prototype.add,ps.prototype.equalsApprox=ps.prototype.Xa,ps.className="PathFigure";function Rr(a,y,x,b,E,te,ne,se){Ai(this),a===void 0&&(a=$r),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===Va?(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===Jo&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===Jo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Rr.prototype.copy=function(){var a=new Rr;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=Rr.prototype,Qe.Xa=function(a){if(!(a instanceof Rr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case gs:case $r:return Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY);case ws:return Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY)&&Wt.B(this.point1X,a.point1X)&&Wt.B(this.point1Y,a.point1Y)&&Wt.B(this.point2X,a.point2X)&&Wt.B(this.point2Y,a.point2Y);case Ta:return Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY)&&Wt.B(this.point1X,a.point1X)&&Wt.B(this.point1Y,a.point1Y);case Jo:return Wt.B(this.startAngle,a.startAngle)&&Wt.B(this.sweepAngle,a.sweepAngle)&&Wt.B(this.centerX,a.centerX)&&Wt.B(this.centerY,a.centerY)&&Wt.B(this.radiusX,a.radiusX)&&Wt.B(this.radiusY,a.radiusY);case Va:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Wt.B(this.xAxisRotation,a.xAxisRotation)&&Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY)&&Wt.B(this.radiusX,a.radiusX)&&Wt.B(this.radiusY,a.radiusY);default:return!1}},Qe.qb=function(a){a.classType===Rr&&(this.type=a)},Qe.toString=function(a){switch(a===void 0&&(a=-1),this.type){case gs:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case $r:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ws: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 Ta: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 Jo: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 Va: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 va(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,te=Wt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=ji.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Rn.Ha(te,ne),ji.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 Is(a,y,x,b){function E(st,Ct,St,Tt){return(st*Tt<Ct*St?-1:1)*Math.acos((st*St+Ct*Tt)/(Math.sqrt(st*st+Ct*Ct)*Math.sqrt(St*St+Tt*Tt)))}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,_e=a.Dc,Ee=a.Ec,Ne=Math.cos(ne),Ge=Math.sin(ne),Ye=Ne*(x-_e)/2+Ge*(b-Ee)/2;ne=-Ge*(x-_e)/2+Ne*(b-Ee)/2;var et=Ye*Ye/(y*y)+ne*ne/(te*te);return 1<et&&(y*=Math.sqrt(et),te*=Math.sqrt(et)),et=(se===he?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Ye*Ye)/(y*y*ne*ne+te*te*Ye*Ye)),isNaN(et)&&(et=0),se=et*y*ne/te,et=et*-te*Ye/y,isNaN(se)&&(se=0),isNaN(et)&&(et=0),x=(x+_e)/2+Ne*se-Ge*et,b=(b+Ee)/2+Ge*se+Ne*et,Ee=E(1,0,(Ye-se)/y,(ne-et)/te),Ne=(Ye-se)/y,_e=(ne-et)/te,Ye=(-Ye-se)/y,se=(-ne-et)/te,ne=E(Ne,_e,Ye,se),Ye=(Ne*Ye+_e*se)/(Math.sqrt(Ne*Ne+_e*_e)*Math.sqrt(Ye*Ye+se*se)),-1>=Ye?ne=Math.PI:1<=Ye&&(ne=0),!he&&0<ne&&(ne-=2*Math.PI),he&&0>ne&&(ne+=2*Math.PI),he=y>te?1:y/te,Ye=y>te?te/y:1,y=Wt.jx(0,0,y>te?y:te,Ee,Ee+ne,!0),te=ji.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Ye),Rn.Ha(y,te),ji.free(te),a.ae=y,a.ae}nt.Object.defineProperties(Rr.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&&ln(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ln(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&ln(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ln(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ln(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&ln(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&ln(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ln(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ln(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&An(a,">= zero",Rr,"radiusX"),this._isFrozen&&ln(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&An(a,">= zero",Rr,"radiusY"),this._isFrozen&&ln(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ln(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&&ln(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&&ln(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&&ln(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&&ln(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Rr.prototype.equalsApprox=Rr.prototype.Xa;var gs=new pn(Rr,"Move",0),$r=new pn(Rr,"Line",1),ws=new pn(Rr,"Bezier",2),Ta=new pn(Rr,"QuadraticBezier",3),Jo=new pn(Rr,"Arc",4),Va=new pn(Rr,"SvgArc",4);Rr.className="PathSegment",Rr.Move=gs,Rr.Line=$r,Rr.Bezier=ws,Rr.QuadraticBezier=Ta,Rr.Arc=Jo,Rr.SvgArc=Va;function na(){this.H=null,this.xu=new ft(0,0).freeze(),this.mt=new ft(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}na.prototype.copy=function(){var a=new na;return this.clone(a)},na.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},na.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},na.prototype.So=function(a,y){var x=this.diagram;return x===null||Ap(x,a,y),y},na.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Ap(x,a,y),y.assign(x.Ps(y))),y},nt.Object.defineProperties(na.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}}}),na.prototype.getMultiTouchDocumentPoint=na.prototype.Bz,na.prototype.getMultiTouchViewPoint=na.prototype.So,na.className="InputEvent";function Pu(){this.H=null,this.xa="",this.ar=this.Lr=null}Pu.prototype.copy=function(){var a=new Pu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Pu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},nt.Object.defineProperties(Pu.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}}}),Pu.className="DiagramEvent";function Io(){this.Fm=Ro,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Io.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Io.prototype.copy=function(){var a=new Io;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=Qt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Qt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Qt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Qt(y)&&typeof y.J=="function"?y.J():y,a},Io.prototype.qb=function(a){a.classType===Io&&(this.change=a)},Io.prototype.toString=function(){var a="";return a=this.change===ca?a+"* ":this.change===Ro?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===ca?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=bi(this.object)),this.oldValue!==null&&(a+=" old: "+bi(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+bi(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Io.prototype.I=function(a){return a?this.oldValue:this.newValue},Io.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Io.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Io.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Io.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Io.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},nt.Object.defineProperties(Io.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===ca&&(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}}}),Io.prototype.redo=Io.prototype.redo,Io.prototype.canRedo=Io.prototype.canRedo,Io.prototype.undo=Io.prototype.undo,Io.prototype.canUndo=Io.prototype.canUndo,Io.prototype.getParam=Io.prototype.Dz,Io.prototype.getValue=Io.prototype.I,Io.prototype.clear=Io.prototype.clear;var ca=new pn(Io,"Transaction",-1),Ro=new pn(Io,"Property",0),ns=new pn(Io,"Insert",1),qo=new pn(Io,"Remove",2);Io.className="ChangedEvent",Io.Transaction=ca,Io.Property=Ro,Io.Insert=ns,Io.Remove=qo;function cs(){this.o=new Ln().freeze(),this.xa="",this.j=!1}cs.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},cs.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()},cs.prototype.canUndo=function(){return this.isComplete},cs.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()}},cs.prototype.canRedo=function(){return this.isComplete},cs.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()}},cs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new hn,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Ro&&b.object){var E=y.get(b.object);E||(E=new hn,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()}},nt.Object.defineProperties(cs.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}}}),cs.prototype.optimize=cs.prototype.ak,cs.prototype.redo=cs.prototype.redo,cs.prototype.canRedo=cs.prototype.canRedo,cs.prototype.undo=cs.prototype.undo,cs.prototype.canUndo=cs.prototype.canUndo,cs.prototype.clear=cs.prototype.clear,cs.className="Transaction";function Ao(){this.Pt=new Mn,this.Jd=!1,this.u=new Ln().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Ln().freeze(),this.hl=new Ln,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Ao.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},Ao.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},Ao.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Qe=Ao.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=""),nh(this,!0,a)},Qe.Kf=function(){return nh(this,!1,"")};function nh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&jn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var te=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(te=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(te=y.M(0),te!==null&&te.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=te,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}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()}},Ao.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Ao.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){jn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Ao.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Ao.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){jn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Ao.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Io;for(b.change=ca,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Ao.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new cs);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||jn("Change not within a transaction: "+x.toString()))}},Ao.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},nt.Object.defineProperties(Ao.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}}}),Ao.prototype.handleChanged=Ao.prototype.Tu,Ao.prototype.redo=Ao.prototype.redo,Ao.prototype.undo=Ao.prototype.undo,Ao.prototype.canUndo=Ao.prototype.canUndo,Ao.prototype.discardHistoryAfterIndex=Ao.prototype.lx,Ao.prototype.rollbackTransaction=Ao.prototype.Kf,Ao.prototype.commitTransaction=Ao.prototype.eb,Ao.prototype.startTransaction=Ao.prototype.Ea,Ao.prototype.removeModel=Ao.prototype.Rx,Ao.prototype.addModel=Ao.prototype.Xw,Ao.prototype.clear=Ao.prototype.clear,Ao.className="UndoManager";function Nr(){Ai(this),this.H=ah,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new na,this.Zr=-1}Nr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Bn(this.constructor)},Nr.prototype.updateAdornments=function(){},Nr.prototype.canStart=function(){return this.isEnabled},Nr.prototype.doStart=function(){},Nr.prototype.doActivate=function(){this.isActive=!0},Nr.prototype.doDeactivate=function(){this.isActive=!1},Nr.prototype.doStop=function(){},Nr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Nr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Nr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Nr.prototype.doMouseMove=function(){},Nr.prototype.doMouseUp=function(){this.stopTool()},Nr.prototype.doMouseWheel=function(){},Nr.prototype.canStartMultiTouch=function(){return!0},Nr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,ft.allocAt(NaN,NaN)),b=y.So(1,ft.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}ft.free(x),ft.free(b)},Nr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,ft.allocAt(NaN,NaN)),b=y.So(1,ft.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 ft((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}ft.free(x),ft.free(b)},Nr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Nr.prototype.doKeyUp=function(){},Nr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Nr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Nr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(ur?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||(ur?y.meta:y.control)||y.shift||a.clearSelection()}},Nr.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,vc(a,b,x),b.handled};function vc(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)}}}Nr.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}},Nr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Nr.prototype.doCurrentObjectChanged=function(){},Nr.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===ih&&!y.shift||E===Cu&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===ih&&y.shift||E===Cu&&!y.control){b=a.position.copy();var te=y.event;E=te.deltaMode;var ne=te.deltaX;te=te.deltaY;var se="pixel";if(ne===0&&te===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(se,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(se,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:se="pixel";break;case 1:se="line";break;case 2:se="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(se,0<ne?"right":"left",Math.abs(ne))),te!==0&&a.allowVerticalScroll&&(te*=a.scrollVerticalLineChange/16,a.scroll(se,0<te?"down":"up",Math.abs(te)))}this.doWheelChange(a,b,y)}}},Nr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Nr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=qt(function(){x.doWaitAfter(b)},a)},Nr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Zt.clearTimeout(this.Zr),this.Zr=-1},Nr.prototype.doWaitAfter=function(){},Nr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof jr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Nr.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},nt.Object.defineProperties(Nr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof en&&(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}}}),Nr.prototype.startTransaction=Nr.prototype.Ea,Nr.className="Tool";function _o(){Nr.call(this),this.name="ToolManager",this.hb=new Ln,this.ob=new Ln,this.Hb=new Ln,this.F=this.V=850,this.o=new Cn(2,2).ja(),this.Ha=5e3,this.ia=Cu,this.u=Ph,this.Mp=this.j=null,this.zj=-1}Xe(_o,Nr),_o.prototype.initializeStandardTools=function(){},_o.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof jr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},_o.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Wl&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Kr){y.bubbles=!0;return}if(this.gestureBehavior===Wl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===Cu?this.mouseWheelBehavior=ih:this.mouseWheelBehavior===ih&&(this.mouseWheelBehavior=Cu)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},_o.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Kr){y.bubbles=!0;return}if(this.gestureBehavior===Wl)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}}Gh(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Gh(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}_o.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof jr&&(y===a||y.rg(a))||this.hideToolTip()},_o.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()))},_o.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)},_o.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 jr)||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()},_o.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof jr){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 Ks&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Zt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=qt(function(){E.hideToolTip()},a)}},_o.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}},_o.prototype.hideToolTip=function(){this.zj!==-1&&(Zt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof jr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ks&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},_o.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()},_o.prototype.doMouseWheel=function(){this.standardMouseWheel()},_o.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},_o.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},_o.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},_o.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},_o.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)},nt.Object.defineProperties(_o.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 jr?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}}}),_o.prototype.replaceStandardTool=_o.prototype.gb;var Cu=new pn(_o,"WheelScroll",0),ih=new pn(_o,"WheelZoom",1),Wh=new pn(_o,"WheelNone",2),Ph=new pn(_o,"GestureZoom",3),Wl=new pn(_o,"GestureCancel",4),Kr=new pn(_o,"GestureNone",5);_o.className="ToolManager",_o.WheelScroll=Cu,_o.WheelZoom=ih,_o.WheelNone=Wh,_o.GestureZoom=Ph,_o.GestureCancel=Wl,_o.GestureNone=Kr;function Ho(){Nr.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 ft(NaN,NaN),this.Fr=new ft,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Mn().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var xl;Xe(Ho,Nr),Ho.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},Ho.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},Ho.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,(ur?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Ho.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),Ot=null,this.isActive=!0,this.tl.set(a.position),Ch(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&&Ya(a),bf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Ot=this,Vt=this.diagram,this.doSimulatedDragOut()))};function Ch(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Fn?(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 Sr,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Ho.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Ho.prototype.Pd=function(a){return a===void 0?new Th(Yn):this.isGridSnapEnabled?new Th(new ft(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Th(a.copy())},Ho.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),wl(this),Lc(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<xl.count){for(var y=xl,x=y.length,b=0;b<x;b++){var E=y.M(b);Dr(E),mo(E),wl(E),E.diagram.ug()}y.clear()}Dr(this),this.tl.h(NaN,NaN),Vt!==null&&(Vt.currentCursor=""),Ot=Vt=null,mo(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Rd(a,!0)},Ho.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function wl(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Wu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Eh(){var a=Ot;mo(a),ya(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Ho.prototype.doCancel=function(){mo(this),ya(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Ho.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Ho.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Zl(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")):ya(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 hn,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 Fn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Ch(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,nc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function mo(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 Fn&&(x.value.point=new ft(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Dr(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 No(a,y,x){var b=a.diagram,E=a.startPoint,te=ft.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),ft.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Ya(b),b.hk())}Ho.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Ec(b,a,y,this.dragOptions,x)};function ya(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 Fn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),nc(b,-E.x,-E.y)}y.bd()}}function ls(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Ka(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=Wu(a,E,b),!a.isActive&&Ot===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof Ji)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&Ot===null||(a.doDragOver(y,b),!a.isActive&&Ot===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)}Ho.prototype.findDragOverObject=function(a){var y=this;return lh(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof jr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Ho.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 Wu(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&&Ot===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=au(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 au(a){var y=a.panel;return y!==null?y:a instanceof Ci&&!(a instanceof Ji)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Eu(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(_e){return b.findValidLinkablePort(_e,x)});a=ft.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(_r,a);he=y.Bf(he),he<te&&(ne=se,te=he)}}return ft.free(a),ne}function Ka(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=Eu(a,x.i(0),!1),te!==null&&(ne=te.part));var se=null,he=null;x.toNode===null&&(se=Eu(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)):Go(E,ne,te,he,se):Go(E,null,null,null,null)}}}}Ho.prototype.doDragOver=function(){};function Vl(a,y){var x=a.diagram;a.dragsLink&&Ka(a,!0),wl(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;vp(a,E,te),te=au(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||Ot!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof Xn&&te.linksConnected.each(function(se){se.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||Ot!==null){for(a=nn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Xn&&yp(x,b,a);nn.free(a)}}}function vp(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Ji||(x=a.mouseDrop,x!==null&&x(y))}function yp(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 Fn},!0,function(E){return E instanceof Fn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Ho.prototype.doDropOnto=function(){},Ho.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()?(Zl(this,!1),bf(a,this.copiedParts),No(this,this.copiedParts,!1),Lc(a,this.copiedParts)):this.mayMove()?(mo(this),No(this,this.draggedParts,!0)):this.mayDragOut()?(Zl(this,!1),No(this,this.copiedParts,!1)):mo(this),ls(this,a.lastInput.documentPoint))}},Ho.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?(mo(this),Zl(this,!0),bf(a,this.copiedParts),No(this,this.copiedParts,!1),Lc(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,mo(this),this.mayMove()&&(No(this,this.draggedParts,!0),ls(this,a.lastInput.documentPoint))),this.Ym=!0,Vl(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Sp(this),a.Ya(),Lc(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Ho.prototype.simulatedMouseMove=function(a,y,x){if(Ot===null)return!1;var b=Ot.diagram;x instanceof en||(x=null);var E=Vt;return x!==E&&(E!==null&&E!==b&&(E.ug(),Ot.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Vt=x,x!==null&&x!==b&&(Eh(),E=x.toolManager.findTool("Dragging"),E!==null&&(xl.contains(E)||xl.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)},Ho.prototype.simulatedMouseUp=function(a,y,x){if(Ot===null)return!1;var b=Vt,E=Ot.diagram;if(x===null)return Ot.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),Ot.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;Vt=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Eh(),xl.contains(b)||xl.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 ft),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=Ot,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function Sp(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Xn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Ho.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(ur?!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())},Ho.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())},Ho.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())},Ho.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Ho.prototype.Az=function(){return Ot},Ho.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Ot;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Ho.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Nl(a),a.animationManager.Cc(),a=Ot,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Ho.prototype.doSimulatedDragLeave=function(){var a=Ot;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Ho.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Ot;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;gf(this,y.draggedParts.Lf(),!1,a.firstInput),No(this,this.copiedParts,!1),ls(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Ho.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Ot;if(y!==null){var x=y.diagram;if(y.Ym=!0,mo(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),gf(this,y.draggedParts.Lf(),!0,a.lastInput),No(this,this.copiedParts,!1);var b=new Mn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Vl(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 gf(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=nn.alloc();E=b=1/0;for(var ne=-1/0,se=-1/0,he=y.iterator;he.next();){var _e=he.value;if(_e.isVisible()){var Ee=_e.location;_e=Ee.x,Ee=Ee.y,isNaN(_e)||isNaN(Ee)||(_e<b&&(b=_e),Ee<E&&(E=Ee),_e>ne&&(ne=_e),Ee>se&&(se=Ee))}}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,nn.free(te),te=a.Fr,ne=new hn,se=ft.alloc(),he=y.iterator;he.next();)_e=he.value,_e instanceof Fn&&_e.canCopy()&&(Ee=x.I(_e),Ee!==null&&(Ee.points=_e.points,nc(Ee,te.x-b,te.y-E),Ee.suspendsRouting=!0,ne.add(Ee,a.Pd())));for(y=y.iterator;y.next();)_e=y.value,_e.Zc()&&_e.canCopy()&&(he=x.I(_e),he!==null&&(_e=_e.location,se.h(te.x-(b-_e.x),te.y-(E-_e.y)),he.location=se,he.Va(),ne.add(he,a.Pd(se))));ft.free(se),a.copiedParts=ne,Ch(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,nc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Ho.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Ho.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new ft},nt.Object.defineProperties(Ho.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}}}),Ho.prototype.getDraggingSource=Ho.prototype.Az;var Ot=null,Vt=null;Ho.className="DraggingTool",xl=new Ln,Di("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),_o.prototype.doCancel=function(){Ot!==null&&Ot.doCancel(),Nr.prototype.doCancel.call(this)};function Jt(){Nr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Fn,y=new nr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new nr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Xn,y=new nr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ui,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Xn,y=new nr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ui,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 hn,this.Of=this.gj=this.Pf=null}Xe(Jt,Nr),Jt.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Jt.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=Cn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Cn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=_r,te=ft.alloc(),x.location=y.ga(_r,te),ft.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Jt.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Ui,y.fromSpot=or,y.toSpot=or),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Jt.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Jt.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Xn){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)}},Jt.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Xn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Xn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Jt.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(Ne){return E.findValidLinkablePort(Ne,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,se=ne.part;if(se instanceof Xn){var he=ne.ga(_r,ft.alloc()),_e=x.x-he.x,Ee=x.y-he.y;ft.free(he),he=_e*_e+Ee*Ee,he<b&&(_e=this.validPortsCache.I(ne),_e!==null?_e&&(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 Xn&&(x.layer===null||x.layer.allowLink))?y:null},Jt.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},Jt.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},Jt.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Jt.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Xn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Xn))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},Jt.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)},Jt.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 Mn;return b.add(a),Wi(this,x,y,b)};function Wi(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Wi(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Wi(a,y.labeledLink,x,b))))}Jt.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!==Ud){if(b===Kp){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!_i(this,a,y,x,!0)}if(b===Yp){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!_i(this,a,y,x,!0)}if(b===Wp)return a===y?a=!0:(b=new Mn,b.add(y),a=hi(this,b,a,y,x)),!a;if(b===Zp)return!_i(this,a,y,x,!1);if(b===Vp)return a===y?a=!0:(b=new Mn,b.add(y),a=xi(this,b,a,y,x)),!a}return!0};function _i(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&&_i(a,ne,x,b,E)))return!0}return!1}function hi(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&&hi(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}nt.Object.defineProperties(Jt.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}}}),Jt.className="LinkingBaseTool";function ui(){Jt.call(this),this.name="Linking",this.V={},this.F=null,this.K=Pi,this.Xd=null}Xe(ui,Jt),ui.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},ui.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 Xn)))return null;var x=this.direction;if(x===Pi||x===$i){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===Pi||x===bo)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ui.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 Xn&&(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 Xn&&(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)},ui.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()},ui.prototype.doStop=function(){Jt.prototype.doStop.call(this),this.startObject=null},ui.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 Xn&&(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)}}},ui.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Fn)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)},ui.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},ui.prototype.doNoLink=function(){},nt.Object.defineProperties(ui.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 Pi=new pn(ui,"Either",0),$i=new pn(ui,"ForwardsOnly",0),bo=new pn(ui,"BackwardsOnly",0);ui.className="LinkingTool",ui.Either=Pi,ui.ForwardsOnly=$i,ui.BackwardsOnly=bo;function Sr(){Jt.call(this),this.name="Relinking";var a=new nr;a.figure="Diamond",a.desiredSize=pr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new nr,a.figure="Diamond",a.desiredSize=pr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new nn}Xe(Sr,Jt),Sr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Fn){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)}},Sr.prototype.makeAdornment=function(a,y){var x=new jr;return x.type=Nn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Sr.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},Sr.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 jr&&x.adornedPart instanceof Fn))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=pi),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=pi),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},Sr.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Kf||x===ic)&&(x=Fa),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}},Sr.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()},Sr.prototype.doStop=function(){Jt.prototype.doStop.call(this),this.handle=null},Sr.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 Xn&&(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()}}},Sr.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},Sr.prototype.doNoRelink=function(){};function Go(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)}nt.Object.defineProperties(Sr.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 jr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Sr.className="RelinkingTool",Di("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Di("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Ki(){Nr.call(this),this.name="LinkReshaping";var a=new nr;a.figure="Rectangle",a.desiredSize=xr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new nr,a.figure="Diamond",a.desiredSize=pr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new ft,this.Yq=new Ln}Xe(Ki,Nr),Ki.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Xr},Ki.prototype.om=function(a,y){a.reshapingBehavior=y},Ki.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Fn){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)}},Ki.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new jr,E.type=Nn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Ll)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 _e=y.i(x+1);Wt.B(he.x,_e.x)&&Wt.B(he.y,_e.y)&&(_e=y.i(x-1)),Wt.B(he.x,_e.x)?(this.om(se,ho),se.cursor="n-resize"):Wt.B(he.y,_e.y)&&(this.om(se,rs),se.cursor="w-resize")}else ne===te-1&&b?(he=y.i(te-1),_e=y.i(te),Wt.B(he.x,_e.x)&&Wt.B(he.y,_e.y)&&(he=y.i(te+1)),Wt.B(he.x,_e.x)?(this.om(se,ho),se.cursor="n-resize"):Wt.B(he.y,_e.y)&&(this.om(se,rs),se.cursor="w-resize")):ne!==te&&(this.om(se,Ko),se.cursor="move");E.add(se)}E.adornedObject=a}return E},Ki.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Ki.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Ki.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},Ki.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 Fn){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}}},Ki.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Ki.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ki.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Ki.prototype.getResegmentingPoint=function(){return this.handle.ga(_r)},Ki.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Ki.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&&(Mo(this,ne,b,E,te,!0)||Mo(this,ne,b,E,te,!1))){var se=y.points.copy();Mo(this,ne,b,E,te,!0)?(se.cd(x-2,new ft(ne.x,(te.y+ne.y)/2)),se.cd(x+1,new ft(te.x,(te.y+ne.y)/2))):(se.cd(x-2,new ft((te.x+ne.x)/2,ne.y)),se.cd(x+1,new ft((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&&(Mo(this,b,E,te,ne,!0)||Mo(this,b,E,te,ne,!1))&&(se=y.points.copy(),Mo(this,b,E,te,ne,!0)?(se.cd(x-1,new ft(b.x,(b.y+ne.y)/2)),se.cd(x+2,new ft(ne.x,(b.y+ne.y)/2))):(se.cd(x-1,new ft((b.x+ne.x)/2,b.y)),se.cd(x+2,new ft((b.x+ne.x)/2,ne.y))),se.mb(x+1),se.mb(x),y.points=se,y.Wb())}}else ne=ft.alloc(),Wt.qh(b.x,b.y,te.x,te.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),ft.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Mo(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}Ki.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===ho?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===rs&&(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===ho?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===rs&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),te=y.i(b-1),ne=y.i(b+1);Wt.B(te.x,E.x)&&Wt.B(E.y,ne.y)?(Wt.B(te.x,y.i(b-2).x)&&!Wt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Wt.B(ne.y,y.i(b+2).y)&&!Wt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Wt.B(te.y,E.y)&&Wt.B(E.x,ne.x)?(Wt.B(te.y,y.i(b-2).y)&&!Wt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Wt.B(ne.x,y.i(b+2).x)&&!Wt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Wt.B(te.x,E.x)&&Wt.B(E.x,ne.x)?(Wt.B(te.x,y.i(b-2).x)&&!Wt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Wt.B(ne.x,y.i(b+2).x)&&!Wt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Wt.B(te.y,E.y)&&Wt.B(E.y,ne.y)&&(Wt.B(te.y,y.i(b-2).y)&&!Wt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Wt.B(ne.y,y.i(b+2).y)&&!Wt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(te=E.ga(_r,ft.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,ft.alloc()),y.L(0,b.x,b.y),ft.free(te),ft.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(_r,ft.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,ft.alloc()),y.L(y.pointsCount-1,a.x,a.y),ft.free(x),ft.free(a));y.zf()},Ki.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Ko:return a;case ho:return new ft(y.i(x).x,a.y);case rs:return new ft(a.x,y.i(x).y);default:case Xr:return y.i(x)}},nt.Object.defineProperties(Ki.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 jr))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}}}),Ki.prototype.setReshapingBehavior=Ki.prototype.om,Ki.prototype.getReshapingBehavior=Ki.prototype.Ru;var Xr=new pn(Ki,"None",0),rs=new pn(Ki,"Horizontal",1),ho=new pn(Ki,"Vertical",2),Ko=new pn(Ki,"All",3);Ki.className="LinkReshapingTool",Ki.None=Xr,Ki.Horizontal=rs,Ki.Vertical=ho,Ki.All=Ko,Di("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Po(){Nr.call(this),this.name="Resizing",this.o=new Cn(1,1).freeze(),this.j=new Cn(9999,9999).freeze(),this.yg=new Cn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new nr;a.alignmentFocus=_r,a.figure="Rectangle",a.desiredSize=xr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new ft,this.Dw=new Cn,this.Tn=new ft,this.rt=new Cn(0,0),this.qt=new Cn(1/0,1/0),this.pt=new Cn(1,1)}Xe(Po,Nr),Po.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Fn)){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(),Dc(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Po.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new jr,y.type=Nn.Spot,y.locationSpot=_r;var x=new Ra;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Gr)),y.add(this.makeHandle(a,aa)),y.add(this.makeHandle(a,jo)),y.add(this.makeHandle(a,xs)),y.add(this.makeHandle(a,ga)),y.add(this.makeHandle(a,As)),y.add(this.makeHandle(a,zs)),y.add(this.makeHandle(a,ma))}else if(Ql(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Po.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Po.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=_r),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 Nn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Po.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},Po.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))},Po.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Po.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Po.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Po.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,ft.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),ft.free(E)}},Po.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,ft.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),ft.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Po.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 Ji){var b=new Ln;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ce;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Po.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=_r);var ne=this.adornedObject.naturalBounds,se=ne.x,he=ne.y,_e=ne.x+ne.width,Ee=ne.y+ne.height,Ne=1;if(!te){Ne=ne.width;var Ge=ne.height;0>=Ne&&(Ne=1),0>=Ge&&(Ge=1),Ne=Ge/Ne}return Ge=ft.alloc(),Wt.No(a.x,a.y,se,he,E.width,E.height,Ge),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Ge.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=Math.max(_e-a.x,x.width),a.y=Math.max(Ge.y,Ee-b.height),a.y=Math.min(a.y,Ee-x.height),a.height=Math.max(Ee-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width),a.x=_e-a.width,a.y=Ee-a.height)):1<=y.y?(a.x=Math.max(Ge.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=Math.max(_e-a.x,x.width),a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width),a.x=_e-a.width)):(a.x=Math.max(Ge.x,_e-b.width),a.x=Math.min(a.x,_e-x.width),a.width=_e-a.x,te||(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne,a.y=he+.5*(Ee-he-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),a.y=Math.max(Ge.y,Ee-b.height),a.y=Math.min(a.y,Ee-x.height),a.height=Math.max(Ee-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width),a.y=Ee-a.height)):1<=y.y?(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne):(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width))):(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),te||(a.height=Math.max(Math.min(Ne*a.width,b.height),x.height),a.width=a.height/Ne,a.y=he+.5*(Ee-he-a.height))):0>=y.y?(a.y=Math.max(Ge.y,Ee-b.height),a.y=Math.min(a.y,Ee-x.height),a.height=Ee-a.y,te||(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width,a.x=se+.5*(_e-se-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Ne,b.width),x.width),a.height=Ne*a.width,a.x=se+.5*(_e-se-a.width))),ft.free(Ge),a},Po.prototype.computeReshape=function(){var a=bn;return this.adornedObject instanceof nr&&(a=Cv(this.adornedObject)),!(a===fi||this.diagram.lastInput.shift)},Po.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},Po.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},Po.prototype.computeCellSize=function(){var a=new Cn(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},nt.Object.defineProperties(Po.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 jr))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 jr)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}}}),Po.className="ResizingTool",Di("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ur(){Nr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new ft,this.ue=null;var a=new nr;a.figure="Ellipse",a.desiredSize=pr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new ft(NaN,NaN),this.u=0,this.F=50}Xe(Ur,Nr),Ur.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)}},Ur.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new jr,y.type=Nn.Position,y.locationSpot=_r;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Ql(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ur.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},Ur.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)},Ur.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(_r)},Ur.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)},Ur.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new ft(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ur.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ur.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ur.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ur.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()},Ur.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()}},Ur.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},nt.Object.defineProperties(Ur.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 jr))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 jr)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}}}),Ur.className="RotatingTool",Di("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Yo(){Nr.call(this),this.name="ClickSelecting"}Xe(Yo,Nr),Yo.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Yo.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Yo.className="ClickSelectingTool";function Zi(){Nr.call(this),this.name="Action",this.pk=null}Xe(Zi,Nr),Zi.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},Zi.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()},Zi.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))}},Zi.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()},Zi.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())},Zi.prototype.doStop=function(){this.pk=null},Zi.className="ActionTool";function ts(){Nr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new ft(0,0)}Xe(ts,Nr),ts.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)},ts.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},ts.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 Ci)x.Zc()&&(Ql(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Qt(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=ft.allocAt(a.x,a.y);this.isGridSnapEnabled&&_f(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),ft.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},nt.Object.defineProperties(ts.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}}}),ts.className="ClickCreatingTool";function vo(){Nr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ci;a.layerName="Tool",a.selectable=!1;var y=new nr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Xe(vo,Nr),vo.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))},vo.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},vo.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},vo.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=Cn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Cn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},vo.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()},vo.prototype.computeBoxBounds=function(){var a=this.diagram;return new nn(a.firstInput.documentPoint,a.lastInput.documentPoint)},vo.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),ur?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new Ln,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},nt.Object.defineProperties(vo.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}}}),vo.className="DragSelectingTool";function Do(){Nr.call(this),this.name="Panning",this.Xt=new ft,this.xy=new ft,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Zt.document,"scroll",a.Kw,!1),a.stopTool()}}Xe(Do,Nr),Do.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())},Do.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Zt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Do.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Do.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Do.prototype.doMouseMove=function(){this.move()},Do.prototype.doMouseUp=function(){this.move(),this.stopTool()},Do.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)}},nt.Object.defineProperties(Do.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Do.className="PanningTool",Di("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Di("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Di("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Di("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Di("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Ks(){this.F=this.u=this.j=this.o=null}nt.Object.defineProperties(Ks.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}}}),Ks.className="HTMLInfo";function fr(a,y,x){this.text=a,this.hx=y,this.visible=x}fr.className="ContextMenuButtonInfo";function Fo(){Nr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new ft,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Xe(Fo,Nr);function Co(a){var y=new Ks;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},Aa=y,a.tu=function(){a.stopTool()},y=Hn("div");var x=Hn("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=Hn("style");Zt.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",Or,!1),b.addEventListener(y,"selectstart",Or,!1),b.addEventListener(x,"contextmenu",Or,!1)),y.className="goCXforeground",x.className="goCXbackground",Zt.document.body&&(Zt.document.body.appendChild(y),Zt.document.body.appendChild(x)),Lu=y,il=x,Ys=!0}function Or(a){return a.preventDefault(),!1}Fo.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)},Fo.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Fo.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Fo.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof en||(a instanceof Gt?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},Fo.prototype.doActivate=function(){},Fo.prototype.doMouseDown=function(){if(Nr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof jr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Jr(this)},Fo.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof jr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Jr(this)};function Jr(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Ks||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Uo(a,!0),a.isActive||a.stopTool())}Fo.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Uo(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=Aa,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Gt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof jr&&!a.currentContextMenu.visible&&a.stopTool()}}Fo.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Fo.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof jr){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 Ks&&a.show(y,x,this);this.currentContextMenu=a},Fo.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}},Fo.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof jr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ks&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Zr(a){var y=new Ln;return y.add(new fr("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new fr("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new fr("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new fr("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new fr("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new fr("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new fr("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new fr("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new fr("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new fr("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new fr("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new fr("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new fr("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Fo.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Zr(this)),Lu.innerHTML="",il.addEventListener("pointerdown",this.tu,!1);var y=this,x=Hn("ul");x.className="goCXul",Lu.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=Hn("li"),te.className="goCXli";var ne=Hn("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)}}Lu.style.display="block",il.style.display="block"},Fo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Aa){Lu.style.display="none",il.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(il,"pointerdown",this.tu,!1),this.currentContextMenu=null}},nt.Object.defineProperties(Fo.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof jr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Ys===!1&&Aa===null&&is&&Co(this),Aa},set:function(a){a===null&&(Ys=!0),Aa=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Aa=null,Ys=!1,il=null,Lu=null;Fo.className="ContextMenuTool",Di("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function ro(){Nr.call(this),this.name="TextEditing",this.Zh=new Eo,this.ia=null,this.V=dl,this.vj=null,this.qa=Kl,this.u=1,this.F=!0,this.o=null,this.j=new Ks,this.kt=null,Mu(this,this.j)}Xe(ro,Nr);function Mu(a,y){if(is){var x=Hn("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(Na)):E==="Tab"?(a.acceptText(ku),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Kl){var b=a.kt;a.qa===yc&&(a.qa=Sc),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Kl){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 Eo&&te instanceof ro)if(te.state===xo)x.style.border="3px solid red",x.focus();else{var ne=b.ga(_r),se=E.position,he=E.scale,_e=b.Df()*he;_e<te.minimumEditorScale&&(_e=te.minimumEditorScale);var Ee=b.naturalBounds.width*_e+6,Ne=b.naturalBounds.height*_e+2,Ge=(ne.x-se.x)*he;ne=(ne.y-se.y)*he,se=b.verticalAlignment,he=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*_e,Ne=se.y*Ne-se.y*he+se.offsetY-(.5*Ne-.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*_e+"%",x.style.lineHeight="normal",x.style.width=Ee+"px",x.style.left=(Ge-Ee/2|0)-1+"px",x.style.top=(ne+Ne|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=_e,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)}}}ro.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||la&&la!==this&&(la.acceptText(Rs),la&&la!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Eo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===dl&&!y.isSelected||this.starting===ia&&2>a.lastInput.clickCount)):!1},ro.prototype.doStart=function(){la=this,this.textBlock!==null&&this.doActivate()},ro.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 Eo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=yc;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new nn(this.textBlock.ga(Gr),this.textBlock.ga(jo));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},ro.prototype.doCancel=function(){this.stopTool()},ro.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},ro.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Rs)},ro.prototype.acceptText=function(a){switch(a){case Rs:this.qa===Ds?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===yc||this.qa===xo||this.qa===Sc)&&(this.qa=Td,So(this));break;case Qo:case Na:case ku:(Na!==a||this.textBlock.isMultiline!==!0)&&(this.qa===yc||this.qa===xo||this.qa===Sc)&&(this.qa=Td,So(this))}};function So(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=Ds,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=xo,a.doError(E,te))}}ro.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)},ro.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},ro.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Kl,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},ro.prototype.doStop=function(){la=null},ro.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)))},ro.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},nt.Object.defineProperties(ro.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)}}}),ro.prototype.measureTemporaryTextBlock=ro.prototype.Lx;var Qo=new pn(ro,"LostFocus",0),Rs=new pn(ro,"MouseDown",1),ku=new pn(ro,"Tab",2),Na=new pn(ro,"Enter",3),$c=new pn(ro,"SingleClick",0),dl=new pn(ro,"SingleClickSelected",1),ia=new pn(ro,"DoubleClick",2),Kl=new pn(ro,"StateNone",0),yc=new pn(ro,"StateActive",1),Sc=new pn(ro,"StateEditing",2),Td=new pn(ro,"StateValidating",3),xo=new pn(ro,"StateInvalid",4),Ds=new pn(ro,"StateValidated",5),la=null;ro.className="TextEditingTool",ro.LostFocus=Qo,ro.MouseDown=Rs,ro.Tab=ku,ro.Enter=Na,ro.SingleClick=$c,ro.SingleClickSelected=dl,ro.DoubleClick=ia,ro.StateNone=Kl,ro.StateActive=yc,ro.StateEditing=Sc,ro.StateValidating=Td,ro.StateInvalid=xo,ro.StateValidated=Ds,Di("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Gs(a){Nd||(xp(),Nd=!0),this.H=ah,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Mh,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Mn,this.ce=new da,this.ce.Yd=this,this.Ei=new Mn,this.pu=new Mn,this.Sr=new Mn,this.pr=new Mn,a&&Object.assign(this,a)}Gs.prototype.Xe=function(a){this.H=a},Gs.prototype.canStart=function(){return!0};function Ss(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),fa(a.H),a.zb=!0)}function Yl(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===Mh?(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===wp&&y.vc.clear(),a.Qw=!!(a.Pk===Dd&&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(),Od(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ca&&b!==null&&(delete b.start.scale,delete b.end.scale),Zt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ya(x),Ep(x),a.zb=!1,y.start(),y.bc&&(sh(a),x.Ya(),_p(y,0),Nl(x,!0),lu(a),x.R("AnimationStarting",a)))}))}}function _l(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function rh(a,y,x,b){a.isTicking||_l(a)||y instanceof Fn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Qe=Gs.prototype,Qe.fv=function(a){return this.ce.fv(a)},Qe.Xu=function(a){return this.ce.Xu(a)};function Lh(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 Gt&&he.diagram!==null||he instanceof en){se=!0;break e}}se=!1}se?Id(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(sh(E),Nl(E.H),lu(E)),Zt.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Zt.requestAnimationFrame(function(){x()}))}function oh(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function sh(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 lu(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(),Od(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Od(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),rl(this,a))},Qe.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Zh(this.ce,y,"position",y.position,y.position),rl(this,a))};function mf(a,y,x){!a.zb||y.D(x)||_l(a)||(a.H.pi||(y=x.copy()),Zh(a.ce,a.H,"position",y,x))}function vf(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function rl(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function xc(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],_e=y[1],Ee=y[2];return y=y[3],se===0||se===100?(te=he,ne=_e):(Ee===0||Ee===100)&&(he=te,_e=ne),180<Math.abs(he-te)&&(he>te?te+=360:he+=360),te=E(x,te,he-te,b)%360,ne=E(x,ne,_e-ne,b),se=E(x,se,Ee-se,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+se+"%, "+x+")"}function xp(){function a(x,b,E,te,ne,se){x.position=new ft(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}var y=new hn;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 ft(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 ft(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 ft(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,_e=E.actualBounds;E=_e.x+_e.width/2-he.width/2,he=_e.y+_e.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 ft(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 nn(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=xc(b,E,ne,se,te)}),y.add("stroke",function(x,b,E,te,ne,se){x.stroke=xc(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=xc(b,E,ne,se,te)}),y.add("areaBackground",function(x,b,E,te,ne,se){x.areaBackground=xc(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)}),Ad=y}nt.Object.defineProperties(Gs.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&&An(a,">= 1",Gs,"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}}}),Gs.prototype.stopAnimation=Gs.prototype.Cc;var Ad=null,Nd=!1,Mh=new pn(Gs,"Default",1),Dd=new pn(Gs,"AnimateLocations",2),wp=new pn(Gs,"None",3);Gs.className="AnimationManager",Gs.defineAnimationEffect=function(a,y){Nd||(xp(),Nd=!0),Ad.add(a,y)},Gs.Default=Mh,Gs.AnimateLocations=Dd,Gs.None=wp;function da(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=ed,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Yn,this.vc=new hn,this.Tt=new hn,this.yl=new Mn,this.Ut=new Mn,this.dw=Yh,a&&Object.assign(this,a)}da.prototype.suspend=function(){this.Xk=!0},da.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Id(this,!0),sh(this.Yd),Nl(this.H),lu(this.Yd),this.H.redraw()};function Od(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=da.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 en?a=x:x instanceof Gt&&(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===Mh&&this===y.defaultAnimation&&(this.Lp=Kg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Hd),sh(y),this.yl.each(function(b){b.data=null,a.add(b)}),lu(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Lh(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 en?this.H=a:a instanceof Gt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ci){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Zh(this,a,y,x,b,E),this};function Zh(a,y,x,b,E,te){var ne=a.vc;if(y instanceof en&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Nh(b),av(),b=[El.j,El.u,El.o,El.F],Nh(E),av(),E=[El.j,El.u,El.o,El.F]),ne.contains(y)){var se=ne.I(y),he=se.start,_e=se.end;he[x]===void 0&&(he[x]=wc(b)),_e[x]=wc(E)}else he={},_e={},he[x]=wc(b),_e[x]=wc(E),se=he.position,y instanceof Gt&&se instanceof ft&&!se.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&se.assign(_e.position),se=new _c(he,_e,te),ne.add(y,se);ne=he[x],ne instanceof ft&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof Ci?se.Ku.location=wc(y.location):te&&(se.Ku[x]=wc(b))}function wc(a){return a instanceof ft||a instanceof Cn?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 Id(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),sh(x),_p(a,E),Nl(a.H,!0),lu(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 _p(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof Gt&&te.diagram===null)){var ne=b.value,se=E?ne.end:ne.start;ne=E?ne.start:ne.end;var he=Ad,_e;for(_e in ne)_e==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||he.get(_e)===null||he.get(_e)(te,se[_e],ne[_e],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,sh(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=Ad;b.next();){var ne=b.key,se=b.value,he=E?se.end:se.start,_e=E?se.start:se.end,Ee=se.Ku,Ne;for(Ne in _e)if(te.get(Ne)!==null){var Ge=Ne;!se.Hu||Ge!=="position:nodeCollapse"&&Ge!=="position:placeholder"||(Ge="position"),te.get(Ge)(ne,he[Ne],Ee[Ne]!==void 0?Ee[Ne]:se.Hu?he[Ne]:_e[Ne],this.Lp,this.Gd,this.Gd,this)}se.Hu&&Ee.location!==void 0&&ne instanceof Ci&&(ne.location=Ee.location),se.nv&&ne instanceof Ci&&ne.Zb(!1)}if(y.As.clear(),Rd(y,!1),y.Ya(),y.N(),Nl(y,!0),x.defaultAnimation===this){for(Ne=x.pr.iterator;Ne.next();)E=Ne.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Nl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),lu(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Od(this,null),x.Ml(this),y.$b())}},Qe.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Ji&&(b=y.placeholder),b!==null?(x=b.ga(Gr),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new ft(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Ji)for(a=a.memberParts;a.next();)b=a.value,b instanceof Xn&&this.Cj(b,y)},Qe.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Ji&&(x=y.placeholder),x!==null){var b=x.ga(Gr);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 Ji)for(a=a.memberParts;a.next();)b=a.value,b instanceof Xn&&this.Aj(b,y)}},Qe.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},nt.Object.defineProperties(da.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&An(a,">= 1",da,"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:kt("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}}}),da.prototype.getTemporaryState=da.prototype.Ez,da.prototype.stop=da.prototype.stop,da.prototype.add=da.prototype.add,da.prototype.addTemporaryPart=da.prototype.Iy;function ed(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Kg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}da.className="Animation",da.EaseLinear=function(a,y,x,b){return x*a/b+y},da.EaseInOutQuad=ed,da.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},da.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},da.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},da.EaseOutExpo=Kg;function _c(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}_c.className="AnimationState";function uu(a,y,x){this.xd=null,this.rf=a,this.so=x||bp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=bc))}uu.prototype.copy=function(){var a=new uu(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 Yg(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))}nt.Object.defineProperties(uu.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 bp=new pn(uu,"Default",1),bc=new pn(uu,"Immediate",2),td=new pn(uu,"Bundled",3);uu.className="AnimationTrigger",uu.Default=bp,uu.Immediate=bc,uu.Bundled=td;function Xs(a){Ai(this),this.H=null,this.Pa=new Ln,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}Qe=Xs.prototype,Qe.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,_a(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 Ji?E++:he instanceof Xn?b++:he instanceof Fn?te++:he instanceof jr?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&&Xi(b)&&(se+=" #"+Xi(b)),x instanceof Xn?se+=" "+bi(b):x instanceof Fn&&(se+=" "+bi(x.fromNode)+" "+bi(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=ft.alloc(),te=this.Pa.s,ne=te.length;ne--;){var se=te[ne];if((b!==!0||Dc(se)!==!1)&&se.isVisible()&&(E.assign(a),ti(E,se.oe),se=se.ic(E,y,x),se!==null&&(y!==null&&(se=y(se)),se!==null&&(x===null||x(se)))))return ft.free(E),se}return ft.free(E),null},Qe.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Ln||b instanceof Mn||(b=new Mn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=ft.alloc(),ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((E!==!0||Dc(he)!==!1)&&he.isVisible()){te.assign(a),ti(te,he.oe);var _e=he;he.ji(te,y,x,b)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||b.add(_e))}}return ft.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 Ln||E instanceof Mn||(E=new Mn),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||Dc(he)!==!1)&&he.isVisible()){var _e=he;he.Cf(a,y,x,b,E)&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||E.add(_e))}}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 _e=se[he];if((ne!==!0||Dc(_e)!==!1)&&te(_e)&&_e.isVisible()){var Ee=_e;_e.Cf(a,y,x,b,E)&&(y!==null&&(Ee=y(Ee)),Ee===null||x!==null&&!x(Ee)||E.add(Ee))}}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 Ln||E instanceof Mn)&&(te=E),E=!0),te instanceof Ln||te instanceof Mn||(te=new Mn),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var se=ft.alloc(),he=ft.alloc(),_e=this.Pa.s,Ee=_e.length;Ee--;){var Ne=_e[Ee];if((ne!==!0||Dc(Ne)!==!1)&&Ne.isVisible()){se.assign(a),ti(se,Ne.oe),he.h(a.x+y,a.y),ti(he,Ne.oe);var Ge=Ne;Ne.og(se,he,x,b,E,te)&&(x!==null&&(Ge=x(Ge)),Ge===null||b!==null&&!b(Ge)||te.add(Ge))}}return ft.free(se),ft.free(he),te},Qe.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=ai();for(var E=ai(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof Fn){if(ne.fd===!1)continue}else if(ne instanceof jr&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&fo(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],Rv(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++)Rv(E[y]);Gn(a),Gn(E)}}};function kh(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=kh(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,se=nn.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(nn.free(se),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Xg(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=kh(a,y),se=a.Zq;se.length=0;for(var he=x.scale,_e=nn.alloc(),Ee=0;Ee<te;Ee++){var Ne=E[Ee];b.contains(Ne)&&a.Oj(y,Ne,x,se,he,_e,!1)}nn.free(_e),y.globalAlpha=ne}}}Qe.Oj=function(a,y,x,b,E,te,ne){if(ne&&!Dc(y))a.Hs(y);else{if(b!==null&&y instanceof Fn&&(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 fl?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&&(os(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(os(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),os(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(Ro,a,this,y,x,b,E)},Qe.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&_a(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)),yf(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,_a(y),a};function yf(a,y,x){if(y=Jg(a,y,x),x instanceof Ji&&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&&yf(a,-1,y)}x.svg!==null&&x.svg.remove()}function Jg(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}nt.Object.defineProperties(Xs.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===""&&kt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&kt("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)&&An(a,"0 <= value <= 1",Xs,"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))}}}),Xs.prototype.findObjectsNear=Xs.prototype.og,Xs.prototype.findObjectsIn=Xs.prototype.Cf,Xs.prototype.findObjectsAt=Xs.prototype.ji,Xs.prototype.findObjectAt=Xs.prototype.ic,Xs.className="Layer";function en(a,y){if(hm||(xa(),hm=!0),Ai(this),ah=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,is){var x=this,b=function(){x.removeEventListener(Zt.document,"DOMContentLoaded",b,!1),x.setRTL()};Zt.document.body!==null?this.setRTL():x.addEventListener(Zt.document,"DOMContentLoaded",b,!1)}this.ol=null,kf.add("Model",to);var E=this;return this.Hb=function(te){var ne=E.partManager;if(te.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var se=te.change;te.modelChange===""&&se===Ro&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,qg(this),this.model=cy(),this.Wg=!0,$g(this),this.layout=new Vo,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 cm,a!==void 0&&(typeof a=="string"||Zt.Element&&a instanceof Element?Cp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Pc,ah;function qg(a){a.Yd=new Gs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Ln,a.pj=new hn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new ft(NaN,NaN).freeze(),a.du=new ft(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new ft(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new ji,a.zu=new ft(NaN,NaN).freeze(),a.ut=new nn(NaN,NaN,NaN,NaN).freeze(),a.rj=new Qi(0,0,0,0).freeze(),a.sj=Yh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ca,a.zk=Ts,a.Fg=Ca,a.pq=Ts,a.yt=Gr,a.Bt=Gr,a.Fc=!0,a.pn=!1,a.De=new Mn,a.Eh=new hn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Qi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new na,a.bq.diagram=a,a.Qg=new na,a.Qg.diagram=a,a.cj=new na,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new Mn,a.Ht=!0,a.uu=Xh,a.pw=!1,a.wu=Ud,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 hn,a.Xn=new Ln,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new Qi(5).freeze(),a.Hw=new Mn().freeze(),a.Nt=999999999,a.nw=new Mn().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 Mn,a.ow=new Mn,a.Xh=null,a.aw=new Cn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new ft,bounds:new nn,Py:new Cn,bA:new Cn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new nn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Cn(NaN,NaN).freeze(),a.Sp=new nn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new hn;var y=new Xn,x=new Eo;x.bind(new ms("text","",bi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Xn,x=new Eo,x.stroke="brown",x.bind(new ms("text","",bi)),y.add(x),a.Lg.add("Comment",y),y=new Xn,y.selectable=!1,y.avoidable=!1,x=new nr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Cn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new hn,y=new Ji,y.selectionObjectName="GROUPPANEL",y.type=Nn.Vertical,x=new Eo,x.font="bold 12pt sans-serif",x.bind(new ms("text","",bi)),y.add(x),x=new Nn(Nn.Auto),x.name="GROUPPANEL";var b=new nr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ra,b.padding=new Qi(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new hn,y=new Fn,x=new nr,x.isPanelMain=!0,y.add(x),x=new nr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Fn,x=new nr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new jr,y.type=Nn.Auto,x=new nr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ra,x.margin=new Qi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new jr,y.type=Nn.Link,x=new nr,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 to,a.toolManager=new _o,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=Qg(),a.eq=null,a.fq=vi,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 ft,a.zy=500,a.wp=new ft,a.wq=!1}en.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),ld=null,kc="",Pp(this,!1),this.Xn.clear(),Hf(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Pp(a,y){a.animationManager.Cc(!0),a.Hw=new Mn().freeze(),a.nw=new Mn().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(),Hf(),a.Og.clear(),wr=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function Qg(){return null}en.prototype.reset=function(){this.clear(),this.vb=!0,qg(this),Vu(this),this.Wg=!0,$g(this),this.layout=new Vo,this.Wg=!1,this.model=cy(),this.model.undoManager=new Ao,this.vb=this.rn=!1,this.N()},en.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Zt.document.body);var y=Hn("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},en.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Zt.document.body);var y=0;if(is){var x=um;y=Pc,x===null&&(x=um=Hn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Pc=Hn("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||ur||(y=11)}this.Db=y,this.Gw=!0},en.prototype.qb=function(a){a.classType===en&&(this.autoScale=a)},en.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 Cp(a,y){if(is){if(y!=null||kt("Diagram setup requires an argument DIV."),a.Ka!==null&&kt("Diagram has already completed setup."),typeof y=="string"?a.Ka=Zt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:kt("No DIV or DIV id supplied: "+y),a.Ka===null&&kt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&kt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Zt.ResizeObserver){var x=Kt(function(){a.$b()},250);a.ol=new Zt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Zt.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=Zt.go;var E=new ql(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Zt.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),Dp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new ql(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,is){E=Hn("div");var te=Hn("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=tm,E.addEventListener("pointerdown",nm),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=Kt(function(){a.Yh=null,a.N()},300),a.Ov=Kt(function(){Ep(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var se=Al(a,ne,!0);se.bubbles=!0;var he=0,_e=0;se.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(he=0<ne.deltaX?1:-1),ne.deltaY!==0&&(_e=0<ne.deltaY?1:-1),se.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-he:-_e):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(he=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(_e=0<ne.wheelDeltaY?-1:1),se.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-he:-_e):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(se.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),hu(se,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Al(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 _e=he;he=Tp(a,ne,!0,!1,!0,_e),id(a,ne,he),he.targetDiagram=kp(ne,ne.target),he.targetObject=null,_e||he.clone(a.bq),_e=a.uw,se=se?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(_e.x-ne.screenX)>se||Math.abs(_e.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():hu(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=Tp(a,ne,!1,!1,!1,se[1]!==null);var he=Zt.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 _e=a,Ee=ne;he&&he.H&&(Ee=ne,_e=he.H),se.targetDiagram=_e,id(a,Ee,se),se.targetObject=null,a.doMouseMove(),hu(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=Tp(a,ne,!1,!0,!0,!1);var _e=Zt.document.elementFromPoint(ne.clientX,ne.clientY)||null;_e!==null&&_e.shadowRoot!==void 0&&_e.shadowRoot!==null&&(_e=_e.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),_e!==null&&_e.H instanceof en&&_e.H!==a&&id(_e.H,ne,he),_e===null&&(_e=ne.target),id(a,ne,he),he.clickCount=a.yq,he.targetDiagram=kp(ne,_e),he.targetObject=null,a.doMouseUp(),hu(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"+Wd[1]+Wd[2]+"wI"+hd.slice(1,5)]["b"+Dx.slice(1,y)](b.Z,Gd,y,y),b.Vc(!0),tv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}en.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},en.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function tv(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(Zt,"resize",a.Ov,!1)}function Ya(a){30<a.Sq&&(a.Yh=1)}function Rd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),mi&&mi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}en.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Zt.devicePixelRatio||1},en.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},en.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},en.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},en.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},en.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},en.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},en.prototype.doFocus=function(){this.focus()},en.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Zt.scrollX||Zt.pageXOffset,y=Zt.scrollY||Zt.pageYOffset;this.ta.focus(),Zt.scrollTo(a,y)}},en.prototype.Oy=function(){this.H.R("GainedFocus")},en.prototype.Ny=function(){this.H.R("LostFocus")};function Ep(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===Ca&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function $g(a){var y=new Xs;y.name="Background",a.Al(y),y=new Xs,y.name="",a.Al(y),y=new Xs,y.name="Foreground",a.Al(y),y=new Xs,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Xs,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Xs,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function em(a){var y=new Nn(Nn.Grid);y.name="GRID";var x=new nr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new nr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new nr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new nr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new nr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new nr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ci,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 tm(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):sd(this.H)}function nm(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):sd(this.H)}en.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,_e=b.height+te.top+te.bottom,Ee=b.right+te.right;te=b.bottom+te.bottom;var Ne=E.x;b=E.y;var Ge=E.width,Ye=E.height,et=E.right,st=E.bottom;E=this.scale;var Ct=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ct=Ct+a.scrollWidth-a.clientWidth;break;case"reverse":Ct=a.scrollWidth-Ct-a.clientWidth}var St=Ct;Ge<he||Ye<_e?(Ct=ft.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==St&&(Ct.x=St/E+ne,this.ju=St),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ct.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=Ct,ft.free(Ct),this.Ee=this.qr=!1):(Ct=ft.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Ne&&(this.position=Ct.h(St+ne,this.position.y)),Ee>et&&(this.position=Ct.h(-(y.scrollWidth-this.Aa)+St-this.Aa/E+Ee,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=Ct.h(this.position.x,a.scrollTop+se)),te>st&&(this.position=Ct.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),ft.free(Ct),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Ee=b.right,et=E.right,te=b.bottom,st=E.bottom,ne=b.x,Ne=E.x,se=b.y,b=E.y,Ge>=he&&ne>=Ne&&Ee<=et&&(x.style.width="1px"),Ye>=_e&&se>=b&&te<=st&&(x.style.height="1px"))}},en.prototype.computeBounds=function(a){return a===void 0&&(a=new nn),fa(this),Lp(this,a)};function Lp(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 _e=ne[he];_e.isInDocumentBounds&&_e.isVisible()&&(_e=_e.actualBounds,_e.w()&&(x?(x=!1,y.assign(_e)):y.ed(_e)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}en.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(rn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Fn||(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 Fn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new nn(NaN,NaN,0,0):x};function Xl(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=ft.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=nn.allocAt(0,0,b.width,b.height);var E=ft.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,nn.free(b),ft.free(E),ft.free(x)}x=a.yh,y&&a.Fg!==Ca&&(x=a.Fg);var te=x!==Ca?nd(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()?_r:he),Mp(a,a.documentBounds,E,ne,se,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,Wt.B(te.x,x)&&Wt.B(te.y,b)&&Wt.B(te.width,E)&&Wt.B(te.height,ne)||a.onViewportBoundsChanged(new nn(x,b,E,ne),te,y,!1)}}function nd(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===bl?(y=Math.min(he,se),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Tc?(y=he>se?(ne-a.Db)/b:(te-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}en.prototype.zoomToFit=function(){var a=this.sj;this.sj=Yh,this.scale=nd(this,bl),a!==Yh&&(Xl(this,!1),Mp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Qe=en.prototype,Qe.BA=function(a,y){y===void 0&&(y=bl);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===bl||y===Tc)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var te=this.ya;E=y===Tc?te/b>E/x?(te-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(te/b,E/x)}this.scale=E,this.position=new ft(a.x,a.y)}},Qe.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new ft(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 Gt){this.eq=a;var y=ft.alloc();this.fq=this.op(a.ga(Gr,y)),ft.free(y)}else this.eq=null,this.fq=vi};function Mp(a,y,x,b,E,te){var ne=ft.allocAt(a.pa.x,a.pa.y),se=ne.x,he=ne.y;if(a.eq!==null){var _e=ft.alloc();_e=a.eq.ga(Gr,_e),se=_e.x-a.fq.x/a.scale,he=_e.y-a.fq.y/a.scale,E=or,ft.free(_e)}(te||a.scrollMode===Yh)&&(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),mf(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Vu(a),ft.free(ne)}Qe.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=lh(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Ci)return a}else if(a=lh(this,a,function(x){return x.part}),a instanceof Ci)return a;return null},Qe.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),fa(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 lh(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),fa(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),Fd(this,a,function(b){return b.part},y?function(b){return b instanceof Ci&&b.canSelect()}:null,x)};function Fd(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Ln||E instanceof Mn||(E=new Mn),fa(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 Ln||b instanceof Mn||(b=new Mn),fa(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),Sf(this,a,function(E){return E instanceof Ci&&(!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 Ln||E instanceof Mn||(E=new Mn),fa(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 Mn;fa(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 Sf(a,y,x,b,E){var te=null;for(te===void 0&&(te=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Ln||E instanceof Mn||(E=new Mn),fa(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),Bd(this,a,y,function(te){return te instanceof Ci&&(!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 Ln||E instanceof Mn)&&(te=E),E=!0),te instanceof Ln||te instanceof Mn||(te=new Mn),fa(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 Bd(a,y,x,b,E,te){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Ln||E instanceof Mn)&&(te=E),E=!0),te instanceof Ln||te instanceof Mn||(te=new Mn),fa(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}en.prototype.acceptEvent=function(a){return Al(this,a,a instanceof MouseEvent)};function Al(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?id(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),ur&&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=kp(y,y.target),b.targetObject=null,b}function kp(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 Tp(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,ur&&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 hu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}en.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Al(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(),hu(x,a)},en.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Al(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(),hu(x,a)},en.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Al(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),hu(x,a)},en.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Al(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),hu(x,a)},en.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new ft(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?ti(new ft(y,a),this.Ab):new ft(y,a)};function id(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=ft.allocAt(ne,se),a.Ab.Cd(y),x.documentPoint.assign(y),ft.free(y)):x.documentPoint.h(ne,se)}function Ap(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))}}en.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function im(a){a.ld||fa(a),a.Va()}en.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Qe=en.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,Nl(this),this.hf=!1,this.du=new ft(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&qt(function(){b.ld=!1,Ss(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;Zt.requestAnimationFrame(function(){y.kg&&y.bd()})}},Qe.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Nl(this))};function Cc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||sd(a)||(y&&fa(a),x&&Xl(a,!1))}function Nl(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];bs(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||Ep(a),Cc(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Zu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),fa(a),te=!1,(!a.hf||a.xh)&&(a.hf?Up(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Up(a,!1)),te=!0),a.Jk=!1,fa(a),a.ou||im(a),Cc(a,!0,!1),ne=!1,te?(x=nn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Np(a)),a.R("LayoutCompleted"),Cc(a,!0,!1),nn.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ca?a.scale=nd(a,a.Fg):a.yh!==Ca?a.scale=nd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Xl(a,!0)),te&&ne&&a.eb("Initial Layout"),fa(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Np(a){if(a.Fg!==Ca)a.scale=nd(a,a.Fg);else if(a.yh!==Ca)a.scale=nd(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Xl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Zu(a)}function fa(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 Mn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Ji&&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 Ji||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Ji&&x.isVisible()&&jd(this,x);for(a.reset();a.next();)x=a.value,x instanceof Fn&&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 jr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function jd(a,y){for(var x=ai(),b=ai(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof Ji?(Cl(te)||Oa(te)||Nc(te))&&jd(a,te):te instanceof Fn?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(Gn(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();Gn(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&&kt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){od(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,Xy(a,se.m11,se.m12,se.m21,se.m22,se.dx,se.dy),this.pb!==1&&(a.globalAlpha=this.pb),Vh(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?cd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(ji.prototype.Cd=ji.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,od(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,_e=Math.round(se.x*he)/he,Ee=Math.round(se.y*he)/he;for(he!==1&&te.scale(he),se.x===0&&se.y===0||te.translate(-_e,-Ee),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Vh(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?cd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(ji.prototype.Cd=ji.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=mi&&mi.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 xf(a,y,x,b,E,te,ne,se,he,_e){if(a.Ka!==null){a.ta===null&&kt("No canvas specified"),ne===void 0&&(ne=null),se===void 0&&(se=null),he===void 0&&(he=!1),_e===void 0&&(_e=!1),od(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var Ee=a.Ca;a.Ca=E;var Ne=a.Wa.s,Ge=Ne.length;try{var Ye=new nn(te.x,te.y,b.width/E,b.height/E),et=Ye.copy();et.Co(x),Zu(a,et),fa(a),a.Fd(Ne,Ge,a,Ye),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 st=a.Mb;y.scale(st,st);var Ct=ji.alloc();Ct.reset(),Ct.translate(x.left,x.top),Ct.scale(E),te.x===0&&te.y===0||Ct.translate(-te.x,-te.y),y.setTransform(Ct.m11,Ct.m12,Ct.m21,Ct.m22,Ct.dx,Ct.dy),y.yc(),y instanceof fl&&Xy(y,Ct.m11,Ct.m12,Ct.m21,Ct.m22,Ct.dx,Ct.dy),ji.free(Ct),Vh(a,y),y.globalAlpha=a.pb;var St=a.Qj("Grid");if(ne){var Tt=new Mn,At=ne.iterator;for(At.reset();At.next();){var It=At.value;It instanceof Ci&&(_e||It.layer!==St)&&(It.Gj(),Tt.add(It))}for(_e=0;_e<Ge;_e++)Xg(Ne[_e],y,a,Tt,he);Tt.each(function($t){return $t.Gj()})}else for(Tt=0;Tt<Ge;Tt++){var Ht=Ne[Tt];Ht===St?_e&&Ht.gc(y,a,!0):Ht.gc(y,a,he)}a.$i=!1,a.Yf&&cd(a.Yf,a)&&a.Vp()}finally{a.Ca=Ee,a.ib.Vc(!0),a.vd=!0,a.Fd(Ne,Ge,a,a.viewportBounds),Zu(a),a.ib instanceof fl&&(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 Mi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(ur||Tr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Vh(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 Mi,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 rd(this,a),this};function rd(a,y){var x=a instanceof Nn,b=a instanceof en,E;for(E in y){E===""&&kt("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])),Qt(te)?ne=E.substr(se+1):kt("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Ei(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Ei(a.toolManager,ne))te=a.toolManager;else if(b&&sm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof gi&&ne==="Changed"){a.Pe(y[ne]);continue}else kt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof Gt&&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 hn,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")},en.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!==Hd&&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=nn.alloc(),zp(this,this.computeBounds(b)),nn.free(b)),b=this.ta,b===null||b instanceof Ku)))){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 _e=70*ne,Ee=Math.max(te,0),Ne=Math.max(y,0),Ge=Math.floor(E-Ee),Ye=Math.floor(se-Ne);a.drawImage(b.Oa,Ee,Ne,Ge,Ye,0,0,Ge,Ye),cd(this.Yf,this)&&a.clearRect(0,0,he,_e),b=ai(),a=ai(),Ye=Math.abs(te),Ge=Math.abs(y);var et=Ee===0?0:E-Ye;Ee=ft.allocAt(et,0),Ye=ft.allocAt(Ye+et,se),a.push(new nn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y)));var st=this.Ab;if(st.reset(),st.scale(ne,ne),this.Ca!==1&&st.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&st.translate(-ne.x,-ne.y),ti(Ee,st),ti(Ye,st),b.push(new nn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),et=Ne===0?0:se-Ge,Ee.h(0,et),Ye.h(E,Ge+et),a.push(new nn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),ti(Ee,st),ti(Ye,st),b.push(new nn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),cd(this.Yf,this)&&(E=0<te?0:-te,se=0<y?0:-y,Ee.h(E,se),Ye.h(he+E,_e+se),a.push(new nn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),ti(Ee,st),ti(Ye,st),b.push(new nn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y)))),ft.free(Ee),ft.free(Ye),Cc(this,!1,!0),this.Ka===null&&kt("No div specified"),this.ta===null&&kt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(od(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,_e=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,-_e),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),Vh(this,E),E.globalAlpha=this.pb,se=0;se<te;se++)if(ne=y[se],he=b,ne.visible&&ne.pb!==0){_e=kh(ne,E),Ne=ne.Zq,Ne.length=0,Ee=this.scale,Ge=nn.alloc(),Ye=ne.Pa.s,st=Ye.length,et=he.length;for(var Ct=0;Ct<st;Ct++){var St=Ye[Ct],Tt=yd(St,St.actualBounds);e:{for(var At=2/Ee,It=4/Ee,Ht=0;Ht<et;Ht++){var $t=he[Ht];if($t.width!==0&&$t.height!==0&&Tt.Vu($t.x-At,$t.y-At,$t.width+It,$t.height+It)){Tt=!0;break e}}Tt=!1}Tt&&ne.Oj(E,St,this,Ne,Ee,Ge,!0)}nn.free(Ge),E.globalAlpha=_e}E.restore(),E.Vc(!0),this.Yf&&cd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Gn(b),Gn(a),this.ld=!1}}else this.bd();x&&(Ya(this),this.bd(),Rd(this,!0))}else x?(Ya(this),this.bd(),Rd(this,!0)):this.bd()}};function od(a){a.pn!==!1&&(a.pn=!1,Dp(a,a.Aa,a.ya))}function Dp(a,y,x){Vu(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function sd(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,_e=E.clientHeight||b+se,Ee=a.viewportBounds;E=Ee.x;var Ne=Ee.y,Ge=Ee.width,Ye=Ee.height;if((he!==x+ne||_e!==b+se)&&(a.gf=!1,a.Be=!1,se=ne=0,a.Aa=he,a.ya=_e,te=a.pn=!0,Vu(a)),!a.hf||!a.viewportBounds.w())return!0;var et=a.ku,st=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Ct=a.documentBounds,St=0,Tt=0,At=0,It=0,Ht=Ee.width,$t=Ee.height,Kn=a.rj;a.contentAlignment.sb()?(Ct.width>Ht&&(St=Kn.left,Tt=Kn.right),Ct.height>$t&&(At=Kn.top,It=Kn.bottom)):(St=Kn.left,Tt=Kn.right,At=Kn.top,It=Kn.bottom);var ci=Ct.width+St+Tt,si=Ct.height+At+It;Kn=a.scale;var In=ci>he/Kn,wn=si>_e/Kn;if(!(te||a.gf||a.Be||In||wn))return!0;St=Ct.x-St,he=Ee.x,Tt=Ct.right+Tt,_e=Ee.right+ne,At=Ct.y-At;var Yi=Ee.y;Ct=Ct.bottom+It,Ee=Ee.bottom+se;var Bi="1px";if(It="1px",a.scrollMode===Yh&&(In||wn)&&(In&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(In=1,St+1<he&&(In=Math.max((he-St)*Kn+a.Aa,In)),Tt>_e+1&&(In=Math.max((Tt-_e)*Kn+a.Aa,In)),Ht+ne+1<ci&&(In=Math.max((ci-Ht)*Kn+a.Aa,In)),Bi=In.toString()+"px"),wn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(In=1,At+1<Yi&&(In=Math.max((Yi-At)*Kn+a.ya,In)),Ct>Ee+1&&(In=Math.max((Ct-Ee)*Kn+a.ya,In)),$t+se+1<si&&(In=Math.max((si-$t)*Kn+a.ya,In)),It=In.toString()+"px")),In=Bi!=="1px",wn=It!=="1px",In&&wn||!In&&!wn||(wn&&(_e-=a.Db),In&&(Ee-=a.Db),ci<Ht+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,St+1<he&&(ne=Math.max((he-St)*Kn+a.Aa,ne)),Tt>_e+1&&(ne=Math.max((Tt-_e)*Kn+a.Aa,ne)),Ht+1<ci&&(ne=Math.max((ci-Ht)*Kn+a.Aa,ne)),Bi=ne.toString()+"px"),In=Bi!=="1px",ne=a.ya,In!==a.Be&&(ne=In?a.ya-a.Db:a.ya+a.Db),si<$t+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,At+1<Yi&&(se=Math.max((Yi-At)*Kn+ne,se)),Ct>Ee+1&&(se=Math.max((Ct-Ee)*Kn+ne,se)),$t+1<si&&(se=Math.max((si-$t)*Kn+ne,se)),It=se.toString()+"px"),wn=It!=="1px"),a.qr&&In===a.Be&&wn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(In!==a.Be&&(Bi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=In,st.style.width=Bi,wn!==a.gf&&(It==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(se=ft.alloc(),wn?(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)),ft.free(se))),te&&Vu(a),a.gf=wn,st.style.height=It,a.gu=!0,te&&(a.pn=!0),y=et.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Ht+1<ci?y=(a.position.x-St)*Kn:St+1<he?y=et.scrollWidth-et.clientWidth:Tt>_e+1&&(y=a.position.x*Kn)),a.tn)switch(a.bu){case"negative":y=-(et.scrollWidth-y-et.clientWidth);break;case"reverse":y=et.scrollWidth-y-et.clientWidth}return et.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&($t+1<si?et.scrollTop=(a.position.y-At)*Kn:At+1<Yi?et.scrollTop=et.scrollHeight-et.clientHeight:Ct>Ee+1&&(et.scrollTop=a.position.y*Kn)),he=a.Aa,_e=a.ya,et.style.width=he+(a.gf?a.Db:0)+"px",et.style.height=_e+(a.Be?a.Db:0)+"px",x!==he||b!==_e||a.animationManager.zb?(x=nn.allocAt(E,Ne,Ge,Ye),a.onViewportBoundsChanged(x,a.viewportBounds,Kn,te),nn.free(x),!1):!0}Qe=en.prototype,Qe.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&kt("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&&kt('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(ns,"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;gd(a,function(x){ad(y,x)}),(a instanceof jr||a instanceof Ji&&a.placeholder!==null)&&a.v(),a.data!==null&&gd(a,function(x){ly(y.partManager,x)}),Oa(a)!==!0&&Nc(a)!==!0||this.De.add(a),B1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(yd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(yd(a,a.actualBounds)),this.$b()},Qe.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&gd(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(yd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(yd(a,a.actualBounds)),this.$b()},Qe.remove=function(a){Op(this,a,!0)};function Op(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(qo,"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),rn(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 Mn,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)},en.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=wf(this)),this.toolManager!==null){var E=new hn;if(a!==null)if(rn(a))for(var te=0;te<a.length;te++)uh(this,E,a[te],x,b);else for(a=a.iterator;a.next();)uh(this,E,a.value,x,b);else{for(a=this.parts;a.next();)uh(this,E,a.value,x,b);for(a=this.nodes;a.next();)uh(this,E,a.value,x,b);for(a=this.links;a.next();)uh(this,E,a.value,x,b)}Ec(this,E,y,b,x)}};function uh(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=wf(a)),x instanceof Xn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Ji&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)uh(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)&&uh(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)uh(a,y,x.value,b,E)}else if(x instanceof Fn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)uh(a,y,x.value,b,E);else x instanceof jr||y.add(x,a.Pd(E,x,x.location))}function Ec(a,y,x,b,E){if(y!==null&&y.count!==0){var te=ft.alloc(),ne=ft.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||bf(a,y);for(var se=ai(),he=ai(),_e=y.iterator,Ee=ft.alloc();_e.next();){var Ne=_e.key,Ge=_e.value;if(Ne.Zc()){var Ye=Ip(a,Ne,y);Ye!==null?se.push(new ie(Ne,Ge,Ye)):(!E||Ne.canMove())&&(Ye=Ge.point,te.assign(Ye),a.computeMove(Ne,te.add(ne),b,Ee),Ne.location=Ee,Ge.shifted===void 0&&(Ge.shifted=new ft),Ge.shifted.assign(Ee.re(Ye)))}else _e.key instanceof Fn&&he.push(_e.sa)}for(ft.free(Ee),E=se.length,_e=0;_e<E;_e++)Ne=se[_e],te.assign(Ne.info.point),Ne.Su.shifted===void 0&&(Ne.Su.shifted=new ft),Ne.node.location=te.add(Ne.Su.shifted);for(E=ft.alloc(),_e=ft.alloc(),Ne=he.length,Ge=0;Ge<Ne;Ge++){var et=he[Ge];if(Ye=et.key,Ye instanceof Fn)if(Ye.suspendsRouting){Ye.Tg=null,Ee=Ye.fromNode;var st=Ye.toNode;if(a.draggedLink!==null&&b.dragsLink)if(st=et.value.point,Ye.dragComputation===null)y.add(Ye,a.Pd(b,Ye,ne)),nc(Ye,ne.x-st.x,ne.y-st.y);else{et=ft.allocAt(0,0),(Ee=Ye.i(0))&&Ee.w()&&et.assign(Ee);var Ct=Ee=ft.alloc().assign(et).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Ct=ft.alloc(),_f(a,Ye,Ee,Ct,b)),Ee.assign(Ye.dragComputation(Ye,Ee,Ct)).re(et),y.add(Ye,a.Pd(b,Ye,Ee)),nc(Ye,Ee.x-st.x,Ee.y-st.y),ft.free(et),ft.free(Ee),Ct!==Ee&&ft.free(Ct)}else Ee!==null&&(E.assign(Ee.location),Ct=y.I(Ee),Ct!==null&&E.re(Ct.point)),st!==null&&(_e.assign(st.location),Ct=y.I(st),Ct!==null&&_e.re(Ct.point)),Ee!==null&&st!==null?E.Xa(_e)?(Ee=et.value.point,st=te,st.assign(E),st.re(Ee),y.add(Ye,a.Pd(b,Ye,E)),nc(Ye,st.x,st.y)):(Ye.suspendsRouting=!1,Ye.bb()):(et=et.value.point,Ee=Ee!==null?E:st!==null?_e:ne,y.add(Ye,a.Pd(b,Ye,Ee)),nc(Ye,Ee.x-et.x,Ee.y-et.y))}else(Ye.fromNode===null||Ye.toNode===null)&&(Ee=et.value.point,y.add(Ye,a.Pd(b,Ye,ne)),nc(Ye,ne.x-Ee.x,ne.y-Ee.y))}ft.free(te),ft.free(ne),ft.free(E),ft.free(_e),Gn(se),Gn(he),x||(fa(a),Lc(a,y))}}en.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new ft),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=ft.alloc(),_f(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,_e=he.x;return isNaN(_e)&&(_e=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,_e)),Math.max(ne,Math.min(x.y,he))),E!==y&&ft.free(E),b};function wf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function _f(a,y,x,b,E){if(E===void 0&&(E=wf(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=ft.allocAt(0,0),te.yi(0,0,a,y,E),Wt.No(x.x,x.y,se+te.x,ne+te.y,a,y,b),ft.free(te)}}function bf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Fn&&(y.suspendsRouting=!0)}function Lc(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Fn&&(x.suspendsRouting=!1,Yv(x)&&x.bb())}a.Mr=!1}}function Ip(a,y,x){return y=y.containingGroup,y!==null&&(a=Ip(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Qe=en.prototype,Qe.Pd=function(a,y,x){if(x===void 0)return new Th(Yn);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Th(new ft(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Th(x.copy())};function Rp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&kt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&kt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&kt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&kt("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&&kt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Qe.Al=function(a){Rp(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(ns,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Qe.Ww=function(a,y){Rp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(qo,"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(ns,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},Qe.Cy=function(a,y){Rp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(qo,"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(ns,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},Qe.kA=function(a){if(a.diagram!==this&&kt("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(qo,"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 Ln),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 Ln),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!==ca&&(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 Io;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(Ro,a,this,y,x,b,E)},en.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===Ro){var E=a.object;if(Wo(E,a.propertyName,a.I(y)),E instanceof Gt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===ns){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof Nn)if(typeof se=="number"&&he instanceof Gt){y?ne.pc(se):ne.Gb(se,he);var _e=ne.part;_e!==null&&_e.Wb()}else typeof se=="number"&&he instanceof Ps&&(he.isRow?c1(ne,se,y?void 0:he):d1(ne,se,y?void 0:he));else if(ne instanceof Xs){var Ee=a.oldParam===!0;typeof se=="number"&&he instanceof Ci&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(Ee?se:-1,he,Ee)):ne.oi(se,he,Ee))}else ne instanceof en?typeof se=="number"&&he instanceof Xs&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):kt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===qo){var Ne=a.object,Ge=a.oldParam,Ye=a.oldValue;if(Ne instanceof Nn)typeof Ge=="number"&&Ye instanceof Gt?y?Ne.Gb(Ge,Ye):Ne.pc(Ge):typeof Ge=="number"&&Ye instanceof Ps&&(Ye.isRow?c1(Ne,Ge,y?Ye:void 0):d1(Ne,Ge,y?Ye:void 0));else if(Ne instanceof Xs){var et=a.newParam===!0;typeof Ge=="number"&&Ye instanceof Ci&&(y?0>Ne.Pa.indexOf(Ye)&&Ne.oi(Ge,Ye,et):(Ye.isSelected=!1,Ye.isHighlighted=!1,Ye.Wb(),Ne.pc(et?Ge:-1,Ye,et)))}else Ne instanceof en?typeof Ge=="number"&&Ye instanceof Xs&&(y?(Ye.Xe(this),this.Wa.Gb(Ge,Ye)):this.Wa.mb(Ge)):kt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==ca&&kt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},en.prototype.Ea=function(a){return this.undoManager.Ea(a)},en.prototype.eb=function(a){return this.undoManager.eb(a)},en.prototype.Kf=function(){return this.undoManager.Kf()},en.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}},en.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},en.prototype.rp=function(){this.partManager.rp()};function Fp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,Vu(a),a.N(),a.Ee=!0,b.zb&&(_l(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Vu(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,se=a.zoomPoint.x,he=a.zoomPoint.y,_e=a.contentAlignment;isNaN(se)&&(_e.$c()?_e.Hf(Pa)?se=0:_e.Hf(Xo)&&(se=te-1):se=_e.sb()?_e.x*(te-1):te/2),isNaN(he)&&(_e.$c()?_e.Hf(ta)?he=0:_e.Hf(Sa)&&(he=ne-1):he=_e.sb()?_e.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=ft.allocAt(a.pa.x+se/y-se/x,a.pa.y+he/y-he/x),a.position=te,ft.free(te),a.Ca=x,Vu(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Xl(a,!1),b.zb&&(_l(b)||b.ce.add(b.H,"scale",y,a.Ca))}}en.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!==Ca||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof _o&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Gh(E,this)),this.vb||this.invalidateViewport(a,y),Zu(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 Zu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=Cn.alloc(),E=1,te=1,ne=x.O.s,se=ne.length,he=0;he<se;he++){var _e=ne[he],Ee=Math.abs(_e.interval);2>Ee||(mv(_e.figure)?te=te*Ee/Wt.vx(te,Ee):E=E*Ee/Wt.vx(E,Ee))}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=nn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){nn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,nn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=ft.alloc(),Wt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Cn.free(b),x.part.location=y,ft.free(y)}}en.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)}},en.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))},en.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),rn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Ci||kt("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 Ci||kt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},en.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=en.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 Mn().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 Ci||kt("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=ft.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)),ft.free(te);return}kt("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):kt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),ft.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,_e=y.m22,Ee=y.dx,Ne=y.dy,Ge=x*ne+b*he+Ee;y=x*se+b*_e+Ne;var Ye=E*ne+b*he+Ee;return a=E*se+b*_e+Ne,b=x*ne+te*he+Ee,x=x*se+te*_e+Ne,ne=E*ne+te*he+Ee,E=E*se+te*_e+Ne,te=Math.min(Ge,Ye),Ge=Math.max(Ge,Ye),Ye=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Ge=Math.max(Ge,b),Ye=Math.min(Ye,x),y=Math.max(y,x),te=Math.min(te,ne),Ge=Math.max(Ge,ne),Ye=Math.min(Ye,E),y=Math.max(y,E),new nn(te,Ye,Ge-te,y-Ye)},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),ti(a.copy(),this.Ab)};function rm(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Bp(a){return a=kf.get(a),a!==null?new a:new to}en.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===ca&&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===ca){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),fa(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Yl(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&&(rm(this),this.As.clear(),oh(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var se=this;qt(function(){se.currentTool.standardMouseOver(),se.Rt=!1},10)}}}finally{this.aa=!0}}}};function ad(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)Mc(a,y[b])}function Mc(a,y){if(y instanceof Qa){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Mn&&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 Qa){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 Mn&&x.Bg.remove(a),Hf(b));break}}}}}en.prototype.Wd=function(){this.partManager.Wd()},en.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},en.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},en.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},en.prototype.Vb=function(a){return this.partManager.Vb(a)},en.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Qe=en.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:Ii(ei(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:Ii(ei(y)))};function Vu(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 zp(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Xl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Qe.Va=function(){if(this.Zi){var a=nn.alloc();zp(this,this.computeBounds(a)),nn.free(a)}},Qe.rz=function(){for(var a=new Mn,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){fa(this),a&&Pf(this,!0),this.ld?Up(this,!1):(this.Jk=!0,Nl(this))};function Pf(a,y){for(var x=a.ai.iterator;x.next();)om(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function om(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)om(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Up(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||Ss(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Hp(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),fa(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||Yl(te),a.aa=x}}}function Hp(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Hp(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),jd(a,y),E.isValidLayout=!0):a.xh=!0)}}Qe.yz=function(){for(var a=new Ln,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function nv(a){function y(E){var te=E.toLowerCase(),ne=new Ln;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new hn,b=new hn;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 Cf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;kt("Unknown DiagramEvent name: "+y)}Qe.Bj=function(a,y){return a=Cf(this,a),a!==null&&a.add(y),this},Qe.am=function(a,y){a=Cf(this,a),a!==null&&a.remove(y)},Qe.R=function(a,y,x){var b=Cf(this,a),E=new Pu;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 Ef(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 Lf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},en.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Lp(this,a):a.assign(this.documentBounds)};function Lf(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new vg(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=am(a,x)),x===null){y=nn.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&&Mf(a,ne,b,y)}nn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=nn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof Xn&&Mf(a,ne,b,y);nn.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function am(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?am(a,y.containingGroup):null}function Mf(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(Yf(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(rc,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=rc}else if(y instanceof Ji)for(y=y.memberParts;y.next();)E=y.value,E instanceof Xn&&Mf(a,E,x,b)}}function Kh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}en.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Gp(this)};function Gp(a){a.vk===-1&&(a.vk=qt(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=nn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),zp(a,y),nn.free(y),a.Fc=!0,a.bd(),Gp(a))}},a.vp))}en.prototype.ug=function(){this.vk!==-1&&(Zt.clearTimeout(this.vk),this.vk=-1)},en.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=nn.allocAt(0,0,b.width*E,b.height*E);var te=ft.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(Yn)||(y=new ft(y.x+te.x/E,y.y+te.y/E)),nn.free(b),ft.free(te),y},Qe=en.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 Ji&&(y.$p=null)})};function zd(a,y,x){function b(){var Ee=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||Ee-_e>he?y(x,E,se):Zt.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,_e=+new Date;return Zt.requestAnimationFrame(function(){b()}),null}Qe.Wz=function(a){return is?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Qe.Jx=function(a){return a===void 0&&(a={}),zd(this,this.Xz,a)},Qe.Xz=function(a,y,x){var b=lm(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 hd+"data":E=b.getImageData(0,0,x.width,x.height);break;case hd:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&kt('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 lm(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&kt("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 Cn(1/0,1/0):new Cn(2e3,2e3));var se=y.position||null,he=y.parts||null,_e=y.padding===void 0?1:y.padding,Ee=y.background||null,Ne=y.omitTemporary;Ne===void 0&&(Ne=!0);var Ge=y.document||document,Ye=y.elementFinished||null,et=y.showTemporary;et===void 0&&(et=!Ne),y=y.showGrid,y===void 0&&(y=et),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof _e=="number"?_e=new Qi(_e):_e instanceof Qi||kt("MakeImage padding must be a Margin or a number."),_e.left=Math.max(_e.left,0),_e.right=Math.max(_e.right,0),_e.top=Math.max(_e.top,0),_e.bottom=Math.max(_e.bottom,0),a.ib.Vc(!0),Ne=new ql(null,Ge,void 0,!0);var st=Ne.context;if(!(E||te||he||se))return Ne.width=a.Aa+Math.ceil(_e.left+_e.right),Ne.height=a.ya+Math.ceil(_e.top+_e.bottom),x==="SVG"?b===null?null:(b.resize(Ne.width,Ne.height,Ne.width,Ne.height),b.ownerDocument=Ge,b.hs=Ye,xf(a,b.context,_e,new Cn(Ne.width,Ne.height),a.Ca,a.pa,he,Ee,et,y),b.context):(a.Xm=!1,xf(a,st,_e,new Cn(Ne.width,Ne.height),a.Ca,a.pa,he,Ee,et,y),a.Xm=!0,Ne.context);var Ct=a.Pp,St=a.documentBounds.copy();if(St.Fv(a.yb),et)for(var Tt=a.Wa.s,At=Tt.length,It=0;It<At;It++){var Ht=Tt[It];if(Ht.visible&&Ht.isTemporary){Ht=Ht.Pa.s;for(var $t=Ht.length,Kn=0;Kn<$t;Kn++){var ci=Ht[Kn];ci.isInDocumentBounds&&ci.isVisible()&&(ci=ci.actualBounds,ci.w()&&St.ed(ci))}}}if(Tt=new ft(St.x,St.y),he!==null){for(At=new nn(0,0,0,0),It=!0,Ht=he.iterator,Ht.reset();Ht.next();)$t=Ht.value,$t instanceof Ci&&(Kn=$t.layer,Kn!==null&&!Kn.visible||Kn!==null&&!et&&Kn.isTemporary||!$t.isVisible()||($t=$t.actualBounds,$t.w()&&(It?(It=!1,At.assign($t)):At.ed($t))));St.width=At.width,St.height=At.height,Tt.x=At.x,Tt.y=At.y}return se!==null&&se.w()&&(Tt=se,te||(te=Ct)),At=se=0,_e!==null&&(se=_e.left+_e.right,At=_e.top+_e.bottom),It=Ht=0,E!==null&&(Ht=E.width,It=E.height,isFinite(Ht)&&(Ht=Math.max(0,Ht-se)),isFinite(It)&&(It=Math.max(0,It-At))),E!==null&&te!==null?(te==="NaN"&&(te=Ct),E.w()?(E=Ht,St=It):isNaN(It)?(E=Ht,St=St.height*te):(E=St.width*te,St=It)):E!==null?E.w()?(te=Math.min(Ht/St.width,It/St.height),E=Ht,St=It):isNaN(It)?(te=Ht/St.width,E=Ht,St=St.height*te):(te=It/St.height,E=St.width*te,St=It):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/St.width,(ne.height-At)/St.height),te>Ct?(te=Ct,E=St.width,St=St.height):(E=ne.width,St=ne.height)):(E=St.width*te,St=St.height*te):(te=Ct,E=St.width,St=St.height),_e!==null?(E+=se,St+=At):_e=new Qi(0),ne!==null&&(Ct=ne.width,ne=ne.height,isNaN(Ct)&&(Ct=2e3),isNaN(ne)&&(ne=2e3),isFinite(Ct)&&(E=Math.min(E,Ct)),isFinite(ne)&&(St=Math.min(St,ne))),Ne.width=Math.ceil(E),Ne.height=Math.ceil(St),x==="SVG"?b===null?null:(b.resize(Ne.width,Ne.height,Ne.width,Ne.height),b.ownerDocument=Ge,b.hs=Ye,xf(a,b.context,_e,new Cn(Math.ceil(E),Math.ceil(St)),te,Tt,he,Ee,et,y),b.context):(a.Xm=!1,xf(a,st,_e,new Cn(Math.ceil(E),Math.ceil(St)),te,Tt,he,Ee,et,y),a.Xm=!0,Ne.context)}nt.Object.defineProperties(en.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Fe||(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 Ku(this,Zt.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 Ku(this,Zt.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(Zt,"resize",this.Ov,!1),this.removeEventListener(Zt,"wheel",this.$j,!0),ah===this&&(ah=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Cp(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)&&An(a,"0 <= value <= 1",en,"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),Xl(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),Xl(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),Xl(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),Xl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&An(a,">= 0",en,"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&&An(a,">= 0",en,"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 An(a,">= 0",en,"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||rm(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&&kt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Pp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Ss(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=Bp(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(Zt,"pointermove",this.dk,!0),this.addEventListener(Zt,"pointerdown",this.ui,!0),this.addEventListener(Zt,"pointerup",this.fk,!0),this.addEventListener(Zt,"pointerout",this.ek,!0),this.addEventListener(Zt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Zt,"wheel",this.$j,!0),this.addEventListener(Zt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Zt,"pointermove",this.dk,!0),this.removeEventListener(Zt,"pointerdown",this.ui,!0),this.removeEventListener(Zt,"pointerup",this.fk,!0),this.removeEventListener(Zt,"pointerout",this.ek,!0),this.removeEventListener(Zt,"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(Zt,"wheel",this.$j,!0),this.removeEventListener(Zt,"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=ft.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),mf(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Vu(this):(this.vb=!0,a=this.scale,Mp(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)}ft.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=em(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=em(this)),a.type!==Nn.Grid&&kt("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),Zu(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),Vu(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||kt("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 Qi(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===Yh&&Xl(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,Xl(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,Fp(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&&Fp(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!==Ca&&Xl(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()||kt("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()||kt("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)):An(a,"> 0",en,"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)):An(a,"> 0",en,"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),Xl(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 Qi(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&&kt("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();)ag(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Xh&&a!==_s&&a!==Tf&&kt("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 Cn(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 Qi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),nt.Object.defineProperties(en,{licenseKey:{get:function(){return Xp.jc()},set:function(a){Xp.add(a.replace(/\s/g,""))}},version:{get:function(){return ud}}}),en.prototype.makeImageData=en.prototype.Jx,en.prototype.makeImage=en.prototype.Wz,en.prototype.cacheGroupExternalLinks=en.prototype.Fu,en.prototype.addRenderer=en.prototype.bs,en.prototype.makeSVG=en.prototype.av,en.prototype.makeSvg=en.prototype.Cs,en.prototype.stopAutoScroll=en.prototype.ug,en.prototype.doAutoScroll=en.prototype.gs,en.prototype.isUnoccupied=en.prototype.Yj,en.prototype.raiseDiagramEvent=en.prototype.R,en.prototype.removeDiagramListener=en.prototype.am,en.prototype.addDiagramListener=en.prototype.Bj,en.prototype.findTreeRoots=en.prototype.yz,en.prototype.layoutDiagram=en.prototype.Uz,en.prototype.findTopLevelGroups=en.prototype.qz,en.prototype.findTopLevelNodesAndLinks=en.prototype.rz,en.prototype.ensureBounds=en.prototype.Va,en.prototype.findLinksByExample=en.prototype.ls,en.prototype.findNodesByExample=en.prototype.ms,en.prototype.findLinkForData=en.prototype.Kc,en.prototype.findNodeForData=en.prototype.ii,en.prototype.findPartForData=en.prototype.Lc,en.prototype.findLinkForKey=en.prototype.findLinkForKey,en.prototype.findNodeForKey=en.prototype.Vb,en.prototype.findPartForKey=en.prototype.findPartForKey,en.prototype.rebuildParts=en.prototype.Wd,en.prototype.transformViewToDoc=en.prototype.Ps,en.prototype.transformRectDocToView=en.prototype.zA,en.prototype.transformDocToView=en.prototype.op,en.prototype.centerRect=en.prototype.es,en.prototype.scrollToRect=en.prototype.tv,en.prototype.scroll=en.prototype.scroll,en.prototype.highlightCollection=en.prototype.Jz,en.prototype.highlight=en.prototype.Iz,en.prototype.selectCollection=en.prototype.rA,en.prototype.select=en.prototype.select,en.prototype.updateAllRelationshipsFromData=en.prototype.rp,en.prototype.updateAllTargetBindings=en.prototype.updateAllTargetBindings,en.prototype.commit=en.prototype.commit,en.prototype.rollbackTransaction=en.prototype.Kf,en.prototype.commitTransaction=en.prototype.eb,en.prototype.startTransaction=en.prototype.Ea,en.prototype.raiseChanged=en.prototype.g,en.prototype.raiseChangedEvent=en.prototype.cb,en.prototype.removeChangedListener=en.prototype.ik,en.prototype.addChangedListener=en.prototype.Pe,en.prototype.removeModelChangedListener=en.prototype.mA,en.prototype.addModelChangedListener=en.prototype.Yw,en.prototype.findLayer=en.prototype.Qj,en.prototype.removeLayer=en.prototype.kA,en.prototype.addLayerAfter=en.prototype.Cy,en.prototype.addLayerBefore=en.prototype.Ww,en.prototype.addLayer=en.prototype.Al,en.prototype.moveParts=en.prototype.moveParts,en.prototype.copyParts=en.prototype.Kj,en.prototype.removeParts=en.prototype.Is,en.prototype.remove=en.prototype.remove,en.prototype.add=en.prototype.add,en.prototype.clearDelayedGeometries=en.prototype.bx,en.prototype.setProperties=en.prototype.nm,en.prototype.attach=en.prototype.Du,en.prototype.set=en.prototype.set,en.prototype.resetInputOptions=en.prototype.Sx,en.prototype.setInputOption=en.prototype.sA,en.prototype.getInputOption=en.prototype.Ql,en.prototype.resetRenderingHints=en.prototype.Tx,en.prototype.setRenderingHint=en.prototype.Xx,en.prototype.getRenderingHint=en.prototype.Gf,en.prototype.maybeUpdate=en.prototype.bd,en.prototype.requestUpdate=en.prototype.$b,en.prototype.delayInitialization=en.prototype.Xy,en.prototype.isUpdateRequested=en.prototype.Pz,en.prototype.invalidateDocumentBounds=en.prototype.Ya,en.prototype.findObjectsNear=en.prototype.og,en.prototype.findPartsNear=en.prototype.mz,en.prototype.findObjectsIn=en.prototype.Cf,en.prototype.findPartsIn=en.prototype.ux,en.prototype.findObjectsAt=en.prototype.ji,en.prototype.findPartsAt=en.prototype.lz,en.prototype.findObjectAt=en.prototype.ic,en.prototype.findPartAt=en.prototype.Ol,en.prototype.focusObject=en.prototype.zz,en.prototype.alignDocument=en.prototype.Jy,en.prototype.zoomToRect=en.prototype.BA,en.prototype.zoomToFit=en.prototype.zoomToFit,en.prototype.diagramScroll=en.prototype.kx,en.prototype.focus=en.prototype.focus;var kf=new hn,um=null,is=Zt.document!==void 0,ld=null,kc="",Ca=new pn(en,"None",0),bl=new pn(en,"Uniform",1),Tc=new pn(en,"UniformToFill",2),Ud=new pn(en,"CycleAll",10),Wp=new pn(en,"CycleNotDirected",11),Zp=new pn(en,"CycleNotDirectedFast",12),Vp=new pn(en,"CycleNotUndirected",13),Kp=new pn(en,"CycleDestinationTree",14),Yp=new pn(en,"CycleSourceTree",15),Yh=new pn(en,"DocumentScroll",1),Hd=new pn(en,"InfiniteScroll",2),Xh=new pn(en,"TreeParentCollapsed",21),_s=new pn(en,"AllParentsCollapsed",22),Tf=new pn(en,"AnyParentsCollapsed",23),Xp=new Ln,ud="2.3.10",hd="image",Gd=null,hm=!1;function xa(){if(is){var a=Zt.document.createElement("canvas"),y=a.getContext("2d"),x=yn("7ca11abfd022028846");y[x]=yn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",_n.Dx+"4ae6247590da4bb21c324ba3a84e385776",ji.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Wt.za],E=1;5>E;E++)y[yn("7ca11abfd7330390")](yn(b[E-1]),10,15*E);for(y[x]=yn("39f046ebb36e4b"),x=1;5>x;x++)y[yn("7ca11abfd7330390")](yn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(ji.prototype.Cd=ji.prototype.Eu),Gd=a}}en.className="Diagram",en.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Zt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof en?y.H:null},en.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},en.useDOM=function(a){is=a?Zt.document!==void 0:!1},en.isUsingDOM=function(){return is},en.None=Ca,en.Uniform=bl,en.UniformToFill=Tc,en.CycleAll=Ud,en.CycleNotDirected=Wp,en.CycleNotDirectedFast=Zp,en.CycleNotUndirected=Vp,en.CycleDestinationTree=Kp,en.CycleSourceTree=Yp,en.DocumentScroll=Yh,en.InfiniteScroll=Hd,en.TreeParentCollapsed=Xh,en.AllParentsCollapsed=_s,en.AnyParentsCollapsed=Tf;function cm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function cd(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=Zt[yn("76a715b2f73f148a")][yn("72ba13b5")]||"";if(a.Rc=!0,is){var b=en[yn("76a115b6ed251eaf4692")];if(b)for(var E=Xp.iterator;E.next()&&(b=E.value,b=yn(b).split(yn("39e9")),!(6>b.length));){var te=yn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=yn(_n[yn("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=Zt[yn("74a900bae4370f8b51")][yn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[yn("73a612b6fb191d")](yn("3aad1ab6e022098b4dc4")),te=yn(b[2]),-1<ne&&(se=se[yn("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[yn("76ad18b4f73e")],se=x[yn("73a612b6fb191d")](yn("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[yn("73a612b6fb191d")](te),0>ne&&te!==yn("7da71ca0ad381e90")&&(ne=y[yn("73a612b6fb191d")](yn("76a715b2ef3e149757"))),0>ne&&(ne=y[yn("73a612b6fb191d")](yn("76a715b2ef3e149757"))),0>ne&&(ne=y[yn("73a612b6fb191d")](yn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[yn("73a612b6fb191d")](yn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[yn("73a612b6fb191d")](yn("35"))||y[yn("73a612b6fb191d")](yn("35"))===-1),!a.Rc||x[yn("73a612b6fb191d")](yn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[yn("73a612b6fb191d")](te)),!a.Rc)||(ne=Zt[yn("76a715b2f73f148a")][yn("69ad17a1e03e")],se=ne[yn("73a612b6fb191d")](yn("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[yn("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=Zt.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[yn("79a417a0f0181a8946")]=b,Zt.document[yn("78a712aa")]){Zt.document[yn("78a712aa")][yn("7bb806b6ed32388c4a875b")](ne),he=Zt.getComputedStyle(ne).getPropertyValue(yn("78a704b7e62456904c9b12701b6532a8"));var _e=Zt.getComputedStyle(ne).getPropertyValue(yn("75b817b0ea2202"));if(Zt.document[yn("78a712aa")][yn("68ad1bbcf533388c4a875b")](ne),he){if(ne=Zt[yn("77a902b0eb1b1e804a8a")],_e==="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(yn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var Ee in ne)if(b===ne[Ee].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(Ee=x[yn("76ad18b4f73e")],E=x[yn("73a612b6fb191d")](yn("35e7"))+2;E<Ee;E++)y+=x[E];x=y[yn("73a612b6fb191d")](yn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[yn("73a612b6fb191d")](yn("35")))}}}return 0<a.Rc&&a!==a.wy}cm.className="DiagramHelper";function Th(a){this.j=a===void 0?new ft:a,this.o=new ft}nt.Object.defineProperties(Th.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 Wd="DraggingInfo";Th.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ce(){this.reset()}ce.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Cn(NaN,NaN).freeze(),this.gridSnapCellSpot=Gr,this.gridSnapOrigin=new ft(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ce.className="DraggingOptions";function Te(a,y){if(typeof a=="string"||Zt.Element&&a instanceof Element)var x=en.call(this,a)||this;else x=en.call(this)||this,y=a;return Me(x),y&&x.nm(y),x}Xe(Te,en);function Me(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Zo,a.layout=new oa}Te.prototype.reset=function(){en.prototype.reset.call(this),Me(this)},Te.className="Palette";function Fe(a,y){if(typeof a=="string"||Zt.Element&&a instanceof Element)var x=en.call(this,a)||this;else x=en.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 Ci;var E=new nr;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 Qi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Et,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new ft(se.x-ne.width/2,se.y-ne.height/2)}},x.Pf=function(){b.Ya(),vt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&vt(b)},x.autoScale=bl,x.vb=!1,y&&Object.assign(x,y),x}Xe(Fe,en),Fe.prototype.computePixelRatio=function(){return 1},Fe.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(od(this),this.ql===null){var x=new ql(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),it(this)}finally{this.ta=a,this.ib=y}}}en.prototype.redraw.call(this)},Fe.prototype.gc=function(){if(this.Ka===null&&kt("No div specified"),this.ta===null&&kt("No canvas specified"),!(this.ta instanceof Ku)&&(Rv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){od(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?it(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 it(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=nn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Zu(y,E),nn.free(E),fa(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 _e=se.diagram.grid.part;if(!x&&se.isTemporary)b&&_e.layer===se&&(se=kh(se,E),_e.gc(E,he),E.globalAlpha=se);else{for(var Ee=kh(se,E),Ne=he.scale,Ge=nn.alloc(),Ye=se.Pa.s,et=Ye.length,st=0;st<et;st++){var Ct=Ye[st];(b||Ct!==_e)&&se.Oj(E,Ct,he,null,Ne,Ge,!1)}nn.free(Ge),E.globalAlpha=Ee}}}}}function vt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=Cn.alloc();E.h(x.width,x.height),b.desiredSize=E,Cn.free(E),a=2/a.scale,b instanceof nr&&(b.strokeWidth=a),y.location=new ft(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Fe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return us;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Fe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Fe.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),vt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=b,this.R("ViewportBoundsChanged",this.fc,a))},nt.Object.defineProperties(Fe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Fe&&kt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),vt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),vt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),Fe.className="Overview";function Et(){Ho.call(this),this.j=null}Xe(Et,Ho),Et.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 ft(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new ft(a.x-this.j.x,a.y-this.j.y)),!0)},Et.prototype.doActivate=function(){this.j=null,Ho.prototype.doActivate.call(this)},Et.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Et.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 ft(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new ft(a.x-this.j.x,a.y-this.j.y)}}},Et.className="OverviewDraggingTool";function Pt(){Ai(this),this.H=ah,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=us,this.hb=!0,this.cg=null,this.ob=200}Pt.prototype.toString=function(){return"CommandHandler"},Pt.prototype.Xe=function(a){this.H=a},Pt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=ur?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()},Pt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Pt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof _o&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Pt.prototype.canStopCommand=function(){return!0},Pt.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=""}},Pt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Pt.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 Mn,x=a.selection.iterator;x.next();)Oc(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Pt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Pt.prototype.copySelection=function(){var a=this.diagram,y=new Mn;for(a=a.selection.iterator;a.next();)Oc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Pt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Pt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Pt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Pt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)ld=null,kc="";else{x=y.model;var b=!1,E=!1,te=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),te=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new Ln,x.addAll(te),ld=x,kc=y.model.dataFormat}}y.R("ClipboardChanged",x)},Pt.prototype.pasteFromClipboard=function(){var a=new Mn,y=ld;if(y===null)return a;var x=this.diagram;if(kc!==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},Pt.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);Ec(y,te,new ft(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=""}},Pt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||ld===null||ld.count===0||kc!==a.model.dataFormat)},Pt.prototype.undo=function(){this.diagram.undoManager.undo()},Pt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Pt.prototype.redo=function(){this.diagram.undoManager.redo()},Pt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Pt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ca&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Pt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ca?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Pt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ca&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Pt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ca?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Pt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Pt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Pt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Ss(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=us):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Yl(y)},Pt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Pt.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;Ss(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Bt(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var te=function(){y.Ea();for(var he=E.pop();0<E.length&&he instanceof Xn&&he.isTreeExpanded&&(!(he instanceof Ji)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof Ci&&y.tv(he.actualBounds),he instanceof Xn&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof Ji&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof Ci&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){qt(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var se=y.position.copy();y.es(a.actualBounds),se.Xa(y.position)&&x.Cc()}}};function Bt(a,y,x){if(y.isVisible())return x;if(y instanceof jr)Bt(a,y.adornedPart,x);else if(y instanceof Fn){var b=y.fromNode;b!==null&&Bt(a,b,x),y=y.toNode,y!==null&&Bt(a,y,x)}else y instanceof Xn&&(b=y.labeledLink,b!==null&&Bt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Bt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Bt(a,y,x));return x}Pt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ci)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Pt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Ss(y.animationManager,"Collapse Tree");var x=new Ln;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Xn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Pt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Xn&&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 Xn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Pt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Ss(y.animationManager,"Expand Tree");var x=new Ln;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Xn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Pt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Xn)||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 Xn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Pt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new Ln,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new Ln,he=E.iterator;he.next();){var _e=he.value;te=!1;for(var Ee=E.iterator;Ee.next();)if(_e.Td(Ee.value)){te=!0;break}te||se.add(_e)}if(0<se.count){var Ne=se.first().containingGroup;if(Ne!==null)for(;Ne!==null;){E=!1;for(var Ge=se.iterator;Ge.next();)if(!Ge.value.Td(Ne)){E=!0;break}if(E)Ne=Ne.containingGroup;else break}if(x instanceof Ji)Ql(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ye=y.copyNodeData(x);Qt(Ye)&&(y.xf(Ye),b=a.ii(Ye))}if(b!==null){Ne!==null&&this.isValidMember(Ne,b)&&(b.containingGroup=Ne);for(var et=se.iterator;et.next();){var st=et.value;this.isValidMember(b,st)&&(st.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Pt.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 gn(a){var y=ai();for(a=a.iterator;a.next();){var x=a.value;x instanceof Fn||y.push(x)}a=new Mn,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 Gn(y),a}Pt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Fn)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},Pt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var b=new Ln;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof Ji&&te.canUngroup()&&b.add(te)}var ne=new Ln;if(0<b.count){y.clearSelection(!0);for(var se=b.iterator;se.next();){var he=se.value;he.expandSubGraph();var _e=he.containingGroup,Ee=_e!==null&&_e.data!==null?x.wa(_e.data):void 0;ne.addAll(he.memberParts);for(var Ne=ne.iterator;Ne.next();){var Ge=Ne.value;if(Ge.isSelected=!0,!(Ge instanceof Fn)){var Ye=Ge.data;Ye!==null?x.mp(Ye,Ee):Ge.containingGroup=_e}}y.remove(he)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Pt.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 Ji))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ji&&y.canUngroup())return!0;return!1},Pt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=gn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Pt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Ss(y.animationManager,"Collapse SubGraph");var x=new Ln;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Ji&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Pt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Ji&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ji&&y.isSubGraphExpanded)return!0;return!1},Pt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Ss(y.animationManager,"Expand SubGraph");var x=new Ln;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Ji&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Pt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Ji&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ji&&!y.isSubGraphExpanded)return!0;return!1},Pt.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 Eo&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Pt.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 Eo))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 Eo&&x.editable}),a!==null))return!0;return!1},Pt.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 Gt?E=a.ga(_r):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new ft(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,Uo(x,!1,a)}},Pt.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)},Pt.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 hn,a===null)return b;for(var te=a.iterator;te.next();)uh(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 Fn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},nt.Object.defineProperties(Pt.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||kt("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}}}),Pt.className="CommandHandler",Qg=function(){return new Pt};function Gt(){Ai(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new ft(NaN,NaN).freeze(),this.jd=Lr,this.Ab=new ji,this.wh=new ji,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Os,this.uc=new nn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new nn(NaN,NaN,NaN,NaN).freeze(),this.dc=new nn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Ts,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 Tn,bn,fi,wi,Oi,er,br,hr,Ir,ao;Gt.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=Pn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Gt.prototype.Vw=function(a){var y=this.Dh;if(rn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Gt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Gt.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},Gt.prototype.copy=function(){return this.clone()},Qe=Gt.prototype,Qe.qb=function(a){a.classType===Fn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:kt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Gt&&(this.stretch=a)},Qe.toString=function(){return Bn(this.constructor)+"#"+Xi(this)},Qe.th=function(){this.A!==null&&(this.A.nc=!0)};function lr(a){a.A===null?a.A=new Vd:a.A.nc&&(a.A=a.A.copy())}Qe.Xc=function(){if(this.ba===null){var a=new Jp;a.Xi=or,a.yj=or,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===Ro&&ua(this)&&Bo(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 hn),ne=te.undoManager.transactionLevel===0,a.startCondition===bc?ne=!0:a.startCondition===td&&(ne=!1),ne?(te=new da,Yg(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()):(Ss(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Nn&&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 Nn&&gd(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function Bo(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=LS(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(Ro,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 ji);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function Fs(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?ii(a.x,a.y,0,0,0,b.height)<=y||ii(a.x,a.y,0,b.height,b.width,b.height)<=y||ii(a.x,a.y,b.width,b.height,b.width,0)<=y||ii(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=ft.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return ft.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=Qr(x.x-ne*he,x.y-ne*he,x.width+te*he,x.height+te*he,y.x,y.y),ft.free(y),a}return E=!1,(this instanceof jr||this instanceof nr?Qr(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)),ft.free(y),E},Qe.gh=function(a){var y=this.naturalBounds;return Qr(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=nn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=ft.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)))),ft.free(E),nn.free(y),b},Qe.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=ft.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)))),ft.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=ft.allocAt(0,0),E=ft.allocAt(0,x.height),te=ft.allocAt(x.width,x.height),ne=ft.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=nn.allocAt(0,0,x.width,x.height);var he=ft.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)))),ft.free(he),nn.free(x),!se&&(Wt.us(a,b,E)||Wt.us(a,E,te)||Wt.us(a,te,ne)||Wt.us(a,ne,b))&&(se=!0)}return ft.free(b),ft.free(E),ft.free(te),ft.free(ne),se},Qe.ga=function(a,y){if(y===void 0&&(y=new ft),a instanceof zn){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 nn);var y=this.naturalBounds,x=this.oe,b=ft.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),Br(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Br(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Br(a,b.x,b.y,0,0),ft.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 ft),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,_e=-te.m21*ne,Ee=te.m11*ne,Ne=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,Wt.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*se+y*_e+Ne,a=a*he+y*Ee+Ge,y=x*se+b*_e+Ne,x=x*he+b*Ee+Ge,E.h(0,0),b=this.naturalBounds,x=Wt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},Gt.prototype.measure=function(a,y,x,b){if(Cl(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 Nn;switch(Ja(this,!0)){case bn:ne=E=0,se&&(y=a=1/0);break;case Tn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case wi:isFinite(a)&&a>x&&(E=a),ne=0,se&&(y=1/0);break;case Oi: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()||kt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),bs(this,!1)}},Gt.prototype.Wl=function(){},Gt.prototype.Dd=function(){return!1},Gt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=nn.alloc();te.assign(this.Ib),this.Ib.ka(),Oa(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&&Qh(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 Eo&&(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()||kt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),hh(this,!1),nn.free(te)},Qe=Gt.prototype,Qe.eh=function(){};function Ea(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=Ja(a,!0),x===b&&te===E&&(y=bn),y){case bn:(x>b||te>E)&&(bs(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Tn:bs(a,!0),a.measure(b,E,0,0);break;case wi:bs(a,!0),a.measure(b,te,0,0);break;case Oi:bs(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||jv(x,!0),this.N(),Mr(a,y)||(x.oh(),this.Pn(x)))},Qe.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof Xn&&W1(a,this))},Qe.gc=function(a,y){if(!Dl(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 Nn&&Qh(this),ne=this.Ib;if(te){var se=this.Ib,he=this.dc,_e=this.areaBackground,Ee=this.Ma;_e===null&&Ee===null||a.yc(),_e!==null&&(os(this,a,_e,!0,!0,he,se),_e instanceof eo&&_e.type===Rl?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(_e)):a.fillRect(se.x,se.y,se.width,se.height)),Ee!==null&&(os(this,a,Ee,!0,!1,he,se),Ee instanceof eo&&Ee.type===Rl?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(Ee)):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&&ra(this),_e=this.part,he=!1;var Ne=0;_e&&y.Gf("drawShadows")&&(he=_e.isShadowed)&&(Ee=_e.shadowOffset,Ne=Math.max(Ee.y,Ee.x)*y.scale*y.Mb),Ee=this.Dd();var Ge;if(!(Ge=y.$i||!Ee)){var Ye=this.naturalBounds;Ge=this.wh;var et=Ge.m11,st=Ge.m21,Ct=Ge.dx,St=Ge.m12,Tt=Ge.m22,At=Ge.dy,It,Ht=It=0;Ge=It*et+Ht*st+Ct;var $t=It*St+Ht*Tt+At;It=Ye.width+Ne,Ht=0;var Kn=It*et+Ht*st+Ct;It=It*St+Ht*Tt+At,Ht=Math.min(Ge,Kn);var ci=Math.min($t,It),si=Math.max(Ge+0,Kn)-Ht,In=Math.max($t+0,It)-ci;Ge=Ht,$t=ci,It=Ye.width+Ne,Ht=Ye.height+Ne,Kn=It*et+Ht*st+Ct,It=It*St+Ht*Tt+At,Ht=Math.min(Ge,Kn),ci=Math.min($t,It),si=Math.max(Ge+si,Kn)-Ht,In=Math.max($t+In,It)-ci,Ge=Ht,$t=ci,It=0,Ht=Ye.height+Ne,Kn=It*et+Ht*st+Ct,It=It*St+Ht*Tt+At,Ht=Math.min(Ge,Kn),ci=Math.min($t,It),si=Math.max(Ge+si,Kn)-Ht,In=Math.max($t+In,It)-ci,Ge=Ht,$t=ci,Ne=y.viewportBounds,Ye=Ne.x,et=Ne.y,Ge=!(Ge>Ne.width+Ye||Ye>si+Ge||$t>Ne.height+et||et>In+$t)}if(Ge){if(Ge=(this.l&256)!==0,a.clipInsteadOfFill&&(Ge=!1),this instanceof Eo&&(a.font=this.font),Ge){if($t=se.se()?se.naturalBounds:se.actualBounds,si=Math.max(ne.x,$t.x),In=Math.max(ne.y,$t.y),Ne=Math.min(ne.right,$t.right)-si,Ye=Math.min(ne.bottom,$t.bottom)-In,et=this.tb,et!==null&&(si=et.x,In=et.y,Ne=et.width,Ye=et.height),si>ne.width+ne.x||ne.x>$t.width+$t.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(si,In,Ne,Ye),a.clip()}if(Ee){if(!_e.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&($t=_e.shadowOffset,a.Ev($t.x*y.scale*this.scale*y.Mb,$t.y*y.scale*this.scale*y.Mb,_e.shadowBlur),Ah(a),a.shadowColor=_e.shadowColor)}he&&this.shadowVisible===!0?Ah(a):he&&this.shadowVisible===!1&&ch(a),_e=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Pl(this,a,_e,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),he&&Js(this,se)&&this.shadowVisible===null&&ch(a),this.Ma!==null&&(a.yc(),ol(this,a,_e,ne)),he&&(this.Ma!==null||this.areaBackground!==null||Js(this,se))?(cu(this,!0),this.shadowVisible===null&&ch(a)):cu(this,!1),this.hh(a,y),he&&this.l&512&&Ah(a),Ee&&he&&ch(a),Ge&&(a.restore(),a.Vc(this instanceof Nn)),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 Js(a,y){return y===null?!1:(Qh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Nn.Auto||y.type===Nn.Spot)&&y.Pb()!==a)}Qe.Dv=function(){};function Pl(a,y,x,b){os(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof eo&&a.areaBackground.type===Rl?(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 ol(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,se=x.width+E,he=x.height+E;os(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof eo&&a.Ma.type===Rl?(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 wa(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===Nn.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 Dl(a,y,x){if(!(y instanceof fl))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&&wa(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),Ah(y),y.shadowColor=a.shadowColor}a instanceof Eo&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Nn;var se=a instanceof Nn?Qh(a):!1;a.l&4096&&ra(a);var he=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&se?(qp(y,1,0,0,1,0,0),a.svg=y.ad):te?(qp(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):qp(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var _e=ne.copy().Vj();y.rb.ha=[_e.m11,_e.m12,_e.m21,_e.m22,_e.dx,_e.dy],Pl(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]),ol(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],ol(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&&Ah(y),se&&a.shadowVisible===!0?Ah(y):se&&a.shadowVisible===!1&&ch(y),E=a.panel,se&&Js(a,E)&&a.shadowVisible===null&&ch(y),y.Il&&(_e=x.computePixelRatio(),_e="drop-shadow("+y.shadowOffsetX/_e+"px "+y.shadowOffsetY/_e+"px "+y.shadowBlur/_e/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",_e),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",_e)),se&&(a.Ma!==null||a.areaBackground!==null||Js(a,E))?(cu(a,!0),a.shadowVisible===null&&ch(y)):cu(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,_e=a.svg,!te&&_e!==null&&se!==_e&&_e.parentNode===a.panel.svg?(a.svg.replaceWith(se),a.svg=se,se!==null&&a.$o(y,b,he,se),Xa(y,_e),!0):(a.svg=se,ne!==null&&se===null&&(fm(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&&Ah(y),a.Dd()&&ch(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&&wa(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"+lo++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Nn&&(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"),Xa(a,b)};function Xa(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function _a(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=ei(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 Nn?Qh(this):!1;if(!(this instanceof Nn&&E))if(this instanceof Qa){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&Jy(a,te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7]),x?y.lastElementChild.setAttributeNS(null,"transform",qy(a)):y.setAttributeNS(null,"transform",qy(a))}else if(!x||this instanceof Nn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof nr){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],Pl(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&&pm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(pm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Nn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),ol(this,a,this.naturalBounds,this.actualBounds),y.Ma?(pm(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&&pm(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 os(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===qh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var _e=a.kq();if(se=te.width,he=te.height,E?(se=ne.width,he=ne.height):b||(se+=_e,he+=_e),(te=y instanceof pd)&&x.xe&&(x.type===Ff||x.yk===se&&x.ft===he))var Ee=x.xe;else{var Ne=0,Ge=0,Ye=0,et=0,st=0,Ct=0;if(Ct=st=0,E?(st=ne.x,Ct=ne.y):b||(st-=_e/2,Ct-=_e/2),Ne=x.start.x*se+x.start.offsetX,Ge=x.start.y*he+x.start.offsetY,Ye=x.end.x*se+x.end.offsetX,et=x.end.y*he+x.end.offsetY,Ne+=st,Ye+=st,Ge+=Ct,et+=Ct,x.type===Dh)Ee=y.createLinearGradient(Ne,Ge,Ye,et);else if(x.type===Rl)Ct=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(st=0,Ct=Math.max(se,he)/2):st=x.startRadius,Ee=y.createRadialGradient(Ne,Ge,st,Ye,et,Ct);else if(x.type===Ff)try{Ee=y.createPattern(x.pattern,"repeat")}catch(Tt){Ee=null}if(x.type!==Ff&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)Ee.addColorStop(E.key,E.value);if(te&&(x.xe=Ee,Ee!==null&&(x.yk=se,x.ft=he),Ee===null&&x.type===Ff&&x.yk!==-1)){x.yk=-1;var St=a.diagram;St!==null&&x.yk===-1&&qt(function(){St.redraw()},600)}}b?y.fillStyle=Ee:y.strokeStyle=Ee}}}Qe.rg=function(a){if(a instanceof Nn)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 Nn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ra(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Jl(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)}Jl(a,!1),Ol(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ol(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,Ol(a,!1)))}Qe.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=ft.alloc();te.yi(y,x,b,E,_r),a.rotate(this.Kb,te.x,te.y),ft.free(te)}},Qe.v=function(a){if(!Cl(this)){a===void 0&&(a=!1),bs(this,!0),hh(this,!0);var y=this.panel;y===null||a||y.v()}},Qe.Uj=function(){Cl(this)||(bs(this,!0),hh(this,!0))};function Da(a){if(!Oa(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Xn&&a.Bd(),y.$b())),hh(a,!0)}}Qe.Uk=function(){!(this.l&2048)&&(Jl(this,!0),Ol(this,!0))},Qe.Wu=function(){Ol(this,!0)},Qe.N=function(){var a=this.part;a!==null&&a.N()};function Ja(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Nn.Table?Tu(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Nn.Auto&&b.Pb()===a?Qs(a,Tn,y):x===er?b!==null?b.type===Nn.Spot&&b.Pb()===a?Qs(a,Tn,y):(x=b.defaultStretch,x===er?Qs(a,bn,y):Qs(a,x,y)):Qs(a,bn,y):Qs(a,x,y)}function Tu(a,y,x,b){var E=a.stretch;if(E!==er)return Qs(a,E,b);var te=E=null;switch(y.stretch){case Oi:te=!0;break;case Tn:te=!0}switch(x.stretch){case wi:E=!0;break;case Tn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===wi||y===Tn),te===null&&(te=y===Oi||y===Tn),E===!0&&te===!0?Qs(a,Tn,b):E===!0?Qs(a,wi,b):te===!0?Qs(a,Oi,b):Qs(a,bn,b)}function Qs(a,y,x){if(x)return y;if(y===bn||(x=a.desiredSize,x.w()))return bn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===wi)return bn;if(y===Tn)return Oi}else{if(y===Oi)return bn;if(y===Tn)return wi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Oi)return bn;if(y===Tn)return wi}else{if(y===wi)return bn;if(y===Tn)return Oi}return y}function cu(a,y){a.l=y?a.l|512:a.l&-513}function ua(a){return(a.l&1024)!==0}function Zd(a,y){a.l=y?a.l|1024:a.l&-1025}function Jl(a,y){a.l=y?a.l|2048:a.l&-2049}function Ol(a,y){a.l=y?a.l|4096:a.l&-4097}function Cl(a){return(a.l&8192)!==0}function bs(a,y){a.l=y?a.l|8192:a.l&-8193}function Oa(a){return(a.l&16384)!==0}function hh(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,Da(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 dd(a){var y=a.part;if(y instanceof Xn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function Yy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Nn?a instanceof Xn?a.Bd():a.qm(a,function(x){dd(x)}):dd(a))}Qe.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new ms(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&kt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Ln),this.localBindings.add(E),this},Qe.set=function(a){return Object.assign(this,a),this},Qe.Du=function(a){return iv(this,a),this},Qe.apply=function(a){return a(this),this},Qe.nm=function(a){return rd(this,a),this},Qe.pz=function(){return this.ih()},Qe.ih=function(){for(var a=this instanceof Nn?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 hn),this.animationTriggers.add(a.propertyName,a),this};function Il(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=Af.I(a);typeof te=="function"?(x=Pn(arguments),b=te(x),Qt(b)||kt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Zt.go[a]}if(b===null&&(E!=null&&E.constructor||kt("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 en&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Cp(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?kt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):iv(b,te);return b}function iv(a,y){if(typeof y=="string")if(a instanceof Eo)a.text=y;else if(a instanceof nr)a.figure=y;else if(a instanceof Qa)a.source=y;else if(a instanceof Nn)y=du.I(y),y!==null&&(a.type=y);else if(a instanceof eo){var x=$n(eo,y);x!==null?a.type=x:kt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Rn?(y=$n(Rn,y),y!==null&&(a.type=y)):a instanceof Rr&&(y=$n(Rr,y),y!==null&&(a.type=y));else if(y instanceof Gt)a instanceof Nn||kt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ps){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 Ps?Tm(b,y):kt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof pn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Ms)a.type=y;else if(y instanceof ms)a instanceof Gt||a instanceof Ps?a.bind(y):kt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof uu)a instanceof Gt?a.Jv(y):kt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof ps)a instanceof Rn&&a.type===Rn.o?a.figures.add(y):kt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Rr)a instanceof ps?a.segments.add(y):kt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Vo)a instanceof en||a instanceof Ji?a.layout=y:kt("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++)iv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof eo){x=new Mi;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);rd(a,x)}else if(a instanceof Ps){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&kt("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)&&kt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Mi;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);rd(a,E)}else rd(a,y);else kt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Jh(a,y){Af.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}nt.Object.defineProperties(Gt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Vd),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 Vd),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 Vd),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(lr(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&&(lr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Fa},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Ac),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Fa&&(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 Ac),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 Ac),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Yn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Ac),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:er},set:function(a){var y=this.stretch;y!==a&&(lr(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&&(lr(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)&&An(a,"0 <= value <= 1",Gt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(yd(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(yd(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Yy(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Yd(a,"GraphObject.areaBackground"),a instanceof eo&&a.freeze(),lr(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&&Yd(a,"GraphObject.background"),a instanceof eo&&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 Ci)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 ft(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&&kt("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Yy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,te=b.height;(E===y||isNaN(E)&&isNaN(y))&&(te===x||isNaN(te)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof nr&&this.qc(),this.g("desiredSize",b,a),ua(this)&&(a=this.part,a!==null&&(Bo(this,a,"width"),Bo(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 Cn(a,this.jd.height).freeze(),this.v(),this instanceof nr&&this.qc(),this.g("desiredSize",y,a),ua(this)&&(a=this.part,a!==null&&Bo(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 Cn(this.jd.width,a).freeze(),this.v(),this instanceof nr&&this.qc(),this.g("desiredSize",y,a),ua(this)&&(a=this.part,a!==null&&Bo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:pi},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(),lr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Ar},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(),lr(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 Qi(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&&ra(this),this.Ab}},oe:{get:function(){return this.l&4096&&ra(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(lr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:bn},set:function(a){this.reshapingBehavior!==a&&(lr(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()&&kt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Da(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&&An(a,">= 0",Gt,"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&&An(a,">= 1",Gt,"columnSpan"),lr(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&&An(a,">= 0",Gt,"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&&An(a,">= 1",Gt,"rowSpan"),lr(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&&(lr(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 Xn||kt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Gv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,K1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:or},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),dd(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&An(a,">= 0",Gt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),dd(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),dd(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&&An(a,">= 0",Gt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:or},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),dd(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&An(a,">= 0",Gt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),dd(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),dd(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&&An(a,">= 0",Gt,"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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(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&&(lr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Gt.prototype.trigger=Gt.prototype.Jv,Gt.prototype.findBindingPanel=Gt.prototype.ih,Gt.prototype.findTemplateBinder=Gt.prototype.pz,Gt.prototype.setProperties=Gt.prototype.nm,Gt.prototype.apply=Gt.prototype.apply,Gt.prototype.attach=Gt.prototype.Du,Gt.prototype.set=Gt.prototype.set,Gt.prototype.isEnabledObject=Gt.prototype.If,Gt.prototype.isVisibleObject=Gt.prototype.Ed,Gt.prototype.isContainedBy=Gt.prototype.rg,Gt.prototype.getNearestIntersectionPoint=Gt.prototype.rs,Gt.prototype.getLocalPoint=Gt.prototype.qs,Gt.prototype.getDocumentScale=Gt.prototype.Df,Gt.prototype.getDocumentAngle=Gt.prototype.li,Gt.prototype.getDocumentBounds=Gt.prototype.mi,Gt.prototype.getDocumentPoint=Gt.prototype.ga,Gt.prototype.intersectsRect=Gt.prototype.Yc,Gt.prototype.containedInRect=Gt.prototype.fh,Gt.prototype.containsRect=Gt.prototype.Re,Gt.prototype.containsPoint=Gt.prototype.ca,Gt.prototype.raiseChanged=Gt.prototype.g,Gt.prototype.raiseChangedEvent=Gt.prototype.cb,Gt.prototype.addCopyProperty=Gt.prototype.Vw;var Af=null;Gt.className="GraphObject",Af=new hn,Jh("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=Il(Nn,Nn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Nn){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"},Il(nr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new zn(0,0,2.76142374915397,2.761423749153969),spot2:new zn(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 Nn&&(x=b.fb("ButtonBorder"),x instanceof nr)){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 Nn&&(x=b.fb("ButtonBorder"),x instanceof nr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Nn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof nr){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 Nn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof nr){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 Nn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof nr){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 Nn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof nr))){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}),Jh("TreeExpanderButton",function(){var a=Il("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Il(nr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:pr},new ms("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new ms("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof jr&&(x=x.adornedPart),x instanceof Xn){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}),Jh("SubGraphExpanderButton",function(){var a=Il("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Il(nr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:pr},new ms("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof jr&&(x=x.adornedPart),x instanceof Ji){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}),Jh("ToolTip",function(){return Il(jr,Nn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new ft(0,3),shadowBlur:5},Il(nr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new zn(0,0,4,6),spot2:new zn(1,1,-4,-4)}))}),Jh("ContextMenu",function(){return Il(jr,Nn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new ft(0,3),shadowBlur:5},new ms("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Jh("ContextMenuButton",function(){var a=Il("Button");a.stretch=wi;var y=a.fb("ButtonBorder");return y instanceof nr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new zn(0,0,2,3),y.spot2=new zn(1,1,-2,-2)),a}),Jh("PanelExpanderButton",function(a){var y=dm(a,"COLLAPSIBLE"),x=Il("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},Il(nr,{name:"ButtonIcon",strokeWidth:2},new ms("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof nr&&(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}),Jh("CheckBoxButton",function(a){var y=dm(a);return a=Il("Button",{desiredSize:new Cn(14,14)},Il(nr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Tn,geometryStretch:fi,visible:!1},y!==""?new ms("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Nn){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}),Jh("CheckBox",function(a){a=dm(a),a=Il("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Qi(0,1,0,0)});var y=Il(Nn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Qi(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}),Gt.None=bn=new pn(Gt,"None",0),Gt.Default=er=new pn(Gt,"Default",0),Gt.Vertical=Oi=new pn(Gt,"Vertical",4),Gt.Horizontal=wi=new pn(Gt,"Horizontal",5),Gt.Fill=Tn=new pn(Gt,"Fill",3),Gt.Uniform=fi=new pn(Gt,"Uniform",1),Gt.UniformToFill=br=new pn(Gt,"UniformToFill",2),Gt.FlipVertical=hr=new pn(Gt,"FlipVertical",1),Gt.FlipHorizontal=Ir=new pn(Gt,"FlipHorizontal",2),Gt.FlipBoth=ao=new pn(Gt,"FlipBoth",3),Gt.make=Il,Gt.getBuilders=function(){var a=new hn,y;for(y in Af)if(y!==y.toLowerCase()){var x=Af.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Gt.defineBuilder=Jh,Gt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=Af.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Gt))return y&&b.set(y),b;kt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Gt.takeBuilderArgument=dm;function Vd(){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=pi,this.o=Ar,this.hg=er,this.ob=this.Bi=1,this.Pf=bn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Vd.prototype.copy=function(){var a=new Vd;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 Ac(){this.u=-1/0,this.o=0,this.F=Yn,this.rr=Fa,this.j=this.V="None"}Ac.prototype.copy=function(){var a=new Ac;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},Ac.className="LinkElementSettings";function Jp(){this.yj=this.Xi=Ts,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Jp.prototype.copy=function(){var a=new Jp;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},Jp.className="LinkSettings";function fd(){this.ha=[1,0,0,1,0,0]}fd.prototype.copy=function(){var a=new fd;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},fd.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},fd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},fd.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)}},fd.className="STransform";function Kd(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Kd.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Kd.className="SGradient";function Ku(a,y,x){this.ownerDocument=a=y===void 0?Zt.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 fl(this,x)}Ku.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},Ku.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Qt(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},Ku.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ku.prototype.focus=function(){this.Oa.focus()},Ku.prototype.mx=function(){this.ownerDocument=null},nt.Object.defineProperties(Ku.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}}}),Ku.className="SVGSurface";function fl(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 fd,this.j=fm(this),this.Nj=fm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=lo++,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 Xy(a,y,x,b,E,te,ne){a.Nj===void 0?qp(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}Qe=fl.prototype,Qe.arc=function(a,y,x,b,E,te,ne,se){var he=2*Math.PI,_e=he-1e-6,Ee=x*Math.cos(b),Ne=x*Math.sin(b),Ge=a+Ee,Ye=y+Ne,et=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Ge)||1e-6<Math.abs(se-Ye))&&this.path.push(["L",Ge,+Ye]),0>b&&(b=b%he+he),b>_e?(this.path.push(["A",x,x,0,1,et,a-Ee,y-Ne]),this.path.push(["A",x,x,0,1,et,Ge,Ye])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),et,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 Kd("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"+lo++,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(hd,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Qe.createRadialGradient=function(a,y,x,b,E,te){var ne=new Kd("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=te,ne};function Jy(a,y,x,b,E,te,ne,se,he){b=se/b,E=he/E,te===0&&ne===0||a.rb.translate(te,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}Qe.drawImage=function(a,y,x,b,E,te,ne,se,he){var _e="";a instanceof HTMLCanvasElement&&(_e=a.toDataURL()),a instanceof HTMLImageElement&&(_e=a.getAttribute("src"));var Ee=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,se=b=Ee,he=E=a),b=b||0,E=E||0,se=se||0,he=he||0,Jy(this,y,x,b,E,te||0,ne||0,se,he),te={x:0,y:0,width:Ee||b,height:a||E,href:_e},Wt.$(b,se)&&Wt.$(E,he)?_e.toLowerCase().indexOf(".svg")===-1&&_e.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==Ee||E!==a)&&(b+=y,E+=x,te["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),Nf(this,hd,te,this.rb),this.addElement(hd,te)},Qe.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(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]},Nf(this,"fill",a,this.rb),this.addElement("rect",a)},Qe.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},Nf(this,"fill",a,this.rb),rv(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},Nf(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||qp(this,a,y,x,b,E,te)};function qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}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(){$y(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 Nf(a,y,x,b){y==="fill"?rv(a,x):y==="stroke"&&$y(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function rv(a,y){a.fillStyle instanceof Kd?y.fill=ov(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Kd?y.setAttributeNS(null,"fill",ov(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function $y(a,y){if(a.strokeStyle instanceof Kd)y.stroke=ov(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function ov(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+lo++,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(_e,Ee){return _e.offset>Ee.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=Pn(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,Nf(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 qp(a,y,x,b,E,te,ne){var se=new fd;se.ha=[y,x,b,E,te,ne],y={},Nf(a,"g",y,se),se=a.addElement("g",y),a.nh.push(se)}function fm(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 ch(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Ah(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(){},fl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},fl.prototype.getImageData=function(){return null},fl.prototype.measureText=function(){return null};function pm(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()))}fl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},fl.className="SVGContext",en.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Ku(this,Zt.document));var y=new Ku(this,Zt.document,!0);a===void 0&&(a=new Mi);var x=this;return zd(this,function(b,E){return b=lm(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},en.prototype.makeSvg=en.prototype.Cs,en.prototype.av=function(a){return this.Cs(a)},en.prototype.makeSVG=en.prototype.av;function ql(a,y,x,b){this.ownerDocument=y=y===void 0?Zt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new pd(y,x,b),y.H=a}ql.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},ql.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},ql.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},ql.prototype.focus=function(){this.Oa.focus()},ql.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},nt.Object.defineProperties(ql.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}}}),ql.className="CanvasSurface";function pd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&kt("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 ji,this.isTemporary=!!x}Qe=pd.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()},pd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Qe=pd.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 eo&&a.type===Rl){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(){},nt.Object.defineProperties(pd.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([]);pd.className="CanvasSurfaceContext";function Qp(){this.F=this.o=this.u=this.j=0}Qp.className="ColorNumbers";function eo(a,y){Rf||(cv(),Rf=!0),Ai(this),this._isFrozen=!1,a===void 0?(this.na=qh,this.xk="black"):typeof a=="string"?(this.na=qh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Dh?(this.Qd=Zo,this.Lk=fs):this.Lk=a===Rl?this.Qd=_r:this.Qd=or,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}eo.prototype.copy=function(){var a=new eo;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=eo.prototype,Qe.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Qe.ka=function(){return Object.isFrozen(this)&&kt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Qe.qb=function(a){a.classType===eo&&(this.type=a)},Qe.toString=function(){var a="Brush(";if(this.type===qh)a+=this.color;else if(a=this.type===Dh?a+"Linear ":this.type===Rl?a+"Radial ":this.type===Ff?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&&ln(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&An(a,"0 <= loc <= 1",eo,"addColorStop:loc"),this.we===null&&(this.we=new hn),this.we.add(a,y),this.na===qh&&(this.type=Dh),this.xe=null,this},Qe.Vz=function(a,y){if(this._isFrozen&&ln(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Bf:y,this.type===qh)Nh(this.color),this.color=Of(a,y);else if((this.type===Dh||this.type===Rl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Nh(x.value),this.addColorStop(x.key,Of(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Bf:x,Nh(a),Of(y,x)}Qe.Wy=function(a,y){if(this._isFrozen&&ln(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Bf:y,this.type===qh)Nh(this.color),this.color=Of(-a,y);else if((this.type===Dh||this.type===Rl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Nh(x.value),this.addColorStop(x.key,Of(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Bf:x,Nh(a),Of(-y,x)}function sv(a,y,x){Nh(a),a=ko.j;var b=ko.u,E=ko.o,te=ko.F;return Nh(y),x===void 0&&(x=.5),"rgba("+Math.round((ko.j-a)*x+a)+", "+Math.round((ko.u-b)*x+b)+", "+Math.round((ko.o-E)*x+E)+", "+Math.round((ko.F-te)*x+te)+")"}Qe.Gx=function(){if(this.type===qh)return Df(this.color);if((this.type===Dh||this.type===Rl)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Rl)return Df(a.first().value);if(a.get(.5)!==null)return Df(a.get(.5));if(a.count===2)return a=a.Fa(),Df(sv(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,Df(sv(a.get(x),a.get(b),1-te/E))}return!1};function Df(a){return a?a instanceof eo?a.Gx():(Nh(a),128>(299*ko.j+587*ko.u+114*ko.o)/1e3):!1}function Of(a,y){switch(y){case Bf:y=100*lv(ko.j);var x=100*lv(ko.u),b=100*lv(ko.o);return Ia.j=.4124564*y+.3575761*x+.1804375*b,Ia.u=.2126729*y+.7151522*x+.072175*b,Ia.o=.0193339*y+.119192*x+.9503041*b,Ia.F=ko.F,y=hv(Ia.j/If[0]),x=hv(Ia.u/If[1]),b=hv(Ia.o/If[2]),dh.j=116*x-16,dh.u=500*(y-x),dh.o=200*(x-b),dh.F=Ia.F,dh.j=Math.min(100,Math.max(0,dh.j+100*a)),a=(dh.j+16)/116,y=a-dh.o/200,Ia.j=If[0]*n1(dh.u/500+a),Ia.u=If[1]*(dh.j>gm*dv?Math.pow(a,3):dh.j/gm),Ia.o=If[2]*n1(y),Ia.F=dh.F,a=-.969266*Ia.j+1.8760108*Ia.u+.041556*Ia.o,y=.0556434*Ia.j+-.2040259*Ia.u+1.0572252*Ia.o,ko.j=255*uv((3.2404542*Ia.j+-1.5371385*Ia.u+-.4985314*Ia.o)/100),ko.u=255*uv(a/100),ko.o=255*uv(y/100),ko.F=Ia.F,ko.j=Math.round(ko.j),255<ko.j?ko.j=255:0>ko.j&&(ko.j=0),ko.u=Math.round(ko.u),255<ko.u?ko.u=255:0>ko.u&&(ko.u=0),ko.o=Math.round(ko.o),255<ko.o?ko.o=255:0>ko.o&&(ko.o=0),"rgba("+ko.j+", "+ko.u+", "+ko.o+", "+ko.F+")";case i1:return av(),El.o=Math.min(100,Math.max(0,El.o+100*a)),"hsla("+El.j+", "+El.u+"%, "+El.o+"%, "+El.F+")";default:kt("Unknown color space: "+y)}}function Nh(a){Rf||(cv(),Rf=!0);var y=fv;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,ko.j=a[0],ko.u=a[1],ko.o=a[2],ko.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,ko.j=0,ko.u=0,ko.o=0,ko.F=1)}}function av(){var a=ko.j/255,y=ko.u/255,x=ko.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))}El.j=Math.round(ne),El.u=Math.round(100*a),El.o=Math.round(100*E),El.F=ko.F}function lv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function uv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function hv(a){return a>dv?Math.pow(a,1/3):(gm*a+16)/116}function n1(a){var y=a*a*a;return y>dv?y:(116*a-16)/gm}function Yd(a,y){typeof a!="string"&&(a instanceof eo||kt("Value for "+y+" must be a color string or a Brush, not "+a))}function cv(){fv=is?new ql(null,void 0,{willReadFrequently:!0}).context:null}nt.Object.defineProperties(eo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&ln(this,a),this.na=a,this.start.Mc()&&(a===Dh?this.start=Zo:a===Rl&&(this.start=_r)),this.end.Mc()&&(a===Dh?this.end=fs:a===Rl&&(this.end=_r)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&ln(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&ln(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&ln(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&ln(this,a),0>a&&An(a,">= zero",eo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&ln(this,a),0>a&&An(a,">= zero",eo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&ln(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&ln(this,a),this.cr=a,this.xe=null}}}),eo.prototype.isDark=eo.prototype.Gx,eo.prototype.darkenBy=eo.prototype.Wy,eo.prototype.lightenBy=eo.prototype.Vz,eo.prototype.addColorStop=eo.prototype.addColorStop;var dv=216/24389,gm=24389/27,If=[95.047,100,108.883],fv=null,ko=new Qp,El=new Qp,Ia=new Qp,dh=new Qp,Rf=!1;eo.className="Brush";var qh;eo.Solid=qh=new pn(eo,"Solid",0);var Dh;eo.Linear=Dh=new pn(eo,"Linear",1);var Rl;eo.Radial=Rl=new pn(eo,"Radial",2);var Ff;eo.Pattern=Ff=new pn(eo,"Pattern",4);var Bf;eo.Lab=Bf=new pn(eo,"Lab",5);var i1;eo.HSL=i1=new pn(eo,"HSL",6),eo.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},eo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Rf||(cv(),Rf=!0);var y=fv;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)},eo.lighten=function(a){return e1(a)},eo.lightenBy=e1,eo.darken=function(a){return t1(a)},eo.darkenBy=t1,eo.mix=sv,eo.isDark=Df;function Ms(){this.xa="Base"}Ms.prototype.measure=function(){},Ms.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Ms.prototype.arrange=function(){},Ms.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},Ms.prototype.iA=function(a){a.Uj()},Ms.prototype.gc=function(){},nt.Object.defineProperties(Ms.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Nn}}}),Ms.prototype.remeasureObject=Ms.prototype.iA,Ms.prototype.arrangeElement=Ms.prototype.Ly,Ms.prototype.measureElement=Ms.prototype.Yz,Ms.className="PanelLayout";function mm(){this.xa="Base"}Xe(mm,Ms),mm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;a=Oh(a);for(var he=0;he<se;he++){var _e=b[he];if(_e.visible||_e===a){var Ee=_e.margin,Ne=Ee.right+Ee.left;Ee=Ee.top+Ee.bottom,_e.measure(y,x,te,ne);var Ge=_e.measuredBounds;Ne=Math.max(Ge.width+Ne,0),Ee=Math.max(Ge.height+Ee,0),Ge=_e.position.x;var Ye=_e.position.y;isFinite(Ge)||(Ge=0),isFinite(Ye)||(Ye=0),_e instanceof nr&&_e.isGeometryPositioned&&(_e=_e.strokeWidth/2,Ge-=_e,Ye-=_e),Br(E,Ge,Ye,Ne,Ee)}}},mm.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,_e=te.position.y;if(he=isNaN(he)?-a:he-a,_e=isNaN(_e)?-x:_e-x,te instanceof nr&&te.isGeometryPositioned){var Ee=te.strokeWidth/2;he-=Ee,_e-=Ee}te.visible&&te.arrange(he+se.left,_e+se.top,ne.width,ne.height)}};function vm(){this.xa="Base"}Xe(vm,Ms),vm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=ai(),te=Oh(a);for(var he=0;he<se;he++){var _e=b[he];if(_e.visible||_e===te){var Ee=Ja(_e,!1);if(Ee!==bn&&Ee!==wi)y.push(_e);else{_e.measure(1/0,x,0,ne),Ee=_e.margin,_e=_e.measuredBounds;var Ne=Math.max(_e.height+Ee.top+Ee.bottom,0);E.width+=Math.max(_e.width+Ee.right+Ee.left,0),E.height=Math.max(E.height,Ne)}}}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)&&(Ee=he.margin,se=Ee.right+Ee.left,Ee=Ee.top+Ee.bottom,he.measure(1/0,x,0,ne),he=he.measuredBounds,Ee=Math.max(he.height+Ee,0),E.width+=Math.max(he.width+se,0),E.height=Math.max(E.height,Ee));Gn(y)},vm.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 _e=te,Ee=y[he];if(Ee.visible){var Ne=Ee.measuredBounds,Ge=Ee.margin,Ye=Ge.top+Ge.bottom,et=te+E.bottom,st=Ne.height,Ct=Ja(Ee,!1);(isNaN(Ee.desiredSize.height)&&Ct===Tn||Ct===Oi)&&(st=Math.max(x.height-Ye-et,0)),Ye=st+Ye+et,et=Ee.alignment,et.Xb()&&(et=a.defaultAlignment),et.sb()||(et=_r),ne&&(se-=Ne.width+Ge.left+Ge.right),Ee.arrange(se+et.offsetX+Ge.left,_e+et.offsetY+Ge.top+(x.height*et.y-Ye*et.y),Ne.width,st),ne||(se+=Ne.width+Ge.left+Ge.right)}}};function ym(){this.xa="Base"}Xe(ym,Ms),ym.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=ai();for(var se=Oh(a),he=0;he<ne;he++){var _e=b[he];if(_e.visible||_e===se){var Ee=Ja(_e,!1);if(Ee!==bn&&Ee!==Oi)x.push(_e);else{var Ne=_e.margin;Ee=Ne.right+Ne.left,Ne=Ne.top+Ne.bottom,_e.measure(y,1/0,te,0),_e=_e.measuredBounds,Fr(E,Math.max(E.width,Math.max(_e.width+Ee,0)),E.height+Math.max(_e.height+Ne,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)&&(_e=he.margin,ne=_e.right+_e.left,_e=_e.top+_e.bottom,he.measure(y,1/0,te,0),he=he.measuredBounds,_e=Math.max(he.height+_e,0),E.width=Math.max(E.width,Math.max(he.width+ne,0)),E.height+=_e);Gn(x)}},ym.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 _e=te,Ee=y[he];if(Ee.visible){var Ne=Ee.measuredBounds,Ge=Ee.margin,Ye=Ge.left+Ge.right,et=te+E.right,st=Ne.width,Ct=Ja(Ee,!1);(isNaN(Ee.desiredSize.width)&&Ct===Tn||Ct===wi)&&(st=Math.max(x.width-Ye-et,0)),Ye=st+Ye+et,et=Ee.alignment,et.Xb()&&(et=a.defaultAlignment),et.sb()||(et=_r),ne&&(se-=Ne.height+Ge.bottom+Ge.top),Ee.arrange(_e+et.offsetX+Ge.left+(x.width*et.x-Ye*et.x),se+et.offsetY+Ge.top,st,Ne.height),ne||(se+=Ne.height+Ge.bottom+Ge.top)}}};function Sm(){this.xa="Base"}Xe(Sm,Ms),Sm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),_e=he.margin,Ee=_e.right+_e.left,Ne=_e.top+_e.bottom;he.measure(y,x,te,ne);var Ge=he.measuredBounds;te=Ge.width,ne=Ge.height;var Ye=Math.max(te+Ee,0),et=Math.max(ne+Ne,0),st=a.isClipping,Ct=nn.allocAt(-_e.left,-_e.top,Ye,et),St=nn.allocAt(0,0,te,ne);pv(he,St,!0),te=St.width,ne=St.height;for(var Tt=!0,At=Oh(a),It=0;It<se;It++){var Ht=b[It];Ge=y;var $t=x;if(Ht!==he&&(Ht.visible||Ht===At)){_e=Ht.margin;var Kn=_e.left,ci=_e.top;switch(Ye=_e.right+_e.left,et=_e.top+_e.bottom,_e=Ja(Ht,!1),_e){case Tn:Ge=te,$t=ne,ci=Kn=et=Ye=0;break;case wi:Ge=te,Kn=Ye=0;break;case Oi:$t=ne,ci=et=0}Ht.measure(Ge,$t,0,0),Ge=Ht.measuredBounds,Ye=Math.max(Ge.width+Ye,0),et=Math.max(Ge.height+et,0),_e=Ht.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=_r);var si=Ht.alignmentFocus;if(si.Xb()&&(si=_r),$t=null,Ht instanceof Nn&&Ht.$e!==""&&($t=Ht.fb(Ht.$e),$t===Ht&&($t=null)),Kn=St.x-Kn,ci=St.y-ci,$t!==null){for(Ht.arrange(0,0,Ge.width,Ge.height),Ge=$t.actualBounds,Ge=ft.allocAt(Ge.x+(si.x*Ge.width-si.offsetX),Ge.y+(si.y*Ge.height-si.offsetY)),$t=$t.panel;$t!==Ht;)$t.transform.Ga(Ge),$t=$t.panel;Kn+=_e.x*te+_e.offsetX-Ge.x,ci+=_e.y*ne+_e.offsetY-Ge.y,ft.free(Ge)}else Kn+=_e.x*te+_e.offsetX-(si.x*Ge.width+si.offsetX),ci+=_e.y*ne+_e.offsetY-(si.y*Ge.height+si.offsetY);Tt?(Tt=!1,E.h(Kn,ci,Ye,et)):Br(E,Kn,ci,Ye,et)}}switch(Tt?E.assign(Ct):st?E.Uu(St.x,St.y,St.width,St.height):Br(E,Ct.x,Ct.y,Ct.width,Ct.height),nn.free(Ct),nn.free(St),_e=he.stretch,_e===er&&(_e=Ja(he,!1)),_e){case bn:return;case Tn:if(!isFinite(y)&&!isFinite(x))return;break;case wi:if(!isFinite(y))return;break;case Oi:if(!isFinite(x))return}for(Ge=he.measuredBounds,te=Ge.width,ne=Ge.height,Ye=Math.max(te+Ee,0),et=Math.max(ne+Ne,0),_e=he.margin,St=nn.allocAt(-_e.left,-_e.top,Ye,et),pv(he,St,!0),te=St.width,ne=St.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==At||(_e=x.margin,Ye=_e.right+_e.left,et=_e.top+_e.bottom,Ge=x.measuredBounds,Ye=Math.max(Ge.width+Ye,0),et=Math.max(Ge.height+et,0),Ee=x.alignment,Ee.Xb()&&(Ee=a.defaultAlignment),Ee.sb()||(Ee=_r),x=x.alignmentFocus,x.Xb()&&(x=_r),Tt?(Tt=!1,E.h(Ee.x*te+Ee.offsetX-(x.x*Ge.width+x.offsetX)-_e.left,Ee.y*ne+Ee.offsetY-(x.y*Ge.height+x.offsetY)-_e.top,Ye,et)):Br(E,Ee.x*te+Ee.offsetX-(x.x*Ge.width+x.offsetX)-_e.left,Ee.y*ne+Ee.offsetY-(x.y*Ge.height+x.offsetY)-_e.top,Ye,et));Tt?E.assign(Ct):st?E.Uu(St.x,St.y,St.width,St.height):Br(E,Ct.x,Ct.y,Ct.width,Ct.height),nn.free(St)},Sm.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 _e=te-x.x,Ee=he-x.y;for(E.arrange(_e,Ee,ne,se),ne=nn.allocAt(0,0,ne,se),pv(E,ne,!1),se=0;se<b;se++){var Ne=y[se];if(Ne!==E){_e=Ne.measuredBounds;var Ge=_e.width,Ye=_e.height;Ee=Ne.alignment,Ee.Xb()&&(Ee=a.defaultAlignment),Ee.sb()||(Ee=_r);var et=Ne.alignmentFocus;if(et.Xb()&&(et=_r),_e=null,Ne instanceof Nn&&Ne.$e!==""&&(_e=Ne.fb(Ne.$e),_e===Ne&&(_e=null)),_e!==null){var st=_e.actualBounds;for(et=ft.allocAt(st.x+(et.x*st.width-et.offsetX),st.y+(et.y*st.height-et.offsetY)),_e=_e.panel;_e!==Ne;)_e.transform.Ga(et),_e=_e.panel;_e=Ee.x*ne.width+Ee.offsetX-et.x,Ee=Ee.y*ne.height+Ee.offsetY-et.y,ft.free(et)}else _e=Ee.x*ne.width+Ee.offsetX-(et.x*Ge+et.offsetX),Ee=Ee.y*ne.height+Ee.offsetY-(et.y*Ye+et.offsetY);_e+=ne.x-x.x,Ee+=ne.y-x.y,Ne.visible&&Ne.arrange(te+_e,he+Ee,Ge,Ye)}}nn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Nn&&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 xm(){this.xa="Base"}Xe(xm,Ms),xm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),_e=he.margin,Ee=y,Ne=x,Ge=_e.right+_e.left,Ye=_e.top+_e.bottom;he.measure(y,x,te,ne),_e=he.measuredBounds;var et=0,st=null;he instanceof nr&&(st=he,et=st.strokeWidth*st.scale);var Ct=Math.max(_e.width+Ge,0);_e=Math.max(_e.height+Ye,0);var St=yv(he),Tt=St.x*Ct+St.offsetX;St=St.y*_e+St.offsetY;var At=Sv(he),It=At.x*Ct+At.offsetX;for(At=At.y*_e+At.offsetY,isFinite(y)&&(Ee=Math.max(Math.abs(Tt-It)-et,0)),isFinite(x)&&(Ne=Math.max(Math.abs(St-At)-et,0)),et=Cn.alloc(),et.h(0,0),a=Oh(a),At=0;At<se;At++)St=b[At],St===he||!St.visible&&St!==a||(_e=St.margin,Ct=_e.right+_e.left,Tt=_e.top+_e.bottom,St.measure(Ee,Ne,0,0),_e=St.measuredBounds,Ct=Math.max(_e.width+Ct,0),_e=Math.max(_e.height+Tt,0),et.h(Math.max(Ct,et.width),Math.max(_e,et.height)));if(se===1)E.width=Ct,E.height=_e,Cn.free(et);else{switch(St=yv(he),At=Sv(he),se=b=0,At.x!==St.x&&At.y!==St.y&&(b=et.width/Math.abs(At.x-St.x),se=et.height/Math.abs(At.y-St.y)),Cn.free(et),et=0,st!==null&&(et=st.strokeWidth*st.scale,Cv(st)===fi&&(b=se=Math.max(b,se))),b+=Math.abs(St.offsetX)+Math.abs(At.offsetX)+et,se+=Math.abs(St.offsetY)+Math.abs(At.offsetY)+et,st=he.stretch,st===er&&(st=Ja(he,!1)),st){case bn:ne=te=0;break;case Tn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case wi:isFinite(y)&&(b=y),ne=0;break;case Oi:te=0,isFinite(x)&&(se=x)}he.Uj(),he.measure(b,se,te,ne),E.width=he.measuredBounds.width+Ge,E.height=he.measuredBounds.height+Ye}},xm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=nn.alloc();te.h(0,0,1,1);var ne=b.margin,se=ne.left;ne=ne.top;var he=a.padding,_e=he.left;he=he.top,b.arrange(_e+se,he+ne,E.width,E.height);var Ee=yv(b),Ne=Sv(b),Ge=Ee.y*E.height+Ee.offsetY,Ye=Ne.x*E.width+Ne.offsetX;for(Ne=Ne.y*E.height+Ne.offsetY,te.x=Ee.x*E.width+Ee.offsetX,te.y=Ge,Br(te,Ye,Ne,0,0),te.x+=se+_e,te.y+=ne+he,E=0;E<x;E++)se=y[E],se!==b&&(_e=se.measuredBounds,ne=se.margin,he=Math.max(_e.width+ne.right+ne.left,0),Ee=Math.max(_e.height+ne.top+ne.bottom,0),Ge=se.alignment,Ge.Xb()&&(Ge=a.defaultAlignment),Ge.sb()||(Ge=_r),he=te.width*Ge.x+Ge.offsetX-he*Ge.x+ne.left+te.x,ne=te.height*Ge.y+Ge.offsetY-Ee*Ge.y+ne.top+te.y,se.visible&&(Qr(te.x,te.y,te.width,te.height,he,ne,_e.width,_e.height)?se.arrange(he,ne,_e.width,_e.height):se.arrange(he,ne,_e.width,_e.height,new nn(te.x,te.y,te.width,te.height))));nn.free(te)};function wm(){this.xa="Base",this.name="Table"}Xe(wm,Ms),wm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=ai(),se=ai(),he=0;he<te;he++){var _e=b[he],Ee=_e instanceof Nn?_e:null;if(Ee!==null&&Qh(Ee)&&_e.visible){se.push(Ee);for(var Ne=Ee.O.s,Ge=Ne.length,Ye=0;Ye<Ge;Ye++){var et=Ne[Ye];Ee.type===Nn.TableRow?et.row=_e.row:Ee.type===Nn.TableColumn&&(et.column=_e.column),ne.push(et)}}else ne.push(_e)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var st=[],Ct=0;Ct<te;Ct++){var St=ne[Ct];St.visible&&(bs(St,!0),hh(St,!0),st[St.row]||(st[St.row]=[]),st[St.row][St.column]||(st[St.row][St.column]=[]),st[St.row][St.column].push(St))}Gn(ne);var Tt=ai(),At=ai(),It=ai(),Ht={count:0},$t={count:0},Kn=y,ci=x,si=a.rowDefs,In=a.colDefs,wn=null;te=si.length;for(var Yi=0;Yi<te;Yi++)wn=si[Yi],wn!==void 0&&(wn.actual=0);te=In.length;for(var Bi=0;Bi<te;Bi++)wn=In[Bi],wn!==void 0&&(wn.actual=0);for(var Wr=st.length,wo=0,Bs=0;Bs<Wr;Bs++)st[Bs]&&(wo=Math.max(wo,st[Bs].length));var Zs=Math.min(a.topIndex,Wr-1),La=Math.min(a.leftIndex,wo-1),js=0;Wr=st.length;for(var lc=Oh(a),vs=0;vs<Wr;vs++)if(st[vs]){wo=st[vs].length;var Iu=a.Fb(vs);Iu.actual=0;for(var Ma=Iu.oc=0;Ma<wo;Ma++)if(st[vs][Ma]){var uc=a.Eb(Ma);Tt[Ma]===void 0&&(uc.actual=0,uc.oc=0,Tt[Ma]=!0);for(var kl=st[vs][Ma],tu=kl.length,ml=0;ml<tu;ml++){var al=kl[ml];if(al.visible||al===lc){var Zc=1<al.rowSpan||1<al.columnSpan;Zc&&(vs<Zs||Ma<La||At.push(al));var Ru=al.margin,ap=Ru.right+Ru.left,vl=Ru.top+Ru.bottom,ka=Tu(al,Iu,uc,!1),jg=al.desiredSize,af=!isNaN(jg.height),Ju=!isNaN(jg.width)&⁡if(Zc||ka===bn||Ju||vs<Zs||Ma<La||(Ht[Ma]!==void 0||ka!==Tn&&ka!==wi||(Ht[Ma]=-1,Ht.count++),$t[vs]!==void 0||ka!==Tn&&ka!==Oi||($t[vs]=-1,$t.count++),It.push(al)),al.measure(1/0,1/0,0,0),!(vs<Zs||Ma<La)){var ll=al.measuredBounds,bd=Math.max(ll.width+ap,0),yl=Math.max(ll.height+vl,0);if(al.rowSpan===1&&(ka===bn||ka===wi)){wn=a.Fb(vs);var Vc=wn.Wc();js=Math.max(yl-wn.actual,0),js+Vc>ci&&(js=Math.max(ci-Vc,0));var W0=wn.oa===0;wn.oc=wn.oc+js,wn.actual=wn.oa+js,ci=Math.max(ci-(js+(W0?Vc:0)),0)}if(al.columnSpan===1&&(ka===bn||ka===Oi)){wn=a.Eb(Ma);var zg=wn.Wc();js=Math.max(bd-wn.actual,0),js+zg>Kn&&(js=Math.max(Kn-zg,0));var Uy=wn.oa===0;wn.oc=wn.oc+js,wn.actual=wn.oa+js,Kn=Math.max(Kn-(js+(Uy?zg:0)),0)}Zc&&al.Uj()}}}}}Gn(Tt);var wh=0,Fh=0;te=a.columnCount;for(var lf=0;lf<te;lf++){var Kc=In[lf];Kc!==void 0&&(wh+=isNaN(Kc.Hc)?Kc.oc:Kc.Hc,Kc.oc!==0&&(wh+=Kc.Wc()))}te=a.rowCount;for(var lp=0;lp<te;lp++){var Yc=si[lp];Yc!==void 0&&(Fh+=isNaN(Yc.Hc)?Yc.oc:Yc.Hc,Yc.oc!==0&&(Fh+=Yc.Wc()))}Kn=Math.max(y-wh,0);var _h=ci=Math.max(x-Fh,0),hc=Kn;te=It.length;for(var ul=0;ul<te;ul++){var qu=It[ul],Z0=a.Fb(qu.row),Bh=a.Eb(qu.column),up=qu.measuredBounds,Fu=qu.margin,Pd=Fu.right+Fu.left,Qu=Fu.top+Fu.bottom;Ht[qu.column]=Bh.oc===0&&Ht[qu.column]!==void 0?Math.max(up.width+Pd,Ht[qu.column]):null,$t[qu.row]=Z0.oc===0&&$t[qu.row]!==void 0?Math.max(up.height+Qu,$t[qu.row]):null}var uf=0,hp=0,yu;for(yu in $t)yu!=="count"&&(uf+=$t[yu]);for(yu in Ht)yu!=="count"&&(hp+=Ht[yu]);for(var sa=Cn.alloc(),Ug=0;Ug<te;Ug++){var Ha=It[Ug];if(Ha.visible||Ha===lc){var ys=a.Fb(Ha.row),Ga=a.Eb(Ha.column),jh=0;isFinite(Ga.width)?jh=Ga.width:(isFinite(Kn)&&Ht[Ha.column]!==null?hp===0?jh=Ga.actual+Kn:jh=Ht[Ha.column]/hp*hc:Ht[Ha.column]!==null?jh=Kn:jh=Ga.actual||Kn,jh=Math.max(0,jh-Ga.Wc()));var cc=0;switch(isFinite(ys.height)?cc=ys.height:(isFinite(ci)&&$t[Ha.row]!==null?uf===0?cc=ys.actual+ci:cc=$t[Ha.row]/uf*_h:$t[Ha.row]!==null?cc=ci:cc=ys.actual||ci,cc=Math.max(0,cc-ys.Wc())),sa.h(Math.max(Ga.minimum,Math.min(jh,Ga.maximum)),Math.max(ys.minimum,Math.min(cc,ys.maximum))),ka=Tu(Ha,ys,Ga,!1),ka){case wi:sa.height=Math.max(sa.height,ys.actual+ci);break;case Oi:sa.width=Math.max(sa.width,Ga.actual+Kn)}var Cd=Ha.margin,Hy=Cd.right+Cd.left,V0=Cd.top+Cd.bottom;Ha.Uj(),Ha.measure(sa.width,sa.height,Ga.minimum,ys.minimum);var cp=Ha.measuredBounds,Ed=Math.max(cp.width+Hy,0),hf=Math.max(cp.height+V0,0);isFinite(Kn)&&(Ed=Math.min(Ed,sa.width)),isFinite(ci)&&(hf=Math.min(hf,sa.height));var hl=0;hl=ys.actual,ys.actual=Math.max(ys.actual,hf),ys.oc=Math.max(ys.oc,hf),js=ys.actual-hl,ci=Math.max(ci-js,0),$t[Ha.row]===null&&(_h=Math.max(_h-js,0)),hl=Ga.actual,Ga.actual=Math.max(Ga.actual,Ed),Ga.oc=Math.max(Ga.oc,Ed),js=Ga.actual-hl,Kn=Math.max(Kn-js,0),Ht[Ha.column]===null&&(hc=Math.max(hc-js,0))}}Gn(It);var zh=Cn.alloc(),Bu=ai(),Ul=ai();if(te=At.length,te!==0){for(var Xc=0;Xc<Wr;Xc++)if(st[Xc]){wo=st[Xc].length;var dp=a.Fb(Xc);Bu[Xc]=dp.actual;for(var Jc=0;Jc<wo;Jc++)if(st[Xc][Jc]){var K0=a.Eb(Jc);Ul[Jc]=K0.actual}}}for(var fp=0;fp<te;fp++){var ss=At[fp];if(ss.visible||ss===lc){var Su=a.Fb(ss.row),nu=a.Eb(ss.column);switch(sa.h(Math.max(nu.minimum,Math.min(y,nu.maximum)),Math.max(Su.minimum,Math.min(x,Su.maximum))),ka=Tu(ss,Su,nu,!1),ka){case Tn:Ul[nu.index]!==0&&(sa.width=Math.min(sa.width,Ul[nu.index])),Bu[Su.index]!==0&&(sa.height=Math.min(sa.height,Bu[Su.index]));break;case wi:Ul[nu.index]!==0&&(sa.width=Math.min(sa.width,Ul[nu.index]));break;case Oi:Bu[Su.index]!==0&&(sa.height=Math.min(sa.height,Bu[Su.index]))}isFinite(nu.width)&&(sa.width=nu.width),isFinite(Su.height)&&(sa.height=Su.height),zh.h(0,0);for(var Y0=nu.minimum,Sl=Su.minimum,dc=1;dc<ss.rowSpan&&!(ss.row+dc>=a.rowCount);dc++)wn=a.Fb(ss.row+dc),js=0,js=ka===Tn||ka===Oi?Math.max(wn.minimum,Bu[ss.row+dc]===0?wn.maximum:Math.min(Bu[ss.row+dc],wn.maximum)):Math.max(wn.minimum,isNaN(wn.Hc)?wn.maximum:Math.min(wn.Hc,wn.maximum)),zh.height+=js,Sl+=wn.minimum;for(var iu=1;iu<ss.columnSpan&&!(ss.column+iu>=a.columnCount);iu++)wn=a.Eb(ss.column+iu),js=0,js=ka===Tn||ka===wi?Math.max(wn.minimum,Ul[ss.column+iu]===0?wn.maximum:Math.min(Ul[ss.column+iu],wn.maximum)):Math.max(wn.minimum,isNaN(wn.Hc)?wn.maximum:Math.min(wn.Hc,wn.maximum)),zh.width+=js,Y0+=wn.minimum;sa.width+=zh.width,sa.height+=zh.height;var pp=ss.margin,qc=pp.right+pp.left,Hg=pp.top+pp.bottom;ss.measure(sa.width,sa.height,Y0,Sl);for(var gp=ss.measuredBounds,$u=Math.max(gp.width+qc,0),Ld=Math.max(gp.height+Hg,0),Qc=0,mp=0;mp<ss.rowSpan&&!(ss.row+mp>=a.rowCount);mp++)wn=a.Fb(ss.row+mp),Qc+=wn.total||0;if(Qc<Ld){var fc=Ld-Qc,bh=Ld-Qc;if(ss.spanAllocation!==null)for(var pc=ss.spanAllocation,Uh=0;Uh<ss.rowSpan&&!(0>=fc)&&!(ss.row+Uh>=a.rowCount);Uh++){wn=a.Fb(ss.row+Uh);var gc=wn.oa||0,Md=pc(ss,wn,bh);wn.actual=Math.min(wn.maximum,gc+Md),wn.oa!==gc&&(fc-=wn.oa-gc)}for(;0<fc;){var ju=wn.oa||0;if(isNaN(wn.height)&&wn.maximum>ju&&(wn.actual=Math.min(wn.maximum,ju+fc),wn.oa!==ju&&(fc-=wn.oa-ju)),wn.index===0)break;wn=a.Fb(wn.index-1)}}for(var cf=0,mc=0;mc<ss.columnSpan&&!(ss.column+mc>=a.columnCount);mc++)wn=a.Eb(ss.column+mc),cf+=wn.total||0;if(cf<$u){var df=$u-cf,Gy=$u-cf;if(ss.spanAllocation!==null)for(var Hh=ss.spanAllocation,kd=0;kd<ss.columnSpan&&!(0>=df)&&!(ss.column+kd>=a.columnCount);kd++){wn=a.Eb(ss.column+kd);var Gg=wn.oa||0,Wy=Hh(ss,wn,Gy);wn.actual=Math.min(wn.maximum,Gg+Wy),wn.oa!==Gg&&(df-=wn.oa-Gg)}for(;0<df;){var X0=wn.oa||0;if(isNaN(wn.width)&&wn.maximum>X0&&(wn.actual=Math.min(wn.maximum,X0+df),wn.oa!==X0&&(df-=wn.oa-X0)),wn.index===0)break;wn=a.Eb(wn.index-1)}}}}Gn(At),Cn.free(zh),Cn.free(sa),Bu!==void 0&&Gn(Bu),Ul!==void 0&&Gn(Ul);var ff=0,pf=0,J0=a.desiredSize,gx=a.maxSize;ka=Ja(a,!0);var Wg=Fh=wh=0,Zg=0;te=a.columnCount;for(var q0=0;q0<te;q0++)In[q0]!==void 0&&(wn=a.Eb(q0),isFinite(wn.width)?(Wg+=wn.width,Wg+=wn.Wc()):Am(wn)===ng?(Wg+=wn.oa,Wg+=wn.Wc()):wn.oa!==0&&(wh+=wn.oa,wh+=wn.Wc()));isFinite(J0.width)?ff=Math.min(J0.width,gx.width):ff=ka!==bn&&isFinite(y)?y:wh,ff=Math.max(ff,a.minSize.width),ff=Math.max(ff-Wg,0);for(var Qx=wh===0?1:Math.max(ff/wh,1),Q0=0;Q0<te;Q0++)In[Q0]!==void 0&&(wn=a.Eb(Q0),isFinite(wn.width)||Am(wn)===ng||(wn.actual=wn.oa*Qx),wn.position=E.width,wn.oa!==0&&(E.width+=wn.oa,E.width+=wn.Wc()));te=a.rowCount;for(var $0=0;$0<te;$0++)si[$0]!==void 0&&(wn=a.Fb($0),isFinite(wn.height)?(Zg+=wn.height,Zg+=wn.Wc()):Am(wn)===ng?(Zg+=wn.oa,Zg+=wn.Wc()):wn.oa!==0&&(Fh+=wn.oa,Fh+=wn.Wc()));isFinite(J0.height)?pf=Math.min(J0.height,gx.height):pf=ka!==bn&&isFinite(x)?x:Fh,pf=Math.max(pf,a.minSize.height),pf=Math.max(pf-Zg,0);for(var $x=Fh===0?1:Math.max(pf/Fh,1),ev=0;ev<te;ev++)si[ev]!==void 0&&(wn=a.Fb(ev),isFinite(wn.height)||Am(wn)===ng||(wn.actual=wn.oa*$x),wn.position=E.height,wn.oa!==0&&(E.height+=wn.oa,E.height+=wn.Wc()));te=se.length;for(var Zy=0;Zy<te;Zy++){var Vg=se[Zy],Vy=0,Ky=0;Vg.type===Nn.TableRow?(Vy=E.width,wn=a.Fb(Vg.row),Ky=wn.actual):(wn=a.Eb(Vg.column),Vy=wn.actual,Ky=E.height),Vg.measuredBounds.h(0,0,Vy,Ky),bs(Vg,!1)}Gn(se),a.inRowsCols=st},wm.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,_e=ne.length,Ee=0,Ne=0;Ne<_e;Ne++)ne[Ne]&&(Ee=Math.max(Ee,ne[Ne].length));he=a.rowDefs,se=a.colDefs;var Ge=Ne=0,Ye=Math.min(a.topIndex,_e-1);if(0<he.length){for(;Ye!==_e&&(he[Ye]===void 0||he[Ye].oa===0);)Ye++;Ye=Math.max(Math.min(Ye,_e-1),0),Ne=-he[Ye].position}var et=Math.min(a.leftIndex,Ee-1);if(0<se.length){for(;et!==Ee&&(se[et]===void 0||se[et].oa===0);)et++;et=Math.max(Math.min(et,Ee-1),0),Ge=-se[et].position}for(var st=0,Ct=0;st!==_e&&he[st]===void 0;)st++;for(;Ct!==_e&&se[Ct]===void 0;)Ct++;Ee=a.part,a.Fb(st),a.Eb(Ct);for(var St=0;St<y.length;St++){var Tt=y[St];if(Tt instanceof Nn&&Tt.visible&&Qh(Tt)){if(Tt.type===Nn.TableRow){se=a.Fb(Tt.row);var At=a.Eb(Ct)}else se=a.Fb(st),At=a.Eb(Tt.column);he=se.position+Ne+E,se.oa!==0&&(he+=se.Io(Math.max(st,Ye))),se=At.position+Ge+te,At.oa!==0&&(se+=At.Io(Math.max(Ct,et))),At=Tt.measuredBounds,Tt.Uk(),Tt.actualBounds.ka();var It=Tt.actualBounds,Ht=nn.allocAt(It.x,It.y,It.width,It.height);It.x=Tt.type===Nn.TableRow?te:se,It.y=Tt.type===Nn.TableColumn?E:he,It.width=At.width,It.height=At.height,Tt.actualBounds.freeze(),hh(Tt,!1),Mr(Ht,It)||Ee===null||(Ee.oh(),Tt.Pn(Ee)),nn.free(Ht)}}for(St=Cn.alloc(),Tt=0;Tt<_e;Tt++)if(ne[Tt]){for(Ee=ne[Tt].length,At=a.Fb(Tt),he=At.position+Ne+E,At.oa!==0&&(he+=At.Io(Math.max(st,Ye))),It=0;It<Ee;It++)if(ne[Tt][It]){Ht=a.Eb(It),se=Ht.position+Ge+te,Ht.oa!==0&&(se+=Ht.Io(Math.max(Ct,et)));for(var $t=ne[Tt][It],Kn=$t.length,ci=0;ci<Kn;ci++){var si=$t[ci],In=si.measuredBounds;St.h(0,0);for(var wn=1;wn<si.rowSpan&&!(Tt+wn>=a.rowCount);wn++){var Yi=a.Fb(Tt+wn);Yi.oa!==0&&(St.height+=Yi.total)}for(wn=1;wn<si.columnSpan&&!(It+wn>=a.columnCount);wn++)Yi=a.Eb(It+wn),Yi.oa!==0&&(St.width+=Yi.total);var Bi=Ht.oa+St.width,Wr=At.oa+St.height;wn=se,Yi=he;var wo=Bi,Bs=Wr,Zs=se,La=he,js=Bi,lc=Wr;se+Bi>x.width&&(js=Math.max(x.width-se,0)),he+Wr>x.height&&(lc=Math.max(x.height-he,0));var vs=si.alignment;if(vs.Xb()){vs=a.defaultAlignment,vs.sb()||(vs=_r);var Iu=vs.x,Ma=vs.y,uc=vs.offsetX;vs=vs.offsetY;var kl=Ht.alignment,tu=At.alignment;kl.sb()&&(Iu=kl.x,uc=kl.offsetX),tu.sb()&&(Ma=tu.y,vs=tu.offsetY)}else Iu=vs.x,Ma=vs.y,uc=vs.offsetX,vs=vs.offsetY;(isNaN(Iu)||isNaN(Ma))&&(Ma=Iu=.5,vs=uc=0),kl=In.width,tu=In.height;var ml=si.margin,al=ml.left+ml.right,Zc=ml.top+ml.bottom,Ru=Tu(si,At,Ht,!1);!isNaN(si.desiredSize.width)||Ru!==Tn&&Ru!==wi||(kl=Math.max(Bi-al,0)),!isNaN(si.desiredSize.height)||Ru!==Tn&&Ru!==Oi||(tu=Math.max(Wr-Zc,0)),Bi=si.maxSize,Wr=si.minSize,kl=Math.min(Bi.width,kl),tu=Math.min(Bi.height,tu),kl=Math.max(Wr.width,kl),tu=Math.max(Wr.height,tu),Bi=tu+Zc,wn+=wo*Iu-(kl+al)*Iu+uc+ml.left,Yi+=Bs*Ma-Bi*Ma+vs+ml.top,si.visible&&(Qr(Zs,La,js,lc,wn,Yi,In.width,In.height)?si.arrange(wn,Yi,kl,tu):si.arrange(wn,Yi,kl,tu,new nn(Zs,La,js,lc)))}}}for(Cn.free(St),a=0;a<b;a++)x=y[a],te=x instanceof Nn?x:null,te!==null&&Qh(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function _m(){this.xa="Base"}Xe(_m,Ms),_m.prototype.measure=function(){},_m.prototype.arrange=function(){};function bm(){this.xa="Base"}Xe(bm,Ms),bm.prototype.measure=function(){},bm.prototype.arrange=function(){};function Pm(){this.xa="Base"}Xe(Pm,Ms),Pm.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&kt("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,_e=he.right+he.left;if(he=he.top+he.bottom,isFinite(y)||isFinite(x)){var Ee=b.scale,Ne=se.width;se=se.height;var Ge=Math.max(y-_e,0),Ye=Math.max(x-he,0),et=1;a.viewboxStretch===fi?Ne!==0&&se!==0&&(et=Math.min(Ge/Ne,Ye/se)):Ne!==0&&se!==0&&(et=Math.max(Ge/Ne,Ye/se)),et===0&&(et=1e-4),b.Ca*=et,Ee!==b.scale&&(bs(b,!0),b.measure(1/0,1/0,te,ne))}se=b.measuredBounds,E.width=isFinite(y)?y:Math.max(se.width+_e,0),E.height=isFinite(x)?x:Math.max(se.height+he,0)},Pm.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=_r),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 $p(){this.xa="Base"}Xe($p,Ms),$p.prototype.measure=function(){},$p.prototype.arrange=function(){},$p.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,_e=Math.ceil(se/E),Ee=Math.ceil(he/b),Ne=a.gridOrigin,Ge=Ne.x;Ne=Ne.y,y.save(),y.beginPath(),y.rect(0,0,se,he),y.clip(),y.Se();for(var Ye=[],et=a.O.s,st=et.length,Ct=0;Ct<st;Ct++){var St=et[Ct],Tt=[];if(Ye.push(Tt),St.visible){var At=St.interval;if(!(0>At)){St=mv(St.figure);for(var It=0;It<st;It++)if(It!==Ct){var Ht=et[It];Ht.visible&&mv(Ht.figure)===St&&(Ht=Ht.interval,Ht>At&&Tt.push(Ht))}}}}for(et=a.O.s,st=et.length,Ct=0;Ct<st;Ct++){var $t=et[Ct];if($t.visible&&(Tt=$t.interval||1,St=Math.abs(Tt),!(2>E*St*x))){if(At=$t.segmentIndex,(!isFinite(At)||isNaN(At))&&(At=0),0>At&&(At=St-Math.min(-At,St)),At=Math.round(At%St),St=$t.opacity,It=1,St!==1){if(St===0)continue;It=y.globalAlpha,y.globalAlpha=It*St}Ht=Ye[Ct];var Kn=!1,ci=$t.strokeDashArray;if(ci!==null&&(Kn=!0,y.js(ci,$t.strokeDashOffset)),$t.figure==="LineV"&&$t.stroke!==null&&0<$t.strokeWidth){for(y.lineWidth=$t.strokeWidth,os(a,y,$t.stroke,!1,!1,te,ne),y.beginPath(),ci=$t=Math.floor((Ge-E)/E);ci<=$t+_e;ci++){var si=ci*E+Ge;0<=si&&si<=se&&Cm(ci,Tt,At,Ht)&&(y.moveTo(si,0),y.lineTo(si,he))}y.stroke(),y.Se()}else if($t.figure==="LineH"&&$t.stroke!==null&&0<$t.strokeWidth){for(y.lineWidth=$t.strokeWidth,os(a,y,$t.stroke,!1,!1,te,ne),y.beginPath(),ci=$t=Math.floor((Ne-b)/b);ci<=$t+Ee;ci++)si=ci*b+Ne,0<=si&&si<=he&&Cm(ci,Tt,At,Ht)&&(y.moveTo(0,si),y.lineTo(se,si));y.stroke(),y.Se()}else if($t.figure==="BarV"&&$t.fill!==null)for(os(a,y,$t.fill,!0,!1,te,ne),$t=$t.width,isNaN($t)&&($t=E),si=ci=Math.floor((Ge-E)/E);si<=ci+_e;si++){var In=si*E+Ge;0<=In+$t&&In<=se&&Cm(si,Tt,At,Ht)&&y.fillRect(In,0,$t,he)}else if($t.figure==="BarH"&&$t.fill!==null)for(os(a,y,$t.fill,!0,!1,te,ne),$t=$t.height,isNaN($t)&&($t=b),si=ci=Math.floor((Ne-b)/b);si<=ci+Ee;si++)In=si*b+Ne,0<=In+$t&&In<=he&&Cm(si,Tt,At,Ht)&&y.fillRect(0,In,se,$t);Kn&&y.fs(),St!==1&&(y.globalAlpha=It)}}y.restore(),y.Vc(!1)};function Cm(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 Em(){this.xa="Base"}Xe(Em,Ms),Em.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof jr||a instanceof Fn){var ne=null,se=null;if(a instanceof Fn&&(ne=a),a instanceof jr&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof Fn){var he=ne;if(te===0)Fr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var _e=a instanceof jr?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var Ee=he.points,Ne=ne.pointsCount;se!==null?se.Ul(!1):ne!==null&&ne.Ul(!1),se=y.width;var Ge=y.height,Ye=a.j;if(Ye.length=0,_e!==null){r1(a,se,Ge,_e);var et=_e.measuredBounds;x.ed(et),Ye.push(et)}et=ji.alloc();for(var st=ft.alloc(),Ct=ft.alloc(),St=0;St<te;St++){var Tt=b[St];if(Tt!==_e)if(Tt.isPanelMain&&Tt instanceof nr){r1(a,se,Ge,Tt);var At=Tt.measuredBounds;x.ed(At),Ye.push(At)}else if(2>Ne)Tt.measure(1/0,1/0,0,0),At=Tt.measuredBounds,x.ed(At),Ye.push(At);else{var It=Tt.segmentIndex,Ht=Tt.segmentFraction,$t=Tt.alignmentFocus;$t.Mc()&&($t=_r);var Kn=Tt.segmentOrientation,ci=Tt.segmentOffset;if(isNaN(It)){var si=he.ua;At=ai(),si.Qu(Ht,At);var In=ft.allocAt(At[0],At[1]);if(In.add(he.i(0)),si.type===Rn.j?In.offset(-si.startX,-si.startY):(si=si.figures.first(),si!==null&&In.offset(-si.startX,-si.startY)),si=At[2],Kn!==Fa){var wn=he.computeAngle(Tt,Kn,si);Tt.Kb=wn}wn=In.x-y.x;var Yi=In.y-y.y;ft.free(In),Gn(At)}else if(It<-Ne||It>=Ne)At=ft.alloc(),he.vg(),he.computeMidPoint(At),si=he.midAngle,Kn!==Fa&&(wn=he.computeAngle(Tt,Kn,si),Tt.Kb=wn),wn=At.x-y.x,Yi=At.y-y.y,ft.free(At);else{if(wn=0,0<=It?(Yi=Ee.M(It),At=It<Ne-1?Ee.M(It+1):Yi):(wn=Ne+It,Yi=Ee.M(wn),At=0<wn?Ee.M(wn-1):Yi),Yi.Xa(At)){0<=It?(si=0<It?Ee.M(It-1):Yi,wn=It<Ne-2?Ee.M(It+2):At):(si=wn<Ne-1?Ee.M(wn+1):Yi,wn=1<wn?Ee.M(wn-2):At),In=si.Bf(Yi);var Bi=At.Bf(wn);si=In>Bi+10?0<=It?si.ab(Yi):Yi.ab(si):Bi>In+10?0<=It?At.ab(wn):wn.ab(At):0<=It?si.ab(wn):wn.ab(si)}else si=0<=It?Yi.ab(At):At.ab(Yi);Kn!==Fa&&(wn=he.computeAngle(Tt,Kn,si),Tt.Kb=wn),wn=Yi.x+(At.x-Yi.x)*Ht-y.x,Yi=Yi.y+(At.y-Yi.y)*Ht-y.y}Tt.measure(1/0,1/0,0,0),At=Tt.measuredBounds,In=Tt.naturalBounds;var Wr=0;Tt instanceof nr&&(Wr=Tt.strokeWidth),Bi=In.width+Wr;var wo=In.height+Wr;et.reset(),et.translate(-At.x,-At.y),et.scale(Tt.scale,Tt.scale),et.rotate(Kn===Fa?Tt.angle:si,Bi/2,wo/2),Kn!==dg&&Kn!==pg||et.rotate(90,Bi/2,wo/2),Kn!==fg&&Kn!==gg||et.rotate(-90,Bi/2,wo/2),Kn===n0&&(45<si&&135>si||225<si&&315>si)&&et.rotate(-si,Bi/2,wo/2),In=new nn(0,0,Bi,wo),st.xi(In,$t),et.Ga(st),$t=-st.x+Wr/2*Tt.scale,Tt=-st.y+Wr/2*Tt.scale,Ct.assign(ci),Wr=isNaN(ci.x);var Bs=isNaN(ci.y);if(Wr||Bs){Bi=Bi/2+3,wo=wo/2+3;var Zs=45<=si&&135>=si,La=225<=si&&315>=si;Kn===Fa&&(Zs||La)?(Ct.x=Bs?Bi:ci.y,Ct.y=Wr?wo:ci.x,Zs?0<=It||isNaN(It)&&.5>Ht||!Wr||(Ct.y=-wo):La&&((0<=It||isNaN(It)&&.5>Ht)&&Wr&&(Ct.y=-wo),Bs&&(Ct.x=-Bi))):(Wr&&(Ct.x=0<=It||isNaN(It)&&.5>Ht?Bi:-Bi),Bs&&(Ct.y=-wo),Ct.rotate(si))}else Ct.rotate(si);wn+=Ct.x,Yi+=Ct.y,In.set(At),In.h(wn+$t,Yi+Tt,At.width,At.height),Ye.push(In),x.ed(In)}}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),Fr(E,x.width||0,x.height||0),ji.free(et),ft.free(st),ft.free(Ct)}}}},Em.prototype.arrange=function(a,y){var x=y.length;if(a instanceof jr||a instanceof Fn){var b=a,E=null;a instanceof jr&&(E=a,b=E.adornedPart);var te=a instanceof jr?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 _e=y[he];if(_e!==te&&se<ne.length){var Ee=ne[se];se++,_e.arrange(Ee.x-a.jg.x,Ee.y-a.jg.y,Ee.width,Ee.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Fn)for(te=a.labelNodes;te.next();){var Ne=a;ne=te.value,se=ne.segmentIndex,he=ne.segmentFraction;var Ge=ne.alignmentFocus;if(_e=ne.segmentOrientation,Ee=ne.segmentOffset,isNaN(se)){var Ye=Ne.ua,et=ai();Ye.Qu(he,et);var st=ft.allocAt(et[0],et[1]);st.add(Ne.i(0)),Ye.type===Rn.j||(Ye=Ye.figures.first()),st.offset(-Ye.startX,-Ye.startY),Ye=et[2],_e!==Fa&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=st.x;var Ct=st.y;ft.free(st),Gn(et)}else if(se<-x||se>=x)et=ft.alloc(),Ye=Ne,Ct=et,Ye.vg(),Ye.computeMidPoint(Ct),Ye=Ne.midAngle,_e!==Fa&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=et.x,Ct=et.y,ft.free(et);else{if(st=0,0<=se?(et=y.s[se],Ct=se<x-1?y.s[se+1]:et):(st=x+se,et=y.s[st],Ct=0<st?y.s[st-1]:et),et.Xa(Ct)){0<=se?(Ye=0<se?y.s[se-1]:et,st=se<x-2?y.s[se+2]:Ct):(Ye=st<x-1?y.s[st+1]:et,st=1<st?y.s[st-2]:Ct);var St=Ye.Bf(et),Tt=Ct.Bf(st);Ye=St>Tt+10?0<=se?Ye.ab(et):et.ab(Ye):Tt>St+10?0<=se?Ct.ab(st):st.ab(Ct):0<=se?Ye.ab(st):st.ab(Ye)}else Ye=0<=se?et.ab(Ct):Ct.ab(et);_e!==Fa&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=et.x+(Ct.x-et.x)*he,Ct=et.y+(Ct.y-et.y)*he}if(Ge.ys())ne.location=new ft(Ne,Ct);else{Ge.Mc()&&(Ge=_r),et=ji.alloc(),et.reset(),et.scale(ne.scale,ne.scale),et.rotate(ne.angle,0,0);var At=ne.naturalBounds;st=nn.allocAt(0,0,At.width,At.height),St=ft.alloc(),St.xi(st,Ge),et.Ga(St),Ge=-St.x,Tt=-St.y;var It=At.width,Ht=At.height;At=ft.alloc(),At.assign(Ee);var $t=isNaN(Ee.x),Kn=isNaN(Ee.y);if($t||Kn){It=It/2+3,Ht=Ht/2+3;var ci=45<=Ye&&135>=Ye,si=225<=Ye&&315>=Ye;_e===Fa&&(ci||si)?(At.x=Kn?It:Ee.y,At.y=$t?Ht:Ee.x,ci?0<=se||isNaN(se)&&.5>he||!$t||(At.y=-Ht):si&&((0<=se||isNaN(se)&&.5>he)&&$t&&(At.y=-Ht),Kn&&(At.x=-It))):($t&&(At.x=0<=se||isNaN(se)&&.5>he?It:-It),Kn&&(At.y=-Ht),At.rotate(Ye))}else At.rotate(Ye);Ne+=At.x,Ct+=At.y,et.pp(st),Ge+=st.x,Tt+=st.y,se=ft.allocAt(Ne+Ge,Ct+Tt),ne.move(se),ft.free(se),ft.free(At),ft.free(St),nn.free(st),ji.free(et)}}E!==null?E.Ul(!1):b.Ul(!1),b=D1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),ft.free(b)}};function r1(a,y,x,b){if(Cl(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof jr&&a.type===Nn.Link&&a.adornedObject instanceof nr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Fn&&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 jr&&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),bs(b,!1)}}function eg(){this.xa="Base"}Xe(eg,Ms),eg.prototype.measure=function(a,y,x,b,E,te,ne){var se=a.Pb();a.graduatedBounds=[];var he=se.margin,_e=he.right+he.left,Ee=he.top+he.bottom;se.measure(y,x,te,ne);var Ne=se.measuredBounds,Ge=new nn(-he.left,-he.top,Math.max(Ne.width+_e,0),Math.max(Ne.height+Ee,0));a.graduatedBounds.push(Ge),E.assign(Ge);for(var Ye=se.geometry,et=se.strokeWidth,st=Ye.flattenedSegments,Ct=Ye.flattenedLengths,St=Ye.flattenedTotalLength,Tt=st.length,At=0,It=0,Ht=ai(),$t=0;$t<Tt;$t++){var Kn=st[$t],ci=[];It=At=0;for(var si=Kn.length,In=0;In<si;In+=2){var wn=Kn[In],Yi=Kn[In+1];if(In!==0){var Bi=180*Math.atan2(Yi-It,wn-At)/Math.PI;0>Bi&&(Bi+=360),ci.push(Bi)}At=wn,It=Yi}Ht.push(ci)}if(a.graduatedIntervals===null){for(var Wr=[],wo=a.O.s,Bs=wo.length,Zs=0;Zs<Bs;Zs++){var La=wo[Zs],js=[];if(Wr.push(js),La.visible){var lc=La.interval;if(!(0>lc)){for(var vs=0;vs<Bs;vs++)if(vs!==Zs){var Iu=wo[vs];if(Iu.visible&&La.constructor===Iu.constructor){var Ma=Iu.interval;Ma>lc&&js.push(Ma)}}}}}a.graduatedIntervals=Wr}var uc=a.graduatedIntervals,kl=a.O.s,tu=kl.length,ml=0,al=0,Zc=St;a.graduatedMarks=[];for(var Ru,ap=0;ap<tu;ap++){var vl=kl[ap];if(Ru=[],vl.visible&&vl!==se){var ka=Math.abs(vl.interval),jg=a.graduatedTickUnit;if(!(2>jg*ka*St/a.graduatedRange&&vl.graduatedSkip===null)){var af=Ct[0][0],Ju=0,ll=0;al=St*vl.graduatedStart-1e-4,Zc=St*vl.graduatedEnd+1e-4;var bd=jg*ka,yl=a.graduatedTickBase;if(yl<a.graduatedMin){var Vc=(a.graduatedMin-yl)/bd;Vc=Vc%1===0?Vc:Math.floor(Vc+1),yl+=Vc*bd}else yl>a.graduatedMin+bd&&(yl-=Math.floor((yl-a.graduatedMin)/bd)*bd);for(var W0=uc[ap],zg=yl,Uy=1e-6*a.graduatedMax,wh=1;yl<=a.graduatedMax+Uy;wh++){e:{for(var Fh=W0.length,lf=0;lf<Fh;lf++){var Kc=(yl-a.graduatedTickBase)%(W0[lf]*a.graduatedTickUnit),lp=1e-6*a.graduatedTickUnit;if(Kc<lp&&Kc>-lp){var Yc=!1;break e}}Yc=!0}if(Yc&&(yl>a.graduatedMax&&(yl=a.graduatedMax),vl.graduatedSkip===null||vl instanceof Eo&&!vl.graduatedSkip(yl,vl)||vl instanceof nr&&!vl.graduatedSkip(yl,vl))&&(ml=(yl-a.graduatedMin)*St/a.graduatedRange,ml>St&&(ml=St),al<=ml&&ml<=Zc)){for(var _h=Ht[Ju][ll],hc=Ct[Ju][ll];Ju<Ct.length;){for(;ml>af&&ll<Ct[Ju].length-1;)ll++,_h=Ht[Ju][ll],hc=Ct[Ju][ll],af+=hc;if(ml<=af)break;Ju++,ll=0,_h=Ht[Ju][ll],hc=Ct[Ju][ll],af+=hc}var ul=st[Ju],qu=ul[2*ll],Z0=ul[2*ll+1],Bh=(ml-(af-hc))/hc,up=new ft(qu+(ul[2*ll+2]-qu)*Bh+et/2-Ye.bounds.x,Z0+(ul[2*ll+3]-Z0)*Bh+et/2-Ye.bounds.y);up.scale(se.scale,se.scale);e:{var Fu=_h,Pd=Ht[Ju];if(!(.5005>Bh&&.4995<Bh)){var Qu=Fu;if(.5>Bh?0<ll?Qu=Pd[ll-1]:Wt.$(ul[0],ul[ul.length-2])&&Wt.$(ul[1],ul[ul.length-1])&&(Qu=Pd[Pd.length-1]):.5<Bh&&(ll+1<Pd.length?Qu=Pd[ll+1]:Wt.$(ul[0],ul[ul.length-2])&&Wt.$(ul[1],ul[ul.length-1])&&(Qu=Pd[0])),Fu!==Qu){var uf=Math.abs(Fu-Qu);if(180<uf&&(Fu<Qu?Fu+=360:Qu+=360,uf=Math.abs(Fu-Qu)),5e-4>Bh||.9995<Bh){_h=(Fu+Qu)/2%360;break e}if(10>uf){var hp=1-Math.abs(.5-Bh);_h=(Fu*hp+Qu*(1-hp))%360;break e}}}_h=Fu}if(vl instanceof Eo){var yu="";vl.graduatedFunction!==null?(yu=vl.graduatedFunction(yl,vl),yu=yu!=null?yu.toString():""):yu=(+yl.toFixed(2)).toString(),yu!==""&&Ru.push({$l:up,angle:_h,text:yu})}else Ru.push({$l:up,angle:_h})}yl=zg+wh*bd}}}a.graduatedMarks.push(Ru)}Gn(Ht);var sa=a.graduatedMarks;if(sa!==null)for(var Ug=b.length,Ha=0;Ha<Ug;Ha++){var ys=b[Ha],Ga=sa[Ha];if(ys.visible&&ys!==se&&Ga.length!==0){if(ys instanceof nr){var jh=a,cc=E,Cd=ys.alignmentFocus;Cd.Mc()&&(Cd=Zo);var Hy=ys.angle;ys.Kb=0,ys.measure(1/0,1/0,0,0),ys.Kb=Hy;var V0=ys.measuredBounds,cp=V0.width,Ed=V0.height,hf=nn.allocAt(0,0,cp,Ed),hl=ft.alloc();hl.xi(hf,Cd),nn.free(hf);for(var zh=-hl.x,Bu=-hl.y,Ul=new nn,Xc=Ga.length,dp=0;dp<Xc;dp++)for(var Jc=Ga[dp],K0=Jc.$l.x,fp=Jc.$l.y,ss=Jc.angle,Su=0;4>Su;Su++){switch(Su){case 0:hl.h(zh,Bu);break;case 1:hl.h(zh+cp,Bu);break;case 2:hl.h(zh,Bu+Ed);break;case 3:hl.h(zh+cp,Bu+Ed)}hl.rotate(ss+ys.angle),hl.offset(K0,fp),dp===0&&Su===0?Ul.h(hl.x,hl.y,0,0):Ul.Ye(hl),hl.offset(-K0,-fp),hl.rotate(-ss-ys.angle)}ft.free(hl),jh.graduatedBounds!==null&&jh.graduatedBounds.push(Ul),Br(cc,Ul.x,Ul.y,Ul.width,Ul.height)}else if(ys instanceof Eo){var nu=a,Y0=E;nu.temporaryTextBlock===null&&(nu.temporaryTextBlock=new Eo);var Sl=nu.temporaryTextBlock;S1(Sl,ys);var dc=ys.alignmentFocus;dc.Mc()&&(dc=Zo);for(var iu=ys.segmentOrientation,pp=ys.segmentOffset,qc=new nn,Hg=0,gp=0,$u=0,Ld=0,Qc=0,mp=Ga.length,fc=0;fc<mp;fc++){var bh=Ga[fc];Hg=bh.$l.x,gp=bh.$l.y,$u=bh.angle,Qc=Ld=ys.angle,iu!==Fa&&(Qc=iu===cg||iu===t0?$u+ys.angle:$u,Ld=Fn.computeAngle(iu,Qc)),Sl.Kb=Ld,Sl.text=bh.text||"",Sl.measure(1/0,1/0,0,0);var pc=Sl.measuredBounds,Uh=Sl.naturalBounds,gc=Uh.width,Md=Uh.height,ju=ji.alloc();ju.reset(),ju.translate(-pc.x,-pc.y),ju.scale(Sl.scale,Sl.scale),ju.rotate(Qc,gc/2,Md/2),iu!==dg&&iu!==pg||ju.rotate(90,gc/2,Md/2),iu!==fg&&iu!==gg||ju.rotate(-90,gc/2,Md/2),iu===n0&&(45<$u&&135>$u||225<$u&&315>$u)&&ju.rotate(-$u,gc/2,Md/2);var cf=nn.allocAt(0,0,gc,Md),mc=ft.alloc();mc.xi(cf,dc),ju.Ga(mc);var df=-mc.x,Gy=-mc.y,Hh=ft.alloc();Hh.assign(pp),isNaN(Hh.x)&&(Hh.x=gc/2+3),isNaN(Hh.y)&&(Hh.y=-(Md/2+3)),Hh.rotate($u),Hg+=Hh.x+df,gp+=Hh.y+Gy;var kd=new nn(Hg,gp,pc.width,pc.height),Gg=new nn(pc.x,pc.y,pc.width,pc.height),Wy=new nn(Uh.x,Uh.y,Uh.width,Uh.height);bh.Sz=Ld,bh.lineCount=Sl.lineCount,bh.lines=[Sl.Cb,Sl.Ih,Sl.df,Sl.Le,Sl.Qc,Sl.Qb,Sl.ze],bh.actualBounds=kd,bh.measuredBounds=Gg,bh.naturalBounds=Wy,fc===0?qc.assign(kd):qc.ed(kd),ft.free(Hh),ft.free(mc),nn.free(cf),ji.free(ju)}nu.graduatedBounds!==null&&nu.graduatedBounds.push(qc),Br(Y0,qc.x,qc.y,qc.width,qc.height)}bs(ys,!1)}}},eg.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,_e=0;_e<he;_e++){var Ee=y[_e];se=E[_e],Ee.visible&&Ee!==b&&se.length!==0&&(se=te[ne],ne++,Ee.arrange(se.x-x.x,se.y-x.y,se.width,se.height))}a.graduatedBounds=null}}},eg.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 fl,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,_e=a.graduatedMarks,Ee=he.length,Ne=0;Ne<Ee;Ne++){var Ge=he[Ne],Ye=_e[Ne],et=Ye.length;if(Ge.visible&&Ge!==te&&Ye.length!==0){if(Ge instanceof nr){if(!(2>a.graduatedTickUnit*Ge.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ge.graduatedSkip===null)){var st=Ge.measuredBounds,Ct=Ge.strokeWidth*Ge.scale,St=Ge.alignmentFocus;St.Mc()&&(St=Zo);for(var Tt=0;Tt<et;Tt++){var At=Ye[Tt].$l,It=Ye[Tt].angle,Ht=St,$t=Ge.Ab;$t.reset(),$t.translate(At.x+se.x,At.y+se.y),$t.rotate(It+Ge.angle,0,0),$t.translate(-st.width*Ht.x+Ht.offsetX+Ct/2,-st.height*Ht.y+Ht.offsetY+Ct/2),$t.scale(Ge.scale,Ge.scale),Jl(Ge,!1),Ge.wh.set(Ge.Ab),Ge.Kk=Ge.scale,Ol(Ge,!1),Ge.gc(y,x),E&&(a.svg.appendChild(Ge.svg),Ge.svg=null),Ge.Ab.reset()}}}else if(Ge instanceof Eo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Eo),st=a.temporaryTextBlock,S1(st,Ge),Ct=0;Ct<et;Ct++)St=Ye[Ct],St.actualBounds&&St.measuredBounds&&St.naturalBounds&&(st.ec=St.text||"",st.Kb=St.Sz||0,st.Gc=St.lineCount||0,Tt=St.lines,Tt!==void 0&&(st.Cb=Tt[0],st.Ih=Tt[1],st.df=Tt[2],st.Le=Tt[3],st.Qc=Tt[4],st.Qb=Tt[5],st.ze=Tt[6]),St.naturalBounds&&(st.dc=St.naturalBounds),St.actualBounds&&(Tt=St.actualBounds,st.arrange(Tt.x,Tt.y,Tt.width,Tt.height)),Tt=St.actualBounds,st.arrange(Tt.x,Tt.y,Tt.width,Tt.height),At=St.measuredBounds,St=St.naturalBounds,It=st.Ab,It.reset(),It.translate(Tt.x+se.x,Tt.y+se.y),It.translate(-At.x,-At.y),st.no(It,St.x,St.y,St.width,St.height),Jl(st,!1),st.wh.set(st.Ab),st.Kk=st.scale,Ol(st,!1),st.Ng=Ge.part,st.Me=Ge.panel,st.gc(y,x),st.Me=null,st.Ng=null,E&&(a.svg.appendChild(st.svg),st.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Nn(a,y){if(Gt.call(this),this.na=null,a===void 0)this.na=Nn.Position;else if(typeof a=="string"){var x=du.I(a);x!==null&&(this.na=x)}else a instanceof Ms?this.na=a:a&&(this.na=Nn.Position,y=a);this.na===null&&kt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Nn.Grid?1048576:0),this.O=new Ln,this.yb=Os,this.Tm=Ts,this.Uf=er,this.$g=null,this.$e="",this.jg=new nn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=fi,this.jn=Er,this.kn=Yn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Xe(Nn,Gt),Nn.prototype.cloneProtected=function(a){Gt.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},Nn.prototype.Af=function(a){Gt.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},Nn.prototype.copy=function(){var a=Gt.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 Xn&&(te.Te=!0);var se=a.diagram;se!==null&&se.undoManager.isUndoingRedoing||te.cb(ns,"elements",a,null,E,null,ne)}}return a}return null},Qe=Nn.prototype,Qe.toString=function(){return"Panel("+this.type.name+")#"+Xi(this)},Qe.Pn=function(a){Gt.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===Nn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Nn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Nn.Table)if(a.yc(),a instanceof fl){var x=a.yd;a.yd=fm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Nn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x&&se===b&&(a.clipInsteadOfFill=!0),se.gc(a,y),x&&se===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Lm(a,y,!0,x,!0),b!==null&&Lm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Lm(a,y,!0,x,!1),b!==null&&Lm(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 _e=b[he];if(_e!==void 0&&_e.actual!==0)if(se)se=!1;else{if(x){if(_e.position>ne.height)continue}else if(_e.position>ne.width)continue;var Ee=_e.separatorStrokeWidth;isNaN(Ee)&&(Ee=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Ne=_e.separatorStroke;if(Ne===null&&(Ne=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),Ee!==0&&Ne!==null){os(a,y,Ne,!1,!1,ne,te),Ne=!1;var Ge=_e.separatorDashArray;Ge===null&&(Ge=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ge!==null&&(Ne=!0,y.js(Ge,0)),y.beginPath(),Ge=_e.position+Ee,x?Ge>ne.height&&(Ee-=Ge-ne.height):Ge>ne.width&&(Ee-=Ge-ne.width),_e=_e.position+Ee/2,y.lineWidth=Ee,Ee=a.yb,x?(_e+=Ee.top,Ge=ne.width-Ee.right,y.moveTo(Ee.left,_e),y.lineTo(Ge,_e)):(_e+=Ee.left,Ge=ne.height-Ee.bottom,y.moveTo(_e,Ee.top),y.lineTo(_e,Ge)),y.stroke(),y.Se(),Ne&&y.fs()}}}}function Lm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,se=a.naturalBounds,he=s1(a,!0),_e=s1(a,!1),Ee=0;Ee<te;Ee++){var Ne=b[Ee];if(Ne!==void 0&&Ne.background!==null&&Ne.coversSeparators!==E&&Ne.actual!==0){var Ge=x?ne.height:ne.width;if(!(Ne.position>Ge)){var Ye=Ne.Wc(),et=Ne.separatorStrokeWidth;isNaN(et)&&(et=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var st=Ne.separatorStroke;st===null&&(st=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(st===null||Ne.index===(x?he:_e))&&(et=0),Ye-=et,et=Ne.position+et,Ye+=Ne.actual,et+Ye>Ge&&(Ye=Ge-et),0>=Ye||(Ge=a.yb,os(a,y,Ne.background,!0,!1,se,ne),x?y.fillRect(Ge.left,et+Ge.top,ne.width-(Ge.left+Ge.right),Ye):y.fillRect(et+Ge.left,Ge.top,Ye,ne.height-(Ge.top+Ge.bottom)))}}}}function s1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function mv(a){return a==="LineV"||a==="BarV"}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(!Gt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Nn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Nn.Grid||this.na===Nn.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 Gt.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,_e=-ne.m12*se,Ee=-ne.m21*se,Ne=ne.m11*se,Ge=se*(ne.m21*ne.dy-ne.m22*ne.dx),Ye=se*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,Wt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*he+y*Ee+Ge,se=a*_e+y*Ne+Ye,a=x*he+b*Ee+Ge,he=x*_e+b*Ne+Ye,E.h(0,0),x=this.naturalBounds,te=Wt.Ff(0,0,x.width,x.height,te,se,a,he,E),E.transform(ne),te;te||(he=1,Ee=_e=0,Ne=1,Ye=Ge=0),se=a*he+y*Ee+Ge,a=a*_e+y*Ne+Ye,he=x*he+b*Ee+Ge,x=x*_e+b*Ne+Ye,E.h(he,x),b=(he-se)*(he-se)+(x-a)*(x-a),_e=!1,Ne=this.O.s,Ye=Ne.length,Ee=ft.alloc(),Ge=null,y=1/0;var et=null,st=this.isClipping&&this.na===Nn.Spot;st&&(et=ft.alloc(),Ge=this.Pb(),(_e=Ge.Sj(se,a,he,x,et))&&(y=(se-et.x)*(se-et.x)+(a-et.y)*(a-et.y)));for(var Ct=0;Ct<Ye;Ct++){var St=Ne[Ct];St.visible&&St!==Ge&&St.Sj(se,a,he,x,Ee)&&(_e=!0,St=(se-Ee.x)*(se-Ee.x)+(a-Ee.y)*(a-Ee.y),St<b&&(b=St,E.set(Ee)))}return st&&(y>b&&E.set(et),ft.free(et)),ft.free(Ee),te&&E.transform(ne),_e},Qe.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Gt.prototype.Gj.call(this)},Qe.v=function(a){if(!Cl(this)){Gt.prototype.v.call(this,a),a=null,(this.na===Nn.Auto||this.na===Nn.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=Ja(E,!1);(E instanceof Ra||E instanceof Nn||E instanceof Eo||te!==bn)&&E.v(!0)}}}},Qe.Uj=function(){if(!Cl(this)){bs(this,!0),hh(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)){Jl(this,!0),Ol(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Qe.Wu=function(){Ol(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 _e=this.O.s;_e.length!==0&&this.na.measure(this,a,y,_e,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),Fr(E,a,he),Fr(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 Oh(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=Ja(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=bn),a){case bn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case Tn:this.v(!0),this.measure(x+se,b+ne,0,0);break;case wi:this.v(!0),this.measure(x+se,te+ne,0,0);break;case Oi: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=Oh(this);if(Qr(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=ft.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(ti(E.set(a),te.transform),te.ca(E)))return ft.free(E),!0}return ft.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 Nn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function gd(a,y){a1(a,a,y)}function a1(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 Nn&&a1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Nn){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 Nn){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=tg(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Nn){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 Nn?x=Math.max(x,h1(E)):E instanceof nr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Qe.se=function(){return!(this.type===Nn.TableRow||this.type===Nn.TableColumn)};function Qh(a){return a.type===Nn.TableRow||a.type===Nn.TableColumn}Qe.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Oa(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:ti(ft.allocAt(a.x,a.y),this.transform),se=this.diagram,he=10,_e=5;if(se!==null&&(he=se.Ql("extraTouchArea"),_e=he/2),Qr(-(_e*E),-(_e*E),b.width+he*E,b.height+he*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var Ee=E.length;if(se=ft.alloc(),_e=(he=this.isClipping&&this.na===Nn.Spot)?this.Pb():null,he&&(_e.se()?ti(se.set(a),_e.transform):se.set(a),!_e.ca(se)))return ft.free(se),te||ft.free(ne),null;for(var Ne=Oh(this);Ee--;){var Ge=E[Ee];if((Ge.visible||Ge===Ne)&&(Ge.se()?ti(se.set(a),Ge.transform):se.set(a),!he||Ge!==_e)){var Ye=null;if(Ge instanceof Nn?Ye=Ge.ic(se,y,x):Ge.pickable===!0&&Ge.ca(se)&&(Ye=Ge),Ye!==null&&(y!==null&&(Ye=y(Ye)),Ye!==null&&(x===null||x(Ye))))return ft.free(se),te||ft.free(ne),Ye}}ft.free(se)}return this.background===null&&this.areaBackground===null?(te||ft.free(ne),null):(a=Qr(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||ft.free(ne),a)}return te||ft.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:ti(ft.allocAt(a.x,a.y),this.transform);if(E=Qr(0,0,E.width,E.height,ne.x,ne.y),Qh(this)||E){if(!this.isAtomic){for(var se=this.O.s,he=se.length,_e=ft.alloc(),Ee=Oh(this);he--;){var Ne=se[he];if(Ne.visible||Ne===Ee){Ne.se()?ti(_e.set(a),Ne.transform):_e.set(a);var Ge=Ne;Ne=Ne instanceof Nn?Ne:null,(Ne!==null?Ne.ji(_e,y,x,b):Ge.ca(_e))&&Ge.pickable!==!1&&(y!==null&&(Ge=y(Ge)),Ge===null||x!==null&&!x(Ge)||b.add(Ge))}}ft.free(_e)}return te||ft.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||ft.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=ji.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&ji.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var se=Oh(this),he=this.O.s,_e=he.length;_e--;){var Ee=he[_e];if(Ee.visible||Ee===se){var Ne=Ee.actualBounds,Ge=this.naturalBounds;Ne.x>Ge.width||Ne.y>Ge.height||0>Ne.x+Ne.width||0>Ne.y+Ne.height||(Ne=Ee,Ee=Ee instanceof Nn?Ee:null,Ge=ji.alloc(),Ge.set(ne),(Ee!==null?Ee.Cf(a,y,x,b,E,Ge):Fs(Ne,a,b,Ge))&&(y!==null&&(Ne=y(Ne)),Ne===null||x!==null&&!x(Ne)||E.add(Ne)),ji.free(Ge))}}return te===void 0&&ji.free(ne),b}return te===void 0&&ji.free(ne),!1};function vv(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var se=ne.actualBounds,he=a.naturalBounds;se.x>he.width||se.y>he.height||0>se.x+se.width||0>se.y+se.height||(ne instanceof Nn&&vv(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:ti(ft.allocAt(a.x,a.y),this.transform),_e=se?y:ti(ft.allocAt(y.x,y.y),this.transform),Ee=he.Bf(_e),Ne=0<he.x&&he.x<ne.width&&0<he.y&&he.y<ne.height||ii(he.x,he.y,0,0,0,ne.height)<=Ee||ii(he.x,he.y,0,ne.height,ne.width,ne.height)<=Ee||ii(he.x,he.y,ne.width,ne.height,ne.width,0)<=Ee||ii(he.x,he.y,ne.width,0,0,0)<=Ee;if(ne=he.zd(0,0)<=Ee&&he.zd(0,ne.height)<=Ee&&he.zd(ne.width,0)<=Ee&&he.zd(ne.width,ne.height)<=Ee,se||(ft.free(he),ft.free(_e)),Ne){if(!this.isAtomic){he=ft.alloc(),_e=ft.alloc(),Ee=Oh(this);for(var Ge=this.O.s,Ye=Ge.length;Ye--;){var et=Ge[Ye];if(et.visible||et===Ee){var st=et.actualBounds,Ct=this.naturalBounds;(!se||!(st.x>Ct.width||st.y>Ct.height||0>st.x+st.width||0>st.y+st.height))&&(et.se()?(st=et.transform,ti(he.set(a),st),ti(_e.set(y),st)):(he.set(a),_e.set(y)),st=et,et=et instanceof Nn?et:null,(et!==null?et.og(he,_e,x,b,E,te):st.tx(he,_e,E))&&(x!==null&&(st=x(st)),st===null||b!==null&&!b(st)||te.add(st)))}}ft.free(he),ft.free(_e)}return E?Ne:ne}return!1};function yv(a){var y=null;return a instanceof nr&&(y=a.spot1,y===Ts&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Gr),y}function Sv(a){var y=null;return a instanceof nr&&(y=a.spot2,y===Ts&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=jo),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 Ci&&kt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&kt("Cannot make a Panel contain itself: "+this.toString()),kt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&kt("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!==Nn.Grid||y instanceof nr||kt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Nn.Graduated||y instanceof nr||y instanceof Eo||kt("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 hn),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 kt("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),Cl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Nn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||km(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Xn&&(x.Te=!0),x.Te&&x instanceof Xn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(qo,"elements",this,y,null,b,null),x.cb(ns,"elements",this,null,y,null,a)))};function xv(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),bs(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 Xn&&(b instanceof Nn?b.qm(b,function(ne,se){Gv(te,se,y)}):Gv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(qo,"elements",this,b,null,a,null))},Qe.Fb=function(a){0>a&&An(a,">= 0",Nn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ps;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(ns,"rowdefs",this,null,x,null,a)}return y[a]},Qe.oA=function(a){if(0>a&&An(a,">= 0",Nn,"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(qo,"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 Ps?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&&An(a,">= 0",Nn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ps;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(ns,"coldefs",this,null,x,null,a)}return y[a]},Qe.jA=function(a){if(0>a&&An(a,">= 0",Nn,"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(qo,"coldefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Ps?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&&Tm(y,a),this},Qe.Hy=function(a,y){return(a=this.Fb(a))&&Tm(a,new Ps(y)),this},Qe.By=function(a,y){return(a=this.Eb(a))&&Tm(a,new Ps(y)),this},Qe.nz=function(a){if(0>a||this.type!==Nn.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!==Nn.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 ft(NaN,NaN)),this.type!==Nn.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!==Nn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function f1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Ql(a){var y=a.allBindings;if(y===null)a.data!==null&&kt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Ln;else if(y._isFrozen)return;var x=new Ln;xv(a,!1),a.qm(a,function(_e,Ee){Ee.th();var Ne=Ee.localBindings;if(Ne!==null)for(Zd(Ee,!1),Ne=Ne.iterator;Ne.next();){var Ge=Ne.value;Ge.mode===bg&&Zd(Ee,!0);var Ye=Ge.sourceName;Ye!==null&&(Ye==="/"&&xv(_e,!0),Ye=LS(Ge,_e,Ee),Ye!==null&&(x.add(Ye),Ye.srcBindings===null&&(Ye.srcBindings=new Ln),Ye.srcBindings.add(Ge))),y.add(Ge)}if(Ee instanceof Nn&&Ee.type===Nn.Table){if(0<Ee.rowCount){for(_e=Ee.rowDefs,Ne=_e.length,Ge=0;Ge<Ne;Ge++)if(Ye=_e[Ge],Ye!==void 0&&Ye.be!==null)for(var et=Ye.be.iterator;et.next();){var st=et.value;st.xd=Ye,st.to=2,st.wl=Ye.index,y.add(st)}}if(0<Ee.columnCount){for(Ee=Ee.colDefs,_e=Ee.length,Ne=0;Ne<_e;Ne++)if(Ge=Ee[Ne],Ge!==void 0&&Ge.be!==null)for(Ye=Ge.be.iterator;Ye.next();)et=Ye.value,et.xd=Ge,et.to=1,et.wl=Ge.index,y.add(et)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Zd(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new Ln),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,te=E.xd,te!==null){E.xd=null;var se=E.targetProperty,he=se.indexOf(".");0<he&&te instanceof Nn&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):jn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Ps?(ne=Xi(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof Gt?(ne=Xi(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):kt("Unknown type of binding target: "+te)}y.freeze(),a instanceof Ci&&a.Zc()&&a.Va()}Qe.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Nn&&(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&&Ql(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 Nn))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 Nn&&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 Nn)||te.data!==y[ne])return!0;E++,ne++}return!1}function tg(a){if(a.type===Nn.Spot||a.type===Nn.Auto)return Math.min(a.O.length,1);if(a.type===Nn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof nr&&b.isPanelMain))break}return x}return a.type===Nn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Nn&&Qh(a))?1:0}Qe.mv=function(){for(var a=tg(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=tg(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++)Mm(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 Nn){if(ne.data!==te){var se=_v(a,ne.data),he=_v(a,te),_e=he!==se;_e||(se=bv(a,se),_e=bv(a,he)!==se),_e?(a.pc(b,!1),Mm(a,te,E,!1)):ne.data=te}}else Mm(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),Cl(a)||a.v(),a.graduatedIntervals=null,a.If()||km(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Xn&&(y.Te=!0),y.Te&&y instanceof Xn&&(y.wc=null))}}function Mm(a,y,x,b){if(!(y==null||0>x)){var E=_v(a,y);if(E=bv(a,E),E!==null){if(Ql(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&xv(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new hn),a.ge.add(y,E)),te=x+tg(a),a.Gb(te,E),b&&(E.ub=y,wv(a,te,x),E.ub=null),E.data=y}}}function wv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Nn){var E=y,te=x;b.type===Nn.TableRow?b.row=E:b.type===Nn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function _v(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=ds(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;kt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function bv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(g1||(g1=!0,jn('No item template Panel found for category "'+y+'" on '+a),jn(" Using default item template."),a=new Nn,y=new Eo,y.bind(new ms("text","",bi)),a.add(y),m1=a),b=m1)),b}function km(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Nn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Nn&&!te.isEnabled||km(a,te,x)}}}function Yu(a,y){y.name=a,du.add(a,y)}nt.Object.defineProperties(Nn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Nn.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&&An(a,">= 0",Nn,"padding"),a=new Qi(a)):(0>a.left&&An(a.left,">= 0",Nn,"padding:value.left"),0>a.right&&An(a.right,">= 0",Nn,"padding:value.right"),0>a.top&&An(a.top,">= 0",Nn,"padding:value.top"),0>a.bottom&&An(a.bottom,">= 0",Nn,"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:Os},set:function(a){typeof a=="number"&&(a=new Qi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Fl),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 eo)&&(a instanceof eo&&a.freeze(),this.T===null&&(this.T=new Fl),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 Fl),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)||kt("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 Fl),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 eo)&&(a instanceof eo&&a.freeze(),this.T===null&&(this.T=new Fl),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 Fl),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)||kt("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 Fl),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 Fl),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||kt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Zu(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()||kt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Zu(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 Ih),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),ua(this)&&(a=this.part,a!==null&&Bo(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 Ih),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),ua(this)&&(a=this.part,a!==null&&Bo(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 Ih),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 Ih),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 Ih,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 Ih,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 Ih,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 Ih,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 Fl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Fl),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Nm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Fl),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Nm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Fl),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)&&kt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Fl),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)&&kt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Fl),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 Ci&&!(this instanceof jr);Ql(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Fn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ci&&(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 Vd),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 hn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ci||a.isPanelMain)&&kt("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(););lr(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&&(lr(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 Ji&&(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&&km(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))}}}),nt.Object.defineProperties(Nn,{Position:{get:function(){return du.I("Position")}},Horizontal:{get:function(){return du.I("Horizontal")}},Vertical:{get:function(){return du.I("Vertical")}},Spot:{get:function(){return du.I("Spot")}},Auto:{get:function(){return du.I("Auto")}},Table:{get:function(){return du.I("Table")}},Viewbox:{get:function(){return du.I("Viewbox")}},TableRow:{get:function(){return du.I("TableRow")}},TableColumn:{get:function(){return du.I("TableColumn")}},Link:{get:function(){return du.I("Link")}},Grid:{get:function(){return du.I("Grid")}},Graduated:{get:function(){return du.I("Graduated")}}}),Nn.prototype.rebuildItemElements=Nn.prototype.mv,Nn.prototype.findItemPanelForData=Nn.prototype.sx,Nn.prototype.updateTargetBindings=Nn.prototype.La,Nn.prototype.copyTemplate=Nn.prototype.Uy,Nn.prototype.graduatedValueForPoint=Nn.prototype.Gz,Nn.prototype.graduatedPointForValue=Nn.prototype.Fz,Nn.prototype.findColumnForLocalX=Nn.prototype.fz,Nn.prototype.findRowForLocalY=Nn.prototype.nz,Nn.prototype.addColumnDefinition=Nn.prototype.By,Nn.prototype.addRowDefinition=Nn.prototype.Hy,Nn.prototype.addRowColumnDefinition=Nn.prototype.Gy,Nn.prototype.removeColumnDefinition=Nn.prototype.jA,Nn.prototype.getColumnDefinition=Nn.prototype.Eb,Nn.prototype.removeRowDefinition=Nn.prototype.oA,Nn.prototype.getRowDefinition=Nn.prototype.Fb,Nn.prototype.removeAt=Nn.prototype.mb,Nn.prototype.remove=Nn.prototype.remove,Nn.prototype.insertAt=Nn.prototype.Gb,Nn.prototype.elt=Nn.prototype.M,Nn.prototype.add=Nn.prototype.add,Nn.prototype.findObject=Nn.prototype.fb,Nn.prototype.findInVisualTree=Nn.prototype.Nl,Nn.prototype.walkVisualTreeFrom=Nn.prototype.qm,Nn.prototype.findMainElement=Nn.prototype.Pb;var g1=!1,m1=null,du=new hn;Nn.className="Panel",Nn.definePanelLayout=Yu,Yu("Position",new mm),Yu("Vertical",new ym),Yu("Auto",new xm),Yu("Link",new Em);function Ih(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Ih.prototype.copy=function(){var a=new Ih;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},Ih.className="GradPanelSettings";function Fl(){this.Pc=[],this.Oc=[],this.j=this.ob=Nm,this.hb=this.Hb=0,this.Qp=Os,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Fl.prototype.copy=function(a){for(var y=new Fl,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},Fl.className="TablePanelSettings";function Ps(a){Ai(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Ts,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Pv,this.hg=er,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))}Ps.prototype.copy=function(){var a=new Ps;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=Pn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Tm(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=Pn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Qe=Ps.prototype,Qe.qb=function(a){a.classType===Ps&&(this.sizing=a)},Qe.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Xi(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===Nn.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(Ro,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Am(a){if(a.sizing===Pv){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 ms(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&kt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Ln),this.be.add(E),this},nt.Object.defineProperties(Ps.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&&An(a,">= 0",Ps,"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&&An(a,">= 0",Ps,"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))&&An(a,">= 0",Ps,"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&&An(a,">= 0",Ps,"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 Qi(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&&Yd(a,"RowColumnDefinition.separatorStroke"),a instanceof eo&&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)||kt("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&&Yd(a,"RowColumnDefinition.background"),a instanceof eo&&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}}}),Ps.prototype.computeEffectiveSpacing=Ps.prototype.Wc,Ps.prototype.computeEffectiveSpacingTop=Ps.prototype.Io;var Pv=new pn(Ps,"Default",0),ng=new pn(Ps,"None",1),Nm=new pn(Ps,"ProportionalExtra",2);Ps.className="RowColumnDefinition",Ps.Default=Pv,Ps.None=ng,Ps.ProportionalExtra=Nm;function nr(a,y){Gt.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)}Xe(nr,Gt),nr.prototype.cloneProtected=function(a){Gt.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=Pn(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 md(a){a.Na===null?a.Na=new Lv:a.Na.nc&&(a.Na=a.Na.copy())}Qe=nr.prototype,Qe.th=function(){Gt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Qe.qb=function(a){a===bn||a===fi||a===br||a===er?this.geometryStretch=a:Gt.prototype.qb.call(this,a)},Qe.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Xi(this)};function jf(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],_e,Ee,Ne,Ge,Ye,et,st=0,Ct=ai(),St=2;St<E;St+=2)_e=x[St],Ee=x[St+1],Ne=_e-se,se=Ee-he,Ne===0&&(Ne=.001),Ge=se/Ne,Ye=Math.atan2(se,Ne),et=Math.sqrt(Ne*Ne+se*se),Ct.push([Ne,Ye,Ge,et]),st+=et,se=_e,he=Ee;se=x[0],he=x[1],Ne=b.measuredBounds.width,b instanceof nr&&(Ne-=b.strokeWidth),1>Ne&&(Ne=1),E=x=Ne,_e=ne/2,Ee=_e!==0,St=0,et=Ct[St],Ne=et[0],Ye=et[1],Ge=et[2],et=et[3];for(var Tt=0;.1<=st;){if(Tt===0&&(Ee?(E=x,E-=_e,st-=_e,Ee=!1):E=x,E===0&&(E=1)),E>st){Gn(Ct);return}E>et?(Tt=E-et,E=et):Tt=0;var At=Math.sqrt(E*E/(1+Ge*Ge));if(0>Ne&&(At=-At),se+=At,he+=Ge*At,a.translate(se,he),a.rotate(Ye),a.translate(-(ne/2),-(te/2)),Tt===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Ye),a.translate(-se,-he),st-=E,et-=E,Tt!==0){if(St++,St===Ct.length){Gn(Ct);return}et=Ct[St],Ne=et[0],Ye=et[1],Ge=et[2],et=et[3],E=Tt}}Gn(Ct)}}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&&os(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===Nn.Link&&se instanceof jr&&se.category==="Selection"&&se.adornedObject instanceof nr&&se.adornedPart.Pb()===se.adornedObject?se.adornedObject.strokeWidth:0),he===0&&(x=null),x!==null&&he!==0&&(os(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===Rn.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===Rn.u){var _e=E.startX;he=E.startY;var Ee=E.endX,Ne=E.endY;E=Math.min(_e,Ee);var Ge=Math.min(he,Ne);_e=Math.abs(Ee-_e),he=Math.abs(Ne-he),a.beginPath(),a.rect(E,Ge,_e,he),b!==null&&a.ng(b),x!==null&&(se&&te&&ch(a),a.jk(),se&&te&&Ah(a)),a.Se()}else if(E.type===Rn.F)_e=E.startX,he=E.startY,Ee=E.endX,Ne=E.endY,E=Math.abs(Ee-_e)/2,Ge=Math.abs(Ne-he)/2,_e=Math.min(_e,Ee)+E,he=Math.min(he,Ne)+Ge,a.beginPath(),a.moveTo(_e,he-Ge),a.bezierCurveTo(_e+Wt.wg*E,he-Ge,_e+E,he-Wt.wg*Ge,_e+E,he),a.bezierCurveTo(_e+E,he+Wt.wg*Ge,_e+Wt.wg*E,he+Ge,_e,he+Ge),a.bezierCurveTo(_e-Wt.wg*E,he+Ge,_e-E,he+Wt.wg*Ge,_e-E,he),a.bezierCurveTo(_e-E,he-Wt.wg*Ge,_e-Wt.wg*E,he-Ge,_e,he-Ge),a.closePath(),b!==null&&a.ng(b),x!==null&&(se&&te&&ch(a),a.jk(),se&&te&&Ah(a)),a.Se();else if(E.type===Rn.o)for(E=E.figures,he=E.length,Ge=0;Ge<he;Ge++){_e=E.s[Ge],a.beginPath(),a.moveTo(_e.startX,_e.startY),Ee=_e.segments.s,Ne=Ee.length;for(var Ye=null,et=0;et<Ne;et++){var st=Ee[et];switch(st.type){case gs:a.moveTo(st.endX,st.endY);break;case $r:a.lineTo(st.endX,st.endY);break;case ws:a.bezierCurveTo(st.point1X,st.point1Y,st.point2X,st.point2Y,st.endX,st.endY);break;case Ta:a.quadraticCurveTo(st.point1X,st.point1Y,st.endX,st.endY);break;case Jo:if(st.radiusX===st.radiusY){var Ct=Math.PI/180;a.arc(st.point1X,st.point1Y,st.radiusX,st.startAngle*Ct,(st.startAngle+st.sweepAngle)*Ct,0>st.sweepAngle,Ye!==null?Ye.endX:_e.startX,Ye!==null?Ye.endY:_e.startY)}else if(Ye=va(st,_e),Ct=Ye.length,Ct===0)a.lineTo(st.centerX,st.centerY);else for(var St=0;St<Ct;St++){var Tt=Ye[St];St===0&&a.lineTo(Tt[0],Tt[1]),a.bezierCurveTo(Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7])}break;case Va:if(St=Ct=0,Ye!==null&&Ye.type===Jo){if(Ye=va(Ye,_e),Tt=Ye.length,Tt===0){a.lineTo(st.endX,st.endY);break}Ye=Ye[Tt-1]||null,Ye!==null&&(Ct=Ye[6],St=Ye[7])}else Ct=Ye!==null?Ye.endX:_e.startX,St=Ye!==null?Ye.endY:_e.startY;if(Ye=Is(st,_e,Ct,St),Ct=Ye.length,Ct===0){a.lineTo(st.endX,st.endY);break}for(St=0;St<Ct;St++)Tt=Ye[St],a.bezierCurveTo(Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7]);break;default:kt("Segment not of valid type: "+st.type)}st.isClosed&&a.closePath(),Ye=st}Ee=_e.isFilled,te?_e.isShadowed?(Ee===!0&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&(Ee&&se&&ch(a),a.jk(),Ee&&se&&Ah(a))):(ch(a),Ee&&b!=="transparent"&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk(),Ah(a)):(Ee&&b!==null&&a.ng(b,_e.isEvenOdd),x!==null&&a.jk()),a.Se(Ge)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),te=this.geometry,a.save(),a.beginPath(),b=ai(),te.type===Rn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),jf(a,y,b,x);else if(te.type===Rn.o)for(te=te.figures.iterator;te.next();){for(se=te.value,b.length=0,b.push(se.startX),b.push(se.startY),ne=se.startX,E=se.startY,he=ne,Ge=E,_e=se.segments.s,Ee=_e.length,Ne=0;Ne<Ee;Ne++){switch(et=_e[Ne],et.type){case gs:jf(a,y,b,x),b.length=0,b.push(et.endX),b.push(et.endY),ne=et.endX,E=et.endY,he=ne,Ge=E;break;case $r:b.push(et.endX),b.push(et.endY),ne=et.endX,E=et.endY;break;case ws:Wt.Qe(ne,E,et.point1X,et.point1Y,et.point2X,et.point2Y,et.endX,et.endY,.5,b),ne=et.endX,E=et.endY;break;case Ta:Wt.ep(ne,E,et.point1X,et.point1Y,et.endX,et.endY,.5,b),ne=et.endX,E=et.endY;break;case Jo:if(st=va(et,se),Ye=st.length,Ye===0){b.push(et.centerX),b.push(et.centerY),ne=et.centerX,E=et.centerY;break}for(Ct=0;Ct<Ye;Ct++)St=st[Ct],Wt.Qe(ne,E,St[2],St[3],St[4],St[5],St[6],St[7],.5,b),ne=St[6],E=St[7];break;case Va:if(st=Is(et,se,ne,E),Ye=st.length,Ye===0){b.push(et.endX),b.push(et.endY),ne=et.endX,E=et.endY;break}for(Ct=0;Ct<Ye;Ct++)St=st[Ct],Wt.Qe(ne,E,St[2],St[3],St[4],St[5],St[6],St[7],.5,b),ne=St[6],E=St[7];break;default:kt("Segment not of valid type: "+et.type)}et.isClosed&&(b.push(he),b.push(Ge),jf(a,y,b,x))}jf(a,y,b,x)}else if(te.type===Rn.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),jf(a,y,b,x);else if(te.type===Rn.F){if(E=new ps,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Rr(Jo),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=va(ne,E),se=te.length,se===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,he=0;he<se;he++)Ge=te[he],Wt.Qe(ne,E,Ge[2],Ge[3],Ge[4],Ge[5],Ge[6],Ge[7],.5,b),ne=Ge[6],E=Ge[7];jf(a,y,b,x)}Gn(b),a.restore(),a.Vc(!1)}}}},Qe.kk=function(a,y,x){return!Gt.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:Gt.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 ft),a instanceof zn){a.Mc()&&kt("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 nn);var y=this.naturalBounds,x=this.oe;y=nn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=ft.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),Br(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Br(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Br(a,b.x,b.y,0,0),nn.free(y),ft.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!==Rn.j||y||(E+=2);var te=nn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return nn.free(te),!1;if(b=E+1e-4,x.type===Rn.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:(nn.free(te),Wt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Rn.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 nn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),nn.free(te),a}if(x.type===Rn.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 nn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),nn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Rn.o)return nn.free(te),this.fill===null?su(x,a.x,a.y,E):Hs(x,a,E,1<this.strokeWidth,y);kt("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=Ev[se];if(he===void 0){var _e=Wt.Ze[se];typeof _e=="string"&&(_e=Wt.Ze[_e]),typeof _e=="function"?(he=_e(null,100,100),Ev[se]=he):kt("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,_e=ne.width;var Ee=ne.height;switch(Ja(this,!0)){case bn:b=x=0;break;case Tn:_e=Math.max(a-te,0),Ee=Math.max(y-te,0);break;case wi:_e=Math.max(a-te,0),b=0;break;case Oi:x=0,Ee=Math.max(y-te,0)}isFinite(E.width)&&(_e=E.width),isFinite(E.height)&&(Ee=E.height);var Ne=this.maxSize,Ge=this.minSize;switch(x=Math.max(x-te,Ge.width),b=Math.max(b-te,Ge.height),_e=Math.min(Ne.width,_e),Ee=Math.min(Ne.height,Ee),_e=isFinite(_e)?Math.max(x,_e):Math.max(se,x),Ee=isFinite(Ee)?Math.max(b,Ee):Math.max(he,b),x=Cv(this),x){case bn:break;case Tn:se=_e,he=Ee;break;case fi:x=Math.min(_e/se,Ee/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:kt(x+" is not a valid geometryStretch.")}this.Rd!==null?(se===0&&(se=.001),he===0&&(he=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=se/ne.width,ne=he/ne.height,isFinite(b)||(b=1),isFinite(ne)||(ne=1),this.ua=b===1&&ne===1?x:x.copy().scale(b,ne)):this.ua!==null&&Wt.$(this.ua.Sk,a-te)&&Wt.$(this.ua.Rk,y-te)||(this.ua=nr.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),_e+te,Ee+te),E.w()?(_e=E.width,Ee=E.height,_e=Math.min(Ne.width,_e),Ee=Math.min(Ne.height,Ee),_e=Math.max(Ge.width,_e),Ee=Math.max(Ge.height,Ee),this.dc.h(0,0,_e,Ee)):this.dc.assign(ne)};function Cv(a){var y=a.geometryStretch;return a.Rd!==null?y===er?Tn:y:y===er?Ev[a.figure].defaultStretch:y}Qe.eh=function(a,y,x,b){Ea(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,_e=-te.m21*ne,Ee=te.m11*ne,Ne=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);te=a*se+y*_e+Ne,ne=a*he+y*Ee+Ge,se=x*se+b*_e+Ne,he=x*he+b*Ee+Ge,Ne=this.ig/2,_e=this.ua,_e===null&&(this.measure(1/0,1/0),_e=this.ua);var Ye=_e.bounds;if(Ee=!1,_e.type===Rn.j)if(1.5>=this.strokeWidth)Ee=Wt.Ve(_e.startX,_e.startY,_e.endX,_e.endY,te,ne,se,he,E);else{if(_e.startX===_e.endX?(b=Ne,Ee=0):(y=(_e.endY-_e.startY)/(_e.endX-_e.startX),Ee=Ne/Math.sqrt(1+y*y),b=Ee*y),y=ai(),a=new ft,Wt.Ve(_e.startX+b,_e.startY+Ee,_e.endX+b,_e.endY+Ee,te,ne,se,he,a)&&y.push(a),a=new ft,Wt.Ve(_e.startX-b,_e.startY-Ee,_e.endX-b,_e.endY-Ee,te,ne,se,he,a)&&y.push(a),a=new ft,Wt.Ve(_e.startX+b,_e.startY+Ee,_e.startX-b,_e.startY-Ee,te,ne,se,he,a)&&y.push(a),a=new ft,Wt.Ve(_e.endX+b,_e.endY+Ee,_e.endX-b,_e.endY-Ee,te,ne,se,he,a)&&y.push(a),se=y.length,se===0)return Gn(y),!1;for(Ee=!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);Gn(y)}else if(_e.type===Rn.u)Ee=Wt.Ff(Ye.x-Ne,Ye.y-Ne,Ye.x+Ye.width+Ne,Ye.y+Ye.height+Ne,te,ne,se,he,E);else if(_e.type===Rn.F){y=nn.allocAt(Ye.x,Ye.y,Ye.width,Ye.height).Bc(Ne,Ne);e:if(y.width===0)Ee=Wt.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)Ee=Wt.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,se,he,E);else{if(a=y.width/2,_e=y.height/2,b=y.x+a,Ee=y.y+_e,x=9999,te!==se&&(x=(ne-he)/(te-se)),9999>Math.abs(x)){if(he=ne-Ee-x*(te-b),0>a*a*x*x+_e*_e-he*he){E.x=NaN,E.y=NaN,Ee=!1;break e}Ne=Math.sqrt(a*a*x*x+_e*_e-he*he),se=(-(a*a*x*he)+a*_e*Ne)/(_e*_e+a*a*x*x)+b,a=(-(a*a*x*he)-a*_e*Ne)/(_e*_e+a*a*x*x)+b,_e=x*(se-b)+he+Ee,he=x*(a-b)+he+Ee,Math.abs((te-se)*(te-se))+Math.abs((ne-_e)*(ne-_e))<Math.abs((te-a)*(te-a))+Math.abs((ne-he)*(ne-he))?(E.x=se,E.y=_e):(E.x=a,E.y=he)}else{if(se=_e*_e,he=te-b,se-=se/(a*a)*he*he,0>se){E.x=NaN,E.y=NaN,Ee=!1;break e}he=Math.sqrt(se),se=Ee+he,he=Ee-he,Math.abs(se-ne)<Math.abs(he-ne)?(E.x=te,E.y=se):(E.x=te,E.y=he)}Ee=!0}nn.free(y)}else if(_e.type===Rn.o){Ge=ft.alloc();var et=se-te,st=he-ne,Ct=et*et+st*st,St=te,Tt=ne;if(0<Ct&&Ye.contains(St,Tt)&&(Ge.x=St,Ge.y=Tt,this.ca(Ge)))for(et!==0&&.5>Math.abs(et)?(st*=.5/et,et=.5):st!==0&&.5>Math.abs(st)&&(et*=.5/st,st=.5),St-=et,Tt-=st;Ye.contains(St,Tt);)St-=et,Tt-=st;for(E.x=se,E.y=he,st=0;st<_e.figures.count;st++){var At=_e.figures.s[st],It=At.isFilled?St:te,Ht=At.isFilled?Tt:ne,$t=At.segments;Ye=At.startX,et=At.startY;for(var Kn=Ye,ci=et,si=0;si<$t.count;si++){var In=$t.s[si],wn=In.type,Yi=In.endX,Bi=In.endY,Wr=!1;switch(wn){case gs:Kn=Yi,ci=Bi;break;case $r:Wr=Om(Ye,et,Yi,Bi,It,Ht,se,he,Ge);break;case ws:Wr=Wt.Eo(Ye,et,In.point1X,In.point1Y,In.point2X,In.point2Y,Yi,Bi,It,Ht,se,he,.6,Ge);break;case Ta:Wr=Wt.Eo(Ye,et,Ye+2/3*(In.point1X-Ye),et+2/3*(In.point1Y-et),Yi+2/3*(In.point1X-Yi),Bi+2/3*(In.point1Y-Bi),Yi,Bi,It,Ht,se,he,.6,Ge);break;case Jo:case Va:wn=In.type===Jo?va(In,At):Is(In,At,Ye,et);var wo=wn.length;if(wo===0){Wr=Om(Ye,et,In.type===Jo?In.centerX:In.endX,In.type===Jo?In.centerY:In.endY,It,Ht,se,he,Ge);break}for(Bi=null,Yi=0;Yi<wo;Yi++){if(Bi=wn[Yi],Yi===0&&Om(Ye,et,Bi[0],Bi[1],It,Ht,se,he,Ge)){var Bs=Dm(It,Ht,Ge,Ct,E);Bs<Ct&&(Ct=Bs,Ee=!0)}Wt.Eo(Bi[0],Bi[1],Bi[2],Bi[3],Bi[4],Bi[5],Bi[6],Bi[7],It,Ht,se,he,.6,Ge)&&(Bs=Dm(It,Ht,Ge,Ct,E),Bs<Ct&&(Ct=Bs,Ee=!0))}Yi=Bi[6],Bi=Bi[7];break;default:kt("Unknown Segment type: "+wn)}Ye=Yi,et=Bi,Wr&&(Wr=Dm(It,Ht,Ge,Ct,E),Wr<Ct&&(Ct=Wr,Ee=!0)),In.isClosed&&(Yi=Kn,Bi=ci,Om(Ye,et,Yi,Bi,It,Ht,se,he,Ge)&&(In=Dm(It,Ht,Ge,Ct,E),In<Ct&&(Ct=In,Ee=!0)))}}te=x-a,ne=b-y,se=Math.sqrt(te*te+ne*ne),se!==0&&(te/=se,ne/=se),E.x-=te*Ne,E.y-=ne*Ne,ft.free(Ge)}else kt("Unknown Geometry type: "+_e.type);return Ee?(this.transform.Ga(E),!0):!1};function Dm(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 Om(a,y,x,b,E,te,ne,se,he){if(Wt.$(a,x)&&Wt.$(y,b)||Wt.$(E,ne)&&Wt.$(te,se))return!1;var _e=!1,Ee=(E-ne)*(y-b)-(te-se)*(a-x);return Ee===0?!1:(he.x=((E*se-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/Ee,he.y=((E*se-te*ne)*(y-b)-(te-se)*(a*b-y*x))/Ee,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(he.y>a||Wt.$(he.y,a))&&(he.y<y||Wt.$(he.y,y))&&(_e=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||Wt.$(he.x,y))&&(he.x<a||Wt.$(he.x,a))&&(_e=!0)),_e)}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=ft.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)))),ft.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=ji.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=ft.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 ft.free(ne),!0;var se=ft.alloc(),he=ft.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,vd(this,ne,se,he)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),vd(this,ne,se,he)?y=!0:(se.x=b,se.y=a,se.transform(x),vd(this,ne,se,he)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),vd(this,ne,se,he)&&(y=!0)))),ft.free(ne),ji.free(x),ft.free(se),ft.free(he),y};function vd(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(Ct,St){for(var Tt=Ct.length,At=0;At<Tt;At+=2)if(St.zd(Ct[At],Ct[At+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,_e=ne.x+ne.width;if(ne=ne.y+ne.height,Fi(a.x,a.y,se,he)<=E&&Fi(a.x,a.y,_e,he)<=E&&Fi(a.x,a.y,se,ne)<=E&&Fi(a.x,a.y,_e,ne)<=E)return!0}if(se=y.startX,he=y.startY,_e=y.endX,ne=y.endY,y.type===Rn.j){if(x=(se-_e)*(a.x-_e)+(he-ne)*(a.y-ne),ii(a.x,a.y,se,he,_e,ne)<=(0<=(_e-se)*(a.x-se)+(ne-he)*(a.y-he)&&0<=x?E:te))return!0}else{if(y.type===Rn.u)return y=!1,x&&(y=ii(a.x,a.y,se,he,se,ne)<=E||ii(a.x,a.y,se,he,_e,he)<=E||ii(a.x,a.y,_e,he,_e,ne)<=E||ii(a.x,a.y,se,ne,_e,ne)<=E),y;if(y.type===Rn.F){y=a.x-(se+_e)/2,te=a.y-(he+ne)/2;var Ee=Math.abs(_e-se)/2,Ne=Math.abs(ne-he)/2;if(Ee===0||Ne===0)return ii(a.x,a.y,se,he,_e,ne)<=E;if(x){if(a=Wt.$y(Ee,Ne,y,te),a*a<=E)return!0}else return!(Fi(y,te,-Ee,0)>=E||Fi(y,te,0,-Ne)>=E||Fi(y,te,0,Ne)>=E||Fi(y,te,Ee,0)>=E)}else if(y.type===Rn.o){if(_e=y.bounds,te=_e.x,se=_e.y,he=_e.x+_e.width,_e=_e.y+_e.height,a.x>he&&a.x<te&&a.y>_e&&a.y<se&&ii(a.x,a.y,te,se,te,_e)>E&&ii(a.x,a.y,te,se,he,se)>E&&ii(a.x,a.y,he,_e,te,_e)>E&&ii(a.x,a.y,he,_e,he,se)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?su(y,a.x,a.y,te):Hs(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,Ee=te.startY,a.zd(ne,Ee)>E)return!1;for(se=te.segments.s,he=se.length,_e=0;_e<he;_e++)switch(Ne=se[_e],Ne.type){case gs:case $r:if(ne=Ne.endX,Ee=Ne.endY,a.zd(ne,Ee)>E)return!1;break;case ws:var Ge=ai();if(Wt.Qe(ne,Ee,Ne.point1X,Ne.point1Y,Ne.point2X,Ne.point2Y,Ne.endX,Ne.endY,.8,Ge),ne=b(Ge,a),Gn(Ge),ne||(ne=Ne.endX,Ee=Ne.endY,a.zd(ne,Ee)>E))return!1;break;case Ta:if(Ge=ai(),Wt.ep(ne,Ee,Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY,.8,Ge),ne=b(Ge,a),Gn(Ge),ne||(ne=Ne.endX,Ee=Ne.endY,a.zd(ne,Ee)>E))return!1;break;case Jo:case Va:Ge=Ne.type===Jo?va(Ne,te):Is(Ne,te,ne,Ee);var Ye=Ge.length;if(Ye===0){if(ne=Ne.type===Jo?Ne.centerX:Ne.endX,Ee=Ne.type===Jo?Ne.centerY:Ne.endY,a.zd(ne,Ee)>E)return!1;break}Ne=null;for(var et=ai(),st=0;st<Ye;st++)if(Ne=Ge[st],et.length=0,Wt.Qe(Ne[0],Ne[1],Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7],.8,et),b(et,a))return Gn(et),!1;Gn(et),Ne!==null&&(ne=Ne[6],Ee=Ne[7]);break;default:kt("Unknown Segment type: "+Ne.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=cg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=As):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new zn(1-As.x,As.y)))}nr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=fh[a.toArrow];else a.fromArrow!=="None"?b=fh[a.fromArrow]:(b=Wt.Ze[a.figure],typeof b=="string"&&(b=Wt.Ze[b]),b===void 0&&kt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Wt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=fh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=fh[x],y===void 0){var b=null,E;for(E in Wt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Rn.parse(Wt.um[b],!1),fh[b]=a,x!==b&&(fh[x]=b),b}}return typeof y=="string"?y:y instanceof Rn?a:null}nt.Object.defineProperties(nr.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),ua(this)&&(a=this.part,a!==null&&Bo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Rn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=ft.allocAt(-y.x,-y.y),ft.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&&Yd(a,"Shape.fill"),a instanceof eo&&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&&Yd(a,"Shape.stroke"),a instanceof eo&&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 An(a,"value >= 0",nr,"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"?An(a,'"butt", "round", or "square"',nr,"strokeCap"):(md(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"?An(a,'"miter", "bevel", or "round"',nr,"strokeJoin"):(md(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){md(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)||kt("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&&(md(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=Wt.Ze[a];typeof x=="function"?x=a:(x=Wt.Ze[a.toLowerCase()])||kt("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?kt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Ac),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?kt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Ac),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:Ts},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),md(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Ts},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),md(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&&(md(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:er},set:function(a){var y=this.geometryStretch;y!==a&&(md(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 ph),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Zu(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 ph),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 ph),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 ph),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),nr.prototype.intersectsRect=nr.prototype.Yc,nr.prototype.containedInRect=nr.prototype.fh,nr.prototype.getNearestIntersectionPoint=nr.prototype.rs,nr.prototype.getDocumentBounds=nr.prototype.mi,nr.prototype.getDocumentPoint=nr.prototype.ga;var fh=new Mi,Ev=new Mi;nr.className="Shape",nr.getFigureGenerators=function(){var a=new hn,y;for(y in Wt.Ze)y!==y.toLowerCase()&&a.add(y,Wt.Ze[y]);return a.freeze(),a},nr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Wt.Ze;b[a]=y,b[x]=a},nr.getArrowheadGeometries=function(){var a=new hn;for(b in Wt.um)if(fh[b]===void 0){var y=Rn.parse(Wt.um[b],!1);fh[b]=y,y=b.toLowerCase(),y!==b&&(fh[y]=b)}for(var x in fh)if(x!==x.toLowerCase()){var b=fh[x];b instanceof Rn&&a.add(x,b)}return a.freeze(),a},nr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Rn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||kt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=fh;b[a]=x,b[y]=a};function Lv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=er,this.gg=this.fg=Ts}Lv.prototype.copy=function(){var a=new Lv;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 Eo(a,y){return Gt.call(this),jm||(qa=is?new ql(null).context:null,jm=!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}Xe(Eo,Gt),Eo.prototype.cloneProtected=function(a){Gt.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 Xu(a){a.da===null?a.da=new Ov:a.da.nc&&(a.da=a.da.copy())}Qe=Eo.prototype,Qe.th=function(){Gt.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===Eo?this.wrap=a:Gt.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(){Gt.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=rg(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 _e=this.isStrikethrough;os(this,a,this.xc,!0,!1,x,b),(he||_e)&&os(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var Ee=this.oe,Ne=Ee.dx-(ne*Ee.m21+Ee.dx);Ee=Ee.dy-(ne*Ee.m22+Ee.dy);var Ge=y.scale;switch(8>(Ne*Ne+Ee*Ee)*Ge*Ge&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof fl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Ne=this.spacingBelow,this.flip){case Ir:a.translate(E,0),a.scale(-1,1);break;case hr:a.translate(0,te),a.scale(1,-1);break;case ao:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),Ee=this.Gc,Ge=(y+ne+Ne)*Ee,te>Ge&&(b=this.verticalAlignment,b=b.y*te-b.y*Ge+b.offsetY),Ee===1&&this.ze!==null)Ne=this.Cb,Ne>E&&(Ne=E),this.Oj(this.ze,a,0,b+y,E,ne,Ne,x,se,he,_e);else if(this.Qc!==null&&this.Qb!==null)for(Ge=0;Ge<Ee;Ge++){var Ye=this.Qc[Ge];Ye>E&&(Ye=E),b+=y,this.Oj(this.Qb[Ge],a,0,b,E,ne,Ye,x,se,he,_e),b+=ne+Ne}switch(this.flip){case Ir:a.scale(-1,1),a.translate(-E,0);break;case hr:a.scale(1,-1),a.translate(0,-te);break;case ao:a.scale(-1,-1),a.translate(-E,-te)}}},Qe.Oj=function(a,y,x,b,E,te,ne,se,he,_e,Ee){var Ne=0;if(se)he==="left"?Ne=0:he==="right"?Ne=E-ne:he==="center"&&(Ne=(E-ne)/2),y.fillRect(x+Ne,b+.25*te,ne,1);else{if(he==="left"?Ne=0:he==="right"?Ne=E:he==="center"&&(Ne=E/2),E=Im!==null?Im(this,te):.75*te,y.fillText(a,x+Ne,b+E),a=te/20|0,a===0&&(a=1),he==="right"?Ne-=ne:he==="center"&&(Ne-=ne/2),_e){se=Rm!==null?Rm(this,te):.8*te,he=x+Ne,_e=b+se,E=x+Ne+ne,se=b+se;var Ge=a;y.beginPath(),y.lineWidth=Ge,y.moveTo(he,_e),y.lineTo(E,se),y.stroke(),y.Se(),y instanceof fl&&y.ad.classList.add("gojs-td")}Ee&&(Ee=b+te-te/2.2|0,a%2!==0&&(Ee+=.5),b=x+Ne,te=Ee,x=x+Ne+ne,ne=Ee,Ne=a,y.beginPath(),y.lineWidth=Ne,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof fl&&y.ad.classList.add("gojs-td"))}},Qe.kk=function(a,y,x){if(!Gt.prototype.kk.call(this,a,y,x))return!1;if(os(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:Gt.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;qa!==null&&E1!==te&&(E1=qa.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 _e=te.indexOf(`
|
|
|
`,se);_e===-1&&(_e=te.length,he=!0),se=te.substr(se,_e-se),this.formatting===og&&(se=se.trim()),ne=Math.max(ne,fu(se)),se=_e+1}te=ne}else ne=te.indexOf(`
|
|
|
`,0),0<=ne&&(te=te.substr(0,ne)),te=fu(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===Fm&&(y=this.Ae,y=this.overflow===Fm?x1(y):0,_e=this.spacingAbove+this.spacingBelow,_e=Math.max(0,rg(this)+_e),he=Math.min(this.maxLines-1,Math.max(Math.floor(he/_e+.01)-1,0)),!(he+1>=this.Qb.length))){for(this.l|=16777216,_e=this.Qb[he],y=Math.max(1,a-y);fu(_e)>y&&1<_e.length;)_e=_e.substr(0,_e.length-1);_e+=sg,y=fu(_e),this.Qb[he]=_e,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===_1||isNaN(this.desiredSize.width))&&(te=isNaN(a)?this.Cb:Math.min(a,this.Cb)),te=Math.max(x,te),ne=Math.max(b,ne),Fr(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){Ea(this,a,y,x,b)};function ig(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Mv(a,y,x,b){var E=a.formatting===og;E&&(y=y.trim());var te=0,ne=a.Ae,se=a.spacingAbove+a.spacingBelow;se=Math.max(0,rg(a)+se);var he=a.overflow===Fm?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,se);else if(ne=y,a.wrap===kv){a.Le=1;var _e=fu(y);if(he===0||_e<=x)a.Cb=Math.max(a.Cb,_e),ig(a,y,a.Cb),b!==null&&b.h(_e,se);else{for(te=zf(a,ne),ne=ne.substr(te.length),y=zf(a,ne),_e=fu(te+y);0<y.length&&_e<=x;)te+=y,ne=ne.substr(y.length),y=zf(a,ne),_e=te+y,E&&(_e=_e.trim()),_e=fu(_e);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-he);fu(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=sg;var Ee=fu(te);a.Cb=Ee,ig(a,te,Ee),b!==null&&b.h(Ee,se)}}else{for(he=0,ne.length===0&&(he=1,ig(a,ne,0));0<ne.length;){for(y=zf(a,ne),ne=ne.substr(y.length);fu(y)>x;){var Ne=1;for(_e=fu(y.substr(0,Ne)),Ee=0;_e<=x;)Ne++,Ee=_e,_e=fu(y.substr(0,Ne));if(Ne===1){var Ge=_e;te=Math.max(te,_e)}else Ge=Ee,te=Math.max(te,Ee);if(Ne--,1>Ne&&(Ne=1),ig(a,y.substr(0,Ne),Ge),he++,y=y.substr(Ne),a.Gc+he>a.maxLines)break}for(Ee=zf(a,ne),_e=fu(y+Ee);0<Ee.length&&_e<=x;)y+=Ee,ne=ne.substr(Ee.length),Ee=zf(a,ne),_e=y+Ee,E&&(_e=_e.trim()),_e=fu(_e);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),Ee.length===0?(Ne=_e,te=Math.max(te,_e)):(Ne=Ee=fu(y),te=Math.max(te,Ee)),ig(a,y,Ne),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 zf(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===P1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function fu(a){return qa===null?8*a.length:qa.measureText(a).width}function rg(a){if(a.df!==null)return a.df;var y=a.Ae;if(qa===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>C1?x=Nv[y]:(x=1.3*qa.measureText("M").width,Nv[y]=x,C1++),a.df=x}function x1(a){if(qa===null)return 6;if(Bm[a]!==void 0&&5e3>Dv)var y=Bm[a];else y=qa.measureText(sg).width,Bm[a]=y,Dv++;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,rg(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!==kv){a.Le=0;var he=Cn.alloc();Mv(a,te,y,he),E+=he.height,Cn.free(he),a.Gc+=a.Le}else Mv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(se=!0)}te=ne+1}return a.Lq=E}nt.Object.defineProperties(Eo.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"||(Xu(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:bn},set:function(a){var y=this.flip;y!==a&&(Xu(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:_u},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Xu(this),this.da.Yr=a,Da(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Cn.alloc();Mv(this,this.ec,999999,a);var y=a.width;Cn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Fr(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:Tv},set:function(a){var y=this.wrap;y!==a&&(Xu(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Av},set:function(a){var y=this.overflow;y!==a&&(Xu(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&&Yd(a,"TextBlock.stroke"),a instanceof eo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return rg(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&&(Xu(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&&(Xu(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 ph),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 ph),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 ph),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 ph),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 ph),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&&(Xu(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&&(Xu(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&&(Xu(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&&(Xu(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:og},set:function(a){var y=this.formatting;y!==a&&(Xu(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&&An(a,"> 0",Eo,"maxLines"),Xu(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var Im=null,Rm=null,kv=new pn(Eo,"None",0),_1=new pn(Eo,"WrapFit",1),Tv=new pn(Eo,"WrapDesiredSize",2),b1=new pn(Eo,"WrapBreakAll",3),Av=new pn(Eo,"OverflowClip",0),Fm=new pn(Eo,"OverflowEllipsis",1),og=new pn(Eo,"FormatTrim",0),P1=new pn(Eo,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new Mi,C1=0,Bm=new Mi,Dv=0,sg="...",E1="",qa=null,jm=!1;Eo.className="TextBlock";function Ov(){this.nc=!1,this.Hd=null,this.Xf=bn,this.gq=og,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=_u,this.$r=Tv}Ov.prototype.copy=function(){var a=new Ov;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},Eo.getEllipsis=function(){return sg},Eo.setEllipsis=function(a){sg=a,Bm=new Mi,Dv=0},Eo.getBaseline=function(){return Im},Eo.setBaseline=function(a){Im=a},Eo.getUnderline=function(){return Rm},Eo.setUnderline=function(a){Rm=a},Eo.isValidFont=function(a){if(jm||(qa=is?new ql(null).context:null,jm=!0),qa===null)return!0;var y=qa.font;if(a===y||a==="10px sans-serif")return!0;qa.font="10px sans-serif",qa.font=a;var x=qa.font;if(x!=="10px sans-serif")return qa.font=y,!0;qa.font="19px serif";var b=qa.font;return qa.font=a,x=qa.font,qa.font=y,x!==b},Eo.FormatNone=P1,Eo.FormatTrim=og,Eo.None=kv,Eo.OverflowClip=Av,Eo.OverflowEllipsis=Fm,Eo.WrapBreakAll=b1,Eo.WrapDesiredSize=Tv,Eo.WrapFit=_1;function ph(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}ph.prototype.copy=function(){var a=new ph;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},ph.className="GradElementSettings";function Qa(a,y){Gt.call(this),this.Eg=null,this.qo="",this.Xg=ha,this.Nk=Tn,this.Zg=this.Hd=null,this.Mk=_r,this.Xf=bn,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 Uf;Xe(Qa,Gt),Qa.prototype.cloneProtected=function(a){Gt.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},Qa.prototype.qb=function(a){a===bn||a===fi||a===br?this.imageStretch=a:Gt.prototype.qb.call(this,a)},Qa.prototype.toString=function(){return"Picture("+this.source+")#"+Xi(this)};function Hf(a){a===void 0&&(a=""),a!==""?Uf[a]&&(delete Uf[a],zm--):(Uf=new Mi,zm=0)}function L1(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()||(bs(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=ai();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);Gn(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Qa.prototype.hA=function(){if(this.source!==""){Hf(this.source);var a=this.source;this.source="",this.source=a}},Qa.prototype.redraw=function(){this.N(),this.Uc=!0},Qa.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 pd)){var E=a instanceof fl;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 _e=he,Ee=se;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,he=this.Xg.width,se=this.Xg.height);var Ne=he,Ge=se,Ye=this.Nk,et=this.Mk;switch(Ye){case bn:if(this.sourceRect.w())break;Ne>=b.width&&(te=te+et.offsetX+(Ne*et.x-b.width*et.x)),Ge>=b.height&&(ne=ne+et.offsetY+(Ge*et.y-b.height*et.y)),he=Math.min(b.width,Ne),se=Math.min(b.height,Ge);break;case Tn:Ne=b.width,Ge=b.height;break;case fi:case br:Ye===fi?(Ye=Math.min(b.height/Ge,b.width/Ne),Ne*=Ye,Ge*=Ye):Ye===br&&(Ye=Math.max(b.height/Ge,b.width/Ne),Ne*=Ye,Ge*=Ye,Ne>=b.width&&(te=(te+et.offsetX+(Ne*et.x-b.width*et.x)/Ne)*he),Ge>=b.height&&(ne=(ne+et.offsetY+(Ge*et.y-b.height*et.y)/Ge)*se),he*=1/(Ne/b.width),se*=1/(Ge/b.height),Ne=b.width,Ge=b.height)}Ye=this.Df()*y.scale;var st=Ne*Ye*Ge*Ye,Ct=he*se/st,St=x.__goCache;Ye=null;var Tt=wx;if(!E){if(x.sq&&St!==void 0&&4<st&&Ct>Tt*Tt)for(St.gi===null&&(k1(St,4,_e,Ee,x),k1(St,16,_e,Ee,x)),E=St.gi,_e=E.length,Ee=0;Ee<_e&&E[Ee].ratio*E[Ee].ratio<Ct;Ee++)Ye=E[Ee];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new ql(null).context;try{E.drawImage(this.Eg,0,0)}catch(At){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(At){this.vl=!0}}if(this.vl)return}}switch(E=Ne<b.width?et.offsetX+(b.width*et.x-Ne*et.x):0,et=Ge<b.height?et.offsetY+(b.height*et.y-Ge*et.y):0,this.flip){case Ir:a.translate(Math.min(b.width,Ne),0),a.scale(-1,1);break;case hr:a.translate(0,Math.min(b.height,Ge)),a.scale(1,-1);break;case ao:a.translate(Math.min(b.width,Ne),Math.min(b.height,Ge)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&St!==void 0&&Ye!==null&&Ye.ratio!==1){a.save(),y=Ye.ratio;try{a.drawImage(Ye.source,te/y,ne/y,Math.min(Ye.source.width,he/y),Math.min(Ye.source.height,se/y),E,et,Math.min(b.width,Ne),Math.min(b.height,Ge)),a instanceof fl&&(this.bt=[te/y,ne/y,Math.min(Ye.source.width,he/y),Math.min(Ye.source.height,se/y),E,et,Math.min(b.width,Ne),Math.min(b.height,Ge)])}catch(At){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,he,se,E,et,Math.min(b.width,Ne),Math.min(b.height,Ge)),a instanceof fl&&(this.bt=[te,ne,he,se,E,et,Math.min(b.width,Ne),Math.min(b.height,Ge)])}catch(At){this.en=!1}switch(this.flip){case Ir:a.scale(-1,1),a.translate(-Math.min(b.width,Ne),0);break;case hr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ge));break;case ao:a.scale(-1,-1),a.translate(-Math.min(b.width,Ne),-Math.min(b.height,Ge))}}}}},Qa.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=Ja(this,!0),ne=this.Eg,se=this.qn,he=0,_e=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,_e=se?+ne.height:ne.naturalHeight),isFinite(E.width)||te===Tn||te===wi?(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===Tn||te===Oi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=_e)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:_e),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)),Fr(this.dc,a,y),this.Ge(0,0,a,y)},Qa.prototype.eh=function(a,y,x,b){Ea(this,a,y,x,b)},nt.Object.defineProperties(Qa.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||kt("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 Mn),b!==null&&x&&Mc(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()||(bs(this,!1),this.v())):x&&L1(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=Uf;if(is){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<zm&&(Hf(),x=Uf),b=Hn("img"),b.hn=!0,L1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,zm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new M1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),Qa.prototype.redraw=Qa.prototype.redraw,Qa.prototype.reloadSource=Qa.prototype.hA;var zm=0,wx=4;Qa.className="Picture",Uf=new Mi,Qa.clearCache=Hf;function M1(){this.gi=null}function k1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new ql(null),ne=te.context,se=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new T1(te.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(se*x,0,0,se*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}M1.className="PictureCacheArray";function T1(a,y){this.source=a,this.ratio=y}T1.className="PictureCacheInstance";function Gf(){this.os=new Rn,this.mc=null}Gf.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Rn,this.mc=null};function Wf(a,y,x,b,E,te){a.mc=new ps,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 _x(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Gf.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Rr(gs);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Gf.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Rr($r);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function $h(a,y,x,b,E,te,ne){var se;se===void 0&&(se=!1);var he=new Rr(ws);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 Rr(Ta);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}Gf.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var se=new Rr(Jo);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 Rr(Va,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 Gf,y.reset(a),y)}var Hm=null;Gf.className="StreamGeometryContext";function ba(a,y){var x=a.toLowerCase(),b=Wt.Ze;b[a]=y,b[x]=a}ba("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Wt.Mf[a];return b!==void 0||(b=new Rn(Rn.u),b.endX=y,b.endY=x,Wt.Nf<Wt.vm&&(Wt.Mf[a]=b,Wt.Nf++)),b}),ba("Square",function(a,y,x){a="s"+y+","+x;var b=Wt.Mf[a];return b!==void 0||(b=new Rn(Rn.u),b.endX=y,b.endY=x,b.defaultStretch=fi,Wt.Nf<Wt.vm&&(Wt.Mf[a]=b,Wt.Nf++)),b}),ba("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=Wt.Mf[b];if(E!==void 0)return E;var te=a*Wt.wg;return E=new Rn().add(new ps(a,0,!0).add(new Rr($r,y-a,0)).add(new Rr(ws,y,a,y-te,0,y,te)).add(new Rr($r,y,x-a)).add(new Rr(ws,y-a,x,y,x-te,y-te,x)).add(new Rr($r,a,x)).add(new Rr(ws,0,x-a,te,x,0,x-te)).add(new Rr($r,0,a)).add(new Rr(ws,a,0,0,te,te,0).close())),1<te&&(E.spot1=new zn(0,0,te,te),E.spot2=new zn(1,1,-te,-te)),Wt.Nf<Wt.vm&&(Wt.Mf[b]=E,Wt.Nf++),E}),ba("Border","RoundedRectangle"),ba("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Wt.Mf[a];return b!==void 0||(b=new Rn(Rn.F),b.endX=y,b.endY=x,b.spot1=zo,b.spot2=io,Wt.Nf<Wt.vm&&(Wt.Mf[a]=b,Wt.Nf++)),b}),ba("Circle",function(a,y,x){a="c"+y+","+x;var b=Wt.Mf[a];return b!==void 0||(b=new Rn(Rn.F),b.endX=y,b.endY=x,b.spot1=zo,b.spot2=io,b.defaultStretch=fi,Wt.Nf<Wt.vm&&(Wt.Mf[a]=b,Wt.Nf++)),b}),ba("TriangleRight",function(a,y,x){return new Rn().add(new ps(0,0).add(new Rr($r,y,.5*x)).add(new Rr($r,0,x).close())).pm(0,.25,.5,.75)}),ba("TriangleDown",function(a,y,x){return new Rn().add(new ps(0,0).add(new Rr($r,y,0)).add(new Rr($r,.5*y,x).close())).pm(.25,0,.75,.5)}),ba("TriangleLeft",function(a,y,x){return new Rn().add(new ps(y,x).add(new Rr($r,0,.5*x)).add(new Rr($r,y,0).close())).pm(.5,.25,1,.75)}),ba("TriangleUp",function(a,y,x){return new Rn().add(new ps(y,x).add(new Rr($r,0,x)).add(new Rr($r,.5*y,0).close())).pm(.25,.5,.75,1)}),ba("Triangle","TriangleUp"),ba("Diamond",function(a,y,x){return new Rn().add(new ps(.5*y,0).add(new Rr($r,0,.5*x)).add(new Rr($r,.5*y,x)).add(new Rr($r,y,.5*x).close())).pm(.25,.25,.75,.75)}),ba("LineH",function(a,y,x){return a=new Rn(Rn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ba("LineV",function(a,y,x){return a=new Rn(Rn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ba("None","Rectangle"),ba("BarH","Rectangle"),ba("BarV","Rectangle"),ba("MinusLine","LineH"),ba("PlusLine",function(a,y,x){return new Rn().add(new ps(0,x/2,!1).add(new Rr($r,y,x/2)).add(new Rr(gs,y/2,0)).add(new Rr($r,y/2,x)))}),ba("XLine",function(a,y,x){return new Rn().add(new ps(0,x,!1).add(new Rr($r,y,0)).add(new Rr(gs,0,0)).add(new Rr($r,y,x)))}),ba("LineRight",function(a,y,x){return new Rn().add(new ps(.25*y,0,!1).add(new Rr($r,.75*y,.5*x)).add(new Rr($r,.25*y,x)))}),ba("LineDown",function(a,y,x){return new Rn().add(new ps(0,.25*x,!1).add(new Rr($r,.5*y,.75*x)).add(new Rr($r,y,.25*x)))}),ba("LineLeft",function(a,y,x){return new Rn().add(new ps(.75*y,0,!1).add(new Rr($r,.25*y,.5*x)).add(new Rr($r,.75*y,x)))}),ba("LineUp",function(a,y,x){return new Rn().add(new ps(0,.75*x,!1).add(new Rr($r,.5*y,.25*x)).add(new Rr($r,y,.75*x)))}),Wt.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Iv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Lr,this.ir=null,this.jr="",this.lr=Ts,this.Gq="",this.Hq=Gr,this.Pq=Un,this.Kq=ni,this.Up=null,this.Cq=127,this.zr=li,this.yr="gray",this.Vg=4}Iv.prototype.copy=function(){var a=new Iv;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 Ci(a,y){a===void 0||a instanceof Ms||typeof a=="string"?Nn.call(this,a):(Nn.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 ft(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new nn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Xe(Ci,Nn),Ci.prototype.cloneProtected=function(a){Nn.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=Ci.prototype,Qe.Af=function(a){Nn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Qe.toString=function(){var a=Bn(this.constructor)+"#"+Xi(this);return this.data!==null&&(a+="("+bi(this.data)+")"),a};function $a(a){a.P===null?a.P=new Iv:a.P.nc&&(a.P=a.P.copy())}Qe.th=function(){Nn.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===ns&&y==="elements"?E instanceof Nn?gd(E,function(he){ly(se.partManager,he),ad(se,he)}):Mc(se,E):a===qo&&y==="elements"&&(E instanceof Nn?gd(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(Nn.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 Nn&&gd(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ci.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ci.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ci.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 hn),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)))}}},Ci.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)}},Ci.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=ai();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Gn(y)}},Ci.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 Ji?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof jr))break e;Ql(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Nn.Link),x.adornedObject=y)}if(x!==null){x.type===Nn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Px(this,a),y=this.adornments;y.next();)y.value.La()}},Ci.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Rv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Px(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Gm(a){if(Nc(a)===!1){Bv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function N1(a){if(a.G|=2097152,Nc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||I1(a,y,x),x=a.Ib;var b=nn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),nn.free(b),Bv(a,!1)}}Ci.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new ji);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Ci.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=_r;this.locationSpot.sb()&&(te=this.locationSpot);var ne=ft.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),ft.free(ne)}},Ci.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ci.prototype.moveTo=function(a,y,x){a=ft.allocAt(a,y),this.move(a,x),ft.free(a)},Ci.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())},Ci.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())},Ci.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new hn),y.I(a)!==null)return y.I(a);var x=Nn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function ec(a,y,x,b){b===void 0&&(b=new ft),x=x.Mc()?_r: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}Ci.prototype.mi=function(a){return a===void 0&&(a=new nn),a.assign(this.actualBounds)},Ci.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function D1(a){var y=ft.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof nr?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 yd(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}Ci.prototype.arrange=function(){if(Oa(this)===!1)N1(this);else{hh(this,!1);var a=this.Ib,y=nn.alloc();y.assign(a);var x=Dc(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;I1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Wt.B(y.width,a.width)&&Wt.B(y.height,a.height)||0<=this.vw&&this.C(16),nn.free(y),Bv(this,!1)}},Qe=Ci.prototype,Qe.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=nn.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),nn.free(E)}!(this.G&65536)&&a.D(y)||B1(this,b,x),x.N(),!a.w()&&!y.w()||Mr(a,y)||(this instanceof Xn&&!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&&O1(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 ft(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),Nc(this)===!1&&Oa(this)===!1&&(Gm(this),N1(this)),!0};function O1(a,y,x,b,E){y===null||a instanceof jr||(y=y.animationManager,y.zb&&rh(y,a,new ft(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;Nc(this)||Oa(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)}Gm(this)},Qe.Av=function(){this.G&=-2097153,Gm(this)};function I1(a,y,x){var b=D1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?R1(a,y,x,E,b):F1(a,y,x,E,b):te?R1(a,y,x,E,b):ne&&F1(a,y,x,E,b),a.G|=2097152,ft.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 jr||rh(x,a,new ft(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new ft(te,ne),y.copy()))}function F1(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 B1(a,y,x){jv(a,!1),a instanceof Xn&&Kh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?Dc(a)?(fo(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 Fv(a,y,x,b){y.constructor===a.constructor||U1||(U1=!0,jn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),jn(" Old class: "+Bn(a.constructor)+", new class: "+Bn(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,_e=!1;a instanceof Xn&&(se=a.isTreeLeaf,he=a.isTreeExpanded,_e=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 Xn&&(a.U=se?a.U|4:a.U&-5,a.U=he?a.U|1:a.U&-2,a.U=_e?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)}Ci.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},Ci.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},Ci.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},Ci.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},Ci.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},Ci.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},Ci.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},Ci.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},Ci.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 Nc(a){return(a.G&32768)!==0}function Bv(a,y){a.G=y?a.G|32768:a.G&-32769}function jv(a,y){a.G=y?a.G|65536:a.G&-65537}function Dc(a){return(a.G&131072)!==0}Qe=Ci.prototype,Qe.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Wm(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&&!Oa(this)&&!Nc(this)&&this.isVisible()&&this.Ib.w()&&a.N(yd(this,this.Ib))},Qe.v=function(){Nn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Xn&&this.labeledLink!==null&&Da(this.labeledLink),a.$b(!0))},Qe.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},Qe.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(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 zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof Xn&&(y=y.labeledLink,y!==null)?zv(a,y):0}Qe.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof Xn&&(x=y.labeledLink,x!==null)?j1(a,x):y}Qe.Td=function(a){return a instanceof Ji?Uv(this,this,a):!1};function Uv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Uv(a,b,x)?y instanceof Xn&&(y=y.labeledLink,y!==null)?Uv(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 Ji&&Wm(y,!0),y instanceof Xn){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 Xn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Ji&&Wm(y,!1),y instanceof Xn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ci.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Xn&&this.isLinkLabel)},Ci.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 Xn&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function Oc(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof jr)){if(a.add(y),y instanceof Xn){if(x&&y instanceof Ji)for(var ne=y.memberParts;ne.next();)Oc(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var se=ne.value;if(!a.contains(se)){var he=se.fromNode,_e=se.toNode;he=he===null||a.contains(he),_e=_e===null||a.contains(_e),(E?he&&_e:he||_e)&&Oc(a,se,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)Oc(a,y.value,x,b-1,E,te)}else if(y instanceof Fn)for(y=y.labelNodes;y.next();)Oc(a,y.value,x,b,E,te)}}nt.Object.defineProperties(Ci.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?dr: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(qo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(ns,"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&&($a(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&&yf(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 jr?this.type!==Nn.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:Un},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),$a(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:ni},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),$a(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&&($a(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:Gr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),$a(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,Oa(this)===!1&&(Gm(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)),O1(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 jr)){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 jr?this instanceof jr&&(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&&(Ql(x),x=x.copy(),x!==null&&Fv(this,x,y,a))):(te!==null&&te.jm(b,a),x=dS(x.partManager,b,a),x!==null&&(Ql(x),x=x.copy(),x===null||x instanceof Fn||(b=this.location.copy(),Fv(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){Fv(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&&($a(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&&($a(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&&($a(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 Fn?(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&&($a(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&&($a(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&&($a(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:Lr},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),$a(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&&($a(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&&($a(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:Ts},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),$a(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&&kt("Cannot make a Group a member of itself: "+this.toString()),kt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Vv(y,this):this instanceof Ji&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof Ji&&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 Ji){for(x=new Mn,Oc(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Xn)for(b=b.linksConnected;b.next();)Zf(b.value)}if(this instanceof Xn){for(x=this.linksConnected;x.next();)Zf(x.value);x=this.labeledLink,x!==null&&Zf(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&yf(y,-1,a))}}else kt("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&&($a(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Xn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&($a(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&&($a(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:li},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),$a(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&&($a(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&&($a(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ci.prototype.invalidateLayout=Ci.prototype.C,Ci.prototype.findCommonContainingGroup=Ci.prototype.px,Ci.prototype.isMemberOf=Ci.prototype.Td,Ci.prototype.findTopLevelPart=Ci.prototype.sz,Ci.prototype.findSubGraphLevel=Ci.prototype.oz,Ci.prototype.ensureBounds=Ci.prototype.Va,Ci.prototype.getDocumentBounds=Ci.prototype.mi,Ci.prototype.findObject=Ci.prototype.fb,Ci.prototype.moveTo=Ci.prototype.moveTo,Ci.prototype.invalidateAdornments=Ci.prototype.Wb,Ci.prototype.clearAdornments=Ci.prototype.Ej,Ci.prototype.removeAdornment=Ci.prototype.Jf,Ci.prototype.addAdornment=Ci.prototype.bh,Ci.prototype.findAdornment=Ci.prototype.Pj,Ci.prototype.updateTargetBindings=Ci.prototype.La;var U1=!1;Ci.className="Part",Ci.LayoutNone=0,Ci.LayoutAdded=1,Ci.LayoutRemoved=2,Ci.LayoutShown=4,Ci.LayoutHidden=8,Ci.LayoutNodeSized=16,Ci.LayoutGroupLayout=32,Ci.LayoutNodeReplaced=64,Ci.LayoutStandard=127,Ci.LayoutAll=16777215;function jr(a,y){a===void 0||a instanceof Ms||typeof a=="string"?Ci.call(this,a):(Ci.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)}Xe(jr,Ci),jr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},jr.prototype.updateRelationshipsFromData=function(){},jr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Fn&&y instanceof nr){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 nr&&(E.ua=a)}}},jr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Oa(a))},jr.prototype.Zc=function(){return!1},jr.prototype.gk=function(a,y,x,b,E,te,ne){if(a===ns&&y==="elements"){if(E instanceof Ra)this.$a===null&&(this.$a=E);else if(E instanceof Nn){var se=E.Nl(function(he){return he instanceof Ra});se instanceof Ra&&this.$a===null&&(this.$a=se)}}else a===qo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Nn&&this.$a.rg(b)&&(this.$a=null));Ci.prototype.gk.call(this,a,y,x,b,E,te,ne)},jr.prototype.updateAdornments=function(){},jr.prototype.Lj=function(){},nt.Object.defineProperties(jr.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}}}),jr.className="Adornment";function Hv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Hr,this.er=Km,this.Kr=this.ij=this.Nq=this.Mq=null}Hv.prototype.copy=function(){var a=new Hv;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 Xn(a,y){a===void 0||a instanceof Ms||typeof a=="string"?Ci.call(this,a):(Ci.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Ln,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Xe(Xn,Ci),Xn.prototype.cloneProtected=function(a){Ci.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Qe=Xn.prototype,Qe.Af=function(a){Ci.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function tc(a){a.Ba===null?a.Ba=new Hv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Qe.th=function(){Ci.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new Mn),a.af.add(y))}function G1(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=G1(this,a,y,x),a!==null&&a.Sl()},Qe.gk=function(a,y,x,b,E,te,ne){a===ns&&y==="elements"?this.wc=null:a===qo&&y==="elements"&&(this.wc=null),Ci.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)||(pl(x.fromPort),pl(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(pl(x.fromPort),pl(x.toPort),x.bb())}}function pl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||pl(y.port)}}Qe.si=function(){return!0},Xn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Xn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Xn.prototype.isVisible=function(){if(!Ci.prototype.isVisible.call(this))return!1;var a=!0,y=Xh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Xh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===_s){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===Tf&&(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},Xn.prototype.Zb=function(a){Ci.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)}},Xn.prototype.qx=function(){var a=new Mn,y=new Mn;return Z1(this,this,a,y),y.iterator};function Z1(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)&&Z1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}Xn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new vr(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},Qe=Xn.prototype,Qe.Mo=function(a){a===void 0&&(a=null);var y=new vr(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 vr(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 Mn,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 Mn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new ar(x):dr},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 Mn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new ar(x):dr},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 Mn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new ar(x):dr},Qe.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new vr(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 vr(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 Zm(a,y,x){pl(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 Vm(a,y,x){pl(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)):ag(y)))}function ag(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}}}Xn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Qe=Xn.prototype,Qe.Vo=function(a){Ci.prototype.Vo.call(this,a),a||(ag(this),a=this.Yk,a!==null&&eS(a,this))},Qe.Wo=function(a){Ci.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,Ci.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 hn:a.wc.clear(),a.qm(a,function(y,x){K1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function K1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Gv(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=ai()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Gn(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;)Wm(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;)Wm(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 Xn)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 Mn;return a(this,y),y},Qe.uz=function(){return Y1(this,this)};function Y1(a,y){return y=y.pg(),y===null?0:1+Y1(a,y)}Qe.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new vr(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 Ln,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Ln,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new ar(x):dr},Qe.wz=function(a){a===void 0&&(a=1/0);var y=new Mn;return Oc(y,this,!1,a,!0),y},Xn.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 Mn;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Xh),y.Ue=!1}};function X1(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),X1(he,y,x,b-1,E,te,ne)))}else J1(a,y,x,E,te,ne)}function J1(a,y,x,b,E,te){for(var ne=E===a?!0:a.isTreeExpanded,se=x?a.Mo():a.Sd(),he={};se.next();){var _e=se.value;if(_e.isTreeLink&&(_e=_e.To(a),_e!==null&&_e!==a)){var Ee=y.contains(_e);if(Ee||y.add(_e),ne){var Ne=x?_e.Oo():_e.Po();he.uv=a,Ne.all(function(Ge){return function(Ye){return Ye===Ge.uv||!Ye.isTreeExpanded}}(he))&&b.Aj(_e,E),_e.oh(),_e.Zb(!1)}_e.isTreeExpanded&&(_e.wasTreeExpanded=_e.isTreeExpanded,Ee||J1(_e,y,x,b,E,te))}he={uv:he.uv}}a.isTreeExpanded=!1}Xn.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 Mn;x.add(this),q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Xh),y.Ue=!1}};function q1(a,y,x,b,E,te,ne){for(var se=te===a?!1:a.isTreeExpanded,he=x?a.Mo():a.Sd(),_e={};he.next();){var Ee=he.value;if(Ee.isTreeLink&&(se||Ee.fd||Ee.bb(),Ee=Ee.To(a),Ee!==null&&Ee!==a&&!y.contains(Ee))){if(y.add(Ee),!se){Ee.Zb(!0),Ee.oh();var Ne=x?Ee.Oo():Ee.Po();_e.vv=a,Ne.all(function(Ge){return function(Ye){return Ye===Ge.vv||!Ye.isTreeExpanded}}(_e))&&E.Cj(Ee,te)}(2<b||Ee.wasTreeExpanded)&&(Ee.wasTreeExpanded=!1,q1(Ee,y,x,b-1,E,te,ne))}_e={vv:_e.vv}}a.isTreeExpanded=!0}nt.Object.defineProperties(Xn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Km},set:function(a){var y=this.portSpreading;y!==a&&(tc(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&&Kh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Hr},set:function(a){typeof a=="number"&&(a=new Qi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),tc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Kh(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&&(tc(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&&(tc(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&&(tc(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),Da(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&&(tc(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))}}}),Xn.prototype.expandTree=Xn.prototype.expandTree,Xn.prototype.collapseTree=Xn.prototype.collapseTree,Xn.prototype.findTreeParts=Xn.prototype.wz,Xn.prototype.findTreeChildrenNodes=Xn.prototype.Ou,Xn.prototype.findTreeChildrenLinks=Xn.prototype.Qo,Xn.prototype.findTreeLevel=Xn.prototype.uz,Xn.prototype.findTreeParentChain=Xn.prototype.vz,Xn.prototype.findTreeParentNode=Xn.prototype.pg,Xn.prototype.findTreeParentLink=Xn.prototype.kh,Xn.prototype.findCommonTreeParent=Xn.prototype.gz,Xn.prototype.findTreeRoot=Xn.prototype.xz,Xn.prototype.isInTreeOf=Xn.prototype.Nz,Xn.prototype.findPort=Xn.prototype.ns,Xn.prototype.findLinksTo=Xn.prototype.kz,Xn.prototype.findLinksBetween=Xn.prototype.jz,Xn.prototype.findNodesInto=Xn.prototype.Oo,Xn.prototype.findNodesOutOf=Xn.prototype.Po,Xn.prototype.findNodesConnected=Xn.prototype.Mu,Xn.prototype.findLinksInto=Xn.prototype.Sd,Xn.prototype.findLinksOutOf=Xn.prototype.Mo,Xn.prototype.findExternalTreeLinksConnected=Xn.prototype.qx,Xn.prototype.invalidateConnectedLinks=Xn.prototype.Bd,Xn.prototype.invalidateLinkBundle=Xn.prototype.Lz;var Cx=new pn(Xn,"SpreadingNone",10),Km=new pn(Xn,"SpreadingEvenly",11),Wv=new pn(Xn,"SpreadingPacked",12);Xn.className="Node",Xn.SpreadingNone=Cx,Xn.SpreadingEvenly=Km,Xn.SpreadingPacked=Wv;function Ji(a,y){a===void 0||a instanceof Ms||typeof a=="string"?Xn.call(this,a):(Xn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Mn,this.$a=null,this.Sc=new Vo,this.Sc.group=this,this.gl=new Mn,this.tb=this.$p=null,y&&Object.assign(this,y)}Xe(Ji,Xn),Ji.prototype.cloneProtected=function(a){Xn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ra});y instanceof Ra?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=Ji.prototype,Qe.Af=function(a){Xn.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 Xn)x.Bd(y);else if(x instanceof Fn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Qe.gk=function(a,y,x,b,E,te,ne){if(a===ns&&y==="elements"){if(E instanceof Ra)this.$a===null?this.$a=E:this.$a!==E&&kt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Nn){var se=E.Nl(function(he){return he instanceof Ra});se instanceof Ra&&(this.$a===null?this.$a=se:this.$a!==se&&kt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===qo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Nn&&this.$a.rg(b)&&(this.$a=null));Xn.prototype.gk.call(this,a,y,x,b,E,te,ne)},Qe.Xl=function(a,y){Xn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Nn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Nn&&(a=a.Pb()),this.tb===null&&(this.tb=new nn),a.mi(this.tb),a instanceof nr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Qe.eh=function(a,y,x,b){this.nf=this.$a,Xn.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 Fn||y.Va()}),Xn.prototype.Va.call(this)},Qe.si=function(){if(!Xn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Xn){if(y.isVisible()&&Oa(y))return!1}else if(y instanceof Fn&&y.isVisible()&&Oa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof Ji&&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 Fn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof Ji&&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 Fn&&!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)}Xn.prototype.Lj.call(this)},Ji.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=gn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Ji.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=gn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Ji.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=Ji.prototype,Qe.Bd=function(a){var y=(this.U&65536)!==0;if(Xn.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()?(pl(x.fromPort),pl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(pl(x.fromPort),pl(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 Mn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Xn)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 Mn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Xn)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 Mn;return a(this,y),y},Qe.Rj=function(){var a=new Mn;return Oc(a,this,!0,0,!0),a.remove(this),a},Qe.Zb=function(a){Xn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Ji.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 Ji&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof Xn)te.Bd(y),x.Aj(te,b);else if(te instanceof Fn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}Ji.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();$1(this,y,a,this),a.Ue=!1}};function $1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!0),te instanceof Ji&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,$1(te,y,x,b)),te instanceof Xn)te.Bd(y),x.Cj(te,b);else if(te instanceof Fn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}Ji.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=ft.alloc(),Xn.prototype.move.call(this,a,y),a=new Mn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Fn&&(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 Xn&&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 Fn&&(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(),Yv(E)&&E.bb());ft.free(te)}},nt.Object.defineProperties(Ji.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&&kt("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&&(tc(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&&(tc(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&&(tc(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&&(tc(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)}}}),Ji.prototype.expandSubGraph=Ji.prototype.expandSubGraph,Ji.prototype.collapseSubGraph=Ji.prototype.collapseSubGraph,Ji.prototype.findSubGraphParts=Ji.prototype.Rj,Ji.prototype.findContainingGroupChain=Ji.prototype.hz,Ji.prototype.findExternalNodesConnected=Ji.prototype.iz,Ji.prototype.findExternalLinksConnected=Ji.prototype.Lu,Ji.prototype.ensureBounds=Ji.prototype.Va,Ji.className="Group";function Ra(a){Gt.call(this),this.yb=Os,this.ko=new nn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Xe(Ra,Gt),Ra.prototype.cloneProtected=function(a){Gt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ra.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Qr(0,0,y.width,y.height,a.x,a.y)},Ra.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Ji||a instanceof jr)||kt("Placeholder is not inside a Group or Adornment."),a instanceof Ji){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Fr(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=ft.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),ft.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 nr&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,_e=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==Nn.Link&&(se=te.ga(a.category==="Selection"?Gr:a.locationSpot,ft.alloc()),a.location=se,ft.free(se)),isNaN(_e)||isNaN(ne)?(a=te.ga(Gr,ft.alloc()),_e=nn.allocAt(a.x,a.y,0,0),_e.Ye(te.ga(jo,a)),_e.Ye(te.ga(aa,a)),_e.Ye(te.ga(xs,a)),Fr(y,_e.width+b||0,_e.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),ft.free(a),nn.free(_e)):(Fr(y,_e+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ra.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ra.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Ji&&!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=nn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof Ji&&!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)),nn.free(x),b&&y instanceof Ji&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ra.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Ji))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 Fn&&(!y.computesBoundsIncludingLinks||Cl(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},nt.Object.defineProperties(Ra.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Qi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ra.className="Placeholder";function Fn(a){Ci.call(this,Nn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Fa,this.Om=0,this.Qm=Fa,this.Rm=NaN,this.qj=qv,this.po=.5,this.wd=null,this.Nb=new Ln().freeze(),this.Tg=this.Mg=null,this.ml=new nn,this.ua=new Rn,this.u=this.o=this.Sf=this.Wf=null,this.su=new ft,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Xe(Fn,Ci),Fn.prototype.cloneProtected=function(a){Ci.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=Fn.prototype,Qe.Af=function(a){Ci.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&&pl(y),a=a.toPort,a!==null&&pl(a)},Qe.qb=function(a){a.classType===Fn?(a.value&2)===2?this.routing=a:a===Ll||a===ic||a===Kf?this.curve=a:a===hg||a===$m||a===e0?this.adjusting=a:a!==qv&&a!==Fa&&kt("Unknown Link enum value for a Link property: "+a):Ci.prototype.qb.call(this,a)},Qe.Xc=function(){this.ba===null&&(this.ba=new Jp)},Qe.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Oa(a)||Nc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Oa(a)||Nc(a)))},Qe.zv=function(){return!1},Qe.Av=function(){},Qe.Zc=function(){return!1},Fn.prototype.computeAngle=function(a,y,x){return Fn.computeAngle(y,x)},Fn.computeAngle=function(a,y){switch(a){default:case Fa:a=0;break;case cg:a=y;break;case dg:a=y+90;break;case fg:a=y-90;break;case Qv:a=y+180;break;case t0:a=Wt.bp(y),90<a&&270>a&&(a-=180);break;case pg:a=Wt.bp(y+90),90<a&&270>a&&(a-=180);break;case gg:a=Wt.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=Wt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Wt.bp(a)};function Zf(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&Vv(x,a),a.Ah=y,y!==null&&Zv(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=Fn.prototype,Qe.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ci.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 Mn),a.wd.add(y),a.v()}Qe.Vo=function(a){if(Ci.prototype.Vo.call(this,a),Sd(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)}lg(this)}},Qe.Wo=function(a){if(Ci.prototype.Wo.call(this,a),Sd(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)}ug(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))},Fn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Fn.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?Ci.prototype.move.call(this,a,!1):(a=ft.allocAt(x.x+b,x.y+E),Ci.prototype.move.call(this,a,!1),ft.free(a)),nc(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Fn.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},Fn.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},Fn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(vi),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()===Ll))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()===Ll){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Wt.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var te=this.i(x+2);x=this.i(x+3),Wt.ax(b.x,b.y,E.x,E.y,te.x,te.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=te=b=0;b<x/2&&te<y&&(E=ne[te],!(b+E>x/2));)b+=E,te++;return y=this.i(te),te=this.i(te+1),1>Math.abs(y.x-te.x)?y.y>te.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-te.y)?y.x>te.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(te.x-y.x),y.y+x*(te.y-y.y))),a},Fn.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()===Ll))return this.ua.wx(.5);if(this.computeCurve()===Ll&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),Wt.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var te;E<b/2&&x<a&&(te=y[x],!(E+te>b/2));)E+=te,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},Qe=Fn.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 ft(y,x))},Qe.Kz=function(a,y){this.Nb.Gb(a,y)},Qe.m=function(a,y,x){this.Nb.Gb(a,new ft(y,x))},Qe.ne=function(a){this.Nb.add(a)},Qe.yf=function(a,y){this.Nb.add(new ft(a,y))},Qe.pv=function(a){this.Nb.mb(a)},Qe.Fj=function(){this.Nb.clear()};function nc(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new Ln,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new ft(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),Da(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&&vf(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,_e=he.length,Ee=0;Ee<_e;Ee++){var Ne=he[Ee];ne=Math.min(Ne.x,ne),se=Math.min(Ne.y,se),Ne.freeze()}if(y.freeze(),_e===te){for(te=0;te<_e;te++)if(Ee=E[te],Ne=he[te],Ee.x-x!==Ne.x-ne||Ee.y-b!==Ne.y-se){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&vf(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()}}},Fn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(qd||(qd=new Xn,qd.desiredSize=pi,qd.Va()),this.defaultFromPoint&&(qd.location=this.defaultFromPoint,qd.Va(),y=a=qd)):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?(Qd||(Qd=new Xn,Qd.desiredSize=pi,Qd.Va()),this.defaultToPoint&&(Qd.location=this.defaultToPoint,Qd.Va(),E=b=Qd)):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=Vf(ne),he=Vf(x),_e=y===E&&y!==null,Ee=this.isOrthogonal,Ne=this.curve===Ll;this.Wf=_e&&!Ee?Ne=!0:!1;var Ge=this.computeAdjusting()===Fa||_e;if(!Ee&&!_e&&se&&he){if(se=!1,!Ge&&3<=te&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),se=this.adjustPoints(0,Ge,te-1,he))&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Ge,te-1,he)),!se)if(this.Fj(),Ne){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Ge=this.getLinkPoint(b,E,x,!1,!1,a,y),se=Ge.x-te.x,he=Ge.y-te.y,_e=this.computeCurviness(),Ne=Ee=0;var Ye=te.x+se/3,et=te.y+he/3,st=Ye,Ct=et;Wt.B(he,0)?Ct=0<se?Ct-_e:Ct+_e:(Ee=-se/he,Ne=Math.sqrt(_e*_e/(Ee*Ee+1)),0>_e&&(Ne=-Ne),st=(0>he?-1:1)*Ne+Ye,Ct=Ee*(st-Ye)+et),Ye=te.x+2*se/3,et=te.y+2*he/3;var St=Ye,Tt=et;Wt.B(he,0)?Tt=0<se?Tt-_e:Tt+_e:(St=(0>he?-1:1)*Ne+Ye,Tt=Ee*(St-Ye)+et),this.Fj(),this.ne(te),this.yf(st,Ct),this.yf(St,Tt),this.ne(Ge),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else te=b,Ge=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Ge),E=this.getLinkPoint(te,Ge,x,!1,!1,a,y),this.hasCurviness()?(Ge=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Ge/2,y=b.y+x/2,te=a,se=y,Wt.B(x,0)?se=0<Ge?se-ne:se+ne:(Ge=-Ge/x,te=Math.sqrt(ne*ne/(Ge*Ge+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,se=Ge*(te-a)+y),this.ne(b),this.yf(te,se),this.ne(E)):(this.ne(b),this.ne(E),se=nn.alloc(),y.mi(se),he=se.ca(E),Ge.mi(se),_e=se.ca(b),(he||_e)&&(ne=y.ga(Jm(ne),new ft),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ge.ga(Jm(x),new ft),this.dd(1,this.getLinkPointFromPoint(te,Ge,x,b,!1,x))),nn.free(se))}else{Ne=this.isAvoiding,Ge&&(Ee&&Ne||_e)&&this.Fj();var At=_e?this.computeCurviness():0;Ne=this.getLinkPoint(a,y,ne,!0,Ee,b,E),Ye=st=et=0,(Ee||!se||_e)&&(Ct=this.computeEndSegmentLength(a,y,ne,!0),Ye=this.getLinkDirection(a,y,Ne,ne,!0,Ee,b,E),_e&&(se||ne.D(x)||!Ee&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ye-=Ee?90:30,0>At&&(Ye-=180)),0>Ye?Ye+=360:360<=Ye&&(Ye-=360),_e&&(Ct+=Math.abs(At)*(Ee?1:2)),Ye===0?et=Ct:Ye===90?st=Ct:Ye===180?et=-Ct:Ye===270?st=-Ct:(et=Ct*Math.cos(Ye*Math.PI/180),st=Ct*Math.sin(Ye*Math.PI/180)),ne.Mc()&&_e&&(Ct=y.ga(_r,ft.alloc()),St=ft.allocAt(Ct.x+1e3*et,Ct.y+1e3*st),this.getLinkPointFromPoint(a,y,Ct,St,!0,Ne),ft.free(Ct),ft.free(St))),Ct=this.getLinkPoint(b,E,x,!1,Ee,a,y);var It=Tt=St=0;if(Ee||!he||_e){var Ht=this.computeEndSegmentLength(b,E,x,!1);It=this.getLinkDirection(b,E,Ct,x,!1,Ee,a,y),_e&&(he||ne.D(x)||!Ee&&ne.x+x.x===1&&ne.y+x.y===1)&&(It+=Ee?0:30,0>At&&(It+=180)),0>It?It+=360:360<=It&&(It-=360),_e&&(Ht+=Math.abs(At)*(Ee?1:2)),It===0?St=Ht:It===90?Tt=Ht:It===180?St=-Ht:It===270?Tt=-Ht:(St=Ht*Math.cos(It*Math.PI/180),Tt=Ht*Math.sin(It*Math.PI/180)),x.Mc()&&_e&&(x=E.ga(_r,ft.alloc()),ne=ft.allocAt(x.x+1e3*St,x.y+1e3*Tt),this.getLinkPointFromPoint(b,E,x,ne,!1,Ct),ft.free(x),ft.free(ne))}x=Ne,(Ee||!se||_e)&&(x=new ft(Ne.x+et,Ne.y+st)),ne=Ct,(Ee||!he||_e)&&(ne=new ft(Ct.x+St,Ct.y+Tt)),!Ge&&!Ee&&se&&3<te&&this.adjustPoints(0,Ne,te-2,ne)?this.dd(te-1,Ct):!Ge&&!Ee&&he&&3<te&&this.adjustPoints(1,x,te-1,Ct)?this.dd(0,Ne):!Ge&&(Ee?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Ne),this.dd(te-1,Ct)):(this.Fj(),this.ne(Ne),(Ee||!se||_e)&&this.ne(x),Ee&&this.addOrthoPoints(x,Ye,ne,It,a,b),(Ee||!he||_e)&&this.ne(ne),this.ne(Ct))}return!0};function Kv(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}Fn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new ft),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,_e=a.m11*E,Ee=E*(a.m21*a.dy-a.m22*a.dx),Ne=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*he+Ee,b=b.x*se+b.y*_e+Ne,ne=x.x*ne+x.y*he+Ee,x=x.x*se+x.y*_e+Ne}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Xm(a,y){var x=y.Zn;return x===null&&(x=new $d,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Fn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,se){if(se===void 0&&(se=new ft),x.sb()&&!Vf(x))return y.ga(x,se),se;if(x.$c()){var he=Xm(this,y);if(he!==null){if(se.assign(he.Zo),E&&this.routing===nS){var _e=Xm(this,ne);if(_e!==null&&he.Gl<_e.Gl){he=ft.alloc(),_e=ft.alloc();var Ee=new nn(y.ga(Gr,he),y.ga(jo,_e)),Ne=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Ne,!b,E,a,y,_e),(x.Hf(Pa)||x.Hf(Xo))&&a.y>=Ee.y&&a.y<=Ee.y+Ee.height?se.y=a.y:(x.Hf(ta)||x.Hf(Sa))&&a.x>=Ee.x&&a.x<=Ee.x+Ee.width&&(se.x=a.x),ft.free(he),ft.free(_e)}}return se}}return x=y.ga(Jm(x),ft.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Kv(x,ne.copy()))):(he=this.computeSpot(!b,ne),te=ft.alloc(),ne=ne.ga(Jm(he),te),E&&(ne=Kv(x,ne)),ft.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,se),ft.free(x),se},Fn.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=Xm(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(_r,ft.alloc()),this.pointsCount>(te?6:2)?(se=E?this.i(1):this.i(this.pointsCount-2),se=te?Kv(he,se.copy()):x):(x=ft.alloc(),se=se.ga(_r,x),ft.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,ft.free(he),he=x}return b.Mc()&&ne.Td(a)&&(he+=180,360<=he&&(he-=360)),Vf(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},Fn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Xm(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)},Fn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=_r:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Ts?or:y)):(a=y||this.toPort,a===null?a=_r:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Ts?or:y)),a};function Vf(a){return a===or||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:_r}Fn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Fa&&4<this.pointsCount?this.computeMidPoint(new ft):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(_r))},Fn.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},Fn.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=ji.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&ji.free(ne),!0;if(this.Yc(a,ne)){var se=!1;if(!this.isAtomic)for(var he=this.O.s,_e=he.length;_e--;){var Ee=he[_e];if(Ee.visible||Ee===this.locationObject){var Ne=Ee.actualBounds,Ge=this.naturalBounds;if(!(Ne.x>Ge.width||Ne.y>Ge.height||0>Ne.x+Ne.width||0>Ne.y+Ne.height)){if(Ne=ji.alloc(),Ne.set(ne),Ee instanceof Nn)se=Ee.Cf(a,y,x,b,E,Ne);else if(this.path===Ee){if(Ee instanceof nr)if(se=a,Ge=b,Ee.pickable===!1)se=!1;else if(Ne.multiply(Ee.transform),Ge)e:{var Ye=se,et=Ne;if(Ee.fh(Ye,et))se=!0;else{if(et===void 0&&(et=Ee.transform,Ye.Re(Ee.actualBounds))){se=!0;break e}se=Ye.left,Ge=Ye.right;var st=Ye.top;Ye=Ye.bottom;var Ct=ft.alloc(),St=ft.alloc(),Tt=ft.alloc(),At=ji.alloc();At.set(et),At.bv(Ee.transform),At.Vj(),St.x=Ge,St.y=st,St.transform(At),Ct.x=se,Ct.y=st,Ct.transform(At),et=!1,vd(Ee,Ct,St,Tt)?et=!0:(Ct.x=Ge,Ct.y=Ye,Ct.transform(At),vd(Ee,Ct,St,Tt)?et=!0:(St.x=se,St.y=Ye,St.transform(At),vd(Ee,Ct,St,Tt)?et=!0:(Ct.x=se,Ct.y=st,Ct.transform(At),vd(Ee,Ct,St,Tt)&&(et=!0)))),ji.free(At),ft.free(Ct),ft.free(St),ft.free(Tt),se=et}}else se=Ee.fh(se,Ne)}else se=Fs(Ee,a,b,Ne);se&&(Ge=Ee,y!==null&&(Ge=y(Ee)),Ge&&(x===null||x(Ge))&&E.add(Ge)),ji.free(Ne)}}}return te===void 0&&ji.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&ji.free(ne),!1},Fn.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?Ll:this.curve},Fn.prototype.computeCorner=function(){if(this.curve===Ll)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Fn.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},Fn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,te=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+te.left+te.right;E=isNaN(E.height)?14:E.height*b.scale+te.top+te.bottom,b=b.segmentOrientation,b===cg||b===t0||b===Qv?a=Math.max(a,E):b===fg||b===gg||b===dg||b===pg?a=Math.max(a,ne):(y=y.ga(_r).ab(x.ga(_r))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Ll&&(a*=1.333)}}return a},Fn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Fa&&x.bb()}},Fn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=ai(),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),Gn(x)}}return a},Fn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Fn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Fn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===$m)return!1;E===e0&&(E=hg)}switch(E){case $m: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,_e=Math.sqrt(se*se+he*he);if(!Wt.$(_e,0)){if(Wt.$(se,0))var Ee=0>he?-Math.PI/2:Math.PI/2;else Ee=Math.atan(he/Math.abs(se)),0>se&&(Ee=Math.PI-Ee);ne=y.x;var Ne=y.y;se=b.x-ne;var Ge=b.y-Ne;for(he=Math.sqrt(se*se+Ge*Ge),Wt.$(se,0)?Ge=0>Ge?-Math.PI/2:Math.PI/2:(Ge=Math.atan(Ge/Math.abs(se)),0>se&&(Ge=Math.PI-Ge)),_e=he/_e,Ee=Ge-Ee,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),se=y.x-E,he=y.y-te,y=Math.sqrt(se*se+he*he),Wt.$(y,0)||(Wt.$(se,0)?he=0>he?-Math.PI/2:Math.PI/2:(he=Math.atan(he/Math.abs(se)),0>se&&(he=Math.PI-he)),se=he+Ee,y*=_e,this.L(a,ne+y*Math.cos(se),Ne+y*Math.sin(se)));this.dd(x,b)}}return!0;case e0:if(te=this.i(a),Ne=this.i(x),!te.Xa(y)||!Ne.Xa(b)){E=te.x,te=te.y,ne=Ne.x,Ne=Ne.y,_e=(ne-E)*(ne-E)+(Ne-te)*(Ne-te),se=y.x,Ee=y.y,he=b.x,Ge=b.y;var Ye=1;if(he-se!==0){var et=(Ge-Ee)/(he-se);Ye=Math.sqrt(1+1/(et*et))}else et=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var st=y.x,Ct=y.y,St=.5;_e!==0&&(St=((E-st)*(E-ne)+(te-Ct)*(te-Ne))/_e);var Tt=E+St*(ne-E),At=te+St*(Ne-te);y=Math.sqrt((st-Tt)*(st-Tt)+(Ct-At)*(Ct-At)),Ct<et*(st-Tt)+At&&(y=-y),0<et&&(y=-y),st=se+St*(he-se),St=Ee+St*(Ge-Ee),et!==0?(y=st+y/Ye,this.L(a,y,St-(y-st)/et)):this.L(a,st,St+y)}this.dd(x,b)}return!0;case hg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),se=te.x,Ee=te.y,Ne=se,_e=Ee,Wt.B(E.y,te.y)?Wt.B(te.x,ne.x)?Ee=y.y:Wt.B(te.y,ne.y)&&(se=y.x):Wt.B(E.x,te.x)&&(Wt.B(te.y,ne.y)?se=y.x:Wt.B(te.x,ne.x)&&(Ee=y.y)),this.L(a+1,se,Ee),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),se=te.x,Ee=te.y,he=se,Ge=Ee,Wt.B(E.y,te.y)?Wt.B(te.x,ne.x)?Ee=b.y:Wt.B(te.y,ne.y)&&(se=b.x):Wt.B(E.x,te.x)&&(Wt.B(te.y,ne.y)?se=b.x:Wt.B(te.x,ne.x)&&(Ee=b.y)),this.L(x-1,se,Ee),Yv(this))){this.L(a+1,Ne,_e),this.L(x-1,he,Ge),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Fn.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(mg,mg),he.Bc(mg,mg),se.Ye(a),he.Ye(x);var _e=ft.alloc(),Ee=ft.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?(_e.h(x.x,a.y),Ee.h(x.x,(a.y+x.y)/2),b===180?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Ee.x=_e.x,Ee.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.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,Ee.x=_e.x,Ee.y=x.y):b===0&&a.x<he.left&&a.y>he.top&&a.y<he.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),Ee.y=_e.y)):(_e.h(a.x,x.y),Ee.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))?_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?_e.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===180||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),Ee.x=x.x,Ee.y=_e.y),_e.y>se.top&&_e.y<se.bottom&&(x.x>=se.left&&x.x<=a.x||a.x<=he.right&&a.x>=x.x?(b===90||b===270)&&(_e.h(Math.max((a.x+x.x)/2,a.x),a.y),Ee.h(_e.x,x.y)):(_e.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)),Ee.x=x.x,Ee.y=_e.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?(_e.h(x.x,a.y),Ee.h(x.x,(a.y+x.y)/2),b===0?(_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),Ee.x=_e.x,Ee.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(_e.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,Ee.x=_e.x,Ee.y=x.y):b===180&&a.x>he.right&&a.y>he.top&&a.y<he.bottom&&(_e.x=a.x,_e.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),Ee.y=_e.y)):(_e.h(a.x,x.y),Ee.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))?_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?_e.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===0||b===270)&&(_e.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),Ee.x=x.x,Ee.y=_e.y),_e.y>se.top&&_e.y<se.bottom&&(x.x<=se.right&&x.x>=a.x||a.x>=he.left&&a.x<=x.x?(b===90||b===270)&&(_e.h(Math.min((a.x+x.x)/2,a.x),a.y),Ee.h(_e.x,x.y)):(_e.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)),Ee.x=x.x,Ee.y=_e.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?(_e.h(a.x,x.y),Ee.h((a.x+x.x)/2,x.y),b===270?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Ee.x=x.x,Ee.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(_e.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,Ee.x=x.x,Ee.y=_e.y):b===90&&a.y<he.top&&a.x>he.left&&a.x<he.right&&(_e.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),_e.y=a.y,Ee.x=_e.x)):(_e.h(x.x,a.y),Ee.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))?_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?_e.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(_e.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),Ee.x=_e.x,Ee.y=x.y),_e.x>se.left&&_e.x<se.right&&(x.y>=se.top&&x.y<=a.y||a.y<=he.bottom&&a.y>=x.y?(b===0||b===180)&&(_e.h(a.x,Math.max((a.y+x.y)/2,a.y)),Ee.h(x.x,_e.y)):(_e.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)),Ee.x=_e.x,Ee.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?(_e.h(a.x,x.y),Ee.h((a.x+x.x)/2,x.y),b===90?(_e.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),Ee.x=x.x,Ee.y=_e.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(_e.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,Ee.x=x.x,Ee.y=_e.y):b===270&&a.y>he.bottom&&a.x>he.left&&a.x<he.right&&(_e.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),_e.y=a.y,Ee.x=_e.x)):(_e.h(x.x,a.y),Ee.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))?_e.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?_e.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(_e.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),Ee.x=_e.x,Ee.y=x.y),_e.x>se.left&&_e.x<se.right&&(x.y<=se.bottom&&x.y>=a.y||a.y>=he.top&&a.y<=x.y?(b===0||b===180)&&(_e.h(a.x,Math.min((a.y+x.y)/2,a.y)),Ee.h(x.x,_e.y)):(_e.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)),Ee.x=_e.x,Ee.y=x.y)));var Ne=x;if(this.isAvoiding){var Ge=this.diagram;if(Ge===null||E===te||this.layer.isTemporary||!Ef(Ge)||se.ca(Ne)&&!te.Td(E)||he.ca(a)&&!E.Td(te))y=!1;else{var Ye=Lf(Ge,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ye.Yj(Math.min(a.x,_e.x),Math.min(a.y,_e.y),Math.abs(a.x-_e.x),Math.abs(a.y-_e.y))&&Ye.Yj(Math.min(_e.x,Ee.x),Math.min(_e.y,Ee.y),Math.abs(_e.x-Ee.x),Math.abs(_e.y-Ee.y))&&Ye.Yj(Math.min(Ee.x,Ne.x),Math.min(Ee.y,Ne.y),Math.abs(Ee.x-Ne.x),Math.abs(Ee.y-Ne.y)))y=!1;else{E=a,te=Ne;var et=x=null;if(Ge.isVirtualized){Ge=Ye.bounds.copy(),Ge.Bc(-Ye.Ho,-Ye.Go);var st=ft.alloc();Yf(Ye,a.x,a.y)||(Wt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,a.x,a.y,_e.x,_e.y,st)?(x=a=st.copy(),y=st.ab(_e)):Wt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,_e.x,_e.y,Ee.x,Ee.y,st)?(x=a=st.copy(),y=st.ab(Ee)):Wt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Ee.x,Ee.y,Ne.x,Ne.y,st)&&(x=a=st.copy(),y=st.ab(Ne))),Yf(Ye,Ne.x,Ne.y)||(Wt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Ne.x,Ne.y,Ee.x,Ee.y,st)?(et=Ne=st.copy(),b=Ee.ab(st)):Wt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Ee.x,Ee.y,_e.x,_e.y,st)?(et=Ne=st.copy(),b=_e.ab(st)):Wt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,_e.x,_e.y,a.x,a.y,st)&&(et=Ne=st.copy(),b=a.ab(st))),ft.free(st)}se=se.copy().ed(he),se.Bc(Ye.Ho*Ye.Os,Ye.Go*Ye.Os),sS(Ye,a,y,Ne,b,se,!0),he=gh(Ye,Ne.x,Ne.y),!Ye.abort&&he>=Xf&&(oS(Ye),se.Bc(Ye.Ho*Ye.Hx,Ye.Go*Ye.Ix),sS(Ye,a,y,Ne,b,se,!1),he=gh(Ye,Ne.x,Ne.y)),!Ye.abort&&he<Xf&&gh(Ye,Ne.x,Ne.y)!==rc?(Xv(this,Ye,Ne.x,Ne.y,b,!0,ne),se=this.i(2),4>this.pointsCount?(y===0||y===180?(se.x=a.x,se.y=Ne.y):(se.x=Ne.x,se.y=a.y),this.L(2,se.x,se.y),this.m(3,se.x,se.y)):(ne=this.i(3),y===0||y===180?Wt.B(se.x,ne.x)?(se=y===0?Math.max(se.x,a.x):Math.min(se.x,a.x),this.L(2,se,a.y),this.L(3,se,ne.y)):Wt.B(se.y,ne.y)?(Math.abs(a.y-se.y)<=Ye.Go/2&&(this.L(2,se.x,a.y),this.L(3,ne.x,a.y)),this.m(2,se.x,a.y)):this.L(2,a.x,se.y):(y===90||y===270)&&(Wt.B(se.y,ne.y)?(se=y===90?Math.max(se.y,a.y):Math.min(se.y,a.y),this.L(2,a.x,se),this.L(3,ne.x,se)):Wt.B(se.x,ne.x)?(Math.abs(a.x-se.x)<=Ye.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)),et!==null&&(b===0||b===180?this.yf(te.x,et.y):this.yf(et.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(_e.copy()),this.ne(Ee.copy())),ft.free(_e),ft.free(Ee)}},Fn.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 Yv(a){if(a.diagram===null||!a.isAvoiding||!Ef(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=Lf(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 Xv(a,y,x,b,E,te,ne){var se=y.Ho,he=y.Go,_e=gh(y,x,b),Ee=x,Ne=b;for(E===0?Ee+=se:E===90?Ne+=he:E===180?Ee-=se:Ne-=he,E!==ne&&_e>xd&&gh(y,Ee,Ne)!==_e-1&&(gh(y,x-se,b)===_e-1?(E=180,Ee=x-se,Ne=b):gh(y,x+se,b)===_e-1?(E=0,Ee=x+se,Ne=b):gh(y,x,b-he)===_e-1?(E=270,Ee=x,Ne=b-he):gh(y,x,b+he)===_e-1&&(E=90,Ee=x,Ne=b+he));_e>xd&&gh(y,Ee,Ne)===_e-1;)x=Ee,b=Ne,E===0?Ee+=se:E===90?Ne+=he:E===180?Ee-=se:Ne-=he,--_e;te?_e>xd&&(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),_e>xd&&(te=E,ne=x,Ee=b,E===0?(te=90,Ee+=he):E===90?(te=180,ne-=se):E===180?(te=270,Ee-=he):E===270&&(te=0,ne+=se),gh(y,ne,Ee)===_e-1?Xv(a,y,ne,Ee,te,!1,te):(ne=x,Ee=b,E===0?(te=270,Ee-=he):E===90?(te=0,ne+=se):E===180?(te=90,Ee+=he):E===270&&(te=180,ne-=se),gh(y,ne,Ee)===_e-1&&Xv(a,y,ne,Ee,te,!1,te))),a.yf(x,b)}Fn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=ii(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=ii(y,a,b.x,b.y,x.x,x.y);b=x,se<E&&(te=ne,E=se)}return te},Fn.prototype.qc=function(){this.lk=!1,this.v()},Fn.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 nr&&(E.ua=this.ua)}}},Fn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Sd(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===Ll&&3<=y&&!Wt.$(this.smoothness,0))if(y===3){var se=this.i(1);b=Math.min(E.x,se.x);var he=Math.min(E.y,se.y);se=this.i(2),b=Math.min(b,se.x),he=Math.min(he,se.y)}else{if(this.isOrthogonal)for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),he=this.i(b),te.x=Math.min(he.x,te.x),te.y=Math.min(he.y,te.y);b=te.x,he=te.y}else{for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);b=te.x,he=te.y}if(b-=this.su.x,he-=this.su.y,E.x-=b,E.y-=he,y!==2||Sd(this)){if(a.type=Rn.o,se=A1(a),this.computeShortLength(!0)!==0&&(E=Xd(this,E,!0,te)),Wf(se,E.x,E.y,!1),ne===Ll&&3<=y&&!Wt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-he,E=this.i(2).copy(),E.x-=b,E.y-=he,this.computeShortLength(!1)!==0&&(E=Xd(this,E,!1,te)),$h(se,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=ft.allocAt(b,he),x=ft.alloc(),x.assign(this.i(1)),te=ft.allocAt(b,he),E=ft.allocAt(b,he),ne=this.i(0);for(var _e,Ee=this.smoothness/3,Ne=1;Ne<this.pointsCount-1;Ne++){_e=this.i(Ne);var Ge=ne,Ye=_e,et=this.i(Jv(this,_e,Ne,!1));if((!Wt.$(Ge.x,Ye.x)||!Wt.$(Ye.x,et.x))&&(!Wt.$(Ge.y,Ye.y)||!Wt.$(Ye.y,et.y))){var st=Ee;isNaN(st)&&(st=this.smoothness/3);var Ct=Ge.x;Ge=Ge.y;var St=Ye.x;Ye=Ye.y;var Tt=et.x;et=et.y;var At=st*qm(Ct,Ge,St,Ye);st*=qm(St,Ye,Tt,et),Wt.$(Ge,Ye)&&Wt.$(St,Tt)&&(St>Ct?et>Ye?(te.x=St-At,te.y=Ye-At,E.x=St+st,E.y=Ye+st):(te.x=St-At,te.y=Ye+At,E.x=St+st,E.y=Ye-st):et>Ye?(te.x=St+At,te.y=Ye-At,E.x=St-st,E.y=Ye+st):(te.x=St+At,te.y=Ye+At,E.x=St-st,E.y=Ye-st)),Wt.$(Ct,St)&&Wt.$(Ye,et)&&(Ye>Ge?(Tt>St?(te.x=St-At,te.y=Ye-At,E.x=St+st):(te.x=St+At,te.y=Ye-At,E.x=St-st),E.y=Ye+st):(Tt>St?(te.x=St-At,te.y=Ye+At,E.x=St+st):(te.x=St+At,te.y=Ye+At,E.x=St-st),E.y=Ye-st)),(Wt.$(Ct,St)&&Wt.$(St,Tt)||Wt.$(Ge,Ye)&&Wt.$(Ye,et))&&(Ct=.5*(Ct+Tt),Ge=.5*(Ge+et),te.x=Ct,te.y=Ge,E.x=Ct,E.y=Ge),(Ne===1||Ne===2&&Wt.$(ne.x,this.i(0).x)&&Wt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+_e.x),x.y=.5*(ne.y+_e.y)),$h(se,x.x-b,x.y-he,te.x-b,te.y-he,_e.x-b,_e.y-he),y.set(te),x.set(E),ne=_e}}_e=ne.x,ne=ne.y,Ee=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(Ee=Xd(this,Ee.copy(),!1,Yn)),_e=.5*(_e+Ee.x),ne=.5*(ne+Ee.y),$h(se,E.x-b,E.y-he,_e-b,ne-he,Ee.x-b,Ee.y-he),ft.free(y),ft.free(x),ft.free(te),ft.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=Xd(this,ne.copy(),!1,Yn)),$h(se,te.x-b,te.y-he,E.x-b,E.y-he,ne.x-b,ne.y-he);else{for(te=ft.alloc(),te.assign(this.i(0)),E=ft.alloc(),E.assign(te),ne=this.computeCorner(),Ne=1,_e=0;Ne<y;){if(Ne=Jv(this,te,Ne,1<Ne),Ee=this.i(Ne),Ne>=y-1){if(!te.D(Ee))this.computeShortLength(!1)!==0&&(Ee=Xd(this,Ee.copy(),!1,Yn)),Jd(this,se,-b,-he,te,Ee,x);else if(_e===0)for(Ne=1;Ne<y;)E.assign(te),Ee=this.i(Ne++),Jd(this,se,-b,-he,te,Ee,x),te.assign(Ee);break}if(_e=Jv(this,Ee,Ne+1,Ne<y-3),Ne=-b,Ct=-he,Ge=Ee,St=this.i(_e),st=x,Wt.B(te.y,Ge.y)&&Wt.B(Ge.x,St.x))if(et=Math.min(ne,Math.abs(Ge.x-E.x)/2),et=At=Math.min(et,Math.abs(St.y-Ge.y)/2),Wt.B(et,0))Jd(this,se,Ne,Ct,te,Ge,st),te.assign(Ge);else{var It=Ge.x,Ht=Ge.y;Ye=It,Tt=Ht,Ge.x>te.x?It=Ge.x-et:It=Ge.x+et,St.y>Ge.y?Tt=Ge.y+At:Tt=Ge.y-At,St=ft.allocAt(It,Ht),Jd(this,se,Ne,Ct,te,St,st),ft.free(St),Um(se,Ge.x+Ne,Ge.y+Ct,Ye+Ne,Tt+Ct),te.h(Ye,Tt)}else Wt.B(te.x,Ge.x)&&Wt.B(Ge.y,St.y)?(et=Math.min(ne,Math.abs(Ge.y-E.y)/2),et=At=Math.min(et,Math.abs(St.x-Ge.x)/2),Wt.B(At,0)?(Jd(this,se,Ne,Ct,te,Ge,st),te.assign(Ge)):(It=Ge.x,Ht=Ge.y,Ye=It,Tt=Ht,Ge.y>te.y?Ht=Ge.y-et:Ht=Ge.y+et,St.x>Ge.x?Ye=Ge.x+At:Ye=Ge.x-At,St=ft.allocAt(It,Ht),Jd(this,se,Ne,Ct,te,St,st),ft.free(St),Um(se,Ge.x+Ne,Ge.y+Ct,Ye+Ne,Tt+Ct),te.h(Ye,Tt))):(Jd(this,se,Ne,Ct,te,Ge,st),te.assign(Ge));E.assign(Ee),Ne=_e}ft.free(te)}Hm=se}else se=this.i(1).copy(),se.x-=b,se.y-=he,this.computeShortLength(!0)!==0&&(E=Xd(this,E,!0,te)),this.computeShortLength(!1)!==0&&(se=Xd(this,se,!1,te)),a.type=Rn.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),Wt.$(a,0)?y:Wt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Xd(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 Jv(a,y,x,b){for(var E=a.pointsCount,te=y;Wt.$(y.x,te.x)&&Wt.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!Wt.$(y.x,te.x)&&!Wt.$(y.y,te.y))return x-1;for(var ne=te;Wt.$(y.x,te.x)&&Wt.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||Wt.$(y.y,te.y)&&Wt.$(te.y,ne.y)&&(!b||(y.x>=te.x?te.x>=ne.x:te.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}Fn.prototype.computeJumpLength=function(){return 10};function Jd(a,y,x,b,E,te,ne){if(!ne&&Sd(a)){ne=a.computeJumpLength();var se=ne/2,he=[],_e=0;if(a.isVisible()&&(_e=Ex(a,E,te,he)),0<_e){if(Wt.B(E.y,te.y))if(E.x<te.x)for(var Ee=0;Ee<_e;){var Ne=Math.max(E.x,Math.min(he[Ee++]-se,te.x-ne));y.lineTo(Ne+x,te.y+b);for(var Ge=Ne+x,Ye=Math.min(Ne+ne,te.x);Ee<_e&&(Ne=he[Ee],Ne<Ye+ne);)Ee++,Ye=Math.min(Ne+se,te.x);Ne=te.y-ne+b,Ye+=x;var et=te.y+b;a.curve===ic?Wf(y,Ye,et,!1):$h(y,Ge,Ne,Ye,Ne,Ye,et)}else for(--_e;0<=_e;){for(Ee=Math.min(E.x,Math.max(he[_e--]+se,te.x+ne)),y.lineTo(Ee+x,te.y+b),Ge=Ee+x,Ne=Math.max(Ee-ne,te.x);0<=_e&&(Ee=he[_e],Ee>Ne-ne);)_e--,Ne=Math.max(Ee-se,te.x);Ee=te.y-ne+b,Ne+=x,Ye=te.y+b,a.curve===ic?Wf(y,Ne,Ye,!1):$h(y,Ge,Ee,Ne,Ee,Ne,Ye)}else if(Wt.B(E.x,te.x))if(E.y<te.y)for(Ee=0;Ee<_e;){for(Ne=Math.max(E.y,Math.min(he[Ee++]-se,te.y-ne)),y.lineTo(te.x+x,Ne+b),Ge=Ne+b,Ne=Math.min(Ne+ne,te.y);Ee<_e&&(Ye=he[Ee],Ye<Ne+ne);)Ee++,Ne=Math.min(Ye+se,te.y);Ye=te.x-ne+x,et=te.x+x,Ne+=b,a.curve===ic?Wf(y,et,Ne,!1):$h(y,Ye,Ge,Ye,Ne,et,Ne)}else for(--_e;0<=_e;){for(Ee=Math.min(E.y,Math.max(he[_e--]+se,te.y+ne)),y.lineTo(te.x+x,Ee+b),Ge=Ee+b,Ee=Math.max(Ee-ne,te.y);0<=_e&&(Ne=he[_e],Ne>Ee-ne);)_e--,Ee=Math.max(Ne-se,te.y);Ne=te.x-ne+x,Ye=te.x+x,Ee+=b,a.curve===ic?Wf(y,Ye,Ee,!1):$h(y,Ne,Ge,Ne,Ee,Ye,Ee)}}}y.lineTo(te.x+x,te.y+b)}function Ex(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 Fn){if(he===a)return 0<b.length&&b.sort(function(Ee,Ne){return Ee-Ne}),b.length;if(he.isVisible()&&Sd(he)){var _e=he.routeBounds;_e.w()&&a.routeBounds.Yc(_e)&&!a.usesSamePort(he)&&(_e=he.path,_e!==null&&_e.Ed()&&Lx(y,x,b,he))}}}}}return 0<b.length&&b.sort(function(Ee,Ne){return Ee-Ne}),b.length}function Lx(a,y,x,b){for(var E=Wt.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),se=ft.alloc(),he=1;he<te;he++){var _e=b.i(he);if(he<te-1){var Ee=b.i(he+1);if(ne.y===_e.y&&_e.y===Ee.y){if(_e.x>ne.x&&Ee.x>=_e.x||_e.x<ne.x&&Ee.x<=_e.x)continue}else if(ne.x===_e.x&&_e.x===Ee.x&&(_e.y>ne.y&&Ee.y>=_e.y||_e.y<ne.y&&Ee.y<=_e.y))continue}e:{Ee=a.x;var Ne=a.y,Ge=y.x,Ye=y.y,et=ne.x;ne=ne.y;var st=_e.x,Ct=_e.y;if(Wt.B(Ee,Ge)){if(!Wt.B(Ne,Ye)&&Wt.B(ne,Ct)&&Math.min(Ne,Ye)<ne&&Math.max(Ne,Ye)>ne&&Math.min(et,st)<Ee&&Math.max(et,st)>Ee&&!Wt.B(et,st)){se.x=Ee,se.y=ne,Ee=!0;break e}}else if(Wt.B(Ne,Ye)&&Wt.B(et,st)&&Math.min(Ee,Ge)<et&&Math.max(Ee,Ge)>et&&Math.min(ne,Ct)<Ne&&Math.max(ne,Ct)>Ne&&!Wt.B(ne,Ct)){se.x=et,se.y=Ne,Ee=!0;break e}se.x=0,se.y=0,Ee=!1}Ee&&(E?x.push(se.x):x.push(se.y)),ne=_e}ft.free(se)}function Sd(a){return a=a.curve,a===Kf||a===ic}function Qm(a,y){(y||Sd(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()))}Fn.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 Fn&&(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 Fn&&tS(this,se,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&Sd(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Fn.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},Fn.prototype.isVisible=function(){if(!Ci.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},Fn.prototype.Zb=function(a){if(Ci.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)},Fn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?hg:this.qk};function lg(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 _e=ne[he];(_e.ef===y&&_e.ff===b&&_e.uf===x&&_e.vf===E||_e.ef===x&&_e.ff===E&&_e.uf===y&&_e.vf===b)&&(te===null?te=_e:(a===null&&(a=[],a.push(te)),a.push(_e)))}if(a!==null){for(te=G1(y,x,b,E),te===null&&(te=new i0(y,b,x,E),H1(y,te),H1(x,te)),te.links=a,y=0;y<a.length;y++)a[y].Sf=te;te.Sl()}}}}function ug(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(oi(y.links,a),y.Sl()))}Fn.prototype.ph=function(){return!0},nt.Object.defineProperties(Fn.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&&Vm(y,this,x),ug(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&&Zm(a,this,E),lg(this),this.C(1)),this.g("fromNode",y,a),Zf(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&pl(x),ug(this),this.ff=a;var b=this.fromPort;b!==null&&pl(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))),lg(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&&Vm(y,this,x),ug(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&&Zm(a,this,E),lg(this),this.C(1)),this.g("toNode",y,a),Zf(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&pl(x),ug(this),this.vf=a;var b=this.toPort;b!==null&&pl(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))),lg(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:Ts},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&&pl(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&&An(a,">= 0",Fn,"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:Ts},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&&pl(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&&An(a,">= 0",Fn,"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?dr: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&&ag(this.fromNode),this.toNode!==null&&ag(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof nr?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()===Ll&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var te=this.i(2);y=Math.min(te.x,y),x=Math.min(te.y,x),Wt.Dl(E.x,E.y,b.x,b.y,b.x,b.y,te.x,te.y,.5,a)}else for(te=3;te<b;te+=3){var ne=this.i(te-2);te+3>=b&&(te=b-1);var se=this.i(te-1),he=this.i(te);Wt.Dl(E.x,E.y,ne.x,ne.y,se.x,se.y,he.x,he.y,.5,a),y=Math.min(he.x,y),x=Math.min(he.y,x),E=he}else for(E=this.i(0),te=this.i(1),y=Math.min(E.x,te.x),x=Math.min(E.y,te.y),a.h(E.x,E.y,0,0),a.Ye(te),E=2;E<b;E++)te=this.i(E),y=Math.min(te.x,y),x=Math.min(te.y,x),a.Ye(te);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new ft)}},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);Wt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Wt.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new Ln,b=0;b<a.length/2;b++)E=new ft(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(!Qt(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new Ln,b=0;b<a.length;b++)E=a[b],x.add(new ft(E.x,E.y).freeze())}}else if(a instanceof Ln)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else kt("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&&vf(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||!Vf(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Vf(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===ic||y===Kf||a===ic||a===Kf),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)}}}),Fn.prototype.invalidateOtherJumpOvers=Fn.prototype.Xo,Fn.prototype.findClosestSegment=Fn.prototype.ez,Fn.prototype.updateRoute=Fn.prototype.vg,Fn.prototype.invalidateRoute=Fn.prototype.bb,Fn.prototype.rollbackRoute=Fn.prototype.rv,Fn.prototype.commitRoute=Fn.prototype.zf,Fn.prototype.startRoute=Fn.prototype.uh,Fn.prototype.clearPoints=Fn.prototype.Fj,Fn.prototype.removePoint=Fn.prototype.pv,Fn.prototype.addPointAt=Fn.prototype.yf,Fn.prototype.addPoint=Fn.prototype.ne,Fn.prototype.insertPointAt=Fn.prototype.m,Fn.prototype.insertPoint=Fn.prototype.Kz,Fn.prototype.setPointAt=Fn.prototype.L,Fn.prototype.setPoint=Fn.prototype.dd,Fn.prototype.getPoint=Fn.prototype.i,Fn.prototype.getOtherPort=Fn.prototype.Cz,Fn.prototype.getOtherNode=Fn.prototype.To;var qd=null,Qd=null,qv=new pn(Fn,"Normal",1),Mx=new pn(Fn,"Orthogonal",2),kx=new pn(Fn,"AvoidsNodes",6),nS=new pn(Fn,"AvoidsNodesStraight",7),Fa=new pn(Fn,"None",0),Ll=new pn(Fn,"Bezier",9),ic=new pn(Fn,"JumpGap",10),Kf=new pn(Fn,"JumpOver",11),hg=new pn(Fn,"End",17),$m=new pn(Fn,"Scale",18),e0=new pn(Fn,"Stretch",19),cg=new pn(Fn,"OrientAlong",21),dg=new pn(Fn,"OrientPlus90",22),fg=new pn(Fn,"OrientMinus90",23),Qv=new pn(Fn,"OrientOpposite",24),t0=new pn(Fn,"OrientUpright",25),pg=new pn(Fn,"OrientPlus90Upright",26),gg=new pn(Fn,"OrientMinus90Upright",27),n0=new pn(Fn,"OrientUpright45",28),iS=16,rS=14,mg=8;Fn.className="Link",Fn.Normal=qv,Fn.Orthogonal=Mx,Fn.AvoidsNodes=kx,Fn.AvoidsNodesStraight=nS,Fn.None=Fa,Fn.Bezier=Ll,Fn.JumpGap=ic,Fn.JumpOver=Kf,Fn.End=hg,Fn.Scale=$m,Fn.Stretch=e0,Fn.OrientAlong=cg,Fn.OrientPlus90=dg,Fn.OrientMinus90=fg,Fn.OrientOpposite=Qv,Fn.OrientUpright=t0,Fn.OrientPlus90Upright=pg,Fn.OrientMinus90Upright=gg,Fn.OrientUpright45=n0,Fn.EndSegmentStep=8,Fn.CurvinessStart=iS,Fn.SpacingMin=rS,Fn.OrthoShortCut=mg;function i0(a,y,x,b){Ai(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}i0.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},i0.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))}},i0.className="LinkBundle";function vg(a){Ai(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}vg.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=$v,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 Yf(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function gh(a,y,x){return Yf(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):$v}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]>=xd&&(x[b]=$v)}vg.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]===rc)return!1}return!0};function mh(a,y,x,b,E,te,ne,se,he){if(!(y<te||y>ne||x<se||x>he)){var _e=y|0,Ee=x|0,Ne=a.ac[_e][Ee];if(Ne>=xd&&Ne<Xf)for(E?Ee+=b:_e+=b,Ne+=1;te<=_e&&_e<=ne&&se<=Ee&&Ee<=he&&!(Ne>=a.ac[_e][Ee]);)a.ac[_e][Ee]=Ne,Ne+=1,E?Ee+=b:_e+=b;if(_e=E?Ee:_e,E)if(0<b)for(x+=b;x<_e;x+=b)mh(a,y,x,1,!E,te,ne,se,he),mh(a,y,x,-1,!E,te,ne,se,he);else for(x+=b;x>_e;x+=b)mh(a,y,x,1,!E,te,ne,se,he),mh(a,y,x,-1,!E,te,ne,se,he);else if(0<b)for(y+=b;y<_e;y+=b)mh(a,y,x,1,!E,te,ne,se,he),mh(a,y,x,-1,!E,te,ne,se,he);else for(y+=b;y>_e;y+=b)mh(a,y,x,1,!E,te,ne,se,he),mh(a,y,x,-1,!E,te,ne,se,he)}}function r0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var _e=rc,Ee=xd;for(a.ac[y][x]=Ee;_e===rc&&y>te&&y<ne&&x>se&&x<he;)Ee+=1,a.ac[y][x]=Ee,E?x+=b:y+=b,_e=a.ac[y][x]}function o0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var _e=rc,Ee=Xf;for(a.ac[y][x]=Ee;_e===rc&&y>te&&y<ne&&x>se&&x<he;)a.ac[y][x]=Ee,E?x+=b:y+=b,_e=a.ac[y][x]}function sS(a,y,x,b,E,te,ne){if(a.ac!==null){a.abort=!1;var se=y.x,he=y.y;if(Yf(a,se,he)){se-=a.Nd,se/=a.rc,he-=a.Od,he/=a.sc;var _e=b.x,Ee=b.y;if(Yf(a,_e,Ee))if(_e-=a.Nd,_e/=a.rc,Ee-=a.Od,Ee/=a.sc,1>=Math.abs(se-_e)&&1>=Math.abs(he-Ee))a.abort=!0;else{var Ne=te.x;b=te.y,y=te.x+te.width;var Ge=te.y+te.height;Ne-=a.Nd,Ne/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Ge-=a.Od,Ge/=a.sc,te=Math.max(0,Math.min(a.di,Ne|0)),y=Math.min(a.di,Math.max(0,y|0)),Ne=Math.max(0,Math.min(a.ei,b|0)),Ge=Math.min(a.ei,Math.max(0,Ge|0)),b=a.ac,se|=0,he|=0,_e|=0,Ee|=0;var Ye=x===0||x===90?1:-1;if(x=x===90||x===270,b[se][he]===rc?(r0(a,se,he,Ye,x,te,y,Ne,Ge),r0(a,se,he,1,!x,te,y,Ne,Ge),r0(a,se,he,-1,!x,te,y,Ne,Ge)):r0(a,se,he,Ye,x,se,he,se,he),b[_e][Ee]===rc?(o0(a,_e,Ee,E===0||E===90?1:-1,E===90||E===270,te,y,Ne,Ge),o0(a,_e,Ee,1,!(E===90||E===270),te,y,Ne,Ge),o0(a,_e,Ee,-1,!(E===90||E===270),te,y,Ne,Ge)):o0(a,_e,Ee,Ye,x,_e,Ee,_e,Ee),x=ai(),ne&&aS(a,_e,Ee,E,se,he,x))for((x[0]!==_e||x[1]!==Ee)&&(x.unshift(Ee),x.unshift(_e)),(x[x.length-2]!==se||x[x.length-1]!==he)&&(x.push(se),x.push(he)),a=xd,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],_e=x[te+1];y>E?E++:y<E?E--:_e>ne?ne++:_e<ne&&ne--,b[E][ne]=a++,E!==y||ne!==_e;);else mh(a,se,he,1,!1,te,y,Ne,Ge),mh(a,se,he,-1,!1,te,y,Ne,Ge),mh(a,se,he,1,!0,te,y,Ne,Ge),mh(a,se,he,-1,!0,te,y,Ne,Ge);Gn(x)}}}}function aS(a,y,x,b,E,te,ne){for(var se=a.ac,he=y,_e=x;;){if(he===E&&_e===te)return!0;var Ee=he,Ne=_e;if(b===0)if(Ee<E)Ee++;else break;else if(b===90)if(Ne<te)Ne++;else break;else if(b===180)if(Ee>E)Ee--;else break;else if(Ne>te)Ne--;else break;var Ge=se[Ee][Ne];if(Ge===0||Ge===ey)break;he=Ee,_e=Ne}for(;;){if(Ee=b,Ne=he,Ge=_e,b===0?Ge<te?(Ee=90,Ge++):Ge>te&&(Ee=270,Ge--):b===90?Ne<E?(Ee=0,Ne++):Ne>E&&(Ee=180,Ne--):b===180?Ge<te?(Ee=90,Ge++):Ge>te&&(Ee=270,Ge--):Ne<E?(Ee=0,Ne++):Ne>E&&(Ee=180,Ne--),Ne=se[Ne][Ge],Ee!==b&&Ne!==0&&Ne!==ey){if(ne.push(he),ne.push(_e),aS(a,he,_e,Ee,E,te,ne))return!0;ne.pop(),ne.pop()}if(se[he][_e]=ey,b===0){if(he===y)return!1;he--}else if(b===90){if(_e===x)return!1;_e--}else if(b===180){if(he===y)return!1;he++}else{if(_e===x)return!1;_e++}}}nt.Object.defineProperties(vg.prototype,{bounds:{get:function(){return new nn(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 rc=0,xd=1,Xf=999999,$v=Xf+1,ey=Xf+2;vg.className="PositionArray";function $d(){Ai(this),this.port=this.node=null,this.pe=[],this.ap=!1}$d.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 Tx(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}$d.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 Ji?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(Gr,ft.alloc()),he=a.port.ga(jo,ft.alloc());for(E=nn.allocAt(se.x,se.y,0,0),E.Ye(he),ft.free(se),ft.free(he),se=ft.allocAt(E.x+E.width/2,E.y+E.height/2),he=a.port.li(),ne=ne.iterator;ne.next();){var _e=ne.value;if(_e.isVisible()&&_e.fromPort!==_e.toPort){var Ee=_e.fromPort===a.port||_e.fromNode!==null&&_e.fromNode.Td(b),Ne=_e.computeSpot(Ee,a.port);if(Ne.$c()&&(Ee=Ee?_e.toPort:_e.fromPort,Ee!==null)){var Ge=Ee.part;if(Ge!==null){var Ye=Ge.findVisibleNode();Ye!==null&&Ye!==Ge&&(Ge=Ye,Ee=Ge.port),Ee=_e.computeOtherPoint(Ge,Ee),Ge=se.ab(Ee),Ge-=he,0>Ge?Ge+=360:360<=Ge&&(Ge-=360),Ne=Tx(E,Ne,Ge,_e.isOrthogonal),Ne===0?(Ne=4,180<Ge&&(Ge-=360)):Ne===90?(Ne=8,270<Ge&&(Ge-=360)):Ne===180?Ne=2:(Ne=1,90>Ge&&(Ge+=360)),Ye=a.pe[te],Ye===void 0?(Ye=new ty(_e,Ge,Ne),a.pe[te]=Ye):(Ye.link=_e,Ye.angle=Ge,Ye.Nc=Ne),Ye.hv.set(Ee),te++}}}}for(ft.free(se),a.pe.sort($d.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,Ne=a.port,b=a.node.portSpreading,se=ft.alloc(),he=ft.alloc(),ne=ft.alloc(),_e=ft.alloc(),Ne.ga(Gr,se),Ne.ga(aa,he),Ne.ga(jo,ne),Ne.ga(xs,_e),Ye=Ge=Ee=Ne=0,b===Wv)for(var et=0;et<te.length;et++){var st=te[et];if(st!==null){var Ct=st.link.computeThickness();switch(st.Nc){case 8:Ge+=Ct;break;case 2:Ye+=Ct;break;case 1:Ne+=Ct;break;default:case 4:Ee+=Ct}}}var St=et=0,Tt=1,At=st=0;for(Ct=0;Ct<te.length;Ct++){var It=te[Ct];if(It!==null){if(et!==It.Nc){switch(et=It.Nc,et){case 8:var Ht=ne;St=_e;break;case 2:Ht=_e,St=se;break;case 1:Ht=se,St=he;break;default:case 4:Ht=he,St=ne}switch(st=St.x-Ht.x,At=St.y-Ht.y,et){case 8:Ge>Math.abs(st)?(Tt=Math.abs(st)/Ge,Ge=Math.abs(st)):Tt=1;break;case 2:Ye>Math.abs(At)?(Tt=Math.abs(At)/Ye,Ye=Math.abs(At)):Tt=1;break;case 1:Ne>Math.abs(st)?(Tt=Math.abs(st)/Ne,Ne=Math.abs(st)):Tt=1;break;default:case 4:Ee>Math.abs(At)?(Tt=Math.abs(At)/Ee,Ee=Math.abs(At)):Tt=1}St=0}var $t=It.Zo;if(b===Wv){switch(It=It.link.computeThickness(),It*=Tt,$t.set(Ht),et){case 8:$t.x=Ht.x+st/2+Ge/2-St-It/2;break;case 2:$t.y=Ht.y+At/2+Ye/2-St-It/2;break;case 1:$t.x=Ht.x+st/2-Ne/2+St+It/2;break;default:case 4:$t.y=Ht.y+At/2-Ee/2+St+It/2}St+=It}else{var Kn=.5;b===Km&&(Kn=(It.Uo+1)/(It.Gl+1)),$t.x=Ht.x+st*Kn,$t.y=Ht.y+At*Kn}}}for(ft.free(se),ft.free(he),ft.free(ne),ft.free(_e),Ht=a.pe,te=0;te<Ht.length;te++)b=Ht[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,nn.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}$d.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},$d.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,or,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var te=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<te.y:y.x<te.x)?x+8*b:(a?y.y===te.y:y.x===te.x)?x:x+8*(E-1-b)},$d.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new ft,this.Gl=this.Uo=0,this.Zo=new ft,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 Vo(a){Ai(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new ft(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Vo.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},Vo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Vo.prototype.qb=function(){},Vo.prototype.toString=function(){var a=Bn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Vo.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())}}},Vo.prototype.createNetwork=function(){return new Lo(this)},Vo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof en?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Ji?y.lg(a.memberParts):y.lg(a.iterator),y},Vo.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")}},Vo.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()}},Vo.prototype.doLayout=function(a){var y=new Mn;a instanceof en?(Ic(this,y,a.nodes,!0,this.rh,!0,!1,!0),Ic(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Ji?Ic(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},Vo.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;yg(se);var he=se.measuredBounds,_e=he.width;he=he.height,se.moveTo(b,E),se instanceof Ji&&(se.rh=!1),b+=Math.max(_e,50)+20,ne=Math.max(ne,Math.max(he,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},Vo.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 Fn)&&(yg(se),this.rh(se))){var he=se.measuredBounds,_e=he.width;he=he.height,se.moveTo(x,b),se instanceof Ji&&(se.rh=!1),x+=Math.max(_e,50)+20,te=Math.max(te,Math.max(he,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},Vo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Ji&&a.rh)};function Ic(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 Xn?he.isLinkLabel||(he instanceof Ji&&he.layout===null?Ic(a,y,he.memberParts,!1,E,te,ne,se):(yg(he),y.add(he))):ne&&he instanceof Fn?y.add(he):!se||!he.Zc()||he instanceof Xn||(yg(he),y.add(he)))}}function yg(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Vo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new nn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Vo.prototype.ex=function(a){var y=new Mn;return a instanceof en?(Ic(this,y,a.nodes,!0,null,!0,!0,!0),Ic(this,y,a.links,!0,null,!0,!0,!0),Ic(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Ji?Ic(this,y,a.memberParts,!1,null,!0,!0,!0):Ic(this,y,a.iterator,!1,null,!0,!0,!0),y},Vo.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(Gr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},nt.Object.defineProperties(Vo.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())}}}),Vo.prototype.collectParts=Vo.prototype.ex,Vo.prototype.getLayoutBounds=Vo.prototype.ni,Vo.prototype.invalidateLayout=Vo.prototype.C,Vo.className="Layout";function Lo(a){Ai(this),this.Sc=a,this.wf=new Mn,this.ye=new Mn,this.Es=new hn,this.zs=new hn}Lo.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 Mn,this.ye=new Mn,this.Es=new hn,this.zs=new hn},Lo.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},Lo.prototype.createVertex=function(){return new ks(this)},Lo.prototype.createEdge=function(){return new gl(this)},Lo.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 Xn)return!ne.isLinkLabel;if(ne instanceof Fn){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 Xn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Ji&&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 Fn&&(!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))}}},Lo.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=Lo.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),iy(this,a)}};function iy(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=ai(),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]);Gn(a)},Lo.prototype.deleteArtificialVertexes=function(){for(var a=ai(),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=ai(),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]);Gn(a),Gn(y)};function Ax(a){for(var y=ai(),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]);Gn(y)}Lo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new Ln;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),ry(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 ry(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&&(iy(a,E),ny(y,E),ry(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(iy(a,x),ny(y,x),ry(a,y,x.toVertex))}}Lo.prototype.dz=function(){for(var a=new Mn,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},nt.Object.defineProperties(Lo.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}}}),Lo.prototype.findAllParts=Lo.prototype.dz,Lo.prototype.splitIntoSubNetworks=Lo.prototype.Zx,Lo.prototype.deleteSelfEdges=Lo.prototype.Ko,Lo.prototype.reverseEdge=Lo.prototype.gm,Lo.prototype.linkVertexes=Lo.prototype.Zj,Lo.prototype.findEdge=Lo.prototype.Lo,Lo.prototype.deleteLink=Lo.prototype.Yy,Lo.prototype.deleteEdge=Lo.prototype.Mj,Lo.prototype.addLink=Lo.prototype.Dy,Lo.prototype.addEdge=Lo.prototype.Bo,Lo.prototype.findVertex=Lo.prototype.ki,Lo.prototype.deleteNode=Lo.prototype.Zy,Lo.prototype.deleteVertex=Lo.prototype.Iu,Lo.prototype.addNode=Lo.prototype.Bl,Lo.prototype.addVertex=Lo.prototype.dh,Lo.prototype.addParts=Lo.prototype.lg,Lo.className="LayoutNetwork";function ks(a){Ai(this),this.ob=a,this.j=new nn(0,0,10,10).freeze(),this.o=new ft(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Ln,this.mg=new Ln}ks.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Ln,this.mg=new Ln},ks.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Xi(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},ks.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Qt(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 Ji)){x=nn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(_r);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),nn.free(x);return}nn.free(x)}a.moveTo(y.x,y.y)}},ks.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ks.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ks.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ks.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}nt.Object.defineProperties(ks.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=nn.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),nn.free(x),!(a instanceof Ji)&&(a=a.locationObject.ga(_r),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 Mn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Mn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Mn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new Ln,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),ks.prototype.deleteDestinationEdge=ks.prototype.Jl,ks.prototype.addDestinationEdge=ks.prototype.zl,ks.prototype.deleteSourceEdge=ks.prototype.Kl,ks.prototype.addSourceEdge=ks.prototype.Cl,ks.className="LayoutVertex",ks.standardComparer=oy,ks.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 gl(a){Ai(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}gl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},gl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Xi(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},gl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},gl.prototype.commit=function(){},gl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},nt.Object.defineProperties(gl.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)}}}),gl.prototype.getOtherVertex=gl.prototype.Ax,gl.className="LayoutEdge";function oa(a){Vo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Cn(NaN,NaN).freeze(),this.tf=new Cn(10,10).freeze(),this.Jb=Sg,this.Rb=a0,this.nd=xg,this.hd=hS,a&&Object.assign(this,a)}Xe(oa,Vo),oa.prototype.cloneProtected=function(a){Vo.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},oa.prototype.qb=function(a){a.classType===oa?a===xg||a===u0||a===sy||a===l0?this.sorting=a:a===a0||a===Au?this.arrangement=a:a===Sg||a===s0?this.alignment=a:kt("Unknown enum value: "+a):Vo.prototype.qb.call(this,a)},oa.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 Ji)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 l0:E.reverse();break;case xg:E.sort(this.comparer);break;case u0: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 s0:var se=y,he=x,_e=nn.alloc(),Ee=Math.max(this.cellSize.width,1);if(!isFinite(Ee))for(var Ne=Ee=0;Ne<E.length;Ne++){var Ge=this.ni(E[Ne],_e);Ee=Math.max(Ee,Ge.width)}if(Ee=Math.max(Ee+se,1),Ne=Math.max(this.cellSize.height,1),!isFinite(Ne))for(Ge=Ne=0;Ge<E.length;Ge++){var Ye=this.ni(E[Ge],_e);Ne=Math.max(Ne,Ye.height)}Ne=Math.max(Ne+he,1),Ge=this.arrangement;for(var et=Ye=this.arrangementOrigin.x,st=this.arrangementOrigin.y,Ct=0,St=0,Tt=0;Tt<E.length;Tt++){var At=E[Tt],It=this.ni(At,_e),Ht=Math.ceil((It.width+se)/Ee)*Ee,$t=Math.ceil((It.height+he)/Ne)*Ne;switch(Ge){case Au:var Kn=Math.abs(et-It.width);break;default:Kn=et+It.width}switch((0<te&&Ct>te-1||0<ne&&0<Ct&&Kn-Ye>ne)&&(b.push(new nn(0,st,ne+se,St)),Ct=0,et=Ye,st+=St,St=0),St=Math.max(St,$t),Ge){case Au:It=-It.width;break;default:It=0}switch(At.moveTo(et+It,st),Ge){case Au:et-=Ht;break;default:et+=Ht}Ct++}b.push(new nn(0,st,ne+se,St)),nn.free(_e);break;case Sg:for(he=ne,Ee=te,Ne=y,Ge=x,ne=nn.alloc(),Ye=Math.max(this.cellSize.width,1),te=st=_e=0,se=ft.alloc(),et=0;et<E.length;et++)St=E[et],Ct=this.ni(St,ne),St=ec(St,St.locationObject,St.locationSpot,se),_e=Math.max(_e,St.x),st=Math.max(st,Ct.width-St.x),te=Math.max(te,St.y);switch(et=this.arrangement,et){case Au:_e+=Ne;break;default:st+=Ne}Ye=isFinite(Ye)?Math.max(Ye+Ne,1):Math.max(_e+st,1);var ci=St=this.arrangementOrigin.x;for(Tt=this.arrangementOrigin.y,st=0,he>=_e&&(he-=_e),_e=At=0,Ht=Math.max(this.cellSize.height,1),It=te=0,$t=!0,Ct=ft.alloc(),Kn=0;Kn<E.length;Kn++){var si=E[Kn],In=this.ni(si,ne),wn=ec(si,si.locationObject,si.locationSpot,se);if(0<st)switch(et){case Au:ci=(ci-St-(In.width-wn.x))/Ye,ci=Wt.$(Math.round(ci),ci)?Math.round(ci):Math.floor(ci),ci=ci*Ye+St;break;default:ci=(ci-St+wn.x)/Ye,ci=Wt.$(Math.round(ci),ci)?Math.round(ci):Math.ceil(ci),ci=ci*Ye+St}else switch(et){case Au:At=ci+wn.x+In.width;break;default:At=ci-wn.x}switch(et){case Au:var Yi=-(ci+wn.x)+At;break;default:Yi=ci+In.width-wn.x-At}if(0<Ee&&st>Ee-1||0<he&&0<st&&Yi>he){for(b.push(new nn(0,$t?Tt-te:Tt,he+Ne,It+te+Ge)),ci=0;ci<st&&Kn!==st;ci++){Yi=E[Kn-st+ci];var Bi=ec(Yi,Yi.locationObject,Yi.locationSpot,Ct);Yi.moveTo(Yi.position.x,Yi.position.y+te-Bi.y)}It+=Ge,Tt=$t?Tt+It:Tt+(It+te),st=It=te=0,ci=St,$t=!1}switch(ci===St&&(_e=et===Au?Math.max(_e,In.width-wn.x):Math.min(_e,-wn.x)),te=Math.max(te,wn.y),It=Math.max(It,In.height-wn.y),isFinite(Ht)&&(It=Math.max(It,Math.max(In.height,Ht)-wn.y)),$t?si.moveTo(ci-wn.x,Tt-wn.y):si.moveTo(ci-wn.x,Tt),et){case Au:ci-=wn.x+Ne;break;default:ci+=In.width-wn.x+Ne}st++}if(b.push(new nn(0,Tt,he+Ne,($t?It:It+te)+Ge)),E.length!==st)for(he=0;he<st;he++)Ee=E[E.length-st+he],Ne=ec(Ee,Ee.locationObject,Ee.locationSpot,se),Ee.moveTo(Ee.position.x,Ee.position.y+te-Ne.y);if(ft.free(se),ft.free(Ct),et===Au)for(E=0;E<b.length;E++)te=b[E],te.width+=_e,te.x-=_e;else for(E=0;E<b.length;E++)te=b[E],te.x>_e&&(te.width+=te.x-_e,te.x=_e);nn.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===Au?this.commitLayers(b,new ft(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new ft(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},oa.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}nt.Object.defineProperties(oa.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!==Sg&&a!==s0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==a0&&a!==Au||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==sy&&a!==l0&&a!==xg&&a!==u0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var s0=new pn(oa,"Position",0),Sg=new pn(oa,"Location",1),a0=new pn(oa,"LeftToRight",2),Au=new pn(oa,"RightToLeft",3),sy=new pn(oa,"Forward",4),l0=new pn(oa,"Reverse",5),xg=new pn(oa,"Ascending",6),u0=new pn(oa,"Descending",7);oa.className="GridLayout",oa.standardComparer=hS,oa.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},oa.Position=s0,oa.Location=Sg,oa.LeftToRight=a0,oa.RightToLeft=Au,oa.Forward=sy,oa.Reverse=l0,oa.Ascending=xg,oa.Descending=u0;function to(){this.On=new Mn,this.Dn=new Mn,this.Pa=new Mn,this.cf=new hn,this.bf=new hn,this.aj=new hn,this.H=null,this.tp=!1}Qe=to.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 Xn){if(this.On.add(a),a instanceof Ji){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 Fn?this.Dn.add(a):a instanceof jr||this.Pa.add(a);y=a.data,y===null||a instanceof jr||(a instanceof Fn?this.bf.add(y,a):this.cf.add(y,a))},Qe.pc=function(a){if(a.Ej(),a instanceof Xn){if(this.On.remove(a),a instanceof Ji){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 Fn?this.Dn.remove(a):a instanceof jr||this.Pa.remove(a);y=a.data,y===null||a instanceof jr||(a instanceof Fn?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 Ji)&&kt('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 Ji||kt('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 Fn||kt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=ai(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=ai(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=ai(),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]);Gn(y),Gn(x),Gn(a)}},to.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},to.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&&Pf(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=dS(a,y,b);if(E!==null&&(Ql(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)}}to.prototype.insertLink=function(){return null},to.prototype.resolveReferencesForData=function(){},to.prototype.Ro=function(a){return this.H.model.Ro(a)};function dS(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,jn('No Group template found for category "'+x+'"'),jn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,jn('No Node template found for category "'+x+'"'),jn(" Using default node template")),y=a.ny))),y}to.prototype.getLinkCategoryForData=function(){return""},to.prototype.setLinkCategoryForData=function(){},to.prototype.setFromNodeForLink=function(){},to.prototype.setToNodeForLink=function(){},to.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,jn('No Link template found for category "'+a+'"'),jn(" Using default link template")),x=y.my)),x},to.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},to.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},to.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Op(this.diagram,a,!1),this.unresolveReferencesForPart(a))},to.prototype.unresolveReferencesForPart=function(){},to.prototype.removeDataForLink=function(){},to.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},to.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Xn?a:null)},to.prototype.findLinkForKey=function(){return null},Qe=to.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 Xn?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 Mn;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(Qt(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},Qe.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Mn;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(Qt(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator};function ay(a,y,x){for(var b in x){var E=y[b],te=x[b];if(rn(te)){if(!rn(E)||E.length<te.length)return!1;for(var ne=0;ne<E.length;ne++){var se=te[ne];if(se!==void 0&&!fS(a,E[ne],se))return!1}}else if(!fS(a,E,te))return!1}return!0}function fS(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(Qt(y)&&Qt(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}to.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var b=a.modelChange;if(b!=="")if(x===Ro){if(b==="nodeCategory"){var E=this.Lc(a.object),te=a.newValue;E!==null&&typeof te=="string"&&(E.category=te)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===ns){var ne=a.newValue;b==="nodeDataArray"&&Qt(ne)&&cS(this,ne),y.isModified=!0}else if(x===qo){var se=a.oldValue;b==="nodeDataArray"&&Qt(se)&&this.ip(se),y.isModified=!0}else x===ca&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Ro){var he=a.propertyName,_e=a.object;_e===y.model?(he==="nodeKeyProperty"||he==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(_e,he),y.isModified=!0}else if(x===ns||x===qo){var Ee=a.change===ns,Ne=Ee?a.newParam:a.oldParam,Ge=Ee?a.newValue:a.oldValue,Ye=this.aj.I(a.object);if(Array.isArray(Ye))for(a=0;a<Ye.length;a++){var et=Ye[a];if(Ee)Mm(et,Ge,Ne,!0);else if(!(0>Ne)){var st=Ne+tg(et);et.pc(st,!0),wv(et,st,Ne)}}y.isModified=!0}}finally{y.aa=!0}}}}},to.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)},to.prototype.rp=function(){for(var a=this.H.model,y=new Mn,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){CS(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&PS(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()},to.prototype.refreshDataBoundLinks=function(){},to.prototype.updateRelationshipsFromData=function(){},to.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=ai()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Gn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(rn(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){gd(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(rn(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}}}}to.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new hn;if(rn(a))for(var E=0;E<a.length;E++)h0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)h0(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 Mn;for(var te=new hn,ne=b.iterator;ne.next();){var se=ne.value;if(se instanceof Fn)a||se.fromNode!==null&&se.toNode!==null||E.add(se);else if(se instanceof Xn&&se.data!==null&&x.Tl()){var he=se;se=ne.key;var _e=se.pg();_e!==null&&(_e=b.I(_e),_e!==null?(x.qe(he.data,x.wa(_e.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 Ee=new hn;b.each(function(Ne){Ne.key.data!==null&&Ee.add(Ne.key.data,Ne.value.data)}),x(Ee,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function h0(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 Ci))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof Xn){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 Ji&&te instanceof Ji)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof Fn||ne===null||(ne.containingGroup=te)}else if(y instanceof Fn&&te instanceof Fn)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=h0(a,y.value,x,b,E),ne!==null&&ne instanceof Xn&&(ne.labeledLink=te);return te}to.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Fn||(b=E.copyNodeData(b),Qt(b)&&(E.xf(b),x=y.Lc(b)))}else Ql(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 Fn||(E=y.copyNodeData(b)),Qt(E)&&(x.data=E)));return x},nt.Object.defineProperties(to.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}}}),to.prototype.updateAllRelationshipsFromData=to.prototype.rp,to.prototype.findLinksByExample=to.prototype.ls,to.prototype.findNodesByExample=to.prototype.ms,to.prototype.findLinkForData=to.prototype.Kc,to.prototype.findNodeForData=to.prototype.ii,to.prototype.findPartForData=to.prototype.Lc,to.prototype.findNodeForKey=to.prototype.Vb,to.prototype.removeModeledPart=to.prototype.ip,to.prototype.removeModeledParts=to.prototype.Gs,to.prototype.rebuildParts=to.prototype.Wd;var pS=!1,gS=!1,mS=!1;to.className="PartManager";function Ws(a){to.apply(this,arguments)}Xe(Ws,to),Ws.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},Ws.prototype.addModeledParts=function(a){for(to.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Zf(a.value);Pf(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),Pf(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){Ql(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=p0(x,y,!0);te!==""&&(E.fromPortId=te),te=Ml(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof Xn&&(E.fromNode=te)),te=p0(x,y,!1),te!==""&&(E.toPortId=te),te=Ml(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof Xn&&(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}}}}Ws.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)})}Ws.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Ws.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Ws.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Ws.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Ws.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Ws.prototype.findPartForKey=function(a){var y=to.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Ws.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Ws.prototype.doModelChanged=function(a){var y=this;if(to.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===Ro){if(E==="linkFromKey"){var te=this.Kc(a.object);if(te!==null){var ne=this.Vb(a.newValue);te.fromNode=ne}}else if(E==="linkToKey"){var se=this.Kc(a.object);if(se!==null){var he=this.Vb(a.newValue);se.toNode=he}}else if(E==="linkFromPortId"){var _e=this.Kc(a.object);if(_e!==null){var Ee=a.newValue;typeof Ee=="string"&&(_e.fromPortId=Ee)}}else if(E==="linkToPortId"){var Ne=this.Kc(a.object);if(Ne!==null){var Ge=a.newValue;typeof Ge=="string"&&(Ne.toPortId=Ge)}}else if(E==="nodeGroupKey"){var Ye=this.Lc(a.object);if(Ye!==null){var et=a.newValue;if(et!==void 0){var st=this.Vb(et);st instanceof Ji?Ye.containingGroup=st:Ye.containingGroup=null}else Ye.containingGroup=null}}else if(E==="linkLabelKeys"){var Ct=this.Kc(a.object);if(Ct!==null){var St=a.oldValue,Tt=a.newValue;Array.isArray(St)&&St.forEach(function(wn){0<=Tt.indexOf(wn)||(wn=y.Vb(wn),wn!==null&&(wn.labeledLink=null))}),Array.isArray(Tt)&&Tt.forEach(function(wn){wn=y.Vb(wn),wn!==null&&(wn.labeledLink=Ct)})}}else if(E==="linkCategory"){var At=this.Kc(a.object),It=a.newValue;At!==null&&typeof It=="string"&&(At.category=It)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===ns){var Ht=a.newValue;if(E==="linkDataArray"&&typeof Ht=="object"&&Ht!==null)yS(this,Ht);else if(E==="linkLabelKeys"&&Fc(Ht)){var $t=this.Kc(a.object),Kn=this.Vb(Ht);$t!==null&&Kn!==null&&(Kn.labeledLink=$t)}x.isModified=!0}else if(b===qo){var ci=a.oldValue;if(E==="linkDataArray"&&typeof ci=="object"&&ci!==null)this.ip(ci);else if(E==="linkLabelKeys"&&Fc(ci)){var si=this.Vb(ci);si!==null&&(si.labeledLink=null)}x.isModified=!0}}else if(b===Ro){var In=a.propertyName;a.object!==x.model||In!=="linkFromKeyProperty"&&In!=="linkToKeyProperty"&&In!=="linkFromPortIdProperty"&&In!=="linkToPortIdProperty"&&In!=="linkLabelKeysProperty"&&In!=="nodeIsGroupProperty"&&In!=="nodeGroupKeyProperty"&&In!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Ws.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Mn,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&&TS(y,te,!1)})},Ws.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 Fn){var E=Ml(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Ml(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 Mn().addAll(y);var ne=new Mn;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 jr)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Ji)&&(a.containingGroup=y)}}},Ws.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=wg(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 Ji&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof Xn&&(Ml(y,ne,!0)===x&&(te.link.fromNode=E),Ml(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}}Du(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Ji&&(E.containingGroup=a))}},Ws.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Xn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Nu(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Nu(y,x,b.data)),a instanceof Ji)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Nu(y,x,b)}}},Ws.prototype.copyPartData=function(a,y){var x=to.prototype.copyPartData.call(this,a,y);if(a instanceof Fn)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},Ws.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 Fn){if(Ql(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 Xn&&(Ql(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&&qf(te,b,te.wa(a.data),!0),Qf(te,b,se,!0),x!==null&&qf(te,b,te.wa(x.data),!1),Qf(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof Xn||(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},Ws.prototype.findLinkForKey=Ws.prototype.findLinkForKey,Ws.prototype.findPartForKey=Ws.prototype.findPartForKey,Ws.prototype.removeAllModeledParts=Ws.prototype.removeAllModeledParts,Ws.prototype.addModeledParts=Ws.prototype.addModeledParts,Ws.prototype.addAllModeledParts=Ws.prototype.addAllModeledParts,Ws.className="GraphLinksPartManager";function Bl(){to.apply(this,arguments),this.Sg=null}Xe(Bl,to);function c0(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||!_i(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(Ql(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}}}Bl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Bl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Bl.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}},Bl.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))},Bl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Bl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Bl.prototype.doModelChanged=function(a){if(to.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var b=a.modelChange;if(b!==""){if(x===Ro){if(b==="nodeParentKey"){var E=a.object,te=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)te!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var se=ne.kh();se!==null?te===null?y.remove(se):y.isTreePathToChildren?se.fromNode=te:se.toNode=te:c0(this,te,ne)}}else if(b==="parentLinkCategory"){var he=this.ii(a.object),_e=a.newValue;if(he!==null&&typeof _e=="string"){var Ee=he.kh();Ee!==null&&(Ee.category=_e)}}y.isModified=!0}}else if(x===Ro){var Ne=a.propertyName;a.object===y.model&&Ne==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Bl.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Xn&&(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:c0(this,y,a):b!==null&&Op(x,b,!1)))}}},Bl.prototype.updateDataBindings=function(a,y){to.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Bl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=wg(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 Xn&&y.mh(te)===x&&c0(this,E,this.ii(te))}Du(y,x)}a=y.mh(a),a!==void 0&&E instanceof Xn&&(a=this.Vb(a),c0(this,a,E))}},Bl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Xn){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(qo,"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)&&Nu(y,x,E)}},Bl.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},Bl.prototype.findLinkForKey=Bl.prototype.findLinkForKey,Bl.className="TreePartManager";function gi(a,y){this.kl=new Mn,this.il=new Mn,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Ai(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new hn,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 hn,this.Lt=new Ln,this.Wg=!1,this.o=null,this.undoManager=new Ao,a!==void 0&&(rn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}gi.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},gi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},gi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},gi.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)+":"+bi(E)}}return y},gi.prototype.xA=function(a){a.change!==ca&&kt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof cs?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},gi.prototype.Qv=function(a,y){var x=this,b=!1,E=new Mn,te=new Mn,ne=new Mn,se=this.vh;a.changes.each(function(Ne){Ne.model===x&&(Ne.modelChange==="nodeDataArray"?Ne.change===ns?E.add(Ne.newValue):Ne.change===qo&&ne.add(Ne.oldValue):x.lb(Ne.object)?te.add(Ne.object):Ne.change!==Ro||x.modelData!==Ne.object&&Ne.propertyName!=="modelData"?Ne.object!==null&&(se&&se.contains(Ne.object)?se.get(Ne.object).each(function(Ge){x.lb(Ge)&&te.add(Ge)}):Ne.object instanceof gi||x.ri()&&x.Jc(Ne.object)||_S(x,Ne.object).each(function(Ge){te.add(Ge)})):b=!0)});var he=this.il;he.clear(),E.each(function(Ne){he.add(x.wa(Ne)),y||te.add(Ne)});var _e=this.kl;_e.clear(),ne.each(function(Ne){_e.add(x.wa(Ne)),y&&te.add(Ne)}),a=x.cloneDeep(te.Fa());var Ee=null;return b&&(Ee===null&&(Ee={}),Ee.modelData=this.cloneDeep(this.modelData)),0<he.count&&(Ee===null&&(Ee={}),y?Ee.removedNodeKeys=he.Fa():Ee.insertedNodeKeys=he.Fa()),0<a.length&&(Ee===null&&(Ee={}),Ee.modifiedNodeData=a),0<_e.count&&(Ee===null&&(Ee={}),y?Ee.insertedNodeKeys=_e.Fa():Ee.removedNodeKeys=_e.Fa()),_e.clear(),he.clear(),Ee},gi.prototype.cloneDeep=function(a){return Jf(this,a,!0)};function Jf(a,y,x,b,E,te){function ne(Ne,Ge){se?(Ne.__gohashid===void 0&&te.push(Ne),b.set(Ne,Ge)):(Ne=lo++,b.set(Ne,Ge),E.set(Ne,y))}if(!Qt(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new hn),se){var he=b.get(y);if(he)return he}else for(E||(E=new hn),he=E.iterator;he.next();){var _e=he.key;if(he.value===y&&(_e=b.get(_e)))return _e}if(Array.isArray(y)){he=[],ne(y,he);for(var Ee=0;Ee<y.length;Ee++)he.push(Jf(a,y[Ee],!1,b,E,te))}else if(y instanceof ft||y instanceof Cn||y instanceof nn||y instanceof Qi||y instanceof zn)he=y.copy(),ne(y,he);else{if(y instanceof eo||y instanceof Rn||y instanceof pn)return y;if(y instanceof Ln)he=new Ln().addAll(Jf(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Mn)he=new Mn().addAll(Jf(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof hn)he=new hn().addAll(Jf(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(Ee in he={},ne(y,he),y)Ee!=="__gohashid"&&(he[Ee]=Jf(a,y[Ee],!1,b,E,te))}return x&&te.forEach(function(Ne){delete Ne.__gohashid}),he}Qe=gi.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,Qt(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": `+Rc(this,this.nodeDataArray,!0)},Qe.kv=function(a){xS(this,a),a=a.nodeDataArray,rn(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 Mn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new hn,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===Ro?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===ns||te===qo)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function _S(a,y){for(var x=new Mn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];d0(a,y,E,E,x)}return x}function d0(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(d0(a,y,ne,b,E))return!0}else if(Qt(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(d0(a,y,ne,b,E))return!0}return!1}Qe.Pv=function(a,y){var x=this,b=!1,E=new Mn,te=new Mn,ne=new Mn,se=this.vh;a.changes.each(function(Ee){Ee.model===x&&(Ee.modelChange==="nodeDataArray"?Ee.change===ns?E.add(Ee.newValue):Ee.change===qo&&ne.add(Ee.oldValue):x.lb(Ee.object)?te.add(Ee.object):Ee.change!==Ro||x.modelData!==Ee.object&&Ee.propertyName!=="modelData"?Ee.object!==null&&(se&&se.contains(Ee.object)?se.get(Ee.object).each(function(Ne){x.lb(Ne)&&te.add(Ne)}):Ee.object instanceof gi||x.ri()&&x.Jc(Ee.object)||_S(x,Ee.object).each(function(Ne){te.add(Ne)})):b=!0)});var he=this.il;he.clear(),E.each(function(Ee){he.add(x.wa(Ee)),y||te.add(Ee)});var _e=this.kl;return _e.clear(),ne.each(function(Ee){_e.add(x.wa(Ee)),y&&te.add(Ee)}),a="",b&&(a+=`,
|
|
|
"modelData": `+hy(this,this.modelData)),0<he.count&&(a+=(y?this.Yv:this.Wv)+Rc(this,he.Fa(),!0)),0<te.count&&(a+=this.jy+Rc(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Wv:this.Yv)+Rc(this,_e.Fa(),!0)),_e.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)&&kt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new hn;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!==ca&&kt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof cs?(y===void 0&&(y=_g(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=_g(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=Zt.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:kt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&kt("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)},gi.constructGraphLinksModel=function(){return new gi},Qe=gi.prototype,Qe.dm=function(a){if(rn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Qt(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:kt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Qt(a)){for(y in a)if(x=a[y],Qt(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new Ln,b=0;b<x.length/2;b++)E.add(new ft(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Nx(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()):rn(a)?Rc(this,a):Qt(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function Rc(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 Ba(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof ft)y={class:"go.Point",x:Ba(x.x),y:Ba(x.y)};else if(x instanceof Cn)y={class:"go.Size",width:Ba(x.width),height:Ba(x.height)};else if(x instanceof nn)y={class:"go.Rect",x:Ba(x.x),y:Ba(x.y),width:Ba(x.width),height:Ba(x.height)};else if(x instanceof Qi)y={class:"go.Margin",top:Ba(x.top),right:Ba(x.right),bottom:Ba(x.bottom),left:Ba(x.left)};else if(x instanceof zn)x.sb()?y={class:"go.Spot",x:Ba(x.x),y:Ba(x.y),offsetX:Ba(x.offsetX),offsetY:Ba(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof eo){if(y={class:"go.Brush",type:x.type.name},x.type===qh?y.color=x.color:(x.type===Dh||x.type===Rl)&&(y.start=x.start,y.end=x.end,x.type===Rl&&(x.startRadius!==0&&(y.startRadius=Ba(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Ba(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 Rn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Ba(x.startX)),x.startY!==0&&(y.startY=Ba(x.startY)),x.endX!==0&&(y.endX=Ba(x.endX)),x.endY!==0&&(y.endY=Ba(x.endY)),x.spot1.D(Gr)||(y.spot1=x.spot1),x.spot2.D(jo)||(y.spot2=x.spot2),x.type===Rn.o&&(y.path=Rn.ia(x))):x instanceof pn&&(y={class:"go.EnumValue",classType:_g(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=ds(y,E);if(!bS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof Ln){var ne="[";for(te=te.iterator;te.next();){var se=te.value;1<ne.length&&(ne+=","),ne+=a.sm(se.x),ne+=",",ne+=a.sm(se.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function ja(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Nx(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 ft(ja(a.x),ja(a.y));else if(y==="Size")x=new Cn(ja(a.width),ja(a.height));else if(y==="Rect")x=new nn(ja(a.x),ja(a.y),ja(a.width),ja(a.height));else if(y==="Margin")x=new Qi(ja(a.top),ja(a.right),ja(a.bottom),ja(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Us(a.enum):x=new zn(ja(a.x),ja(a.y),ja(a.offsetX),ja(a.offsetY));else if(y==="Brush"){if(x=new eo,x.type=$n(eo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof zn&&(x.start=a.start),a.end instanceof zn&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=ja(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=ja(a.endRadius)),a=a.colorStops,Qt(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Rn.parse(a.path):x=new Rn,x.type=$n(Rn,a.type),typeof a.startX=="number"&&(x.startX=ja(a.startX)),typeof a.startY=="number"&&(x.startY=ja(a.startY)),typeof a.endX=="number"&&(x.endX=ja(a.endX)),typeof a.endY=="number"&&(x.endY=ja(a.endY)),a.spot1 instanceof zn&&(x.spot1=a.spot1),a.spot2 instanceof zn&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=$n(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){Cs(this,"",a,y,x,b,E,te,ne)},Qe.g=function(a,y,x,b,E){Cs(this,"",Ro,a,this,y,x,b,E)},Qe.Fs=function(a,y,x,b,E,te){Cs(this,"",Ro,y,a,x,b,E,te)};function Cs(a,y,x,b,E,te,ne,se,he){se===void 0&&(se=null),he===void 0&&(he=null);var _e=new Io;_e.model=a,_e.change=x,_e.modelChange=y,_e.propertyName=b,_e.object=E,_e.oldValue=te,_e.oldParam=se,_e.newValue=ne,_e.newParam=he,a.ds(_e)}gi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Ro){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),Wo(x,b,E)}else a.change===ns?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Qt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&oi(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Dn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!rn(b)&&a.propertyName&&(b=ds(a.object,a.propertyName)),rn(b)&&typeof x=="number"&&(a=a.newValue,y?oi(b,x):Dn(b,x,a))):kt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===qo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Qt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Dn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&oi(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!rn(b)&&a.propertyName&&(b=ds(a.object,a.propertyName)),rn(b)&&typeof x=="number"&&(a=a.oldValue,y?Dn(b,x,a):oi(b,x))):kt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ca&&kt("unknown ChangedEvent: "+a.toString())},gi.prototype.Ea=function(a){return this.undoManager.Ea(a)},gi.prototype.eb=function(a){return this.undoManager.eb(a)},gi.prototype.Kf=function(){return this.undoManager.Kf()},gi.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=gi.prototype,Qe.La=function(a,y){y===void 0&&(y=""),Cs(this,"SourceChanged",ca,y,a,null,null)},Qe.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ds(a,y),y!==void 0)){if(Fc(y))return y;kt("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=ds(a,x);b!==y&&this.hc(y)===null&&(Wo(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Cs(this,"nodeKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Wo(a,x,y)}};function Fc(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&&kt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Fc(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&&(zi(a),this.lb(a)||PS(this,a,!0))};function PS(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&&kt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Dn(a.Tc,b,y)),Cs(a,"nodeDataArray",ns,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Qe.Fy=function(a){if(rn(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&&CS(this,a,!0)};function CS(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;oi(a.Tc,b)}Cs(a,"nodeDataArray",qo,"nodeDataArray",a,y,null,b,null),a.qp(y)}Qe.nA=function(a){if(rn(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&&rn(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=wg(this,a),a instanceof Mn&&this.Vf.add(y,a))},Qe.Lv=function(){},Qe.fm=function(){},Qe.em=function(){},Qe.qp=function(){};function Nu(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new Mn,a.Vf.add(y,b)),b.add(x)}}function Du(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof Mn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function wg(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Mn?a:null)}Qe.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},gi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),Qt(a)&&Ai(a),a};function f0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=f0(a,y[x],a.copiesArrayObjects);b.push(E)}return Ai(b),b}if(x&&Qt(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=ds(y,b),ne=_g(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof gi||te instanceof Ao||te instanceof cs||te instanceof Io||(te=f0(a,te,!1)),Wo(x,b,te)}return Ai(x),x}return y instanceof ft||y instanceof Cn||y instanceof nn||y instanceof zn||y instanceof Qi?y.copy():y}gi.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!ES&&a instanceof Gt&&(ES=!0,jn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),jn(" Is that really your intent?"));var b=ds(a,y);b!==x&&(Wo(a,y,x),this.Fs(a,y,b,x))},Qe=gi.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),Dn(a,y,x),Cs(this,"",ns,"",a,null,x,null,y)},Qe.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&kt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];oi(a,y),Cs(this,"",qo,"",a,x,null,y,null)},Qe.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ds(a,y),y===void 0))return"";if(typeof y=="string")return y;kt("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=ds(a,x);b===void 0&&(b=""),b!==y&&(Wo(a,x,y),Cs(this,"nodeCategory",Ro,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 gi}function _g(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 _g(a,y.constructor);return typeof y}function dy(a){return pu[a]?pu[a]:Zt.go!==void 0&&Zt.go[a]?Zt.go[a]:null}function ds(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){}}nt.Object.defineProperties(gi.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===""&&kt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&kt("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];Qt(E)||kt("Model.nodeDataArray must only contain Objects, not: "+E),zi(E)}for(this.Tc=a,b=new Ln,E=0;E<x;E++){var te=a[E],ne=this.wa(te);ne===void 0||this.kb.I(ne)!==null?b.add(te):this.kb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),te=this.wa(E),te!==void 0&&this.kb.add(te,E);for(Cs(this,"nodeDataArray",Ro,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),gi.prototype.setCategoryForNodeData=gi.prototype.jm,gi.prototype.getCategoryForNodeData=gi.prototype.Ro,gi.prototype.removeArrayItem=gi.prototype.ov,gi.prototype.insertArrayItem=gi.prototype.ts,gi.prototype.addArrayItem=gi.prototype.Ay,gi.prototype.assignAllDataProperties=gi.prototype.Do,gi.prototype.set=gi.prototype.set,gi.prototype.clearUnresolvedReferences=gi.prototype.Qy,gi.prototype.mergeNodeDataArray=gi.prototype.$z,gi.prototype.removeNodeDataCollection=gi.prototype.nA,gi.prototype.removeNodeData=gi.prototype.cm,gi.prototype.addNodeDataCollection=gi.prototype.Fy,gi.prototype.addNodeData=gi.prototype.xf,gi.prototype.makeNodeDataKeyUnique=gi.prototype.$u,gi.prototype.findNodeDataForKey=gi.prototype.hc,gi.prototype.containsNodeData=gi.prototype.lb,gi.prototype.setKeyForNodeData=gi.prototype.km,gi.prototype.getKeyForNodeData=gi.prototype.wa,gi.prototype.updateTargetBindings=gi.prototype.La,gi.prototype.commit=gi.prototype.commit,gi.prototype.rollbackTransaction=gi.prototype.Kf,gi.prototype.commitTransaction=gi.prototype.eb,gi.prototype.startTransaction=gi.prototype.Ea,gi.prototype.raiseDataChanged=gi.prototype.Fs,gi.prototype.raiseChanged=gi.prototype.g,gi.prototype.raiseChangedEvent=gi.prototype.cb,gi.prototype.removeChangedListener=gi.prototype.ik,gi.prototype.addChangedListener=gi.prototype.Pe,gi.prototype.writeJsonValue=gi.prototype.sm,gi.prototype.replaceJsonObjects=gi.prototype.dm,gi.prototype.applyIncrementalJSON=gi.prototype.Ky,gi.prototype.applyIncrementalJson=gi.prototype.Zw,gi.prototype.toJSON=gi.prototype.toJSON,gi.prototype.toJson=gi.prototype.np,gi.prototype.toIncrementalJSON=gi.prototype.yA,gi.prototype.toIncrementalJson=gi.prototype.$x,gi.prototype.toIncrementalData=gi.prototype.xA,gi.prototype.clear=gi.prototype.clear;var ES=!1,pu={};gi.className="Model",gi.fromJSON=gi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Zt.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:kt("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=dy(b)):(E=dy(b),E===null&&(E=Zt[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof gi?y=a:kt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=gi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},gi.safePropertyValue=ds,gi.safePropertySet=Wo,pu.Brush=eo,pu.ChangedEvent=Io,pu.Geometry=Rn,pu.Margin=Qi,pu.Panel=Nn,pu.Point=ft,pu.Rect=nn,pu.Size=Cn,pu.Spot=zn,pu.Transaction=cs,pu.UndoManager=Ao;function ms(a,y,x,b){Ai(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,b===void 0?(this.el=MS,this.wk=null):(this.el=bg,this.wk=b),this.st=new Mn}ms.prototype.copy=function(){var a=new ms;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Qe=ms.prototype,Qe.qb=function(a){a.classType===ms&&(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=bg,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 LS(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==="")jn("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=ds(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===bg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=ds(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 _e=b.itemIndex,Ee=b.panel.itemArray;he.ov(Ee,_e),he.ts(Ee,_e,ne)}}else try{if(x!==""){var Ne=te(ne,y,he);he!==null?he.setDataProperty(y,x,Ne):Wo(y,x,Ne)}else{var Ge=te(ne,y,he);if(Ge!==void 0&&he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ye=b.itemIndex,et=b.panel.itemArray;he.ov(et,Ye),he.ts(et,Ye,Ge)}}}catch(st){}}finally{this.st.remove(a)}}}},nt.Object.defineProperties(ms.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&ln(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&ln(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&ln(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&ln(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&ln(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&ln(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&ln(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&ln(this),this.el=a}}}),ms.prototype.updateSource=ms.prototype.sp,ms.prototype.updateTarget=ms.prototype.Mv,ms.prototype.ofModel=ms.prototype.dA,ms.prototype.ofObject=ms.prototype.cp,ms.prototype.makeTwoWay=ms.prototype.Kx;var Dx="Binding",MS=new pn(ms,"OneWay",1),bg=new pn(ms,"TwoWay",2);ms.className="Binding",ms.parseEnum=function(a,y){return function(x){return x=$n(a,x),x===null?y:x}},ms.toString=bi,ms.OneWay=MS,ms.TwoWay=bg;function kr(a,y,x){gi.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Mn,this.wb=new hn,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&&(rn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Xe(kr,gi),kr.constructGraphLinksModel=gi.constructGraphLinksModel,kr.prototype.cloneProtected=function(a){gi.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=kr.prototype,Qe.clear=function(){gi.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)+":"+bi(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Ml(this,E,!0)+"-->"+Ml(this,E,!1)}return y},Qe.Qv=function(a,y){this.linkKeyProperty===""&&kt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=gi.prototype.Qv.call(this,a,y),b=this,E=new Mn,te=new Mn,ne=new Mn,se=this.vh;a.changes.each(function(Ee){Ee.model===b&&(Ee.modelChange==="linkDataArray"?Ee.change===ns?E.add(Ee.newValue):Ee.change===qo&&ne.add(Ee.oldValue):b.Jc(Ee.object)?te.add(Ee.object):Ee.object!==null&&(Ee.object!==null&&se&&se.contains(Ee.object)?se.get(Ee.object).each(function(Ne){b.Jc(Ne)&&te.add(Ne)}):Ee.object instanceof gi||b.lb(Ee.object)||kS(b,Ee.object).each(function(Ne){te.add(Ne)})))});var he=this.il;he.clear(),E.each(function(Ee){he.add(b.Ac(Ee)),y||te.add(Ee)});var _e=this.kl;return _e.clear(),ne.each(function(Ee){_e.add(b.Ac(Ee)),y&&te.add(Ee)}),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<_e.count&&(x===null&&(x={}),y?x.insertedLinkKeys=_e.Fa():x.removedLinkKeys=_e.Fa()),_e.clear(),he.clear(),x},Qe.rm=function(){var a=gi.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){gi.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=gi.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+Rc(this,this.linkDataArray,!0);return a+y},Qe.kv=function(a){gi.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function kS(a,y){for(var x=new Mn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];d0(a,y,E,E,x)}return x}Qe.Pv=function(a,y){this.linkKeyProperty===""&&kt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=gi.prototype.Pv.call(this,a,y),b=this,E=new Mn,te=new Mn,ne=new Mn,se=this.vh;a.changes.each(function(Ee){Ee.model===b&&(Ee.modelChange==="linkDataArray"?Ee.change===ns?E.add(Ee.newValue):Ee.change===qo&&ne.add(Ee.oldValue):b.Jc(Ee.object)?te.add(Ee.object):Ee.object!==null&&(Ee.object!==null&&se&&se.contains(Ee.object)?se.get(Ee.object).each(function(Ne){b.Jc(Ne)&&te.add(Ne)}):Ee.object instanceof gi||b.lb(Ee.object)||kS(b,Ee.object).each(function(Ne){te.add(Ne)})))});var he=this.il;he.clear(),E.each(function(Ee){he.add(b.Ac(Ee)),y||te.add(Ee)});var _e=this.kl;return _e.clear(),ne.each(function(Ee){_e.add(b.Ac(Ee)),y&&te.add(Ee)}),a=x,0<he.count&&(a+=(y?this.Xv:this.Vv)+Rc(this,he.Fa(),!0)),0<te.count&&(a+=this.iy+Rc(this,te.Fa(),!0)),0<_e.count&&(a+=(y?this.Vv:this.Xv)+Rc(this,_e.Fa(),!0)),_e.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)&&kt("applyIncrementalJson cannot change Model properties"),gi.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]);NS(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)},kr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Ro){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),Wo(x,b,E);return}}else if(a.change===ns){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Qt(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===qo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Qt(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}}gi.prototype.changeState.call(this,a,y)}},Qe=kr.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 Ml(this,a,!0)},Qe.wv=function(a,y){qf(this,a,y,!0)},Qe.Bx=function(a){return Ml(this,a,!1)},Qe.Bv=function(a,y){qf(this,a,y,!1)};function Ml(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ds(y,a),a!==void 0))){if(Fc(a))return a;kt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function qf(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=ds(y,E);te!==x&&(Du(a,te,y),Wo(y,E,x),a.hc(x)===null&&Nu(a,x,y),Cs(a,b?"linkFromKey":"linkToKey",Ro,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Wo(y,E,x)}}Qe.zx=function(a){return p0(this,a,!0)},Qe.xv=function(a,y){Qf(this,a,y,!0)},Qe.Cx=function(a){return p0(this,a,!1)},Qe.Cv=function(a,y){Qf(this,a,y,!1)};function p0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=ds(y,a),y===void 0?"":y)}function Qf(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=ds(y,E);te===void 0&&(te=""),te!==x&&(Wo(y,E,x),Cs(a,b?"linkFromPortId":"linkToPortId",Ro,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Wo(y,E,x)}}Qe.Ef=function(a){if(a===null)return g0;var y=this.je;return y===""?g0:(a=ds(a,y),a===void 0?g0:a)},Qe.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=ds(a,x);if(b===void 0&&(b=g0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)Du(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&&Nu(this,ne,a)}Cs(this,"linkLabelKeys",Ro,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=ds(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&&Nu(this,y,a),Cs(this,"linkLabelKeys",ns,x,a,null,y,null,E)))}else kt(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=ds(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Du(this,y,a),Cs(this,"linkLabelKeys",qo,x,a,y,null,E,null)))}else b!==void 0&&kt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Qe.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ds(a,y),y!==void 0)){if(Fc(y))return y;kt("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=ds(a,x);b!==y&&this.jh(y)===null&&(Wo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Cs(this,"linkKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},Qe.jh=function(a){return a===null&&kt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Fc(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&&(zi(a),this.Jc(a)||TS(this,a,!0))};function TS(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&&kt("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)),Cs(a,"linkDataArray",ns,"linkDataArray",a,null,y,null,b),fy(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(Cs(a,"linkDataArray",qo,"linkDataArray",a,y,null,b,null),x=Ml(a,y,!0),Du(a,x,y),x=Ml(a,y,!1),Du(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],Du(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===""&&kt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&rn(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),NS(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 fy(a,y){var x=Ml(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Nu(a,x,y),x=Ml(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Nu(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&&Nu(a,x,y)}Qe.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):f0(this,a,!0),Qt(a)&&(Ai(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:!!ds(a,y)},Qe.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ds(a,y),y!==void 0)){if(Fc(y))return y;kt("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=ds(a,x);b!==y&&(Du(this,b,a),Wo(a,x,y),this.hc(y)===null&&Nu(this,y,a),Cs(this,"nodeGroupKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},kr.prototype.copyNodeData=function(a){return a===null?null:(a=gi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ds(a,this.Je)===void 0||Wo(a,this.Je,void 0),a)},kr.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){qf(this,a,x,!0);return}if(y===this.linkToKeyProperty){qf(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Qf(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Qf(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=ds(a,y);b!==x&&(Wo(a,y,x),this.Fs(a,y,b,x))},Qe=kr.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&&ds(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},Qe.jp=function(a,y){gi.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(Ml(this,b,!0)===E){var ne=this.lf;Wo(b,ne,te),Cs(this,"linkFromKey",Ro,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(Ml(this,b,!1)===E&&(ne=this.mf,Wo(b,ne,te),Cs(this,"linkToKey",Ro,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var se=ne.length,he=this.je,_e=0;_e<se;_e++)ne[_e]===E&&(ne[_e]=te,Cs(this,"linkLabelKeys",ns,he,b,E,te,_e,_e))}},Qe.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Wo(a,b,x),Cs(this,"nodeGroupKey",Ro,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Qe.Lv=function(){gi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},Qe.fm=function(a){gi.prototype.fm.call(this,a),a=this.wa(a);var y=wg(this,a);if(y!==null){var x=ai();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Cs(this,"nodeGroupKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Ml(this,b,!0)===a&&(E=this.lf,Cs(this,"linkFromKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Ml(this,b,!1)===a&&(E=this.mf,Cs(this,"linkToKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var te=E.length,ne=this.je,se=0;se<te;se++)E[se]===a&&(Cs(this,"linkLabelKeys",ns,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)Du(this,a,x[y]);Gn(x)}},Qe.em=function(a){gi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Nu(this,y,a)},Qe.qp=function(a){gi.prototype.qp.call(this,a);var y=this.lh(a);Du(this,y,a)},Qe.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ds(a,y),y===void 0))return"";if(typeof y=="string")return y;kt("getCategoryForLinkData found a non-string category for "+a+": "+y)},kr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},kr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=ds(a,x);b===void 0&&(b=""),b!==y&&(Wo(a,x,y),Cs(this,"linkCategory",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},kr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Qe=kr.prototype,Qe.lm=function(a,y){gi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function NS(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},nt.Object.defineProperties(kr.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];Qt(E)||kt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),zi(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Ln,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new Mn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Cs(this,"linkDataArray",Ro,"linkDataArray",this,y,a),y=0;y<x;y++)fy(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"}}}),kr.prototype.setCategoryForLinkData=kr.prototype.lp,kr.prototype.getCategoryForLinkData=kr.prototype.ps,kr.prototype.assignAllDataProperties=kr.prototype.Do,kr.prototype.setGroupKeyForNodeData=kr.prototype.mp,kr.prototype.getGroupKeyForNodeData=kr.prototype.lh,kr.prototype.isGroupForNodeData=kr.prototype.Yu,kr.prototype.copyLinkData=kr.prototype.Jo,kr.prototype.mergeLinkDataArray=kr.prototype.Zz,kr.prototype.removeLinkDataCollection=kr.prototype.lA,kr.prototype.removeLinkData=kr.prototype.bm,kr.prototype.addLinkDataCollection=kr.prototype.Ey,kr.prototype.addLinkData=kr.prototype.fi,kr.prototype.containsLinkData=kr.prototype.Jc,kr.prototype.makeLinkDataKeyUnique=kr.prototype.Bs,kr.prototype.findLinkDataForKey=kr.prototype.jh,kr.prototype.setKeyForLinkData=kr.prototype.Ks,kr.prototype.getKeyForLinkData=kr.prototype.Ac,kr.prototype.removeLabelKeyForLinkData=kr.prototype.Qx,kr.prototype.addLabelKeyForLinkData=kr.prototype.Bu,kr.prototype.setLabelKeysForLinkData=kr.prototype.Ls,kr.prototype.getLabelKeysForLinkData=kr.prototype.Ef,kr.prototype.setToPortIdForLinkData=kr.prototype.Cv,kr.prototype.getToPortIdForLinkData=kr.prototype.Cx,kr.prototype.setFromPortIdForLinkData=kr.prototype.xv,kr.prototype.getFromPortIdForLinkData=kr.prototype.zx,kr.prototype.setToKeyForLinkData=kr.prototype.Bv,kr.prototype.getToKeyForLinkData=kr.prototype.Bx,kr.prototype.setFromKeyForLinkData=kr.prototype.wv,kr.prototype.getFromKeyForLinkData=kr.prototype.yx,kr.prototype.clear=kr.prototype.clear;var g0=Object.freeze([]);kr.className="GraphLinksModel",pu.GraphLinksModel=kr,gi.constructGraphLinksModel=gi.constructGraphLinksModel=function(){return new kr},gi.initDiagramModel=cy=function(){return new kr};function za(a,y){gi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(rn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Xe(za,gi),za.constructGraphLinksModel=gi.constructGraphLinksModel,za.prototype.cloneProtected=function(a){gi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Qe=za.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)+":"+bi(E)}}return y},Qe.rm=function(){var a=gi.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){gi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Qe.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&kt("applyIncrementalJson cannot change Model properties"),gi.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=ds(a,y),y!==void 0)){if(Fc(y))return y;kt("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=ds(a,x);b!==y&&(Du(this,b,a),Wo(a,x,y),this.hc(y)===null&&Nu(this,y,a),Cs(this,"nodeParentKey",Ro,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=ds(a,y),y===void 0)?"":typeof y=="string"?y:(kt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},za.prototype.getLinkCategoryForData=function(a){return this.ss(a)},za.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=ds(a,x);b===void 0&&(b=""),b!==y&&(Wo(a,x,y),Cs(this,"parentLinkCategory",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},za.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},za.prototype.copyNodeData=function(a){return a===null?null:(a=gi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ds(a,this.Ke)===void 0||Wo(a,this.Ke,void 0),a)},za.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=ds(a,y);b!==x&&(Wo(a,y,x),this.Fs(a,y,b,x))},Qe=za.prototype,Qe.jp=function(a,y){gi.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),Cs(this,"nodeParentKey",Ro,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Qe.fm=function(a){gi.prototype.fm.call(this,a),a=this.wa(a);var y=wg(this,a);if(y!==null){var x=ai();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Cs(this,"nodeParentKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Du(this,a,x[y]);Gn(x)}},Qe.em=function(a){gi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Nu(this,y,a)},Qe.qp=function(a){gi.prototype.qp.call(this,a);var y=this.mh(a);Du(this,y,a)},Qe.lm=function(a,y){gi.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},nt.Object.defineProperties(za.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"}}}),za.prototype.setParentLinkCategoryForNodeData=za.prototype.Ms,za.prototype.getParentLinkCategoryForNodeData=za.prototype.ss,za.prototype.setParentKeyForNodeData=za.prototype.qe,za.prototype.getParentKeyForNodeData=za.prototype.mh,za.className="TreeModel",pu.TreeModel=za;function $o(a){Vo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=gu,this.Ti=0,this.Zv=new ft,this.Jp=this.me=0,this.Xr=new Lg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=gu,this.K=Ua,this.nd=ep,this.hd=oy,this.tf=6,this.Nn=_0,a&&Object.assign(this,a)}Xe($o,Vo),$o.prototype.cloneProtected=function(a){Vo.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},$o.prototype.qb=function(a){a.classType===$o?a===x0||a===w0||a===y0||a===S0||a===ep?this.sorting=a:a===wd||a===$f||a===Ua||a===jc?this.direction=a:a===oc||a===Bc||a===gu||a===mu?this.arrangement=a:(a===ef||a===_0)&&(this.nodeDiameterFormula=a):Vo.prototype.qb.call(this,a)},$o.prototype.createNetwork=function(){return new tp(this)},$o.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Ln;y.addAll(a.iterator),a=new Ln;var x=new Ln,b=this.sort(y),E,te,ne=this.Jp,se=this.arrangement,he=this.nodeDiameterFormula,_e=this.radius;(!isFinite(_e)||0>=_e)&&(_e=NaN);var Ee=this.aspectRatio;(!isFinite(Ee)||0>=Ee)&&(Ee=1);var Ne=this.startAngle;isFinite(Ne)||(Ne=0);var Ge=this.sweepAngle;if((!isFinite(Ge)||360<Ge||1>Ge)&&(Ge=360),y=this.spacing,isFinite(y)||(y=NaN),se===mu&&he===ef?se=gu:se===mu&&he!==ef&&(se=this.arrangement),(this.direction===wd||this.direction===$f)&&this.sorting!==ep){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===wd?(this.arrangement===mu&&a.reverse(),b=new Ln,b.addAll(a),b.addAll(x)):(this.arrangement===mu&&x.reverse(),b=new Ln,b.addAll(x),b.addAll(a))}he=b.length;for(var Ye=te=E=0;Ye<b.length;Ye++){var et=Ne+Ge*te*(this.direction===Ua?1:-1)/he,st=b.M(Ye).diameter;isNaN(st)&&(st=zc(b.M(Ye),et)),360>Ge&&(Ye===0||Ye===b.length-1)&&(st/=2),E+=st,te++}if(isNaN(_e)||se===mu){if(isNaN(y)&&(y=6),se!==gu&&se!==mu){for(te=-1/0,ne=0;ne<he;ne++)Ye=b.M(ne),E=b.M(ne===he-1?0:ne+1),isNaN(Ye.diameter)&&zc(Ye,0),isNaN(E.diameter)&&zc(E,0),te=Math.max(te,(Ye.diameter+E.diameter)/2);ne=te+y,se===oc?_e=(te+y)/(2*Math.PI/he):_e=m0(this,ne*(360<=Ge?he:he-1),Ee,Ne*Math.PI/180,Ge*Math.PI/180)}else _e=m0(this,E+(360<=Ge?he:he-1)*(se!==mu?y:1.6*y),Ee,Ne*Math.PI/180,Ge*Math.PI/180);te=_e*Ee}else if(te=_e*Ee,Ye=py(this,_e,te,Ne*Math.PI/180,Ge*Math.PI/180),isNaN(y))(se===gu||se===mu)&&(y=(Ye-E)/(360<=Ge?he:he-1));else if(se===gu||se===mu)Ye=(Ye-E)/(360<=Ge?he:he-1),Ye<y?(_e=m0(this,E+y*(360<=Ge?he:he-1),Ee,Ne*Math.PI/180,Ge*Math.PI/180),te=_e*Ee):y=Ye;else{for(ne=-1/0,E=0;E<he;E++)et=b.M(E),st=b.M(E===he-1?0:E+1),isNaN(et.diameter)&&zc(et,0),isNaN(st.diameter)&&zc(st,0),ne=Math.max(ne,(et.diameter+st.diameter)/2);ne+=y,E=m0(this,ne*(360<=Ge?he:he-1),Ee,Ne*Math.PI/180,Ge*Math.PI/180),E>_e?(_e=E,te=_e*Ee):ne=Ye/(360<=Ge?he:he-1)}if(this.kw=se,this.lc=_e,this.Zm=Ee,this.lw=Ne,this.Wp=Ge,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,se=this.lc,_e=this.lw,Ee=this.Wp,Ne=this.Ti,Ge=this.me,he=this.Jp,this.direction!==wd&&this.direction!==$f||b!==mu)if(this.direction===wd||this.direction===$f){switch(ne=0,b){case Bc:ne=180*v0(this,se,Ge,_e,he)/Math.PI;break;case gu:he=y=0,ne=a.first(),ne!==null&&(y=zc(ne,Math.PI/2)),ne=x.first(),ne!==null&&(he=zc(ne,Math.PI/2)),ne=180*v0(this,se,Ge,_e,Ne+(y+he)/2)/Math.PI;break;case oc:ne=Ee/y.length}if(this.direction===wd){switch(b){case Bc:Eg(this,a,_e,jc);break;case gu:Cg(this,a,_e,jc);break;case oc:Pg(this,a,Ee/2,_e,jc)}switch(b){case Bc:Eg(this,x,_e+ne,Ua);break;case gu:Cg(this,x,_e+ne,Ua);break;case oc:Pg(this,x,Ee/2,_e+ne,Ua)}}else{switch(b){case Bc:Eg(this,x,_e,jc);break;case gu:Cg(this,x,_e,jc);break;case oc:Pg(this,x,Ee/2,_e,jc)}switch(b){case Bc:Eg(this,a,_e+ne,Ua);break;case gu:Cg(this,a,_e+ne,Ua);break;case oc:Pg(this,a,Ee/2,_e+ne,Ua)}}}else switch(b){case Bc:Eg(this,y,_e,this.direction);break;case gu:Cg(this,y,_e,this.direction);break;case oc:Pg(this,y,Ee,_e,this.direction);break;case mu:DS(this,y,Ee,_e,this.direction)}else DS(this,y,Ee,_e-Ee/2,Ua)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Pg(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 _e=b+(E===Ua?he*x/(360<=te?se:se-1):-(he*x)/se),Ee=y.M(he),Ne=ne*Math.tan(_e)/a;Ne=Math.sqrt((ne*ne+a*a*Ne*Ne)/(1+Ne*Ne)),Ee.centerX=Ne*Math.cos(_e),Ee.centerY=Ne*Math.sin(_e),Ee.actualAngle=180*_e/Math.PI}}function Cg(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 _e=y.M(he),Ee=y.M(he===se-1?0:he+1),Ne=te*Math.sin(x);_e.centerX=E*Math.cos(x),_e.centerY=Ne,_e.actualAngle=180*x/Math.PI,isNaN(_e.diameter)&&zc(_e,0),isNaN(Ee.diameter)&&zc(Ee,0),_e=v0(a,E,te,b===Ua?x:-x,(_e.diameter+Ee.diameter)/2+ne),x+=b===Ua?_e:-_e}}function Eg(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 _e=y.M(he);_e.centerX=E*Math.cos(x),_e.centerY=te*Math.sin(x),_e.actualAngle=180*x/Math.PI,_e=v0(a,E,te,b===Ua?x:-x,ne),x+=b===Ua?_e:-_e}}function DS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new Lg,360>x){for(te=b+(E===Ua?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,IS(a,y,x,b,E)}else OS(a,y,x,b,E);a.Xr.commit(y)}function OS(a,y,x,b,E){var te=a.lc,ne=a.Ti,se=a.Zm,he=te*Math.cos(b*Math.PI/180),_e=a.me*Math.sin(b*Math.PI/180),Ee=y.Fa();if(Ee.length===3)Ee[0].centerX=te,Ee[0].centerY=0,Ee[1].centerX=Ee[0].centerX-Ee[0].width/2-Ee[1].width/2-ne,Ee[1].y=Ee[0].y,Ee[2].centerX=(Ee[0].centerX+Ee[1].centerX)/2,Ee[2].y=Ee[0].y-Ee[2].height-ne;else if(Ee.length===4)Ee[0].centerX=te,Ee[0].centerY=0,Ee[2].centerX=-Ee[0].centerX,Ee[2].centerY=Ee[0].centerY,Ee[1].centerX=0,Ee[1].y=Math.min(Ee[0].y,Ee[2].y)-Ee[1].height-ne,Ee[3].centerX=0,Ee[3].y=Math.max(Ee[0].y+Ee[0].height+ne,Ee[2].y+Ee[2].height+ne);else{te=ft.alloc();for(var Ne=0;Ne<Ee.length&&(Ee[Ne].centerX=he,Ee[Ne].centerY=_e,!(Ne>=Ee.length-1));Ne++)RS(a,he,_e,Ee,Ne,E,te)||FS(a,he,_e,Ee,Ne,E,te),he=te.x,_e=te.y;if(ft.free(te),a.mj++,!(23<a.mj)){he=Ee[0].centerX,_e=Ee[0].centerY,te=Ee[Ee.length-1].centerX,Ne=Ee[Ee.length-1].centerY;var Ge=Math.abs(he-te)-((Ee[0].width+Ee[Ee.length-1].width)/2+ne),Ye=Math.abs(_e-Ne)-((Ee[0].height+Ee[Ee.length-1].height)/2+ne);ne=0,1>Math.abs(Ye)?Math.abs(he-te)<(Ee[0].width+Ee[Ee.length-1].width)/2&&(ne=0):ne=0<Ye?Ye:1>Math.abs(Ge)?0:Ge,he=Math.abs(te)>Math.abs(Ne)?0<te!=_e>Ne:0<Ne!=he<te,(he=E===Ua?he:!he)&&(ne=-Math.abs(ne),ne=Math.min(ne,-Ee[Ee.length-1].width),ne=Math.min(ne,-Ee[Ee.length-1].height)),a.Xr.compare(ne,Ee),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>Ee.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*se,OS(a,y,x,b,E))}}}function IS(a,y,x,b,E){for(var te=a.lc,ne=a.me,se=a.Zm,he=te*Math.cos(b*Math.PI/180),_e=ne*Math.sin(b*Math.PI/180),Ee=ft.alloc(),Ne=y.Fa(),Ge=0;Ge<Ne.length&&(Ne[Ge].centerX=he,Ne[Ge].centerY=_e,!(Ge>=Ne.length-1));Ge++)RS(a,he,_e,Ne,Ge,E,Ee)||FS(a,he,_e,Ne,Ge,E,Ee),he=Ee.x,_e=Ee.y;if(ft.free(Ee),a.mj++,!(23<a.mj)){if(he=Math.atan2(_e,he),he=E===Ua?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<Ne.length;he++)ne.mk[he]=Ne[he].bounds.x,ne.tm[he]=Ne[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,IS(a,y,x,b,E))}}function RS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,_e=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var Ee=!1;if(0<=x!=(te===Ua)){if(te=y+a,te>se){if(te=y-a,te<-se)return ne.x=te,ne.y=_e,!1;Ee=!0}}else if(te=y-a,te<-se){if(te=y+a,te>se)return ne.x=te,ne.y=_e,!1;Ee=!0}return _e=Math.sqrt(1-Math.min(1,te*te/(se*se)))*he,0>x!==Ee&&(_e=-_e),Math.abs(x-_e)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=_e,!1):(ne.x=te,ne.y=_e,!0)}function FS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,_e=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===Ua)){if(te=x-a,te<-he){if(te=x+a,te>he){ne.x=_e,ne.y=te;return}b=!0}}else if(te=x+a,te>he){if(te=x-a,te<-he){ne.x=_e,ne.y=te;return}b=!0}_e=Math.sqrt(1-Math.min(1,te*te/(he*he)))*se,0>y!==b&&(_e=-_e),ne.x=_e,ne.y=te}$o.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},$o.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 ft(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))},$o.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,_e=0;_e<=te;_e++){b!==void 0&&E!==void 0?he=b+_e*E/te:he=_e*Math.PI/(2*te);var Ee=Math.sin(he);ne+=Math.sqrt(1-a*a*Ee*Ee)*se}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function m0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function v0(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}}$o.prototype.sort=function(a){switch(this.sorting){case y0:break;case S0:a.reverse();break;case x0:a.sort(this.comparer);break;case w0:a.sort(this.comparer),a.reverse();break;case ep:return this.ak(Ox(a));default:kt("Invalid sorting type.")}return a};function Ox(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Ln;for(var b=0;b<a.length;b++){var E=-1,te=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var se=a.M(ne).edgesCount;se>E&&(E=se,te=ne)}else for(ne=0;ne<a.length;ne++)se=y[ne],se>E&&(E=se,te=ne);for(x.add(a.M(te)),y[te]=-1,te=a.M(te),ne=te.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(te=te.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}$o.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,te=b.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(te=[],x=0;x<y.length;x++)te[x]=0;x=[];var ne=[],se=[];b=[],E=new Ln;for(var he=0,_e=0;_e<y.length;_e++){var Ee=y[_e].length;if(Ee===1)b.push(_e);else if(Ee===0)E.add(a.M(_e));else{if(he===0)x.push(_e);else{for(var Ne=Ee=1/0,Ge=-1,Ye=[],et=0;et<x.length;et++)0>y[x[et]].indexOf(x[et===x.length-1?0:et+1])&&Ye.push(et===x.length-1?0:et+1);if(Ye.length===0)for(et=0;et<x.length;et++)Ye.push(et);for(et=0;et<Ye.length;et++){for(var st=Ye[et],Ct=y[_e],St=0,Tt=0;Tt<ne.length;Tt++){var At=te[ne[Tt]],It=te[se[Tt]];if(At<It){var Ht=At;At=It}else Ht=It;if(Ht<st&&st<=At)for(It=0;It<Ct.length;It++){var $t=Ct[It];0>x.indexOf($t)||Ht<te[$t]&&te[$t]<At||Ht===te[$t]||At===te[$t]||St++}else for(It=0;It<Ct.length;It++)$t=Ct[It],0>x.indexOf($t)||Ht<te[$t]&&te[$t]<At&&Ht!==te[$t]&&At!==te[$t]&&St++}for(Ct=St,Tt=St=0;Tt<y[_e].length;Tt++)Ht=x.indexOf(y[_e][Tt]),0<=Ht&&(Ht=Math.abs(st-(Ht>=st?Ht+1:Ht)),St+=Ht<x.length+1-Ht?Ht:x.length+1-Ht);for(Tt=0;Tt<ne.length;Tt++)Ht=te[ne[Tt]],At=te[se[Tt]],Ht>=st&&Ht++,At>=st&&At++,Ht>At&&(It=At,At=Ht,Ht=It),At-Ht<(x.length+2)/2==(Ht<st&&st<=At)&&St++;(Ct<Ee||Ct===Ee&&St<Ne)&&(Ee=Ct,Ne=St,Ge=st)}for(x.splice(Ge,0,_e),Ee=0;Ee<x.length;Ee++)te[x[Ee]]=Ee;for(Ee=0;Ee<y[_e].length;Ee++)Ne=y[_e][Ee],0<=x.indexOf(Ne)&&(ne.push(_e),se.push(Ne))}he++}}for(ne=x.length;;){for(te=!0,se=0;se<b.length;se++)if(he=b[se],_e=y[he][0],Ee=x.indexOf(_e),0<=Ee){for(Ge=Ne=0;Ge<y[_e].length;Ge++)Ye=x.indexOf(y[_e][Ge]),0>Ye||Ye===Ee||(et=Ye>Ee?Ye-Ee:Ee-Ye,Ne+=Ye<Ee!=et>ne-et?1:-1);x.splice(0>Ne?Ee:Ee+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},nt.Object.defineProperties($o.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!==mu&&a!==gu&&a!==Bc&&a!==oc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Ua&&a!==jc&&a!==wd&&a!==$f||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==y0&&a!==S0&&a!==x0&&!w0&&a!==ep||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==_0&&a!==ef||(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 gu=new pn($o,"ConstantSpacing",0),Bc=new pn($o,"ConstantDistance",1),oc=new pn($o,"ConstantAngle",2),mu=new pn($o,"Packed",3),Ua=new pn($o,"Clockwise",4),jc=new pn($o,"Counterclockwise",5),wd=new pn($o,"BidirectionalLeft",6),$f=new pn($o,"BidirectionalRight",7),y0=new pn($o,"Forwards",8),S0=new pn($o,"Reverse",9),x0=new pn($o,"Ascending",10),w0=new pn($o,"Descending",11),ep=new pn($o,"Optimized",12),_0=new pn($o,"Pythagorean",13),ef=new pn($o,"Circular",14);$o.className="CircularLayout",$o.ConstantSpacing=gu,$o.ConstantDistance=Bc,$o.ConstantAngle=oc,$o.Packed=mu,$o.Clockwise=Ua,$o.Counterclockwise=jc,$o.BidirectionalLeft=wd,$o.BidirectionalRight=$f,$o.Forwards=y0,$o.Reverse=S0,$o.Ascending=x0,$o.Descending=w0,$o.Optimized=ep,$o.Pythagorean=_0,$o.Circular=ef;function Lg(){this.Pl=-1/0,this.tm=this.mk=null}Lg.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},Lg.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]}},Lg.className="VertexArrangement";function tp(a){Lo.call(this,a)}Xe(tp,Lo),tp.prototype.createVertex=function(){return new Mg(this)},tp.prototype.createEdge=function(){return new b0(this)},tp.className="CircularNetwork";function Mg(a){ks.call(this,a),this.u=this.Si=NaN}Xe(Mg,ks);function zc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===mu)if(x.nodeDiameterFormula===ef)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===ef?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}nt.Object.defineProperties(Mg.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)}}}),Mg.className="CircularVertex";function b0(a){gl.call(this,a)}Xe(b0,gl),b0.className="CircularEdge";function pa(a){Vo.call(this),this.ah=null,this.An=0,this.$d=new Cn(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)}Xe(pa,Vo),pa.prototype.cloneProtected=function(a){Vo.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},pa.prototype.createNetwork=function(){return new tf(this)},pa.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}BS(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 _e=ai(),Ee=0;Ee<se+y.vertexes.count+2;Ee++)_e[Ee]=null;se=0,ne.reset();for(var Ne=nn.alloc();ne.next();)if(Ee=ne.value,this.computeBounds(Ee,Ne),he)he=!1,E=Ne.x+Ne.width/2,te=Ne.y+Ne.height/2,_e[0]=new ft(Ne.x+Ne.width+b.width,Ne.y),_e[1]=new ft(Ne.x,Ne.y+Ne.height+b.height),se=2;else{var Ge=jS(_e,se,E,te,Ne.width,Ne.height,b),Ye=_e[Ge],et=new ft(Ye.x+Ne.width+b.width,Ye.y),st=new ft(Ye.x,Ye.y+Ne.height+b.height);for(Ge+1<se&&_e.splice(Ge+1,0,null),_e[Ge]=et,_e[Ge+1]=st,se++,Ge=Ye.x-Ne.x,Ye=Ye.y-Ne.y,Ee=Ee.vertexes.iterator;Ee.next();)et=Ee.value,et.centerX+=Ge,et.centerY+=Ye}for(nn.free(Ne),Ee=y.vertexes.iterator;Ee.next();)ne=Ee.value,Ge=ne.bounds,2>se?(E=Ge.x+Ge.width/2,te=Ge.y+Ge.height/2,_e[0]=new ft(Ge.x+Ge.width+b.width,Ge.y),_e[1]=new ft(Ge.x,Ge.y+Ge.height+b.height),se=2):(he=jS(_e,se,E,te,Ge.width,Ge.height,b),Ne=_e[he],Ye=new ft(Ne.x+Ge.width+b.width,Ne.y),Ge=new ft(Ne.x,Ne.y+Ge.height+b.height),he+1<se&&_e.splice(he+1,0,null),_e[he]=Ye,_e[he+1]=Ge,se++,ne.centerX=Ne.x+ne.width/2,ne.centerY=Ne.y+ne.height/2);for(Gn(_e),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)}}US(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},pa.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},pa.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 BS(a,y,x){if(Ix(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,BS(a,y+1,x),US(a,te),Fx(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++)Bx(a,y[x]);a.Zf=b}}function Ix(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 tf(a),E=0;E<a.ah.length;E++){var te=a.ah[E];if(1<te.Vd){b.dh(te);var ne=new HS;ne.Rs=te.Vd,ne.Ss=te.width,ne.Qs=te.height,ne.Sv=te.focus.x,ne.Tv=te.focus.y,te.We===null&&(te.We=new Ln),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var se=te.value;E=se.fromVertex,ne=se.toVertex,E.network===b&&ne.network===b?b.Bo(se):E.network===b?(se=E.Hj,se===null&&(se=new Ln,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new Ln,ne.Hj=se),se.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,Wt.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var he=E.Hj;if(he!==null&&0<he.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var _e=se=0,Ee=he.count-ne;Ee<he.count;Ee++){var Ne=he.M(Ee),Ge=null;for(te=Ne.edges.iterator;te.next();){var Ye=te.value;if(Ye.Ax(Ne)===E){Ge=Ye;break}}Ge!==null&&(_e+=Ge.length,se+=Ne.width*Ne.height)}te=E.centerX,he=E.centerY,Ee=E.width,Ne=E.height,Ge=E.focus,Ye=Ee*Ne,1>Ye&&(Ye=1),se=Wt.sqrt((se+Ye+_e*_e*4/(ne*ne))/Ye),ne=(se-1)*Ee/2,se=(se-1)*Ne/2,E.bounds=new nn(te-Ge.x-ne,he-Ge.y-se,Ee+2*ne,Ne+2*se),E.focus=new ft(Ge.x+ne,Ge.y+se)}}return a.network=b,x}function Fx(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 nn(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new ft(te,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Bx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,te=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),te=ne.Ss,ne=ne.Qs),te=Wt.sqrt(te*te+ne*ne)/2;for(var se=!1,he=ne=0,_e=0,Ee=y.vertexes.iterator;Ee.next();){var Ne=Ee.value;1>=Ne.Vd?he++:(se=!0,_e++,ne+=Math.atan2(y.centerY-Ne.centerY,y.centerX-Ne.centerX))}if(he!==0){for(0<_e&&(ne/=_e),_e=y=0,y=se?2*Math.PI/(he+1):2*Math.PI/he,he%2===0&&(_e=y/2),1<x.count&&x.sort(function(Ye,et){return Ye===null||et===null||Ye===et?0:et.width*et.height-Ye.width*Ye.height}),se=he%2===0?0:1,x=x.iterator;x.next();)if(he=x.value,!(1<he.Vd||a.isFixed(he))){for(Ee=null,Ne=he.edges.iterator;Ne.next();){Ee=Ne.value;break}Ne=he.width;var Ge=he.height;Ne=Wt.sqrt(Ne*Ne+Ge*Ge)/2,Ee=te+Ee.length+Ne,Ne=ne+(y*(se/2>>1)+_e)*(se%2===0?1:-1),he.centerX=b+Ee*Math.cos(Ne),he.centerY=E+Ee*Math.sin(Ne),se++}}}}function jS(a,y,x,b,E,te,ne){var se=9e19,he=-1,_e=0;e:for(;_e<y;_e++){var Ee=a[_e],Ne=Ee.x-x,Ge=Ee.y-b;if(Ne=Ne*Ne+Ge*Ge,Ne<se){for(Ge=_e-1;0<=Ge;Ge--)if(a[Ge].y>Ee.y&&a[Ge].x-Ee.x<E+ne.width)continue e;for(Ge=_e+1;Ge<y;Ge++)if(a[Ge].x>Ee.x&&a[Ge].y-Ee.y<te+ne.height)continue e;he=_e,se=Ne}}return he}pa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},pa.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,Wt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Wt.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,Wt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,Wt.sqrt(b*b+a*a)):b-(ne+se):a>y+te?a-(y+te):a+x<y?y-(a+x):.1}function US(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jx(a)););a.ah=null}function jx(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(st,Ct){return st===null||Ct===null||st===Ct?0:st.centerX-Ct.centerX}):y.sort(function(st,Ct){return st===null||Ct===null||st===Ct?0:st.centerY-Ct.centerY}),x=a.Zf;var _e=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 Ee=b.y+se.y;b=ne.charge*a.electricalFieldX(he,Ee),_e=ne.charge*a.electricalFieldY(he,Ee),b+=ne.mass*a.gravitationalFieldX(he,Ee),_e+=ne.mass*a.gravitationalFieldY(he,Ee),ne.forceX+=b,ne.forceY+=_e;for(var Ne=te+1;Ne<y.length;Ne++){var Ge=y[Ne];if(Ge!==ne){b=Ge.bounds,se=Ge.focus,_e=b.x+se.x;var Ye=b.y+se.y;if(he-_e>x||_e-he>x){if(E)break}else if(Ee-Ye>x||Ye-Ee>x){if(!E)break}else{var et=zS(ne,Ge);1>et?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new P0),et=b.random(),se=b.random(),he>_e?(b=Math.abs(Ge.bounds.right-ne.bounds.x),b=(1+b)*et):he<_e?(b=Math.abs(Ge.bounds.x-ne.bounds.right),b=-(1+b)*et):(b=Math.max(Ge.width,ne.width),b=(1+b)*et-b/2),Ee>Ye?(_e=Math.abs(Ge.bounds.bottom-ne.bounds.y),_e=(1+_e)*se):he<_e?(_e=Math.abs(Ge.bounds.y-ne.bounds.bottom),_e=-(1+_e)*se):(_e=Math.max(Ge.height,ne.height),_e=(1+_e)*se-_e/2)):(se=-(ne.charge*Ge.charge)/(et*et),b=(_e-he)/et*se,_e=(Ye-Ee)/et*se),ne.forceX+=b,ne.forceY+=_e,Ge.forceX-=b,Ge.forceY-=_e}}}}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,Ee=te.bounds,Ne=te.focus,he=Ee.x+Ne.x,Ee=Ee.y+Ne.y,Ne=zS(x,te),1>Ne?(Ne=a.randomNumberGenerator,Ne===null&&(a.randomNumberGenerator=Ne=new P0),se=Ne.random(),Ne=Ne.random(),b=(b>he?1:-1)*(1+(te.width>x.width?te.width:x.width))*se,_e=(ne>Ee?1:-1)*(1+(te.height>x.height?te.height:x.height))*Ne):(se=se.stiffness*(Ne-se.length),b=(he-b)/Ne*se,_e=(Ee-ne)/Ne*se),x.forceX+=b,x.forceY+=_e,te.forceX-=b,te.forceY-=_e;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}pa.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},pa.prototype.moveFixedVertex=function(){},pa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},pa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Ts,y.toSpot=Ts)}},pa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=nn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,nn.free(x)}x=nn.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()}nn.free(x)},pa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},pa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},pa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},pa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},pa.prototype.electricalFieldX=function(){return 0},pa.prototype.electricalFieldY=function(){return 0},pa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},pa.prototype.gravitationalFieldX=function(){return 0},pa.prototype.gravitationalFieldY=function(){return 0},pa.prototype.isFixed=function(a){return a.isFixed},nt.Object.defineProperties(pa.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"&&kt('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())}}}),pa.className="ForceDirectedLayout";function HS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}HS.className="ForceDirectedSubnet";function tf(a){Lo.call(this,a)}Xe(tf,Lo),tf.prototype.createVertex=function(){return new kg(this)},tf.prototype.createEdge=function(){return new Tg(this)},tf.className="ForceDirectedNetwork";function kg(a){ks.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}Xe(kg,ks),nt.Object.defineProperties(kg.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)}}}),kg.className="ForceDirectedVertex";function Tg(a){gl.call(this,a),this.j=this.o=NaN}Xe(Tg,gl),nt.Object.defineProperties(Tg.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)}}}),Tg.className="ForceDirectedEdge";function P0(){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()}P0.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},P0.className="RandomNumberGenerator";function no(a){Vo.call(this),this.kc=this.ie=25,this.K=0,this.Dk=k0,this.Zk=T0,this.Qk=A0,this.bj=4,this.rk=N0,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 ft,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Xe(no,Vo),no.prototype.cloneProtected=function(a){Vo.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},no.prototype.qb=function(a){a.classType===no?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:kt("Unknown enum value: "+a):Vo.prototype.qb.call(this,a)},no.prototype.createNetwork=function(){return new ip(this)},no.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!==Ng&&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===Ng&&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,_e=0;if(b.link!==null){if(se=b.link,se===null)continue;var Ee=E.node;if(ne=te.node,Ee===null||ne===null)continue;var Ne=se.fromNode;he=se.toNode;for(var Ge=se.fromPort;Ge!==null&&!Ge.Ed();)Ge=Ge.panel;for(se=se.toPort;se!==null&&!se.Ed();)se=se.panel;if(b.rev){_e=Ne;var Ye=Ge;Ne=he,Ge=se,he=_e,se=Ye}var et=E.focus;_e=te.focus;var st=b.rev?te.bounds:E.bounds;Ye=ft.alloc(),Ee!==Ne?st.w()&&Ne.isVisible()?Ne.actualBounds.w()?(ec(Ne,Ge,_r,Ye),Ye.x+=Ne.actualBounds.x-st.x,Ye.y+=Ne.actualBounds.y-st.y):(ec(Ne,Ge,_r,Ye),Ye.w()||Ye.assign(et)):Ye.assign(et):st.w()?(ec(Ne,Ge,_r,Ye),Ye.w()||Ye.assign(et)):Ye.assign(et),Ne=b.rev?E.bounds:te.bounds,Ee=ft.alloc(),ne!==he?Ne.w()&&he.isVisible()?he.actualBounds.w()?(ec(he,se,_r,Ee),Ee.x+=he.actualBounds.x-Ne.x,Ee.y+=he.actualBounds.y-Ne.y):(ec(he,se,_r,Ee),Ee.w()||Ee.assign(_e)):Ee.assign(_e):Ne.w()?(ec(he,se,_r,Ee),Ee.w()||Ee.assign(_e)):Ee.assign(_e),this.K===90||this.K===270?(ne=Math.round((Ye.x-et.x)/this.kc),he=Ye.x,se=Math.round((Ee.x-_e.x)/this.kc),_e=Ee.x):(ne=Math.round((Ye.y-et.y)/this.kc),he=Ye.y,se=Math.round((Ee.y-_e.y)/this.kc),_e=Ee.y),ft.free(Ye),ft.free(Ee),b.portFromColOffset=ne,b.portFromPos=he,b.portToColOffset=se,b.portToPos=_e}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ye=E.layer,Ee=te.layer,Ne=0,st=b.link,st!==null){var Ct=st.fromPort,St=st.toPort;if(Ct!==null&&St!==null){var Tt=st.fromNode;if(Ge=st.toNode,Tt!==null&&Ge!==null){var At=M0(this,!0),It=M0(this,!1),Ht=this.setsPortSpots?At:st.computeSpot(!0,Ct);et=this.setsPortSpots?It:st.computeSpot(!1,St);var $t=st.isOrthogonal;Ht.$c()&&Ht.Hf(It)&&et.$c()&&et.Hf(At)?Ne=0:(At=st.getLinkPoint(Tt,Ct,Ht,!0,$t,Ge,St,ft.alloc()),It=st.getLinkDirection(Tt,Ct,At,Ht,!0,$t,Ge,St),ft.free(At),Ht.ys()||It!==qS(this,b,!0)?this.setsPortSpots&&Tt!==null&&Tt.ports.count===1&&b.rev&&(Ne+=1):Ne+=1,Ht=st.getLinkPoint(Ge,St,et,!1,$t,Tt,Ct,ft.alloc()),st=st.getLinkDirection(Ge,St,Ht,et,!1,$t,Tt,Ct),ft.free(Ht),et.ys()||st!==qS(this,b,!1)?this.setsPortSpots&&Ge!==null&&Ge.ports.count===1&&b.rev&&(Ne+=2):Ne+=2)}}}if(Ge=Ne,Ne=Ge===1||Ge===3,(Ge=Ge===2||Ge===3)&&(et=a.createVertex(),et.node=null,et.Dj=1,et.layer=Ye,et.near=E,a.dh(et),E=a.Zj(E,et,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=et),st=1,Ne&&st--,Ye-Ee>st&&0<Ye){for(b.valid=!1,et=a.createVertex(),et.node=null,et.Dj=2,et.layer=Ye-1,a.dh(et),E=a.Zj(E,et,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Ge?0:ne,E.portToColOffset=0,E.portFromPos=Ge?0:he,E.portToPos=0,E=et,Ye--;Ye-Ee>st&&0<Ye;)et=a.createVertex(),et.node=null,et.Dj=3,et.layer=Ye-1,a.dh(et),E=a.Zj(E,et,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=et,Ye--;E=a.Zj(et,te,b.link),E.valid=!Ne,Ne&&(et.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=se,E.portFromPos=0,E.portToPos=_e}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=Uc(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),Hc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},no.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}no.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},no.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 el(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 jl(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 GS(a,y,x){var b=Uc(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],_e=he.near;if(_e!==null&&_e.layer===he.layer)if(he=_e.index,he>ne)for(var Ee=ne+1;Ee<he;Ee++){var Ne=b[Ee];Ne.near===_e&&Ne.Dj===_e.Dj||se++}else for(Ee=ne-1;Ee>he;Ee--)Ne=b[Ee],Ne.near===_e&&Ne.Dj===_e.Dj||se++;var Ge;if(0<=x)for(he=b[ne].sourceEdgesArrayAccess,_e=0;_e<he.length;_e++){var Ye=he[_e];if(Ye.valid&&Ye.fromVertex.layer!==y)for(Ne=Ye.fromVertex.index,Ee=Ye.portToPos,Ye=Ye.portFromPos,Ge=_e+1;Ge<he.length;Ge++){var et=he[Ge];if(et.valid&&et.fromVertex.layer!==y){var st=et.fromVertex.index,Ct=et.portToPos;et=et.portFromPos,Ee<Ct&&(Ne>st||Ne===st&&Ye>et)&&se++,Ct<Ee&&(st>Ne||st===Ne&&et>Ye)&&se++}}}if(0>=x){for(he=b[ne].destinationEdgesArrayAccess,_e=0;_e<he.length;_e++)if(Ye=he[_e],Ye.valid&&Ye.toVertex.layer!==y)for(Ne=Ye.toVertex.index,Ee=Ye.portToPos,Ye=Ye.portFromPos,Ge=_e+1;Ge<he.length;Ge++)et=he[Ge],et.valid&&et.toVertex.layer!==y&&(st=et.toVertex.index,Ct=et.portToPos,et=et.portFromPos,Ye<et&&(Ne>st||Ne===st&&Ee>Ct)&&se++,et<Ye&&(st>Ne||st===Ne&&Ct>Ee)&&se++)}for(te[ne*E+ne]=se,he=ne+1;he<E;he++){var St=0,Tt=0;if(0<=x){se=b[ne].sourceEdgesArrayAccess;var At=b[he].sourceEdgesArrayAccess;for(_e=0;_e<se.length;_e++)if(Ye=se[_e],Ye.valid&&Ye.fromVertex.layer!==y)for(Ne=Ye.fromVertex.index,Ye=Ye.portFromPos,Ge=0;Ge<At.length;Ge++)et=At[Ge],et.valid&&et.fromVertex.layer!==y&&(st=et.fromVertex.index,et=et.portFromPos,(Ne<st||Ne===st&&Ye<et)&&Tt++,(st<Ne||st===Ne&&et<Ye)&&St++)}if(0>=x){for(se=b[ne].destinationEdgesArrayAccess,At=b[he].destinationEdgesArrayAccess,_e=0;_e<se.length;_e++)if(Ye=se[_e],Ye.valid&&Ye.toVertex.layer!==y)for(Ne=Ye.toVertex.index,Ee=Ye.portToPos,Ge=0;Ge<At.length;Ge++)et=At[Ge],et.valid&&et.toVertex.layer!==y&&(st=et.toVertex.index,Ct=et.portToPos,(Ne<st||Ne===st&&Ee<Ct)&&Tt++,(st<Ne||st===Ne&&Ct<Ee)&&St++)}te[ne*E+he]=St,te[he*E+ne]=Tt}}return Hc(a,y,b),te}no.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=GS(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 C0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=Uc(b,E),ne=b.tc[E],se=0,he=0;he<ne;he++){var _e=te[he].destinationEdgesArrayAccess;if(_e!==null)for(var Ee=0;Ee<_e.length;Ee++){var Ne=_e[Ee];if(Ne.valid&&Ne.toVertex.layer!==E){var Ge=Ne.fromVertex.column+Ne.portFromColOffset,Ye=Ne.toVertex.column+Ne.portToColOffset;se+=(Math.abs(Ge-Ye)+1)*gy(Ne)}}}Hc(b,E,te),y+=se}return y}no.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=Uc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=se.destinationEdgesArrayAccess);var Ee=0,Ne=0,Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(Ee+=Ge.column-1,Ne++),he!==null)for(Ge=0;Ge<he.length;Ge++){se=he[Ge];var Ye=se.fromVertex;se.valid&&!se.rev&&Ye.layer!==y&&(Ee+=Ye.column,Ne++)}if(_e!==null)for(he=0;he<_e.length;he++)se=_e[he],Ge=se.toVertex,se.valid&&!se.rev&&Ge.layer!==y&&(Ee+=Ge.column,Ne++);te[ne]=Ne===0?-1:Ee/Ne}return Hc(a,y,b),te}function WS(a,y,x){for(var b=Uc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var _e=null;0<=x&&(_e=se.destinationEdgesArrayAccess);var Ee=0,Ne=[],Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(Ne[Ee]=Ge.column-1,Ee++),se=void 0,he!==null)for(Ge=0;Ge<he.length;Ge++){se=he[Ge];var Ye=se.fromVertex;se.valid&&!se.rev&&Ye.layer!==y&&(Ne[Ee]=Ye.column+se.portFromColOffset,Ee++)}if(_e!==null)for(he=0;he<_e.length;he++)se=_e[he],Ge=se.toVertex,se.valid&&!se.rev&&Ge.layer!==y&&(Ne[Ee]=Ge.column+se.portToColOffset,Ee++);Ee===0?te[ne]=-1:(Ne.sort(function(et,st){return et-st}),_e=Ee>>1,te[ne]=Ee&1?Ne[_e]:Ne[_e-1]+Ne[_e]>>1)}return Hc(a,y,b),te}function Ag(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,_e=y.layer-he.layer;se=a.linkMinLength(se),_e===se&&Ag(a,he,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)se=ne.value,he=se.fromVertex,_e=he.layer-y.layer,se=a.linkMinLength(se),_e===se&&Ag(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)}}no.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=ZS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=ZS(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,_e=se.destinationEdges;_e.next();)_e.value.toVertex.valid&&he++;_e=0;for(var Ee=se.sourceEdges;Ee.next();)Ee.value.fromVertex.valid&&_e++;(E===null||te<he-_e)&&(E=se,te=he-_e)}}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 k0: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 Ng: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 ZS(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++}no.prototype.assignLayers=function(){switch(this.Zk){case wy:KS(this);break;case _y:for(var a,y=this.network.vertexes.iterator;y.next();)a=XS(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 T0:for(KS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&JS(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function KS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=YS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,te=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,te)+E)}y.layer=x}else x=y.layer;return x}function XS(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,XS(a,te)+E)}y.layer=x}else x=y.layer;return x}function JS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)JS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,te=0;te<E;te++){var ne=b[te],se=ne.fromVertex,he=ne.toVertex;ne=a.linkMinLength(ne),se.layer-he.layer>ne&&Ag(a,se,0,-1,!0,!1)}for(Ag(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 _e=ne.value;if(_e.component===1){var Ee=0,Ne=!1,Ge=_e.sourceEdgesArrayAccess;E=Ge.length;for(var Ye=0;Ye<E;Ye++){var et=Ge[Ye],st=et.fromVertex;Ee+=1,st.component!==1&&(te+=1,st=st.layer-_e.layer,et=a.linkMinLength(et),b=Math.min(b,st-et))}for(Ge=_e.destinationEdgesArrayAccess,E=Ge.length,Ye=0;Ye<E;Ye++)et=Ge[Ye].toVertex,--Ee,et.component!==1?--te:Ne=!0;(he===null||Ee<se)&&!Ne&&(he=_e,se=Ee)}}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(Ag(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(_e=0,Ee=!1,Ge=ne.sourceEdgesArrayAccess,Ne=Ge.length,Ye=0;Ye<Ne;Ye++)et=Ge[Ye].fromVertex,_e+=1,et.component!==1?b+=1:Ee=!0;for(Ge=ne.destinationEdgesArrayAccess,Ne=Ge.length,Ye=0;Ye<Ne;Ye++)et=Ge[Ye],st=et.toVertex,--_e,st.component!==1&&(--b,st=ne.layer-st.layer,et=a.linkMinLength(et),E=Math.min(E,st-et));(se===null||_e>te)&&!Ee&&(se=ne,te=_e)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else se.component=0}}}function qS(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}no.prototype.initializeIndices=function(){switch(this.Qk){default:case Py: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 A0: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&&$S(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 $S(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&&$S(a,b))}no.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=el(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)E0(this,b,1),$l(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=el(this)),b=this.Ia;0<=b;b--)E0(this,b,-1),$l(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=el(this))}for(jl(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)E0(this,b,0),$l(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=el(this)),b=this.Ia;0<=b;b--)E0(this,b,0),$l(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=el(this))}jl(this,y);var te,ne,se;switch(this.rk){case Cy:break;case Ey: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=$l(this,b,-1)||te;for(E=this.countCrossings(),E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=$l(this,b,1)||te;for(E=this.countCrossings(),E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=$l(this,b,1)||te;for(E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=$l(this,b,-1)||te;for(E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=$l(this,b,0)||te;for(E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=$l(this,b,0)||te;E>=a?jl(this,y):(a=E,y=el(this))}break;default:case N0: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=$l(this,b,-1)||te;for(E=this.countCrossings(),E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=$l(this,b,1)||te;for(E=this.countCrossings(),E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=$l(this,b,1)||te;for(E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=$l(this,b,-1)||te;for(E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=$l(this,b,0)||te;for(E>=a?jl(this,y):(a=E,y=el(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=$l(this,b,0)||te;E>=a?jl(this,y):(a=E,y=el(this))}}jl(this,y)};function E0(a,y,x){var b=Uc(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);Hc(a,y,b)}function $l(a,y,x){var b=Uc(a,y),E=a.tc[y];x=GS(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,_e=!0;_e;)for(_e=!1,te=0;te<E-1;te++){var Ee=x[b[te].index*E+b[te+1].index],Ne=x[b[te+1].index*E+b[te].index],Ge=0,Ye=0,et=b[te].column,st=b[te+1].column,Ct=a.nodeMinColumnSpace(b[te],!0),St=a.nodeMinColumnSpace(b[te],!1),Tt=a.nodeMinColumnSpace(b[te+1],!0),At=a.nodeMinColumnSpace(b[te+1],!1);Ct=et-Ct+Tt,St=st-St+At;var It=b[te].sourceEdges.iterator;for(It.reset();It.next();)if(Tt=It.value,At=Tt.fromVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt<te&&(Ge+=2*(te-Tt),Ye+=2*(te+1-Tt)),Tt===te+1&&(Ge+=1),Tt>te+1&&(Ge+=4*(Tt-te),Ye+=4*(Tt-(te+1)))}for(It=b[te].destinationEdges.iterator,It.reset();It.next();)if(Tt=It.value,At=Tt.toVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt===te+1&&(Ye+=1)}for(It=b[te+1].sourceEdges.iterator,It.reset();It.next();)if(Tt=It.value,At=Tt.fromVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt<te&&(Ge+=2*(te+1-Tt),Ye+=2*(te-Tt)),Tt===te&&(Ye+=1),Tt>te+1&&(Ge+=4*(Tt-(te+1)),Ye+=4*(Tt-te))}for(It=b[te+1].destinationEdges.iterator,It.reset();It.next();)if(Tt=It.value,At=Tt.toVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt===te&&(Ge+=1)}Tt=At=0,It=ne[b[te].index];var Ht=se[b[te].index],$t=ne[b[te+1].index],Kn=se[b[te+1].index];It!==-1&&(At+=Math.abs(It-et),Tt+=Math.abs(It-St)),Ht!==-1&&(At+=Math.abs(Ht-et),Tt+=Math.abs(Ht-St)),$t!==-1&&(At+=Math.abs($t-st),Tt+=Math.abs($t-Ct)),Kn!==-1&&(At+=Math.abs(Kn-st),Tt+=Math.abs(Kn-Ct)),(Ye<Ge-.5||Ye===Ge&&Ne<Ee-.5||Ye===Ge&&Ne===Ee&&Tt<At-.5)&&(_e=he=!0,b[te].column=St,b[te+1].column=Ct,Ee=b[te],b[te]=b[te+1],b[te+1]=Ee)}for(te=0;te<E;te++)b[te].index=te;return Hc(a,y,b),he}no.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Yx)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var b,E=this.network.vertexes.iterator;E.next();){var te=E.value;y=te.layer,b=te.column,te=this.nodeMinColumnSpace(te,!1),x[y]=Math.max(x[y],b+te)}for(E.reset();E.next();)te=E.value,y=te.layer,b=te.column,te.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=np(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=np(this,y,-1)||x;x=np(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=np(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=np(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=np(this,y,0)||x}}else Wx(this)};function np(a,y,x){for(var b=!1;Ux(a,y,x);)b=!0;return b}function Ux(a,y,x){var b,E=Uc(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,_e=!0;_e;)for(_e=!1,b=0;b<te;b++){var Ee=E[b].column,Ne=a.nodeMinColumnSpace(E[b],!0),Ge=a.nodeMinColumnSpace(E[b],!1),Ye=0;0>b-1||Ee-E[b-1].column-1>Ne+a.nodeMinColumnSpace(E[b-1],!1)?Ye=Ee-1:Ye=Ee,Ne=b+1>=te||E[b+1].column-Ee-1>Ge+a.nodeMinColumnSpace(E[b+1],!0)?Ee+1:Ee;var et=Ge=0,st=0;if(0>=x)for(var Ct=E[b].sourceEdges.iterator;Ct.next();){var St=Ct.value,Tt=St.fromVertex;if(St.valid&&Tt.layer!==y){var At=gy(St),It=St.portFromColOffset;St=St.portToColOffset,Tt=Tt.column,Ge+=(Math.abs(Ee+St-(Tt+It))+1)*At,et+=(Math.abs(Ye+St-(Tt+It))+1)*At,st+=(Math.abs(Ne+St-(Tt+It))+1)*At}}if(0<=x)for(Ct=E[b].destinationEdges.iterator;Ct.next();)St=Ct.value,Tt=St.toVertex,St.valid&&Tt.layer!==y&&(At=gy(St),It=St.portFromColOffset,St=St.portToColOffset,Tt=Tt.column,Ge+=(Math.abs(Ee+It-(Tt+St))+1)*At,et+=(Math.abs(Ye+It-(Tt+St))+1)*At,st+=(Math.abs(Ne+It-(Tt+St))+1)*At);St=It=At=0,Ct=ne[E[b].index],Tt=se[E[b].index],Ct!==-1&&(At+=Math.abs(Ct-Ee),It+=Math.abs(Ct-Ye),St+=Math.abs(Ct-Ne)),Tt!==-1&&(At+=Math.abs(Tt-Ee),It+=Math.abs(Tt-Ye),St+=Math.abs(Tt-Ne)),et<Ge||et===Ge&&It<At?(_e=he=!0,E[b].column=Ye):(st<Ge||st===Ge&&St<At)&&(_e=he=!0,E[b].column=Ne)}return Hc(a,y,E),a.normalize(),he}function Sy(a,y,x){var b=Uc(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),_e=a.nodeMinColumnSpace(b[x],!1),Ee=0;if(ne[x]===-1)if(x===0&&x===E-1)Ee=se;else if(x===0){var Ne=b[x+1].column;Ne-se===_e+a.nodeMinColumnSpace(b[x+1],!0)?Ee=se-1:Ee=se}else x===E-1?(Ne=b[x-1].column,Ee=se-Ne===he+a.nodeMinColumnSpace(b[x-1],!1)?se+1:se):(Ne=b[x-1].column,he=Ne+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ne=b[x+1].column,_e=Ne-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Ee=(he+_e)/2|0);else x===0&&x===E-1?Ee=ne[x]:x===0?(Ne=b[x+1].column,_e=Ne-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,Ee=Math.min(ne[x],_e)):x===E-1?(Ne=b[x-1].column,he=Ne+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ee=Math.max(ne[x],he)):(Ne=b[x-1].column,he=Ne+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Ne=b[x+1].column,_e=Ne-a.nodeMinColumnSpace(b[x+1],!0)-_e-1,he<ne[x]&&ne[x]<_e?Ee=ne[x]:he>=ne[x]?Ee=he:_e<=ne[x]&&(Ee=_e));Ee!==se&&(te=!0,b[x].column=Ee)}Hc(a,y,b),a.normalize()}function Hx(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 Gx(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(;Hx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Gx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=el(a),te=C0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=C0(a);ne>te?jl(a,E):ne<te&&(te=ne,E=el(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=el(a),te=C0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=C0(a),ne>te?jl(a,E):ne<te&&(te=ne,E=el(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=ai(),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 Mn,Zx(y,x);var te=null,ne=null,se=null,he=null,_e=(a.ve&1)!==0,Ee=(a.ve&2)!==0,Ne=(a.ve&4)!==0,Ge=(a.ve&8)!==0;for(_e&&(a.verticalAlignment(y,x,!0),te=L0(a,y,!0,!1)),y.reverse(),Ne&&(a.verticalAlignment(y,x,!1),se=L0(a,y,!1,!1)),b=ei(y),E=b.next();!E.done;E=b.next())E.value.reverse();Ge&&(a.verticalAlignment(y,x,!1),he=L0(a,y,!1,!0)),y.reverse(),Ee&&(a.verticalAlignment(y,x,!0),ne=L0(a,y,!0,!0)),Gn(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Ye){var et=ai();_e&&et.push(te.get(Ye)),Ee&&et.push(ne.get(Ye)),Ne&&et.push(se.get(Ye)),Ge&&et.push(he.get(Ye)),et.sort(function(Ct,St){return Ct-St});var st=et.length;st=(et[Math.floor((st-1)/2)]+et[Math.ceil((st-1)/2)])/2,Gn(et),Ye.zc=st})}function Zx(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 _e=se[he];e:{if(_e.node===null){var Ee=Ly(_e);if(0<Ee.length){Ee=Ee[0].node===null;break e}}Ee=!1}var Ne=Ee;if(he===se.length-1||Ne){for(Ee=ne.length-1,Ne&&(Ee=Ly(_e)[0].index);te<=he;){if(_e=se[te],!_e.bo){Ne=[];for(var Ge=ei(_e.sourceEdgesArrayAccess),Ye=Ge.next();!Ye.done;Ye=Ge.next())Ye=Ye.value,Ye.valid&&Ne.push(Ye);_e.bo=Ne}for(_e=ei(_e.bo),Ne=_e.next();!Ne.done;Ne=_e.next())Ne=Ne.value,Ge=Ne.fromVertex.index,(Ge<E||Ge>Ee)&&y.add(Ne);te++}E=Ee}}}no.prototype.verticalAlignment=function(a,y,x){Vx(a),a=ei(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=ei(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?Ly(te):Xx(te),se=ne.length;if(0<se){ne.sort(function(Ne,Ge){return Ne.vi-Ge.vi});var he=(se-1)/2;for(se=Math.floor(he),he=Math.ceil(he);se<=he;se++)if(te.align===te){var _e=ne[se],Ee=void 0;Ee=x?D0(_e,te):D0(te,_e),!y.contains(Ee)&&E<_e.vi&&(_e.align=te,te.root=_e.root,te.align=_e.root,E=_e.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 L0(a,y,x,b){for(var E=a.K===90||a.K===270,te=ei(y),ne=te.next();!ne.done;ne=te.next()){var se=ei(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=ei(y),se=te.next();!se.done;se=te.next()){se=ei(se.value);for(var he=se.next();!he.done;he=se.next())if(he=he.value,he.root===he){for(var _e=0,Ee=he;Ee.align!==he;){var Ne=Ee.align,Ge=ne?Ee.width:Ee.height,Ye=ne?Ne.width:Ne.height;if(x){var et=D0(Ee,Ne),st=et.portFromPos,Ct=et.portToPos;et.link!==null&&(Ee.node&&Ee.node!==et.link.fromNode&&(st=ne?Ee.focusX:Ee.focusY),Ne.node&&Ne.node!==et.link.toNode&&(Ct=ne?Ne.focusX:Ne.focusY))}else et=D0(Ne,Ee),st=et.portToPos,Ct=et.portFromPos,et.link!==null&&(Ee.node&&Ee.node!==et.link.toNode&&(st=ne?Ee.focusX:Ee.focusY),Ne.node&&Ne.node!==et.link.fromNode&&(Ct=ne?Ne.focusX:Ne.focusY));Ge=b?Ee.qg+(Ge-st)-(Ye-Ct):Ee.qg+st-Ct,Ne.qg=Ge,_e=Math.min(_e,Ge),Ee=Ee.align}Ee=he;do Ee.qg=Ee.qg-_e,Ee=Ee.align;while(Ee!==he)}}for(x=ei(y),ne=x.next();!ne.done;ne=x.next())for(te=ei(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=ix(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 hn,y=ei(y),ne=y.next();!ne.done;ne=y.next())for(x=ei(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=ix(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 ix(a,y){var x=a.Tz;return a=a.vi,1>a&&kt("Could not determine previous vertex in layer"),y[x][a-1]}no.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=ai(),E=ai(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var se=Kx(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(_e){_e.value+=he.delta}}(te)));Gn(b),Gn(E)};function Kx(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}no.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=M0(this,!0),y=M0(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 M0(a,y){return a.K===270?y?ga:zs:a.K===90?y?zs:ga:a.K===180?y?ma:As:y?As:ma}no.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,_e=he.layer,Ee=he.column|0;b?(ne=y.x+this.kc*Ee,_e=this.Kd[_e]):(ne=this.Kd[_e],_e=y.y+this.kc*Ee),he.centerX=ne,he.centerY=_e,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 ft(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},no.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 nn(0,0,x,Math.abs(this.Ta[0]))):y.push(new nn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new nn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new nn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new nn(0,0,Math.abs(this.Ta[0]),x)):y.push(new nn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new nn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new nn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},no.prototype.commitLayers=function(){},no.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 _e=y.computeSpot(!0,ne);he=y.computeSpot(!1,se);var Ee=x.fromVertex,Ne=x.toVertex;if(x.valid)y.curve===Ll&&y.pointsCount===4&&(Ee.column===Ne.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,_e,!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&&_e===or&&(b=!0),se!==null&&he===or&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga(_r),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(_r),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(Ee.layer===Ne.layer)y.zf();else{var Ge=!1,Ye=!1,et=this.ie,st=y.firstPickIndex+1;if(y.isOrthogonal){Ye=!0;var Ct=y.pointsCount;4<Ct&&y.points.removeRange(2,Ct-3)}else if(y.curve===Ll)Ge=!0,Ct=y.pointsCount,4<Ct&&y.points.removeRange(2,Ct-3),Ct===4&&(st=2);else{Ct=y.pointsCount;var St=_e===or,Tt=he===or;2<Ct&&St&&Tt?y.points.removeRange(1,Ct-2):3<Ct&&St&&!Tt?y.points.removeRange(1,Ct-3):3<Ct&&!St&&Tt?y.points.removeRange(2,Ct-2):4<Ct&&!St&&!Tt&&y.points.removeRange(2,Ct-3)}if(x.rev){for(;Ne!==null&&Ee!==Ne;){var At=Ct=null;for(St=Ne.sourceEdges.iterator;St.next()&&(Tt=St.value,Tt.link!==x.link||(Ct=Tt.fromVertex,At=Tt.toVertex,Ct.node!==null)););if(Ct===null)break;if(Ct!==Ee){St=y.i(st-1).x,Tt=y.i(st-1).y;var It=Ct.centerX,Ht=Ct.centerY;if(Ye)this.K===180||this.K===0?st===y.firstPickIndex+1?(y.m(st++,St,Tt),y.m(st++,St,Ht)):(At!==null?At.centerY:Tt)!==Ht&&(At=this.Ta[Ct.layer-1]+this.Rf.x,y.m(st++,At,Tt),y.m(st++,At,Ht)):st===y.firstPickIndex+1?(y.m(st++,St,Tt),y.m(st++,It,Tt)):(At!==null?At.centerX:St)!==It&&(At=this.Ta[Ct.layer-1]+this.Rf.y,y.m(st++,St,At),y.m(st++,It,At));else if(st===y.firstPickIndex+1){At=Math.max(10,this.he[Ne.layer]);var $t=Math.max(10,this.Ld[Ne.layer]);if(Ge)this.K===180?It<=Ne.bounds.x?(Ne=Ne.bounds.x,y.m(st++,Ne-At,Ht),y.m(st++,Ne,Ht),y.m(st++,Ne+$t,Ht)):(y.m(st++,It-At,Ht),y.m(st++,It,Ht),y.m(st++,It+$t,Ht)):this.K===90?Ht>=Ne.bounds.bottom?(Ne=Ne.bounds.y+Ne.bounds.height,y.m(st++,It,Ne+$t),y.m(st++,It,Ne),y.m(st++,It,Ne-At)):(y.m(st++,It,Ht+$t),y.m(st++,It,Ht),y.m(st++,It,Ht-At)):this.K===270?Ht<=Ne.bounds.y?(Ne=Ne.bounds.y,y.m(st++,It,Ne-At),y.m(st++,It,Ne),y.m(st++,It,Ne+$t)):(y.m(st++,It,Ht-At),y.m(st++,It,Ht),y.m(st++,It,Ht+$t)):this.K===0&&(It>=Ne.bounds.right?(Ne=Ne.bounds.x+Ne.bounds.width,y.m(st++,Ne+$t,Ht),y.m(st++,Ne,Ht),y.m(st++,Ne-At,Ht)):(y.m(st++,It+$t,Ht),y.m(st++,It,Ht),y.m(st++,It-At,Ht)));else{y.m(st++,St,Tt);var Kn=0;this.K===180||this.K===0?((this.K===180?It>=Ne.bounds.right:It<=Ne.bounds.x)&&(Kn=(this.K===0?-At:$t)/2),y.m(st++,St+Kn,Ht)):((this.K===270?Ht>=Ne.bounds.bottom:Ht<=Ne.bounds.y)&&(Kn=(this.K===90?-At:$t)/2),y.m(st++,It,Tt+Kn)),y.m(st++,It,Ht)}}else At=Math.max(10,this.he[Ct.layer]),$t=Math.max(10,this.Ld[Ct.layer]),Ge?this.K===180?(y.m(st++,It-At-et,Ht),y.m(st++,Math.min(It-At+et/2,It),Ht),y.m(st++,It,Ht),y.m(st++,It,Ht),y.m(st++,Math.max(It+$t-et/2,It),Ht),y.m(st++,It+$t+et,Ht)):this.K===90?(y.m(st++,It,Ht+$t+et),y.m(st++,It,Math.max(Ht+$t-et/2,Ht)),y.m(st++,It,Ht),y.m(st++,It,Ht),y.m(st++,It,Math.min(Ht-At+et/2,Ht)),y.m(st++,It,Ht-At-et)):this.K===270?(y.m(st++,It,Ht-At-et),y.m(st++,It,Math.min(Ht-At+et/2,Ht)),y.m(st++,It,Ht),y.m(st++,It,Ht),y.m(st++,It,Math.max(Ht+$t-et/2,Ht)),y.m(st++,It,Ht+$t+et)):(y.m(st++,It+$t+et,Ht),y.m(st++,Math.max(It+$t-et/2,It),Ht),y.m(st++,It,Ht),y.m(st++,It,Ht),y.m(st++,Math.min(It-At+et/2,It),Ht),y.m(st++,It-At-et,Ht)):y.m(st++,It,Ht)}Ne=Ct}(se===null||_e!==or||Ye)&&(St=y.i(st-1).x,Tt=y.i(st-1).y,It=y.i(st).x,Ht=y.i(st).y,Ye?(et=this.Ld[Ee.layer],this.K===180||this.K===0?(Ye=Tt,Ye>=Ee.bounds.y&&Ye<=Ee.bounds.bottom&&(this.K===180?It>=Ee.bounds.x:It<=Ee.bounds.right)&&(Ne=Ee.centerX+(this.K===180?-et:et),Ye<Ee.bounds.y+Ee.bounds.height/2?Ye=Ee.bounds.y-this.kc/2:Ye=Ee.bounds.bottom+this.kc/2,y.m(st++,Ne,Tt),y.m(st++,Ne,Ye)),y.m(st++,It,Ye)):(Ye=St,Ye>=Ee.bounds.x&&Ye<=Ee.bounds.right&&(this.K===270?Ht>=Ee.bounds.y:Ht<=Ee.bounds.bottom)&&(Ne=Ee.centerY+(this.K===270?-et:et),Ye<Ee.bounds.x+Ee.bounds.width/2?Ye=Ee.bounds.x-this.kc/2:Ye=Ee.bounds.right+this.kc/2,y.m(st++,St,Ne),y.m(st++,Ye,Ne)),y.m(st++,Ye,Ht)),y.m(st++,It,Ht)):Ge?(At=Math.max(10,this.he[Ee.layer]),$t=Math.max(10,this.Ld[Ee.layer]),this.K===180&&It>=Ee.bounds.x?(Ne=Ee.bounds.x+Ee.bounds.width,y.L(st-2,Ne,Tt),y.L(st-1,Ne+$t,Tt)):this.K===90&&Ht<=Ee.bounds.bottom?(Ne=Ee.bounds.y,y.L(st-2,St,Ne),y.L(st-1,St,Ne-At)):this.K===270&&Ht>=Ee.bounds.y?(Ne=Ee.bounds.y+Ee.bounds.height,y.L(st-2,St,Ne),y.L(st-1,St,Ne+$t)):this.K===0&&It<=Ee.bounds.right&&(Ne=Ee.bounds.x,y.L(st-2,Ne,Tt),y.L(st-1,Ne-At,Tt))):(At=Math.max(10,this.he[Ee.layer]),$t=Math.max(10,this.Ld[Ee.layer]),Ye=0,this.K===180||this.K===0?((this.K===180?It<=Ee.bounds.x:It>=Ee.bounds.right)&&(Ye=(this.K===0?$t:-At)/2),y.m(st++,It+Ye,Tt)):((this.K===270?Ht<=Ee.bounds.y:Ht>=Ee.bounds.bottom)&&(Ye=(this.K===90?$t:-At)/2),y.m(st++,St,Ht+Ye)),y.m(st++,It,Ht)))}else{for(;Ee!==null&&Ee!==Ne;){for(At=Ct=null,Ee=Ee.destinationEdges.iterator;Ee.next()&&(St=Ee.value,St.link!==x.link||(Ct=St.toVertex,At=St.fromVertex,At.node!==null&&(At=null),Ct.node!==null)););if(Ct===null)break;Ct!==Ne&&(St=y.i(st-1).x,Tt=y.i(st-1).y,It=Ct.centerX,Ht=Ct.centerY,Ye?this.K===180||this.K===0?(At!==null?At.centerY:Tt)!==Ht&&(At=this.Ta[Ct.layer]+this.Rf.x,st===y.firstPickIndex+1&&(At=this.K===0?Math.max(At,St):Math.min(At,St)),y.m(st++,At,Tt),y.m(st++,At,Ht)):(At!==null?At.centerX:St)!==It&&(At=this.Ta[Ct.layer]+this.Rf.y,st===y.firstPickIndex+1&&(At=this.K===90?Math.max(At,Tt):Math.min(At,Tt)),y.m(st++,St,At),y.m(st++,It,At)):(At=Math.max(10,this.he[Ct.layer]),$t=Math.max(10,this.Ld[Ct.layer]),Ge?this.K===180?(y.m(st++,It+$t+et,Ht),y.m(st++,Math.max(It+$t-et/2,It),Ht),y.m(st++,It,Ht),y.m(st++,It,Ht),y.m(st++,Math.min(It-At+et/2,It),Ht),y.m(st++,It-At-et,Ht)):this.K===90?(y.m(st++,It,Ht-At-et),y.m(st++,It,Math.min(Ht-At+et/2,Ht)),y.m(st++,It,Ht),y.m(st++,It,Ht),y.m(st++,It,Math.max(Ht+$t-et/2,Ht)),y.m(st++,It,Ht+$t+et)):this.K===270?(y.m(st++,It,Ht+$t+et),y.m(st++,It,Math.max(Ht+$t-et/2,Ht)),y.m(st++,It,Ht),y.m(st++,It,Ht),y.m(st++,It,Math.min(Ht-At+et/2,Ht)),y.m(st++,It,Ht-At-et)):(y.m(st++,It-At-et,Ht),y.m(st++,Math.min(It-At+et/2,It),Ht),y.m(st++,It,Ht),y.m(st++,It,Ht),y.m(st++,Math.max(It+$t-et/2,It),Ht),y.m(st++,It+$t+et,Ht)):this.K===180?(y.m(st++,It+$t,Ht),y.m(st++,It-At,Ht)):this.K===90?(y.m(st++,It,Ht-At),y.m(st++,It,Ht+$t)):this.K===270?(y.m(st++,It,Ht+$t),y.m(st++,It,Ht-At)):(y.m(st++,It-At,Ht),y.m(st++,It+$t,Ht)))),Ee=Ct}Ye&&(St=y.i(st-1).x,Tt=y.i(st-1).y,It=y.i(st).x,Ht=y.i(st).y,this.K===180||this.K===0?Tt!==Ht&&(At=this.K===0?Math.min(Math.max((It+St)/2,this.Ta[Ne.layer]+this.Rf.x),It):Math.max(Math.min((It+St)/2,this.Ta[Ne.layer]+this.Rf.x),It),y.m(st++,At,Tt),y.m(st++,At,Ht)):St!==It&&(At=this.K===90?Math.min(Math.max((Ht+Tt)/2,this.Ta[Ne.layer]+this.Rf.y),Ht):Math.max(Math.min((Ht+Tt)/2,this.Ta[Ne.layer]+this.Rf.y),Ht),y.m(st++,St,At),y.m(st++,It,At)))}b!==null&&Ge&&4<=y.pointsCount&&(ne!==null&&(ne=_e===or?y.getLinkPointFromPoint(E,ne,ne.ga(_r),y.i(3),!0):y.i(0),_e===or&&(_e=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+_e.x)/2,_e.y),y.L(2,b.x,(_e.y+b.y)/2)):(y.L(1,_e.x,(ne.y+_e.y)/2),y.L(2,(_e.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),se!==null&&(E=he===or?y.getLinkPointFromPoint(te,se,se.ga(_r),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===or&&(se=y.i(y.pointsCount-3),he=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+se.x)/2,se.y),y.L(y.pointsCount-2,he.x,(se.y+he.y)/2)):(y.L(y.pointsCount-2,se.x,(E.y+se.y)/2),y.L(y.pointsCount-3,(se.x+he.x)/2,he.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},no.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Ln,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var te=b.i(E),ne=b.i(E+1);if(this.B(te.y,ne.y)&&!this.B(te.x,ne.x)){var se=new Gc;se.layer=Math.floor(te.y/2);var he=b.i(0),_e=b.i(b.pointsCount-1);if(se.first=he.x*he.x+he.y,se.jc=_e.x*_e.x+_e.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),_e=b.i(E+2);var Ee=0;he.y<te.y?Ee=_e.y<te.y?3:te.x<ne.x?2:1:he.y>te.y&&(Ee=_e.y>te.y?0:ne.x<te.x?2:1),se.j=Ee}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),Ee=1,se=x[te].jc,he=te;he<E;he++)_e=x[he],_e.jc!==se&&(Ee++,se=_e.jc);this.zi(x,this.Ux,te,te+ne);var Ne=1;for(se=x[te].first,he=te;he<E;he++)_e=x[he],_e.first!==se&&(Ne++,se=_e.first);for(he=!0,_e=Ne,Ee<Ne?(he=!1,_e=Ee,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,Ee=0,Ne=te;Ne<E;Ne++){var Ge=x[Ne];(he?Ge.first:Ge.jc)!==se&&(Ee++,se=he?Ge.first:Ge.jc);var Ye=Ge.link;te=Ye.i(Ge.index),ne=Ye.i(Ge.index+1);var et=this.linkSpacing*(Ee-(_e-1)/2);y++,Ye.uh(),Ye.L(Ge.index,te.x,te.y+et),Ye.L(Ge.index+1,ne.x,ne.y+et),Ye.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 Gc,se.layer=Math.floor(te.x/2),he=b.i(0),_e=b.i(b.pointsCount-1),se.first=he.x+he.y*he.y,se.jc=_e.x+_e.y*_e.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),_e=b.i(E+2),Ee=0,he.x<te.x?Ee=_e.x<te.x?3:te.y<ne.y?2:1:he.x>te.x&&(Ee=_e.x>te.x?0:ne.y<te.y?2:1),se.j=Ee),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),Ee=1,se=x[te].jc,he=te;he<E;he++)_e=x[he],_e.jc!==se&&(Ee++,se=_e.jc);for(this.zi(x,this.Ux,te,te+ne),Ne=1,se=x[te].first,he=te;he<E;he++)_e=x[he],_e.first!==se&&(Ne++,se=_e.first);for(he=!0,_e=Ne,Ee<Ne?(he=!1,_e=Ee,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,Ee=0,Ne=te;Ne<E;Ne++)Ge=x[Ne],(he?Ge.first:Ge.jc)!==se&&(Ee++,se=he?Ge.first:Ge.jc),Ye=Ge.link,te=Ye.i(Ge.index),ne=Ye.i(Ge.index+1),et=this.linkSpacing*(Ee-(_e-1)/2),y++,Ye.uh(),Ye.L(Ge.index,te.x+et,te.y),Ye.L(Ge.index+1,ne.x+et,ne.y),Ye.zf()}te=E}a=b}}}},Qe=no.prototype,Qe.Vx=function(a,y){return a instanceof Gc&&y instanceof Gc&&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 Gc&&y instanceof Gc&&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 Gc&&y instanceof Gc&&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)&&kt("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 Uc(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 Hc(a,y,x){a.He[a.tc[y]]=x}nt.Object.defineProperties(no.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()):kt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==k0&&a!==Ng||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==T0&&a!==wy&&a!==_y||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==A0&&a!==by&&a!==Py||(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!==Cy&&a!==N0&&a!==Ey||(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 k0=new pn(no,"CycleDepthFirst",0),xy=new pn(no,"CycleGreedy",1),Ng=new pn(no,"CycleFromLayers",2),T0=new pn(no,"LayerOptimalLinkLength",0),wy=new pn(no,"LayerLongestPathSink",1),_y=new pn(no,"LayerLongestPathSource",2),A0=new pn(no,"InitDepthFirstOut",0),by=new pn(no,"InitDepthFirstIn",1),Py=new pn(no,"InitNaive",2),Cy=new pn(no,"AggressiveNone",0),N0=new pn(no,"AggressiveLess",1),Ey=new pn(no,"AggressiveMore",2),Yx=8;no.className="LayeredDigraphLayout",no.CycleDepthFirst=k0,no.CycleGreedy=xy,no.CycleFromLayers=Ng,no.LayerOptimalLinkLength=T0,no.LayerLongestPathSink=wy,no.LayerLongestPathSource=_y,no.InitDepthFirstOut=A0,no.InitDepthFirstIn=by,no.InitNaive=Py,no.AggressiveNone=Cy,no.AggressiveLess=N0,no.AggressiveMore=Ey,no.PackNone=0,no.PackExpand=1,no.PackStraighten=2,no.PackMedian=4,no.PackAll=15,no.AlignNone=0,no.AlignUpperLeft=1,no.AlignUpperRight=2,no.AlignLowerLeft=4,no.AlignLowerRight=8,no.AlignAll=15;function Gc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Gc.className="SegInfo";function ip(a){Lo.call(this,a)}Xe(ip,Lo),ip.prototype.createVertex=function(){return new zl(this)},ip.prototype.createEdge=function(){return new Dg(this)},ip.className="LayeredDigraphNetwork";function zl(a){ks.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}Xe(zl,ks);function rx(a,y){return a.index-y.index}function D0(a,y){if(!a.$n){for(var x=[],b=ei(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=ei(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;kt("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=ei(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(rx),a.co=y}return a.co}function Xx(a){if(!a.ao){for(var y=[],x=ei(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(rx),a.ao=y}return a.ao}zl.prototype.Cl=function(a){ks.prototype.Cl.call(this,a),this.bo=this.co=null},zl.prototype.Kl=function(a){ks.prototype.Kl.call(this,a),this.bo=this.co=null},zl.prototype.zl=function(a){ks.prototype.zl.call(this,a),this.$n=this.ao=null},zl.prototype.Jl=function(a){ks.prototype.Jl.call(this,a),this.$n=this.ao=null},nt.Object.defineProperties(zl.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)}}}),zl.prototype.deleteDestinationEdge=zl.prototype.Jl,zl.prototype.addDestinationEdge=zl.prototype.zl,zl.prototype.deleteSourceEdge=zl.prototype.Kl,zl.prototype.addSourceEdge=zl.prototype.Cl,zl.className="LayeredDigraphVertex";function Dg(a){gl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Xe(Dg,gl),nt.Object.defineProperties(Dg.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)}}}),Dg.className="LayeredDigraphEdge";function yr(a){Vo.call(this),this.Ub=new Mn,this.Wn=F0,this.ud=vh,this.vo=j0,this.Bq=By,this.$v=[],this.td=!0,this.Rb=z0,this.$d=new Cn(10,10).freeze();var y=new sf(this);this.W=new eu(y),this.Y=new eu(y),this.ru=[],a&&Object.assign(this,a)}Xe(yr,Vo),yr.prototype.cloneProtected=function(a){Vo.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},yr.prototype.qb=function(a){a.classType===yr?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:kt("Unknown enum value: "+a):Vo.prototype.qb.call(this,a)},yr.prototype.createNetwork=function(){return new sf(this)},yr.prototype.makeNetwork=function(a){function y(b){if(b instanceof Xn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Fn){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 en?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Ji?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},yr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==U0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof en&&(y=a),this.path===F0&&y!==null?this.ud=y.isTreePathToChildren?vh:rf:this.ud=this.path===F0?vh: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 Mn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Xn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof eu&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,My(this,y));for(y=this.network.vertexes,a=null;a=Jx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof eu&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof eu&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof eu&&ux(this,y);if(this.Cu(),this.layerStyle===H0){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===jy)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 eu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Mn,this.isValidLayout=!0};function Jx(a){var y=new Mn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}yr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case vh:x.sourceEdges.count===0&&this.Ub.add(x);break;case rf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:kt("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 vh:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case rf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:kt("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case vh:if(0<y.destinationEdges.count){for(var x=new Ln,b=y.destinationVertexes;b.next();){var E=b.value;sx(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case rf:if(0<y.sourceEdges.count){for(x=new Ln,b=y.sourceVertexes;b.next();)E=b.value,sx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:kt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var te=x[E];te.initialized=!0,te.level=y.level+1,te.parent=y,a.Ub.remove(te)}for(y=0;y<b;y++)My(a,x[y])}}function sx(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}yr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var te=E=0;te<x.length;te++)x[te]!==y&&(b[E++]=x[te]);a.children=b}}};function ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===xh&&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];ax(a,he),x+=he.descendantCount+1,b=Math.max(b,he.maxChildrenCount),E=Math.max(E,he.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function qx(a,y){switch(a.vo){default:case j0: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 Iy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Oy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,te=0;te<E;te++)if(0<b[te].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}yr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(qx(this,a)),a.parent!==null&&a.parent.alignment===xh){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}yr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==xh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}yr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case rp:break;case Ig:a.children.reverse();break;case Rg:a.children.sort(a.comparer);break;case Fg:a.children.sort(a.comparer),a.children.reverse();break;default:kt("Unhandled sorting value "+a.sorting.toString())}},yr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},yr.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=Wc(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 _e=a.node.Mu();_e.next();){var Ee=_e.value;Ee.category==="Comment"&&Ee.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(Ee),Ee.Va(),Ee=Ee.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,Ee.width),ne+=Ee.height+Math.abs(se)):(te+=Ee.width+Math.abs(se),ne=Math.max(ne,Ee.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=nn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,nn.free(E))};function Wc(a){return a===sc||a===xh||a===ac||a===Rh}function Og(a){return a===sc||a===xh}function ky(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Wc(x)){if(Og(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===ac)return!0}}return!1}yr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,te=!1;x!==null&&(E=x.angle,te=x.alignment,te=Wc(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,se=ky(a),he=0,_e=a.comments,Ee=_e.length,Ne=ft.alloc(),Ge=0;Ge<Ee;Ge++){var Ye=_e[Ge],et=Ye.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&se)if(0<=a.commentMargin)for(Ne.h(a.bounds.x-a.commentMargin-et.width,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();){var st=Ye.value;st.fromSpot=ma,st.toSpot=As}else for(Ne.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=As,st.toSpot=ma;else if(0<=a.commentMargin)for(Ne.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=As,st.toSpot=ma;else for(Ne.h(a.bounds.x+a.commentMargin-et.width,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=ma,st.toSpot=As;he=0<=a.commentSpacing?he+(et.height+a.commentSpacing):he+(a.commentSpacing-et.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Ne.h(a.bounds.x+he,a.bounds.y-a.commentMargin-et.height),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=ga,st.toSpot=zs;else for(Ne.h(a.bounds.x+he,a.bounds.y+2*a.focus.y-a.commentMargin),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=zs,st.toSpot=ga;else if(0<=a.commentMargin)for(Ne.h(a.bounds.x+he,a.bounds.y+2*a.focus.y+a.commentMargin),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=zs,st.toSpot=ga;else for(Ne.h(a.bounds.x+he,a.bounds.y+a.commentMargin-et.height),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=ga,st.toSpot=zs;he=0<=a.commentSpacing?he+(et.width+a.commentSpacing):he+(a.commentSpacing-et.width)}}if(ft.free(Ne),y=he-a.commentSpacing-(b?y.height:y.width),this.ud===vh)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},yr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case B0:hx(this,a);break;case Bg:if(a.alignment===xh)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=Wc(x)),b=ky(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=vu(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===yh;var _e=he===Sh,Ee=Wc(he),Ne=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ge=a.nodeSpacing,Ye=this.computeNodeIndent(a),et=a.rowSpacing,st=0;(b||_e||a.hm||a.im&&a.maxGenerationCount===1)&&(st=Math.max(0,a.rowIndent)),b=a.width;var Ct=a.height,St=0,Tt=0,At=0,It=null,Ht=null,$t=0,Kn=0,ci=0,si=0,In=0,wn=0,Yi=0,Bi=0;if(Ee&&!Og(he)&&135<E&&ne.reverse(),Og(he))if(1<se)for(var Wr=0;Wr<se;Wr++)Wr%2===0&&Wr!==se-1&&(Bi=Math.max(Bi,y?ne[Wr].Da.width:ne[Wr].Da.height));else se===1&&(Bi=y?ne[0].Da.width:ne[0].Da.height);if(Ee){switch(he){case sc:Tt=135>E?cx(this,a,ne,Bi,St,Tt):dx(this,a,ne,Bi,St,Tt),Bi=Tt.x,St=Tt.width,Tt=Tt.height;break;case ac:for(It=0;It<se;It++)Ht=ne[It],Ne=Ht.Da,At=wn===0?0:et,y?(Ht.S.h(te-Ne.width,si+At),St=Math.max(St,Ne.width),Tt=Math.max(Tt,si+At+Ne.height),si+=At+Ne.height):(Ht.S.h(ci+At,te-Ne.height),St=Math.max(St,ci+At+Ne.width),Tt=Math.max(Tt,Ne.height),ci+=At+Ne.width),wn++;break;case Rh:for(It=0;It<se;It++)Ht=ne[It],te=Ht.Da,Ne=wn===0?0:et,y?(Ht.S.h(Ge/2+a.focus.x,si+Ne),St=Math.max(St,te.width),Tt=Math.max(Tt,si+Ne+te.height),si+=Ne+te.height):(Ht.S.h(ci+Ne,Ge/2+a.focus.y),St=Math.max(St,ci+Ne+te.width),Tt=Math.max(Tt,te.height),ci+=Ne+te.width),wn++}It=sl(this,2),Ht=sl(this,2),y?(It[0].h(0,0),It[1].h(0,Tt),Ht[0].h(St,0)):(It[0].h(0,0),It[1].h(St,0),Ht[0].h(0,Tt)),Ht[1].h(St,Tt)}else for(Wr=0;Wr<se;Wr++){var wo=ne[Wr],Bs=wo.Da;if(y){0<Ne&&0<wn&&ci+Ge+Bs.width>Ne&&(ci<te&&_d(a,he,te-ci,0,Yi,Wr-1),In++,wn=0,Yi=Wr,At=Tt,ci=0,si=135<E?-Tt-et:Tt+et),I0(this,wo,0,si);var Zs=0;if(wn===0)It=wo.Yo,Ht=wo.kp,$t=Bs.width,Kn=Bs.height,(It===null||Ht===null||E!==vu(wo))&&(It=sl(this,2),Ht=sl(this,2),It[0].h(0,0),It[1].h(0,Kn),Ht[0].h($t,0),Ht[1].h($t,Kn));else{var La=ai();Kn=fx(this,a,wo,It,Ht,$t,Kn,La),Zs=Kn.x,It=La[0],Ht=La[1],$t=Kn.width,Kn=Kn.height,Gn(La),ci<Bs.width&&0>Zs&&(nf(a,-Zs,0,Yi,Wr-1),R0(It,-Zs,0),R0(Ht,-Zs,0),Zs=0)}wo.S.h(Zs,si),St=Math.max(St,$t),Tt=Math.max(Tt,At+(In===0?0:et)+Bs.height),ci=$t}else 0<Ne&&0<wn&&si+Ge+Bs.height>Ne&&(si<te&&_d(a,he,0,te-si,Yi,Wr-1),In++,wn=0,Yi=Wr,At=St,si=0,ci=135<E?-St-et:St+et),I0(this,wo,ci,0),Zs=0,wn===0?(It=wo.Yo,Ht=wo.kp,$t=Bs.width,Kn=Bs.height,(It===null||Ht===null||E!==vu(wo))&&(It=sl(this,2),Ht=sl(this,2),It[0].h(0,0),It[1].h($t,0),Ht[0].h(0,Kn),Ht[1].h($t,Kn))):(La=ai(),Kn=fx(this,a,wo,It,Ht,$t,Kn,La),Zs=Kn.x,It=La[0],Ht=La[1],$t=Kn.width,Kn=Kn.height,Gn(La),si<Bs.height&&0>Zs&&(nf(a,0,-Zs,Yi,Wr-1),R0(It,0,-Zs),R0(Ht,0,-Zs),Zs=0)),wo.S.h(ci,Zs),Tt=Math.max(Tt,Kn),St=Math.max(St,At+(In===0?0:et)+Bs.width),si=Kn;wn++}switch(0<In&&(y?(Tt+=Math.max(0,x),ci<St&&_d(a,he,St-ci,0,Yi,se-1),0<st&&(_e||nf(a,st,0,0,se-1),St+=st)):(St+=Math.max(0,x),si<Tt&&_d(a,he,0,Tt-si,Yi,se-1),0<st&&(_e||nf(a,0,st,0,se-1),Tt+=st))),st=_e=0,he){case op:y?_e+=St/2-a.focus.x-Ye/2:st+=Tt/2-a.focus.y-Ye/2;break;case of:0<In?y?_e+=St/2-a.focus.x-Ye/2:st+=Tt/2-a.focus.y-Ye/2:y?(Bi=ne[0].S.x+ne[0].la.x,_e+=Bi+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-Bi)/2-a.focus.x-Ye/2):(Bi=ne[0].S.y+ne[0].la.y,st+=Bi+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-Bi)/2-a.focus.y-Ye/2);break;case yh:y?(_e-=Ye,St+=Ye):(st-=Ye,Tt+=Ye);break;case Sh:y?(_e+=St-a.width+Ye,St+=Ye):(st+=Tt-a.height+Ye,Tt+=Ye);break;case sc:y?1<se?_e+=Bi+Ge/2-a.focus.x:_e+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?st+=Bi+Ge/2-a.focus.y:st+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case ac:y?_e+=St+Ge/2-a.focus.x:st+=Tt+Ge/2-a.focus.y;break;case Rh:break;default:Tt=this.customAlignment(a,_e,st,St,Tt),_e=Tt[0],st=Tt[1],St=Tt[2],Tt=Tt[3]}for(Ye=0;Ye<se;Ye++)Bi=ne[Ye],y?Bi.S.h(Bi.S.x+Bi.la.x-_e,Bi.S.y+(135<E?(Ee?-Tt:-Bi.Da.height)+Bi.la.y-x:Ct+x+Bi.la.y)):Bi.S.h(Bi.S.x+(135<E?(Ee?-St:-Bi.Da.width)+Bi.la.x-x:b+x+Bi.la.x),Bi.S.y+Bi.la.y-st);if(se=ne=0,Ee?y?(St=Ty(a,St,_e),0>_e&&(_e=0),135<E&&(st+=Tt+x),Tt+=Ct+x,he===Rh&&(ne+=Ge/2+a.focus.x),se+=Ct+x):(135<E&&(_e+=St+x),St+=b+x,Tt=Ay(a,Tt,st),0>st&&(st=0),he===Rh&&(se+=Ge/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>St&&(St=Ny(he,b-St,0),ne=St.x,se=St.y,St=b,_e=0):St=Ty(a,St,_e),0>_e&&(ne-=_e,_e=0),135<E&&(st+=Tt+x),Tt=Math.max(Math.max(Tt,Ct),Tt+Ct+x),se+=Ct+x):(135<E&&(_e+=St+x),St=Math.max(Math.max(St,b),St+b+x),a.comments===null?Ct>Tt&&(Tt=Ny(he,0,Ct-Tt),ne=Tt.x,se=Tt.y,Tt=Ct,st=0):Tt=Ay(a,Tt,st),0>st&&(se-=st,st=0),ne+=b+x),0<In)E=sl(this,4),In=sl(this,4),y?(E[2].h(0,Ct+x),E[3].h(E[2].x,Tt),In[2].h(St,E[2].y),In[3].h(In[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(St,E[2].y),In[2].h(E[2].x,Tt),In[3].h(E[3].x,In[2].y));else{for(E=sl(this,It.length+2),In=sl(this,Ht.length+2),he=0;he<It.length;he++)Ee=It[he],E[he+2].h(Ee.x+ne,Ee.y+se);for(he=0;he<Ht.length;he++)Ee=Ht[he],In[he+2].h(Ee.x+ne,Ee.y+se)}y?(E[0].h(_e,0),E[1].h(E[0].x,Ct),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])),In[0].h(_e+b,0),In[1].h(In[0].x,Ct),In[2].y<In[1].y&&(In[2].x<In[0].x?In[2].assign(In[1]):In[1].assign(In[2])),In[3].y<In[2].y&&(In[3].x<In[0].x?In[3].assign(In[2]):In[2].assign(In[3])),E[2].y-=x/2,In[2].y-=x/2):(E[0].h(0,st),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])),In[0].h(0,st+Ct),In[1].h(b,In[0].y),In[2].x<In[1].x&&(In[2].y<In[0].y?In[2].assign(In[1]):In[1].assign(In[2])),In[3].x<In[2].x&&(In[3].y<In[0].y?In[3].assign(In[2]):In[2].assign(In[3])),E[2].x-=x/2,In[2].x-=x/2),Ou(this,It),Ou(this,Ht),a.Yo=E,a.kp=In,a.la.h(_e,st),a.Da.h(St,Tt)}break;default:kt("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=Wc(x));var E=ky(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=vu(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 _e=y.alignment,Ee=_e===yh,Ne=_e===Sh;se=Wc(_e);var Ge=Math.max(0,y.breadthLimit);he=a.computeLayerSpacing(y);var Ye=y.nodeSpacing,et=a.computeNodeIndent(y),st=Ee||Ne?0:et/2,Ct=y.rowSpacing,St=0;(Ee||Ne||y.hm||y.im&&y.maxGenerationCount===1)&&(St=Math.max(0,y.rowIndent)),Ee=y.width;var Tt=y.height,At=0,It=0,Ht=0,$t=0,Kn=0,ci=0,si=0,In=0,wn=0,Yi=0;if(se&&!Og(_e)&&135<b&&E.reverse(),Og(_e))if(1<ne)for(var Bi=0;Bi<ne;Bi++){var Wr=E[Bi],wo=Wr.Da;Bi%2===0&&Bi!==ne-1?wn=Math.max(wn,(x?wo.width:wo.height)+a.computeBusNodeSpacing(Wr)-Ye):Bi%2!==0&&(Yi=Math.max(Yi,(x?wo.width:wo.height)+a.computeBusNodeSpacing(Wr)-Ye))}else ne===1&&(wn=x?E[0].Da.width:E[0].Da.height);if(se)switch(_e){case sc:case xh:It=135>b?cx(a,y,E,wn,At,It):dx(a,y,E,wn,At,It),wn=It.x,At=It.width,It=It.height;break;case ac:for(Ge=0;Ge<ne;Ge++)st=E[Ge],Ht=st.Da,Yi=si===0?0:Ct,x?(st.S.h(te-Ht.width,Kn+Yi),At=Math.max(At,Ht.width),It=Math.max(It,Kn+Yi+Ht.height),Kn+=Yi+Ht.height):(st.S.h($t+Yi,te-Ht.height),At=Math.max(At,$t+Yi+Ht.width),It=Math.max(It,Ht.height),$t+=Yi+Ht.width),si++;break;case Rh:for(te=0;te<ne;te++)Ge=E[te],st=Ge.Da,Ht=si===0?0:Ct,x?(Ge.S.h(Ye/2+y.focus.x,Kn+Ht),At=Math.max(At,st.width),It=Math.max(It,Kn+Ht+st.height),Kn+=Ht+st.height):(Ge.S.h($t+Ht,Ye/2+y.focus.y),At=Math.max(At,$t+Ht+st.width),It=Math.max(It,st.height),$t+=Ht+st.width),si++}else for(Yi=0;Yi<ne;Yi++)Bi=E[Yi],Wr=Bi.Da,x?(0<Ge&&0<si&&$t+Ye+Wr.width>Ge&&($t<te&&_d(y,_e,te-$t,0,In,Yi-1),ci++,si=0,In=Yi,Ht=It,$t=0,Kn=135<b?-It-Ct:It+Ct),wo=si===0?st:Ye,I0(a,Bi,0,Kn),Bi.S.h($t+wo,Kn),At=Math.max(At,$t+wo+Wr.width),It=Math.max(It,Ht+(ci===0?0:Ct)+Wr.height),$t+=wo+Wr.width):(0<Ge&&0<si&&Kn+Ye+Wr.height>Ge&&(Kn<te&&_d(y,_e,0,te-Kn,In,Yi-1),ci++,si=0,In=Yi,Ht=At,Kn=0,$t=135<b?-At-Ct:At+Ct),wo=si===0?st:Ye,I0(a,Bi,$t,0),Bi.S.h($t,Kn+wo),It=Math.max(It,Kn+wo+Wr.height),At=Math.max(At,Ht+(ci===0?0:Ct)+Wr.width),Kn+=wo+Wr.height),si++;switch(0<ci&&(x?(It+=Math.max(0,he),$t<At&&_d(y,_e,At-$t,0,In,ne-1),0<St&&(Ne||nf(y,St,0,0,ne-1),At+=St)):(At+=Math.max(0,he),Kn<It&&_d(y,_e,0,It-Kn,In,ne-1),0<St&&(Ne||nf(y,0,St,0,ne-1),It+=St))),St=Ne=0,_e){case op:x?Ne+=At/2-y.focus.x-et/2:St+=It/2-y.focus.y-et/2;break;case of:0<ci?x?Ne+=At/2-y.focus.x-et/2:St+=It/2-y.focus.y-et/2:x?(a=E[0].S.x+E[0].la.x,Ne+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-et/2):(a=E[0].S.y+E[0].la.y,St+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-et/2);break;case yh:x?(Ne-=et,At+=et):(St-=et,It+=et);break;case Sh:x?(Ne+=At-y.width+et,At+=et):(St+=It-y.height+et,It+=et);break;case sc:case xh:x?1<ne?Ne+=wn+Ye/2-y.focus.x:Ne+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?St+=wn+Ye/2-y.focus.y:St+=E[0].focus.y-y.focus.y+E[0].la.y;break;case ac:x?Ne+=At+Ye/2-y.focus.x:St+=It+Ye/2-y.focus.y;break;case Rh:break;default:a=a.customAlignment(y,Ne,St,At,It),Ne=a[0],St=a[1],At=a[2],It=a[3]}for(a=0;a<ne;a++)et=E[a],x?et.S.h(et.S.x+et.la.x-Ne,et.S.y+(135<b?(se?-It:-et.Da.height)+et.la.y-he:Tt+he+et.la.y)):et.S.h(et.S.x+(135<b?(se?-At:-et.Da.width)+et.la.x-he:Ee+he+et.la.x),et.S.y+et.la.y-St);x?(At=Ty(y,At,Ne),0>Ne&&(Ne=0),135<b&&(St+=It+he),It=Math.max(Math.max(It,Tt),It+Tt+he)):(135<b&&(Ne+=At+he),At=Math.max(Math.max(At,Ee),At+Ee+he),It=Ay(y,It,St),0>St&&(St=0)),y.la.h(Ne,St),y.Da.h(At,It)}}yr.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new nn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new nn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,_e=vu(y)===90,Ee=0,Ne=0,Ge=0,Ye=0;Ye<ne;Ye++)if(!(Ye%2!==0||1<ne&&Ye===ne-1)){var et=x[Ye],st=et.Da,Ct=Ee===0?0:he;if(_e){var St=a.computeBusNodeSpacing(et)-se;et.S.h(b-(st.width+St),Ge+Ct),E=Math.max(E,st.width+St),te=Math.max(te,Ge+Ct+st.height),Ge+=Ct+st.height}else St=a.computeBusNodeSpacing(et)-se,et.S.h(Ne+Ct,b-(st.height+St)),te=Math.max(te,st.height+St),E=Math.max(E,Ne+Ct+st.width),Ne+=Ct+st.width;Ee++}for(Ee=0,et=Ne,Ye=Ge,_e?(Ne=b+se,Ge=0):(Ne=0,Ge=b+se),st=0;st<ne;st++)if(st%2!==0){Ct=x[st],St=Ct.Da;var Tt=Ee===0?0:he;if(_e){var At=a.computeBusNodeSpacing(Ct)-se;Ct.S.h(Ne+At,Ge+Tt),E=Math.max(E,Ne+St.width+At),te=Math.max(te,Ge+Tt+St.height),Ge+=Tt+St.height}else At=a.computeBusNodeSpacing(Ct)-se,Ct.S.h(Ne+Tt,Ge+At),E=Math.max(E,Ne+Tt+St.width),te=Math.max(te,Ge+St.height+At),Ne+=Tt+St.width;Ee++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,_e?Math.max(Math.abs(Ye),Math.abs(Ge)):Math.max(Math.abs(et),Math.abs(Ne))),_e?(x.S.h(b+se/2-x.focus.x-x.la.x,te+a),_e=b+se/2-x.focus.x-x.la.x,E=Math.max(E,_e+ne.width),0>_e&&(E-=_e),te=Math.max(te,Math.max(Ye,Ge)+a+ne.height),0>x.S.x&&(b=O0(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(et,Ne)+a+ne.width),Ge=b+se/2-x.focus.y-x.la.y,te=Math.max(te,Ge+ne.height),0>Ge&&(te-=Ge),0>x.S.y&&(b=O0(y,x.S.y,!0,b,se)))),new nn(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new nn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new nn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,_e=vu(y)===270,Ee=0,Ne=0,Ge=0,Ye=0;Ye<ne;Ye++)if(!(Ye%2!==0||1<ne&&Ye===ne-1)){var et=x[Ye],st=et.Da,Ct=Ee===0?0:he;if(_e){var St=a.computeBusNodeSpacing(et)-se;Ge-=Ct+st.height,et.S.h(b-(st.width+St),Ge),E=Math.max(E,st.width+St),te=Math.max(te,Math.abs(Ge))}else St=a.computeBusNodeSpacing(et)-se,Ne-=Ct+st.width,et.S.h(Ne,b-(st.height+St)),te=Math.max(te,st.height+St),E=Math.max(E,Math.abs(Ne));Ee++}for(Ee=0,et=Ne,Ye=Ge,_e?(Ne=b+se,Ge=0):(Ne=0,Ge=b+se),st=0;st<ne;st++)if(st%2!==0){Ct=x[st],St=Ct.Da;var Tt=Ee===0?0:he;if(_e){var At=a.computeBusNodeSpacing(Ct)-se;Ge-=Tt+St.height,Ct.S.h(Ne+At,Ge),E=Math.max(E,Ne+St.width+At),te=Math.max(te,Math.abs(Ge))}else At=a.computeBusNodeSpacing(Ct)-se,Ne-=Tt+St.width,Ct.S.h(Ne,Ge+At),te=Math.max(te,Ge+St.height+At),E=Math.max(E,Math.abs(Ne));Ee++}for(1<ne&&ne%2===1&&(he=x[ne-1],Ee=he.Da,a=a.computeBusLastRowSpacing(he,_e?Math.max(Math.abs(Ye),Math.abs(Ge)):Math.max(Math.abs(et),Math.abs(Ne))),_e?(he.S.h(b+se/2-he.focus.x-he.la.x,-te-Ee.height-a),Ne=b+se/2-he.focus.x-he.la.x,E=Math.max(E,Ne+Ee.width),0>Ne&&(E-=Ne),te=Math.max(te,Math.abs(Math.min(Ye,Ge))+a+Ee.height),0>he.S.x&&(b=O0(y,he.S.x,!1,b,se))):(he.S.h(-E-Ee.width-a,b+se/2-he.focus.y-he.la.y),E=Math.max(E,Math.abs(Math.min(et,Ne))+a+Ee.width),Ge=b+se/2-he.focus.y-he.la.y,te=Math.max(te,Ge+Ee.height),0>Ge&&(te-=Ge),0>he.S.y&&(b=O0(y,he.S.y,!0,b,se)))),y=0;y<ne;y++)se=x[y],_e?se.S.h(se.S.x,se.S.y+te):se.S.h(se.S.x+E,se.S.y);return new nn(b,0,E,te)}yr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},yr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function O0(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 Ty(a,y,x){switch(a.alignment){case of:case op:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case yh:return a.width>y?a.width:y;case Sh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case sc:case xh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case ac:return a.width-a.focus.x+a.nodeSpacing/2+y;case Rh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case of:case op:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case yh:return a.height>y?a.height:y;case Sh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case sc:case xh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case ac:return a.height-a.focus.y+a.nodeSpacing/2+y;case Rh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a){case op:y/=2,x/=2;break;case of:y/=2,x/=2;break;case yh:x=y=0;break;case Sh:break;default:kt("Unhandled alignment value "+a.toString())}return new ft(y,x)}function _d(a,y,x,b,E,te){y=Ny(y,x,b),nf(a,y.x,y.y,E,te)}function nf(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 I0(a,y,x,b){var E=y.parent;switch(a.ud){case vh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case rf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:kt("Unhandled path value "+a.ud.toString())}}function R0(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function fx(a,y,x,b,E,te,ne,se){var he=vu(y),_e=he===90||he===270,Ee=y.nodeSpacing;y=b;var Ne=E;b=te;var Ge=ne,Ye=x.Yo,et=x.kp;ne=x.Da;var st=_e?Math.max(Ge,ne.height):Math.max(b,ne.width);if((Ye===null||he!==vu(x))&&(Ye=sl(a,2),et=sl(a,2),_e?(Ye[0].h(0,0),Ye[1].h(0,ne.height),et[0].h(ne.width,0),et[1].h(et[0].x,Ye[1].y)):(Ye[0].h(0,0),Ye[1].h(ne.width,0),et[0].h(0,ne.height),et[1].h(Ye[1].x,et[0].y))),_e){if(Ge=9999999,!(Ne===null||2>Ne.length||Ye===null||2>Ye.length))for(E=x=0;x<Ne.length&&E<Ye.length;){te=Ne[x];var Ct=Ye[E];he=Ct.x,_e=Ct.y,he+=b;var St=te;x+1<Ne.length&&(St=Ne[x+1]);var Tt=Ct;Ct=Tt.x,Tt=Tt.y,E+1<Ye.length&&(Tt=Ye[E+1],Ct=Tt.x,Tt=Tt.y,Ct+=b);var At=Ge;te.y===_e?At=he-te.x:te.y>_e&&te.y<Tt?At=he+(te.y-_e)/(Tt-_e)*(Ct-he)-te.x:_e>te.y&&_e<St.y&&(At=he-(te.x+(_e-te.y)/(St.y-te.y)*(St.x-te.x))),At<Ge&&(Ge=At),St.y<=te.y?x++:Tt<=_e?E++:(St.y<=Tt&&x++,Tt<=St.y&&E++)}if(Ge=b-Ge,Ge+=Ee,x=Ye,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Ee=sl(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].y<y[0].y;)_e=x[te++],Ee[b++].h(_e.x+E,_e.y);for(;he<y.length;)_e=y[he++],Ee[b++].h(_e.x,_e.y);for(he=y[y.length-1].y;te<x.length&&x[te].y<=he;)te++;for(;te<x.length&&x[te].y>he;)_e=x[te++],Ee[b++].h(_e.x+E,_e.y);for(x=sl(a,b),he=0;he<b;he++)x[he].assign(Ee[he]);Ou(a,Ee),b=x}if(te=et,he=Ge,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Ee=sl(a,Ne.length+te.length),E=_e=x=0;x<Ne.length&&Ne[x].y<te[0].y;)St=Ne[x++],Ee[E++].h(St.x,St.y);for(;_e<te.length;)St=te[_e++],Ee[E++].h(St.x+he,St.y);for(te=te[te.length-1].y;x<Ne.length&&Ne[x].y<=te;)x++;for(;x<Ne.length&&Ne[x].y>te;)he=Ne[x++],Ee[E++].h(he.x,he.y);for(te=sl(a,E),x=0;x<E;x++)te[x].assign(Ee[x]);Ou(a,Ee),E=te}return te=Math.max(0,Ge)+ne.width,ne=st,Ou(a,y),Ou(a,Ye),Ou(a,Ne),Ou(a,et),se[0]=b,se[1]=E,new nn(Ge,0,te,ne)}if(b=9999999,!(Ne===null||2>Ne.length||Ye===null||2>Ye.length))for(E=x=0;x<Ne.length&&E<Ye.length;)te=Ne[x],Ct=Ye[E],he=Ct.x,_e=Ct.y,_e+=Ge,St=te,x+1<Ne.length&&(St=Ne[x+1]),Tt=Ct,Ct=Tt.x,Tt=Tt.y,E+1<Ye.length&&(Tt=Ye[E+1],Ct=Tt.x,Tt=Tt.y,Tt+=Ge),At=b,te.x===he?At=_e-te.y:te.x>he&&te.x<Ct?At=_e+(te.x-he)/(Ct-he)*(Tt-_e)-te.y:he>te.x&&he<St.x&&(At=_e-(te.y+(he-te.x)/(St.x-te.x)*(St.y-te.y))),At<b&&(b=At),St.x<=te.x?x++:Ct<=he?E++:(St.x<=Ct&&x++,Ct<=St.x&&E++);if(Ge-=b,Ge+=Ee,x=Ye,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(Ee=sl(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].x<y[0].x;)_e=x[te++],Ee[b++].h(_e.x,_e.y+E);for(;he<y.length;)_e=y[he++],Ee[b++].h(_e.x,_e.y);for(he=y[y.length-1].x;te<x.length&&x[te].x<=he;)te++;for(;te<x.length&&x[te].x>he;)_e=x[te++],Ee[b++].h(_e.x,_e.y+E);for(x=sl(a,b),he=0;he<b;he++)x[he].assign(Ee[he]);Ou(a,Ee),b=x}if(te=et,he=Ge,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Ee=sl(a,Ne.length+te.length),E=_e=x=0;x<Ne.length&&Ne[x].x<te[0].x;)St=Ne[x++],Ee[E++].h(St.x,St.y);for(;_e<te.length;)St=te[_e++],Ee[E++].h(St.x,St.y+he);for(te=te[te.length-1].x;x<Ne.length&&Ne[x].x<=te;)x++;for(;x<Ne.length&&Ne[x].x>te;)he=Ne[x++],Ee[E++].h(he.x,he.y);for(te=sl(a,E),x=0;x<E;x++)te[x].assign(Ee[x]);Ou(a,Ee),E=te}return te=st,ne=Math.max(0,Ge)+ne.height,Ou(a,y),Ou(a,Ye),Ou(a,Ne),Ou(a,et),se[0]=b,se[1]=E,new nn(Ge,0,te,ne)}function sl(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 ft;return a}function Ou(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}yr.prototype.arrangeTrees=function(){if(this.Rb===U0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof eu){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),Dy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof eu&&a.push(x);switch(this.sorting){case rp:break;case Ig:a.reverse();break;case Rg:a.sort(this.comparer);break;case Fg:a.sort(this.comparer),a.reverse();break;default:kt("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(Dy(this,E,y+E.la.x,x+E.la.y),this.Rb){case z0:x+=E.Da.height+this.$d.height;break;case Fy:y+=E.Da.width+this.$d.width;break;default:kt("Unhandled arrangement value "+this.Rb.toString())}}}};function Dy(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];Dy(a,ne,x+ne.S.x,b+ne.S.y)}}}yr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},yr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},yr.prototype.Gu=function(){if(this.layerStyle===H0){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 ft(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new ft(-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 nn(0,te,x,se))):this.angle===90?(E.push(new nn(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new nn(te,0,se,x))):(E.push(new nn(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},yr.prototype.commitLayers=function(){},yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},yr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof eu&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}yr.prototype.setPortSpots=function(a){var y=a.alignment;if(Wc(y)){var x=this.ud===vh,b=vu(a);switch(b){case 0:var E=As;break;case 90:E=zs;break;case 180:E=ma;break;default:E=ga}var te=a.children,ne=te.length;switch(y){case sc:case xh: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?ma:ga;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=ma;break;case 90:he=ga;break;case 180:he=As;break;default:he=zs}else y%2===0&&(he=b===90||b===270?As:zs);x?(a.setsPortSpot&&(se.fromSpot=E),a.setsChildPortSpot&&(se.toSpot=he)):(a.setsPortSpot&&(se.fromSpot=he),a.setsChildPortSpot&&(se.toSpot=E))}}break;case ac:for(b=b===90||b===270?As:zs,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 Rh:for(b=b===90||b===270?ma:ga,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=vu(a),this.ud===vh){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=As;break;case 90:b.fromSpot=zs;break;case 180:b.fromSpot=ma;break;default:b.fromSpot=ga}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=ma;break;case 90:b.toSpot=ga;break;case 180:b.toSpot=As;break;default:b.toSpot=zs}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=As;break;case 90:b.toSpot=zs;break;case 180:b.toSpot=ma;break;default:b.toSpot=ga}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=ma;break;case 90:b.fromSpot=ga;break;case 180:b.fromSpot=As;break;default:b.fromSpot=zs}else b.fromSpot=a.childPortSpot}};function vu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}yr.prototype.computeLayerSpacing=function(a){var y=vu(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},yr.prototype.computeNodeIndent=function(a){var y=vu(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)},nt.Object.defineProperties(yr.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==j0&&a!==Iy&&a!==Oy&&a!==Ry||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==By&&a!==jy&&a!==H0||(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!==z0&&a!==Fy&&a!==U0||(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!==rp&&a!==Ig&&a!==Rg&&!Fg||(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()):kt("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!==B0&&a!==Bg||(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!==rp&&a!==Ig&&a!==Rg&&!Fg||(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!==B0&&a!==Bg||(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 F0=new pn(yr,"PathDefault",-1),vh=new pn(yr,"PathDestination",0),rf=new pn(yr,"PathSource",1),rp=new pn(yr,"SortingForwards",10),Ig=new pn(yr,"SortingReverse",11),Rg=new pn(yr,"SortingAscending",12),Fg=new pn(yr,"SortingDescending",13),op=new pn(yr,"AlignmentCenterSubtrees",20),of=new pn(yr,"AlignmentCenterChildren",21),yh=new pn(yr,"AlignmentStart",22),Sh=new pn(yr,"AlignmentEnd",23),sc=new pn(yr,"AlignmentBus",24),xh=new pn(yr,"AlignmentBusBranching",25),ac=new pn(yr,"AlignmentTopLeftBus",26),Rh=new pn(yr,"AlignmentBottomRightBus",27),B0=new pn(yr,"CompactionNone",30),Bg=new pn(yr,"CompactionBlock",31),j0=new pn(yr,"StyleLayered",40),Oy=new pn(yr,"StyleLastParents",41),Iy=new pn(yr,"StyleAlternating",42),Ry=new pn(yr,"StyleRootOnly",43),z0=new pn(yr,"ArrangementVertical",50),Fy=new pn(yr,"ArrangementHorizontal",51),U0=new pn(yr,"ArrangementFixedRoots",52),By=new pn(yr,"LayerIndividual",60),jy=new pn(yr,"LayerSiblings",61),H0=new pn(yr,"LayerUniform",62);yr.className="TreeLayout",yr.PathDefault=F0,yr.PathDestination=vh,yr.PathSource=rf,yr.SortingForwards=rp,yr.SortingReverse=Ig,yr.SortingAscending=Rg,yr.SortingDescending=Fg,yr.AlignmentCenterSubtrees=op,yr.AlignmentCenterChildren=of,yr.AlignmentStart=yh,yr.AlignmentEnd=Sh,yr.AlignmentBus=sc,yr.AlignmentBusBranching=xh,yr.AlignmentTopLeftBus=ac,yr.AlignmentBottomRightBus=Rh,yr.CompactionNone=B0,yr.CompactionBlock=Bg,yr.StyleLayered=j0,yr.StyleLastParents=Oy,yr.StyleAlternating=Iy,yr.StyleRootOnly=Ry,yr.ArrangementVertical=z0,yr.ArrangementHorizontal=Fy,yr.ArrangementFixedRoots=U0,yr.LayerIndividual=By,yr.LayerSiblings=jy,yr.LayerUniform=H0;function sf(a){Lo.call(this,a)}Xe(sf,Lo),sf.prototype.createVertex=function(){return new eu(this)},sf.prototype.createEdge=function(){return new sp(this)},sf.className="TreeNetwork";function eu(a){ks.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 ft(0,0),this.Da=new Cn(0,0),this.la=new ft(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=rp,this.hd=oy,this.Kb=0,this.Jb=of,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Bg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Ts,this.wr=!0,this.Dp=Ts}Xe(eu,ks),eu.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)},nt.Object.defineProperties(eu.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)}}}),eu.className="TreeVertex";function sp(a){gl.call(this,a),this.$t=new ft(0,0)}Xe(sp,gl),sp.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 vh:x=this.fromVertex,b=this.toVertex;break;case rf:x=this.toVertex,b=this.fromVertex;break;default:kt("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=vu(x),ne=y.computeLayerSpacing(x),se=x.rowSpacing;a.vg();var he=a.curve===Ll,_e=a.isOrthogonal,Ee;if(a.uh(),_e||he){for(Ee=2;4<a.pointsCount;)a.pv(2);var Ne=a.i(1),Ge=a.i(2)}else{for(Ee=1;3<a.pointsCount;)a.pv(1);Ne=a.i(0),Ge=a.i(a.pointsCount-1)}var Ye=a.i(a.pointsCount-1);te===0?(x.alignment===Sh?(te=b.bottom+E.y,E.y===0&&Ne.y>Ye.y+x.rowIndent&&(te=Math.min(te,Math.max(Ne.y,te-y.computeNodeIndent(x))))):x.alignment===yh?(te=b.top+E.y,E.y===0&&Ne.y<Ye.y-x.rowIndent&&(te=Math.max(te,Math.min(Ne.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(Ee,Ne.x,te),Ee++,a.m(Ee,b.right+ne,te),Ee++,a.m(Ee,b.right+ne+(E.x-se)/3,te),Ee++,a.m(Ee,b.right+ne+2*(E.x-se)/3,te),Ee++,a.m(Ee,b.right+ne+(E.x-se),te),Ee++,a.m(Ee,Ge.x,te)):(_e&&(a.m(Ee,b.right+ne/2,Ne.y),Ee++),a.m(Ee,b.right+ne/2,te),Ee++,a.m(Ee,b.right+ne+E.x-(_e?se/2:se),te),Ee++,_e&&a.m(Ee,a.i(Ee-1).x,Ge.y))):te===90?(x.alignment===Sh?(te=b.right+E.x,E.x===0&&Ne.x>Ye.x+x.rowIndent&&(te=Math.min(te,Math.max(Ne.x,te-y.computeNodeIndent(x))))):x.alignment===yh?(te=b.left+E.x,E.x===0&&Ne.x<Ye.x-x.rowIndent&&(te=Math.max(te,Math.min(Ne.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(Ee,te,Ne.y),Ee++,a.m(Ee,te,b.bottom+ne),Ee++,a.m(Ee,te,b.bottom+ne+(E.y-se)/3),Ee++,a.m(Ee,te,b.bottom+ne+2*(E.y-se)/3),Ee++,a.m(Ee,te,b.bottom+ne+(E.y-se)),Ee++,a.m(Ee,te,Ge.y)):(_e&&(a.m(Ee,Ne.x,b.bottom+ne/2),Ee++),a.m(Ee,te,b.bottom+ne/2),Ee++,a.m(Ee,te,b.bottom+ne+E.y-(_e?se/2:se)),Ee++,_e&&a.m(Ee,Ge.x,a.i(Ee-1).y))):te===180?(x.alignment===Sh?(te=b.bottom+E.y,E.y===0&&Ne.y>Ye.y+x.rowIndent&&(te=Math.min(te,Math.max(Ne.y,te-y.computeNodeIndent(x))))):x.alignment===yh?(te=b.top+E.y,E.y===0&&Ne.y<Ye.y-x.rowIndent&&(te=Math.max(te,Math.min(Ne.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(Ee,Ne.x,te),Ee++,a.m(Ee,b.left-ne,te),Ee++,a.m(Ee,b.left-ne+(E.x+se)/3,te),Ee++,a.m(Ee,b.left-ne+2*(E.x+se)/3,te),Ee++,a.m(Ee,b.left-ne+(E.x+se),te),Ee++,a.m(Ee,Ge.x,te)):(_e&&(a.m(Ee,b.left-ne/2,Ne.y),Ee++),a.m(Ee,b.left-ne/2,te),Ee++,a.m(Ee,b.left-ne+E.x+(_e?se/2:se),te),Ee++,_e&&a.m(Ee,a.i(Ee-1).x,Ge.y))):te===270?(x.alignment===Sh?(te=b.right+E.x,E.x===0&&Ne.x>Ye.x+x.rowIndent&&(te=Math.min(te,Math.max(Ne.x,te-y.computeNodeIndent(x))))):x.alignment===yh?(te=b.left+E.x,E.x===0&&Ne.x<Ye.x-x.rowIndent&&(te=Math.max(te,Math.min(Ne.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(Ee,te,Ne.y),Ee++,a.m(Ee,te,b.top-ne),Ee++,a.m(Ee,te,b.top-ne+(E.y+se)/3),Ee++,a.m(Ee,te,b.top-ne+2*(E.y+se)/3),Ee++,a.m(Ee,te,b.top-ne+(E.y+se)),Ee++,a.m(Ee,te,Ge.y)):(_e&&(a.m(Ee,Ne.x,b.top-ne/2),Ee++),a.m(Ee,te,b.top-ne/2),Ee++,a.m(Ee,te,b.top-ne+E.y+(_e?se/2:se)),Ee++,_e&&a.m(Ee,Ge.x,a.i(Ee-1).y))):kt("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=vu(x),y!==vu(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===Ll,E=a.isOrthogonal,b=Wc(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()))}}},nt.Object.defineProperties(sp.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)}}}),sp.className="TreeEdge",_o.prototype.initializeStandardTools=function(){this.gb("Action",new Zi,this.mouseDownTools),this.gb("Relinking",new Sr,this.mouseDownTools),this.gb("LinkReshaping",new Ki,this.mouseDownTools),this.gb("Rotating",new Ur,this.mouseDownTools),this.gb("Resizing",new Po,this.mouseDownTools),this.gb("Linking",new ui,this.mouseMoveTools),this.gb("Dragging",new Ho,this.mouseMoveTools),this.gb("DragSelecting",new vo,this.mouseMoveTools),this.gb("Panning",new Do,this.mouseMoveTools),this.gb("ContextMenu",new Fo,this.mouseUpTools),this.gb("TextEditing",new ro,this.mouseUpTools),this.gb("ClickCreating",new ts,this.mouseUpTools),this.gb("ClickSelecting",new Yo,this.mouseUpTools)},Yu("Horizontal",new vm),Yu("Spot",new Sm),Yu("Table",new wm),Yu("Viewbox",new Pm),Yu("TableRow",new _m),Yu("TableColumn",new bm),Yu("Graduated",new eg),Yu("Grid",new $p),kf.add("GraphLinksModel",Ws),kf.add("TreeModel",Bl);var G0=Zt.go,zy={get licenseKey(){return en.licenseKey},set licenseKey(a){en.licenseKey=a},get version(){return en.version},Group:Ji,EnumValue:pn,List:Ln,Set:Mn,Map:hn,Point:ft,Size:Cn,Rect:nn,Margin:Qi,Spot:zn,Geometry:Rn,PathFigure:ps,PathSegment:Rr,InputEvent:na,DiagramEvent:Pu,ChangedEvent:Io,Model:gi,GraphLinksModel:kr,TreeModel:za,Binding:ms,Transaction:cs,UndoManager:Ao,CommandHandler:Pt,Tool:Nr,DraggingTool:Ho,DraggingInfo:Th,DraggingOptions:ce,LinkingBaseTool:Jt,LinkingTool:ui,RelinkingTool:Sr,LinkReshapingTool:Ki,ResizingTool:Po,RotatingTool:Ur,ClickSelectingTool:Yo,ActionTool:Zi,ClickCreatingTool:ts,HTMLInfo:Ks,ContextMenuTool:Fo,DragSelectingTool:vo,PanningTool:Do,TextEditingTool:ro,ToolManager:_o,Animation:da,AnimationManager:Gs,AnimationTrigger:uu,Layer:Xs,Diagram:en,Palette:Te,Overview:Fe,Brush:eo,GraphObject:Gt,Panel:Nn,RowColumnDefinition:Ps,Shape:nr,TextBlock:Eo,Picture:Qa,Part:Ci,Adornment:jr,Node:Xn,Link:Fn,Placeholder:Ra,Layout:Vo,LayoutNetwork:Lo,LayoutVertex:ks,LayoutEdge:gl,GridLayout:oa,PanelLayout:Ms,CircularLayout:$o,CircularNetwork:tp,CircularVertex:Mg,CircularEdge:b0,ForceDirectedLayout:pa,ForceDirectedNetwork:tf,ForceDirectedVertex:kg,ForceDirectedEdge:Tg,LayeredDigraphLayout:no,LayeredDigraphNetwork:ip,LayeredDigraphVertex:zl,LayeredDigraphEdge:Dg,TreeLayout:yr,TreeNetwork:sf,TreeVertex:eu,TreeEdge:sp};typeof G0=="object"&&G0.version&&jn("WARNING: a `go` object on the root object is already defined. "+("Debug"in G0?"debug ":"")+"version: "+G0.version+", replaced with version: "+zy.version),en.prototype.go=zy,Zt.go=zy,typeof xn.exports=="object"&&(xn.exports=typeof Re.g!="undefined"?Re.g.go:self.go)}();var ke=typeof Re.g!="undefined"?Re.g.go:self.go;const Se=typeof Re.g!="undefined"?Re.g.go:self.go,Be=Se.Group,Le=Se.EnumValue,Ce=Se.List,xe=Se.Set,be=Se.Map,ye=Se.Point,we=Se.Size,pe=Se.Rect,de=Se.Margin,ge=Se.Spot,fe=Se.Geometry,ue=Se.PathFigure,ee=Se.PathSegment,z=Se.InputEvent,oe=Se.DiagramEvent,re=Se.ChangedEvent,ae=Se.Model,le=Se.GraphLinksModel,me=Se.TreeModel,ve=Se.Binding,Pe=Se.Transaction,Ae=Se.UndoManager,Oe=Se.CommandHandler,Ie=Se.Tool,Ze=Se.DraggingTool,qe=Se.DraggingInfo,Je=Se.LinkingBaseTool,mt=Se.LinkingTool,gt=Se.RelinkingTool,Mt=Se.LinkReshapingTool,at=Se.ResizingTool,_t=Se.RotatingTool,ht=Se.ClickSelectingTool,Dt=Se.ActionTool,ut=Se.ClickCreatingTool,ot=Se.HTMLInfo,ct=Se.ContextMenuTool,yt=Se.DragSelectingTool,wt=Se.PanningTool,xt=Se.TextEditingTool,zt=Se.ToolManager,Ut=Se.Animation,cn=Se.AnimationManager,jt=Se.AnimationTrigger,mn=Se.Layer,Ft=Se.Diagram,Yt=Se.Palette,tn=Se.Overview,lt=Se.Brush,Ue=Se.GraphObject,je=Se.Panel,rt=Se.RowColumnDefinition,dt=Se.Shape,tt=Se.TextBlock,Ke=Se.TextBlockMetrics,De=Se.Picture,ze=Se.Part,$e=Se.Adornment,We=Se.Node,Ve=Se.Link,pt=Se.Placeholder,Lt=Se.Layout,on=Se.LayoutNetwork,Xt=Se.LayoutVertex,Rt=Se.LayoutEdge,fn=Se.GridLayout,En=Se.PanelLayout,Sn=Se.CircularLayout,dn=Se.CircularNetwork,Zn=Se.CircularVertex,vn=Se.CircularEdge,Wn=Se.ForceDirectedLayout,ri=Se.ForceDirectedNetwork,Ni=Se.ForceDirectedVertex,Qn=Se.ForceDirectedEdge,ki=Se.LayeredDigraphLayout,Hi=Se.LayeredDigraphNetwork,Gi=Se.LayeredDigraphVertex,qi=Se.LayeredDigraphEdge,Pr=Se.TreeLayout,gr=Se.TreeNetwork,Ri=Se.TreeVertex,Vi=Se.TreeEdge,sr=Se.version},24334:function(xn,un,Re){var ke,Se;(function(Be,Le){xn.exports=Le(Be)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Re.g!="undefined"?Re.g:this,function(Be){"use strict";Be=Be||{};var Le=Be.Base64,Ce="2.6.4",xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=function(gt){for(var Mt={},at=0,_t=gt.length;at<_t;at++)Mt[gt.charAt(at)]=at;return Mt}(xe),ye=String.fromCharCode,we=function(gt){if(gt.length<2){var Mt=gt.charCodeAt(0);return Mt<128?gt:Mt<2048?ye(192|Mt>>>6)+ye(128|Mt&63):ye(224|Mt>>>12&15)+ye(128|Mt>>>6&63)+ye(128|Mt&63)}else{var Mt=65536+(gt.charCodeAt(0)-55296)*1024+(gt.charCodeAt(1)-56320);return ye(240|Mt>>>18&7)+ye(128|Mt>>>12&63)+ye(128|Mt>>>6&63)+ye(128|Mt&63)}},pe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,de=function(gt){return gt.replace(pe,we)},ge=function(gt){var Mt=[0,2,1][gt.length%3],at=gt.charCodeAt(0)<<16|(gt.length>1?gt.charCodeAt(1):0)<<8|(gt.length>2?gt.charCodeAt(2):0),_t=[xe.charAt(at>>>18),xe.charAt(at>>>12&63),Mt>=2?"=":xe.charAt(at>>>6&63),Mt>=1?"=":xe.charAt(at&63)];return _t.join("")},fe=Be.btoa&&typeof Be.btoa=="function"?function(gt){return Be.btoa(gt)}:function(gt){if(gt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return gt.replace(/[\s\S]{1,3}/g,ge)},ue=function(gt){return fe(de(String(gt)))},ee=function(gt){return gt.replace(/[+\/]/g,function(Mt){return Mt=="+"?"-":"_"}).replace(/=/g,"")},z=function(gt,Mt){return Mt?ee(ue(gt)):ue(gt)},oe=function(gt){return z(gt,!0)},re;Be.Uint8Array&&(re=function(gt,Mt){for(var at="",_t=0,ht=gt.length;_t<ht;_t+=3){var Dt=gt[_t],ut=gt[_t+1],ot=gt[_t+2],ct=Dt<<16|ut<<8|ot;at+=xe.charAt(ct>>>18)+xe.charAt(ct>>>12&63)+(typeof ut!="undefined"?xe.charAt(ct>>>6&63):"=")+(typeof ot!="undefined"?xe.charAt(ct&63):"=")}return Mt?ee(at):at});var ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,le=function(gt){switch(gt.length){case 4:var Mt=(7>.charCodeAt(0))<<18|(63>.charCodeAt(1))<<12|(63>.charCodeAt(2))<<6|63>.charCodeAt(3),at=Mt-65536;return ye((at>>>10)+55296)+ye((at&1023)+56320);case 3:return ye((15>.charCodeAt(0))<<12|(63>.charCodeAt(1))<<6|63>.charCodeAt(2));default:return ye((31>.charCodeAt(0))<<6|63>.charCodeAt(1))}},me=function(gt){return gt.replace(ae,le)},ve=function(gt){var Mt=gt.length,at=Mt%4,_t=(Mt>0?be[gt.charAt(0)]<<18:0)|(Mt>1?be[gt.charAt(1)]<<12:0)|(Mt>2?be[gt.charAt(2)]<<6:0)|(Mt>3?be[gt.charAt(3)]:0),ht=[ye(_t>>>16),ye(_t>>>8&255),ye(_t&255)];return ht.length-=[0,0,2,1][at],ht.join("")},Pe=Be.atob&&typeof Be.atob=="function"?function(gt){return Be.atob(gt)}:function(gt){return gt.replace(/\S{1,4}/g,ve)},Ae=function(gt){return Pe(String(gt).replace(/[^A-Za-z0-9\+\/]/g,""))},Oe=function(gt){return me(Pe(gt))},Ie=function(gt){return String(gt).replace(/[-_]/g,function(Mt){return Mt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ze=function(gt){return Oe(Ie(gt))},qe;Be.Uint8Array&&(qe=function(gt){return Uint8Array.from(Ae(Ie(gt)),function(Mt){return Mt.charCodeAt(0)})});var Je=function(){var gt=Be.Base64;return Be.Base64=Le,gt};if(Be.Base64={VERSION:Ce,atob:Ae,btoa:fe,fromBase64:Ze,toBase64:z,utob:de,encode:z,encodeURI:oe,btou:me,decode:Ze,noConflict:Je,fromUint8Array:re,toUint8Array:qe},typeof Object.defineProperty=="function"){var mt=function(gt){return{value:gt,enumerable:!1,writable:!0,configurable:!0}};Be.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",mt(function(){return Ze(this)})),Object.defineProperty(String.prototype,"toBase64",mt(function(gt){return z(this,gt)})),Object.defineProperty(String.prototype,"toBase64URI",mt(function(){return z(this,!0)}))}}return Be.Meteor&&(Base64=Be.Base64),xn.exports?xn.exports.Base64=Be.Base64:(ke=[],Se=function(){return Be.Base64}.apply(un,ke),Se!==void 0&&(xn.exports=Se)),{Base64:Be.Base64}})},2859:function(xn,un,Re){"use strict";Re.d(un,{hP:function(){return tn}});var ke=function(lt,Ue){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(je,rt){je.__proto__=rt}||function(je,rt){for(var dt in rt)Object.prototype.hasOwnProperty.call(rt,dt)&&(je[dt]=rt[dt])})(lt,Ue)};function Se(lt,Ue){function je(){this.constructor=lt}ke(lt,Ue),lt.prototype=Ue===null?Object.create(Ue):(je.prototype=Ue.prototype,new je)}function Be(lt,Ue,je,rt){return new(je||(je=Promise))(function(dt,tt){function Ke($e){try{ze(rt.next($e))}catch(We){tt(We)}}function De($e){try{ze(rt.throw($e))}catch(We){tt(We)}}function ze($e){var We;$e.done?dt($e.value):(We=$e.value,We instanceof je?We:new je(function(Ve){Ve(We)})).then(Ke,De)}ze((rt=rt.apply(lt,Ue||[])).next())})}function Le(lt,Ue){var je,rt,dt,tt,Ke={label:0,sent:function(){if(1&dt[0])throw dt[1];return dt[1]},trys:[],ops:[]};return tt={next:De(0),throw:De(1),return:De(2)},typeof Symbol=="function"&&(tt[Symbol.iterator]=function(){return this}),tt;function De(ze){return function($e){return function(We){if(je)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(je=1,rt&&(dt=2&We[0]?rt.return:We[0]?rt.throw||((dt=rt.return)&&dt.call(rt),0):rt.next)&&!(dt=dt.call(rt,We[1])).done)return dt;switch(rt=0,dt&&(We=[2&We[0],dt.value]),We[0]){case 0:case 1:dt=We;break;case 4:return Ke.label++,{value:We[1],done:!1};case 5:Ke.label++,rt=We[1],We=[0];continue;case 7:We=Ke.ops.pop(),Ke.trys.pop();continue;default:if(dt=Ke.trys,!((dt=dt.length>0&&dt[dt.length-1])||We[0]!==6&&We[0]!==2)){Ke=0;continue}if(We[0]===3&&(!dt||We[1]>dt[0]&&We[1]<dt[3])){Ke.label=We[1];break}if(We[0]===6&&Ke.label<dt[1]){Ke.label=dt[1],dt=We;break}if(dt&&Ke.label<dt[2]){Ke.label=dt[2],Ke.ops.push(We);break}dt[2]&&Ke.ops.pop(),Ke.trys.pop();continue}We=Ue.call(lt,Ke)}catch(Ve){We=[6,Ve],rt=0}finally{je=dt=0}if(5&We[0])throw We[1];return{value:We[0]?We[1]:void 0,done:!0}}([ze,$e])}}}function Ce(){for(var lt=0,Ue=0,je=arguments.length;Ue<je;Ue++)lt+=arguments[Ue].length;var rt=Array(lt),dt=0;for(Ue=0;Ue<je;Ue++)for(var tt=arguments[Ue],Ke=0,De=tt.length;Ke<De;Ke++,dt++)rt[dt]=tt[Ke];return rt}var xe=function(){function lt(){}return lt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},lt.setAttributes=function(Ue,je){for(var rt=0,dt=je;rt<dt.length;rt++){var tt=dt[rt],Ke=tt[0],De=tt[1];Ue.setAttribute(Ke,De)}},lt.createRect=function(Ue,je,rt){var dt=document.createElementNS("http://www.w3.org/2000/svg","rect");return dt.setAttribute("width",Ue.toString()),dt.setAttribute("height",je.toString()),rt&<.setAttributes(dt,rt),dt},lt.createLine=function(Ue,je,rt,dt,tt){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",Ue.toString()),Ke.setAttribute("y1",je.toString()),Ke.setAttribute("x2",rt.toString()),Ke.setAttribute("y2",dt.toString()),tt&<.setAttributes(Ke,tt),Ke},lt.createPolygon=function(Ue,je){var rt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return rt.setAttribute("points",Ue),je&<.setAttributes(rt,je),rt},lt.createCircle=function(Ue,je){var rt=document.createElementNS("http://www.w3.org/2000/svg","circle");return rt.setAttribute("cx",(Ue/2).toString()),rt.setAttribute("cy",(Ue/2).toString()),rt.setAttribute("r",Ue.toString()),je&<.setAttributes(rt,je),rt},lt.createEllipse=function(Ue,je,rt){var dt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return dt.setAttribute("cx",(Ue/2).toString()),dt.setAttribute("cy",(je/2).toString()),dt.setAttribute("rx",(Ue/2).toString()),dt.setAttribute("ry",(je/2).toString()),rt&<.setAttributes(dt,rt),dt},lt.createGroup=function(Ue){var je=document.createElementNS("http://www.w3.org/2000/svg","g");return Ue&<.setAttributes(je,Ue),je},lt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},lt.createMarker=function(Ue,je,rt,dt,tt,Ke,De){var ze=document.createElementNS("http://www.w3.org/2000/svg","marker");return lt.setAttributes(ze,[["id",Ue],["orient",je],["markerWidth",rt.toString()],["markerHeight",dt.toString()],["refX",tt.toString()],["refY",Ke.toString()]]),ze.appendChild(De),ze},lt.createText=function(Ue){var je=document.createElementNS("http://www.w3.org/2000/svg","text");return je.setAttribute("x","0"),je.setAttribute("y","0"),Ue&<.setAttributes(je,Ue),je},lt.createTSpan=function(Ue,je){var rt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return rt.textContent=Ue,je&<.setAttributes(rt,je),rt},lt.createImage=function(Ue){var je=document.createElementNS("http://www.w3.org/2000/svg","image");return Ue&<.setAttributes(je,Ue),je},lt.createPoint=function(Ue,je){var rt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return rt.x=Ue,rt.y=je,rt},lt.createPath=function(Ue,je){var rt=document.createElementNS("http://www.w3.org/2000/svg","path");return rt.setAttribute("d",Ue),je&<.setAttributes(rt,je),rt},lt}(),be=function(){function lt(){}return lt.addKey=function(Ue){lt.key=Ue},Object.defineProperty(lt,"isLicensed",{get:function(){return!!lt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(lt.key)},enumerable:!1,configurable:!0}),lt}(),ye=function(){function lt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return lt.prototype.rasterize=function(Ue,je,rt){var dt=this;return new Promise(function(tt){var Ke=rt!==void 0?rt:document.createElement("canvas");Ue===null&&(dt.markersOnly=!0,dt.naturalSize=!1);var De=document.createElementNS("http://www.w3.org/2000/svg","svg");De.setAttribute("xmlns","http://www.w3.org/2000/svg"),De.setAttribute("width",je.width.baseVal.valueAsString),De.setAttribute("height",je.height.baseVal.valueAsString),De.setAttribute("viewBox","0 0 "+je.viewBox.baseVal.width.toString()+" "+je.viewBox.baseVal.height.toString()),De.innerHTML=je.innerHTML,dt.naturalSize===!0?(De.width.baseVal.value=Ue.naturalWidth,De.height.baseVal.value=Ue.naturalHeight):dt.width!==void 0&&dt.height!==void 0&&(De.width.baseVal.value=dt.width,De.height.baseVal.value=dt.height),Ke.width=De.width.baseVal.value,Ke.height=De.height.baseVal.value;var ze=De.outerHTML,$e=Ke.getContext("2d");dt.markersOnly!==!0&&$e.drawImage(Ue,0,0,Ke.width,Ke.height);var We=window.URL,Ve=new Image(Ke.width,Ke.height);Ve.setAttribute("crossOrigin","anonymous");var pt=new Blob([ze],{type:"image/svg+xml"}),Lt=We.createObjectURL(pt);Ve.onload=function(){$e.drawImage(Ve,0,0),We.revokeObjectURL(Lt);var on=Ke.toDataURL(dt.imageType,dt.imageQuality);tt(on)},Ve.src=Lt})},lt}(),we=function(){},pe=function(){function lt(Ue){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ue+"_"}return Object.defineProperty(lt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(lt.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(lt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),lt.prototype.addClass=function(Ue){return this.styleSheet===void 0&&this.addStyleSheet(),Ue.name=""+this.classNamePrefix+Ue.localName,this.classes.push(Ue),this.styleSheet.sheet.insertRule("."+Ue.name+" {"+Ue.style+"}",this.styleSheet.sheet.cssRules.length),Ue},lt.prototype.addRule=function(Ue){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ue),this.styleSheet.sheet.insertRule(Ue.selector+" {"+Ue.style+"}",this.styleSheet.sheet.cssRules.length)},lt.prototype.addStyleSheet=function(){var Ue;this.styleSheet=document.createElement("style"),((Ue=this.styleSheetRoot)!==null&&Ue!==void 0?Ue:document.head).appendChild(this.styleSheet),this.addRule(new de("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new de("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new de("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ge("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ge("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},lt.prototype.removeStyleSheet=function(){var Ue;this.styleSheet&&(((Ue=this.styleSheetRoot)!==null&&Ue!==void 0?Ue:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},lt}(),de=function(lt,Ue){this.selector=lt,this.style=Ue},ge=function(lt,Ue){this.localName=lt,this.style=Ue},fe=function(){function lt(Ue,je,rt,dt,tt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ue,this.displayMode=je,this.markerItems=rt,this.uiStyleSettings=dt,this.styles=tt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return lt.prototype.show=function(Ue){var je=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ue,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var rt=document.createElement("div");rt.className=this.toolbarBlockStyleClass.name,rt.style.whiteSpace="nowrap",this.uiContainer.appendChild(rt),this.addActionButton(rt,'<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(rt,'<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(rt,'<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(rt,'<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(rt,'<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(rt,'<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(rt,'<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(rt,'<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(tt){var Ke=document.createElement("div");Ke.className=""+je.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",tt.typeName),Ke.innerHTML=tt.icon,Ke.addEventListener("click",function(){je.markerToolbarButtonClicked(Ke,tt)}),je.buttons.push(Ke),je.markerButtons.push(Ke)}),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 dt=document.createElement("div");dt.className=this.toolbarBlockStyleClass.name,dt.style.whiteSpace="nowrap",dt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(dt),this.addActionButton(dt,'<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(dt,'<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()},lt.prototype.addButtonClickListener=function(Ue){this.buttonClickListeners.push(Ue)},lt.prototype.removeButtonClickListener=function(Ue){this.buttonClickListeners.indexOf(Ue)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ue),1)},lt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},lt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ue=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var je=0;je<this.markerButtons.length;je++)je<Ue||je===Ue&&this.markerButtons.length-1===Ue?this.markerButtonBlock.appendChild(this.markerButtons[je]):(je===Ue&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[je]))}},lt.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")},lt.prototype.resetButtonStyles=function(){var Ue=this;this.buttons.forEach(function(je){je.className=je.className.replace(Ue.uiStyleSettings.toolbarButtonStyleColorsClassName?Ue.uiStyleSettings.toolbarButtonStyleColorsClassName:Ue.toolbarButtonStyleColorsClass.name,"").trim(),je.className=je.className.replace(Ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ue.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ue.toolbarActiveButtonStyleColorsClass.name,"").trim(),je.className+=" "+(Ue.uiStyleSettings.toolbarButtonStyleColorsClassName?Ue.uiStyleSettings.toolbarButtonStyleColorsClassName:Ue.toolbarButtonStyleColorsClass.name)})},lt.prototype.addActionButton=function(Ue,je,rt){var dt=this,tt=document.createElement("div");switch(tt.className=""+this.toolbarButtonStyleClass.name,tt.innerHTML=je,tt.setAttribute("data-action",rt),tt.addEventListener("click",function(){dt.actionToolbarButtonClicked(tt,rt)}),rt){case"select":tt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":tt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":tt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":tt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":tt.style.fill=this.uiStyleSettings.closeButtonColor}Ue.appendChild(tt),this.buttons.push(tt)},lt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ge("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 ge("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ge("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ge("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 ge("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Ue=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ge("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ue)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ue)+`px;
|
|
|
padding: `+Ue+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ge("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ge("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new de("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new de("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},lt.prototype.markerToolbarButtonClicked=function(Ue,je){this.setActiveButton(Ue),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(rt){return rt("marker",je)}),this.markerButtonOverflowBlock.style.display="none"},lt.prototype.actionToolbarButtonClicked=function(Ue,je){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(rt){return rt("action",je)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},lt.prototype.setActiveButton=function(Ue){this.resetButtonStyles(),Ue.className=Ue.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ue.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},lt.prototype.setActiveMarkerButton=function(Ue){var je=this.markerButtons.find(function(rt){return rt.getAttribute("data-type-name")===Ue});je&&this.setActiveButton(je)},lt.prototype.setCurrentMarker=function(Ue){var je=this;this.currentMarker=Ue,this.buttons.filter(function(rt){return/delete|notes/.test(rt.getAttribute("data-action"))}).forEach(function(rt){je.currentMarker===void 0?(rt.style.fillOpacity="0.4",rt.style.pointerEvents="none"):(rt.style.fillOpacity="1",rt.style.pointerEvents="all")})},lt}(),ue=function(){function lt(Ue,je,rt,dt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ue,this.displayMode=je,this.uiStyleSettings=rt,this.styles=dt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return lt.prototype.addStyles=function(){var Ue;this.toolboxStyleClass=this.styles.addClass(new ge("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 ge("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var je=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ge("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ge("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ge("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 ge("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Ue=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ue!==void 0?Ue:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ge("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*je)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*je)+`px;
|
|
|
padding: `+je+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ge("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ge("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new de("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new de("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},lt.prototype.show=function(Ue){var je;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ue,this.uiContainer.className=this.toolboxStyleClass.name+" "+((je=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&je!==void 0?je:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},lt.prototype.setPanelButtons=function(Ue){var je,rt,dt=this;this.panels=Ue,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((je=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&je!==void 0?je:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((rt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&rt!==void 0?rt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(tt){var Ke;tt.uiStyleSettings=dt.uiStyleSettings;var De=document.createElement("div");De.className=dt.toolboxButtonStyleClass.name+" "+((Ke=dt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:dt.toolboxButtonStyleColorsClass.name),De.innerHTML=tt.icon,De.title=tt.title,De.addEventListener("click",function(){dt.panelButtonClick(tt)}),dt.panelButtons.push(De),dt.buttonRow.appendChild(De)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},lt.prototype.panelButtonClick=function(Ue){var je=this,rt=-1;if(Ue!==this.activePanel){rt=this.panels.indexOf(Ue),this.panelRow.innerHTML="";var dt=Ue.getUi();dt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(dt),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=Ue}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){je.displayMode==="inline"?je.panelRow.style.display="none":je.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(tt,Ke){var De,ze;tt.className=je.toolboxButtonStyleClass.name+" "+(Ke===rt?""+((De=je.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&De!==void 0?De:je.toolboxActiveButtonStyleColorsClass.name):""+((ze=je.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ze!==void 0?ze:je.toolboxButtonStyleColorsClass.name))})},lt}(),ee=function(lt,Ue){this.title=lt,this.icon=Ue},z=function(lt){function Ue(je,rt,dt,tt){var Ke=lt.call(this,je,tt||'<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 Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=rt,Ke.currentColor=dt,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return Se(Ue,lt),Ue.prototype.getUi=function(){var je=this,rt=document.createElement("div");return rt.style.overflow="hidden",rt.style.whiteSpace="nowrap",this.colors.forEach(function(dt){var tt=je.getColorBox(dt);rt.appendChild(tt),je.colorBoxes.push(tt)}),rt},Ue.prototype.getColorBox=function(je){var rt=this,dt=this.uiStyleSettings.toolbarHeight/4,tt=this.uiStyleSettings.toolbarHeight-dt,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=tt-2+"px",Ke.style.height=tt-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(tt+2)/2+"px",Ke.style.borderColor=je===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){rt.setCurrentColor(je,Ke)});var De=document.createElement("div");return De.style.display="inline-block",De.style.width=tt-2+"px",De.style.height=tt-2+"px",De.style.backgroundColor=je,De.style.borderRadius=tt/2+"px",je==="transparent"&&(De.style.fill=this.uiStyleSettings.toolboxAccentColor,De.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>`),Ke.appendChild(De),Ke},Ue.prototype.setCurrentColor=function(je,rt){var dt=this;this.currentColor=je,this.colorBoxes.forEach(function(tt){tt.style.borderColor=tt===rt?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(je)},Ue}(ee),oe=function(){function lt(Ue,je,rt){this._state="new",this._isSelected=!1,this._container=Ue,this._overlayContainer=je,this.globalSettings=rt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(lt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),lt.prototype.ownsTarget=function(Ue){return!1},Object.defineProperty(lt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),lt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},lt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},lt.prototype.pointerDown=function(Ue,je){},lt.prototype.dblClick=function(Ue,je){},lt.prototype.manipulate=function(Ue){},lt.prototype.pointerUp=function(Ue){this.stateChanged()},lt.prototype.dispose=function(){},lt.prototype.addMarkerVisualToContainer=function(Ue){this.container.childNodes.length>0?this.container.insertBefore(Ue,this.container.childNodes[0]):this.container.appendChild(Ue)},lt.prototype.getState=function(){return{typeName:lt.typeName,state:this.state,notes:this.notes}},lt.prototype.restoreState=function(Ue){this._state=Ue.state,this.notes=Ue.notes},lt.prototype.scale=function(Ue,je){},lt.prototype.colorChanged=function(Ue){this.onColorChanged&&this.onColorChanged(Ue),this.stateChanged()},lt.prototype.fillColorChanged=function(Ue){this.onFillColorChanged&&this.onFillColorChanged(Ue),this.stateChanged()},lt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ue=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ue.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ue)&&this.onStateChanged(this)}},lt.typeName="MarkerBase",lt}(),re=function(){function lt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return lt.prototype.findGripByVisual=function(Ue){return this.topLeft.ownsTarget(Ue)?this.topLeft:this.topCenter.ownsTarget(Ue)?this.topCenter:this.topRight.ownsTarget(Ue)?this.topRight:this.centerLeft.ownsTarget(Ue)?this.centerLeft:this.centerRight.ownsTarget(Ue)?this.centerRight:this.bottomLeft.ownsTarget(Ue)?this.bottomLeft:this.bottomCenter.ownsTarget(Ue)?this.bottomCenter:this.bottomRight.ownsTarget(Ue)?this.bottomRight:void 0},lt}(),ae=function(){function lt(){this.GRIP_SIZE=10,this.visual=xe.createGroup(),this.visual.appendChild(xe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(xe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return lt.prototype.ownsTarget=function(Ue){return Ue===this.visual||Ue===this.visual.childNodes[0]||Ue===this.visual.childNodes[1]},lt}(),le=function(){function lt(){}return lt.toITransformMatrix=function(Ue){return{a:Ue.a,b:Ue.b,c:Ue.c,d:Ue.d,e:Ue.e,f:Ue.f}},lt.toSVGMatrix=function(Ue,je){return Ue.a=je.a,Ue.b=je.b,Ue.c=je.c,Ue.d=je.d,Ue.e=je.e,Ue.f=je.f,Ue},lt}(),me=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.left=0,tt.top=0,tt.width=0,tt.height=0,tt.defaultSize={x:50,y:20},tt.offsetX=0,tt.offsetY=0,tt.rotationAngle=0,tt.CB_DISTANCE=10,tt._suppressMarkerCreateEvent=!1,tt.container.transform.baseVal.appendItem(xe.createTransform()),tt.setupControlBox(),tt}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ue.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ue.prototype,"visual",{get:function(){return this._visual},set:function(je){this._visual=je;var rt=xe.createTransform();this._visual.transform.baseVal.appendItem(rt)},enumerable:!1,configurable:!0}),Ue.prototype.ownsTarget=function(je){return!!lt.prototype.ownsTarget.call(this,je)||!!(this.controlGrips.findGripByVisual(je)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(je))},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.state==="new"&&(this.left=je.x,this.top=je.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var dt=this.unrotatePoint(je);if(this.manipulationStartX=dt.x,this.manipulationStartY=dt.y,this.offsetX=dt.x-this.left,this.offsetY=dt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(rt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(rt)){this.activeGrip=this.rotatorGrip;var tt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=tt.x-this.width/2,this.top=tt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ue.prototype.pointerUp=function(je){var rt=this.state;lt.prototype.pointerUp.call(this,je),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(je),this._state="select",rt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ue.prototype.moveVisual=function(je){this.visual.style.transform="translate("+je.x+"px, "+je.y+"px)"},Ue.prototype.manipulate=function(je){var rt=this.unrotatePoint(je);this.state==="creating"?this.resize(je):this.state==="move"?(this.left=this.manipulationStartLeft+(rt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(rt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(rt):this.state==="rotate"&&this.rotate(je)},Ue.prototype.resize=function(je){var rt=this.manipulationStartLeft,dt=this.manipulationStartWidth,tt=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:rt=this.manipulationStartLeft+je.x-this.manipulationStartX,dt=this.manipulationStartWidth+this.manipulationStartLeft-rt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:dt=this.manipulationStartWidth+je.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:tt=this.manipulationStartTop+je.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-tt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+je.y-this.manipulationStartY}dt>=0?(this.left=rt,this.width=dt):(this.left=rt+dt,this.width=-dt),Ke>=0?(this.top=tt,this.height=Ke):(this.top=tt+Ke,this.height=-Ke),this.setSize()},Ue.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ue.prototype.rotate=function(je){if(Math.abs(je.x-this.centerX)>.1){var rt=Math.sign(je.x-this.centerX);this.rotationAngle=180*Math.atan((je.y-this.centerY)/(je.x-this.centerX))/Math.PI+90*rt,this.applyRotation()}},Ue.prototype.applyRotation=function(){var je=this.container.transform.baseVal.getItem(0);je.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(je,0)},Ue.prototype.rotatePoint=function(je){if(this.rotationAngle===0)return je;var rt=this.container.getCTM(),dt=xe.createPoint(je.x,je.y);return{x:(dt=dt.matrixTransform(rt)).x,y:dt.y}},Ue.prototype.unrotatePoint=function(je){if(this.rotationAngle===0)return je;var rt=this.container.getCTM();rt=rt.inverse();var dt=xe.createPoint(je.x,je.y);return{x:(dt=dt.matrixTransform(rt)).x,y:dt.y}},Ue.prototype.select=function(){lt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ue.prototype.deselect=function(){lt.prototype.deselect.call(this),this.controlBox.style.display="none"},Ue.prototype.setupControlBox=function(){this.controlBox=xe.createGroup();var je=xe.createTransform();je.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(je),this.container.appendChild(this.controlBox),this.controlRect=xe.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=xe.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 re,this.addControlGrips(),this.controlBox.style.display="none"},Ue.prototype.adjustControlBox=function(){var je=this.controlBox.transform.baseVal.getItem(0);je.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(je,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()},Ue.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()},Ue.prototype.createGrip=function(){var je=new ae;return je.visual.transform.baseVal.appendItem(xe.createTransform()),this.controlBox.appendChild(je.visual),je},Ue.prototype.positionGrips=function(){var je=this.controlGrips.topLeft.GRIP_SIZE,rt=-je/2,dt=rt,tt=(this.width+this.CB_DISTANCE)/2-je/2,Ke=(this.height+this.CB_DISTANCE)/2-je/2,De=this.height+this.CB_DISTANCE-je/2,ze=this.width+this.CB_DISTANCE-je/2;this.positionGrip(this.controlGrips.topLeft.visual,rt,dt),this.positionGrip(this.controlGrips.topCenter.visual,tt,dt),this.positionGrip(this.controlGrips.topRight.visual,ze,dt),this.positionGrip(this.controlGrips.centerLeft.visual,rt,Ke),this.positionGrip(this.controlGrips.centerRight.visual,ze,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,rt,De),this.positionGrip(this.controlGrips.bottomCenter.visual,tt,De),this.positionGrip(this.controlGrips.bottomRight.visual,ze,De),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,tt,dt-3*this.CB_DISTANCE)},Ue.prototype.positionGrip=function(je,rt,dt){var tt=je.transform.baseVal.getItem(0);tt.setTranslate(rt,dt),je.transform.baseVal.replaceItem(tt,0)},Ue.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ue.prototype.showControlBox=function(){this.controlBox.style.display=""},Ue.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:le.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:le.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},lt.prototype.getState.call(this))},Ue.prototype.restoreState=function(je){lt.prototype.restoreState.call(this,je);var rt=je;this.left=rt.left,this.top=rt.top,this.width=rt.width,this.height=rt.height,this.rotationAngle=rt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,rt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,rt.containerTransformMatrix))},Ue.prototype.scale=function(je,rt){lt.prototype.scale.call(this,je,rt);var dt=this.rotatePoint({x:this.left,y:this.top}),tt=this.unrotatePoint({x:dt.x*je,y:dt.y*rt});this.left=tt.x,this.top=tt.y,this.width=this.width*je,this.height=this.height*rt,this.adjustControlBox()},Ue}(oe),ve=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.fillColor="transparent",tt.strokeColor="transparent",tt.strokeWidth=0,tt.strokeDasharray="",tt.opacity=1,tt.setStrokeColor=tt.setStrokeColor.bind(tt),tt.setFillColor=tt.setFillColor.bind(tt),tt.setStrokeWidth=tt.setStrokeWidth.bind(tt),tt.setStrokeDasharray=tt.setStrokeDasharray.bind(tt),tt.createVisual=tt.createVisual.bind(tt),tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){return!(!lt.prototype.ownsTarget.call(this,je)&&je!==this.visual)},Ue.prototype.createVisual=function(){this.visual=xe.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)},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.state==="new"&&(this.createVisual(),this.moveVisual(je),this._state="creating")},Ue.prototype.manipulate=function(je){lt.prototype.manipulate.call(this,je)},Ue.prototype.resize=function(je){lt.prototype.resize.call(this,je),this.setSize()},Ue.prototype.setSize=function(){lt.prototype.setSize.call(this),xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ue.prototype.pointerUp=function(je){lt.prototype.pointerUp.call(this,je),this.setSize()},Ue.prototype.setStrokeColor=function(je){this.strokeColor=je,this.visual&&xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(je),this.stateChanged()},Ue.prototype.setFillColor=function(je){this.fillColor=je,this.visual&&xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ue.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.visual&&xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ue.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.visual&&xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ue.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},lt.prototype.getState.call(this))},Ue.prototype.restoreState=function(je){var rt=je;this.fillColor=rt.fillColor,this.strokeColor=rt.strokeColor,this.strokeWidth=rt.strokeWidth,this.strokeDasharray=rt.strokeDasharray,this.opacity=rt.opacity,this.createVisual(),lt.prototype.restoreState.call(this,je),this.setSize()},Ue.prototype.scale=function(je,rt){lt.prototype.scale.call(this,je,rt),this.setSize()},Ue.title="Rectangle marker",Ue}(me),Pe=function(lt){function Ue(je,rt,dt,tt){var Ke=lt.call(this,je,tt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=rt,Ke.currentWidth=dt,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return Se(Ue,lt),Ue.prototype.getUi=function(){var je=this,rt=document.createElement("div");return rt.style.display="flex",rt.style.overflow="hidden",rt.style.flexGrow="2",this.widths.forEach(function(dt){var tt=document.createElement("div");tt.style.display="flex",tt.style.flexGrow="2",tt.style.alignItems="center",tt.style.justifyContent="space-between",tt.style.padding="5px",tt.style.borderWidth="2px",tt.style.borderStyle="solid",tt.style.borderColor=dt===je.currentWidth?je.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){je.setCurrentWidth(dt,tt)}),rt.appendChild(tt);var Ke=document.createElement("div");Ke.innerText=dt.toString(),Ke.style.marginRight="5px",tt.appendChild(Ke);var De=document.createElement("div");De.style.minHeight="20px",De.style.flexGrow="2",De.style.display="flex",De.style.alignItems="center";var ze=document.createElement("hr");ze.style.minWidth="20px",ze.style.border="0px",ze.style.borderTop=dt+"px solid "+je.uiStyleSettings.toolboxColor,ze.style.flexGrow="2",De.appendChild(ze),tt.appendChild(De),je.widthBoxes.push(tt)}),rt},Ue.prototype.setCurrentWidth=function(je,rt){var dt=this;this.currentWidth=je,this.widthBoxes.forEach(function(tt){tt.style.borderColor=tt===rt?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ue}(ee),Ae=function(lt){function Ue(je,rt,dt,tt){var Ke=lt.call(this,je,tt||'<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 Ke.styles=[],Ke.styleBoxes=[],Ke.styles=rt,Ke.currentStyle=dt,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return Se(Ue,lt),Ue.prototype.getUi=function(){var je=this,rt=document.createElement("div");return rt.style.display="flex",rt.style.overflow="hidden",rt.style.flexGrow="2",this.styles.forEach(function(dt){var tt=document.createElement("div");tt.style.display="flex",tt.style.alignItems="center",tt.style.justifyContent="space-between",tt.style.padding="5px",tt.style.borderWidth="2px",tt.style.borderStyle="solid",tt.style.overflow="hidden",tt.style.maxWidth=100/je.styles.length-5+"%",tt.style.borderColor=dt===je.currentStyle?je.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){je.setCurrentStyle(dt,tt)}),rt.appendChild(tt);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var De=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+je.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(dt!==""?'stroke-dasharray="'+dt+'"':"")+` />
|
|
|
</svg>`;Ke.innerHTML=De,tt.appendChild(Ke),je.styleBoxes.push(tt)}),rt},Ue.prototype.setCurrentStyle=function(je,rt){var dt=this;this.currentStyle=je,this.styleBoxes.forEach(function(tt){tt.style.borderColor=tt===rt?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ue}(ee),Oe=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.strokeColor=dt.defaultColor,tt.strokeWidth=dt.defaultStrokeWidth,tt.strokeDasharray=dt.defaultStrokeDasharray,tt.strokePanel=new z("Line color",dt.defaultColorSet,dt.defaultColor),tt.strokePanel.onColorChanged=tt.setStrokeColor,tt.strokeWidthPanel=new Pe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),tt.strokeWidthPanel.onWidthChanged=tt.setStrokeWidth,tt.strokeStylePanel=new Ae("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),tt.strokeStylePanel.onStyleChanged=tt.setStrokeDasharray,tt}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=lt.prototype.getState.call(this);return je.typeName=Ue.typeName,je},Ue.typeName="FrameMarker",Ue.title="Frame marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ue}(ve),Ie=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"},Ze=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.x1=0,tt.y1=0,tt.x2=0,tt.y2=0,tt.defaultLength=50,tt.manipulationStartX=0,tt.manipulationStartY=0,tt.manipulationStartX1=0,tt.manipulationStartY1=0,tt.manipulationStartX2=0,tt.manipulationStartY2=0,tt.setupControlBox(),tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){return!!lt.prototype.ownsTarget.call(this,je)||!(!this.grip1.ownsTarget(je)&&!this.grip2.ownsTarget(je))},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.manipulationStartX=je.x,this.manipulationStartY=je.y,this.state==="new"&&(this.x1=je.x,this.y1=je.y,this.x2=je.x,this.y2=je.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(rt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(rt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ue.prototype.pointerUp=function(je){var rt=this.state;lt.prototype.pointerUp.call(this,je),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(je),this._state="select",rt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ue.prototype.adjustVisual=function(){},Ue.prototype.manipulate=function(je){this.state==="creating"?this.resize(je):this.state==="move"?(this.x1=this.manipulationStartX1+je.x-this.manipulationStartX,this.y1=this.manipulationStartY1+je.y-this.manipulationStartY,this.x2=this.manipulationStartX2+je.x-this.manipulationStartX,this.y2=this.manipulationStartY2+je.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(je)},Ue.prototype.resize=function(je){switch(this.activeGrip){case this.grip1:this.x1=je.x,this.y1=je.y;break;case this.grip2:case void 0:this.x2=je.x,this.y2=je.y}this.adjustVisual(),this.adjustControlBox()},Ue.prototype.select=function(){lt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ue.prototype.deselect=function(){lt.prototype.deselect.call(this),this.controlBox.style.display="none"},Ue.prototype.setupControlBox=function(){this.controlBox=xe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ue.prototype.adjustControlBox=function(){this.positionGrips()},Ue.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ue.prototype.createGrip=function(){var je=new ae;return je.visual.transform.baseVal.appendItem(xe.createTransform()),this.controlBox.appendChild(je.visual),je},Ue.prototype.positionGrips=function(){var je=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-je/2,this.y1-je/2),this.positionGrip(this.grip2.visual,this.x2-je/2,this.y2-je/2)},Ue.prototype.positionGrip=function(je,rt,dt){var tt=je.transform.baseVal.getItem(0);tt.setTranslate(rt,dt),je.transform.baseVal.replaceItem(tt,0)},Ue.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},lt.prototype.getState.call(this))},Ue.prototype.restoreState=function(je){lt.prototype.restoreState.call(this,je);var rt=je;this.x1=rt.x1,this.y1=rt.y1,this.x2=rt.x2,this.y2=rt.y2},Ue.prototype.scale=function(je,rt){lt.prototype.scale.call(this,je,rt),this.x1=this.x1*je,this.y1=this.y1*rt,this.x2=this.x2*je,this.y2=this.y2*rt,this.adjustVisual(),this.adjustControlBox()},Ue}(oe),qe=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.strokeColor="transparent",tt.strokeWidth=0,tt.strokeDasharray="",tt.setStrokeColor=tt.setStrokeColor.bind(tt),tt.setStrokeWidth=tt.setStrokeWidth.bind(tt),tt.setStrokeDasharray=tt.setStrokeDasharray.bind(tt),tt.strokeColor=dt.defaultColor,tt.strokeWidth=dt.defaultStrokeWidth,tt.strokeDasharray=dt.defaultStrokeDasharray,tt.strokePanel=new z("Line color",dt.defaultColorSet,dt.defaultColor),tt.strokePanel.onColorChanged=tt.setStrokeColor,tt.strokeWidthPanel=new Pe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),tt.strokeWidthPanel.onWidthChanged=tt.setStrokeWidth,tt.strokeStylePanel=new Ae("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),tt.strokeStylePanel.onStyleChanged=tt.setStrokeDasharray,tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){return!(!lt.prototype.ownsTarget.call(this,je)&&je!==this.visual&&je!==this.selectorLine&&je!==this.visibleLine)},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.selectorLine=xe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=xe.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)},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ue.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()),xe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),xe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),xe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ue.prototype.setStrokeColor=function(je){this.strokeColor=je,this.adjustVisual(),this.colorChanged(je)},Ue.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.adjustVisual()},Ue.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},lt.prototype.getState.call(this));return je.typeName=Ue.typeName,je},Ue.prototype.restoreState=function(je){lt.prototype.restoreState.call(this,je);var rt=je;this.strokeColor=rt.strokeColor,this.strokeWidth=rt.strokeWidth,this.strokeDasharray=rt.strokeDasharray,this.createVisual(),this.adjustVisual()},Ue.typeName="LineMarker",Ue.title="Line marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ue}(Ze),Je=function(lt){function Ue(je,rt,dt,tt){var Ke=lt.call(this,je,tt||'<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 Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=rt,Ke.currentFont=dt,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return Se(Ue,lt),Ue.prototype.getUi=function(){var je=this,rt=document.createElement("div");return rt.style.overflow="hidden",rt.style.flexGrow="2",this.fonts.forEach(function(dt){var tt=document.createElement("div");tt.style.display="inline-block",tt.style.alignItems="center",tt.style.justifyContent="space-between",tt.style.padding="5px",tt.style.borderWidth="2px",tt.style.borderStyle="solid",tt.style.overflow="hidden",tt.style.maxWidth=100/je.fonts.length-5+"%",tt.style.borderColor=dt===je.currentFont?je.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){je.setCurrentFont(dt,tt)}),rt.appendChild(tt);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=dt,Ke.style.overflow="hidden";var De=document.createElement("div");De.style.whiteSpace="nowrap",De.style.overflow="hidden",De.style.textOverflow="ellipsis",De.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(De),tt.appendChild(Ke),je.fontBoxes.push(tt)}),rt},Ue.prototype.setCurrentFont=function(je,rt){var dt=this;this.currentFont=je,this.fontBoxes.forEach(function(tt){tt.style.borderColor=tt===rt?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ue}(ee),mt=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.color="transparent",tt.padding=5,tt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",tt.text=tt.DEFAULT_TEXT,tt.isMoved=!1,tt.color=dt.defaultColor,tt.fontFamily=dt.defaultFontFamily,tt.defaultSize={x:100,y:30},tt.setColor=tt.setColor.bind(tt),tt.setFont=tt.setFont.bind(tt),tt.renderText=tt.renderText.bind(tt),tt.sizeText=tt.sizeText.bind(tt),tt.textEditDivClicked=tt.textEditDivClicked.bind(tt),tt.showTextEditor=tt.showTextEditor.bind(tt),tt.setSize=tt.setSize.bind(tt),tt.positionTextEditor=tt.positionTextEditor.bind(tt),tt.colorPanel=new z("Color",dt.defaultColorSet,dt.defaultColor),tt.colorPanel.onColorChanged=tt.setColor,tt.fontFamilyPanel=new Je("Font",dt.defaultFontFamilies,dt.defaultFontFamily),tt.fontFamilyPanel.onFontChanged=tt.setFont,tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){if(lt.prototype.ownsTarget.call(this,je)||je===this.visual||je===this.textElement||je===this.bgRectangle)return!0;var rt=!1;return this.textElement.childNodes.forEach(function(dt){dt===je&&(rt=!0)}),rt},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.bgRectangle=xe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=xe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(xe.createTransform()),this.textElement.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.isMoved=!1,this.pointerDownPoint=je,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(je),this._state="creating")},Ue.prototype.renderText=function(){var je=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(rt){je.textElement.appendChild(xe.createTSpan(rt.trim()===""?" ":rt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ue.prototype.getTextScale=function(){var je=this.textElement.getBBox(),rt=1;if(je.width>0&&je.height>0){var dt=(1*this.width-this.width*this.padding*2/100)/je.width,tt=(1*this.height-this.height*this.padding*2/100)/je.height;rt=Math.min(dt,tt)}return rt},Ue.prototype.getTextPosition=function(je){var rt=this.textElement.getBBox(),dt=0,tt=0;return rt.width>0&&rt.height>0&&(dt=(this.width-rt.width*je)/2,tt=this.height/2-rt.height*je/2),{x:dt,y:tt}},Ue.prototype.sizeText=function(){var je=this.textElement.getBBox(),rt=this.getTextScale(),dt=this.getTextPosition(rt);dt.y-=je.y*rt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+dt.x+"px, "+dt.y+"px) scale("+rt+", "+rt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(dt.x,dt.y),this.textElement.transform.baseVal.getItem(1).setScale(rt,rt))},Ue.prototype.manipulate=function(je){lt.prototype.manipulate.call(this,je),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(je.x-this.pointerDownPoint.x)>5||Math.abs(je.y-this.pointerDownPoint.y)>5)},Ue.prototype.resize=function(je){lt.prototype.resize.call(this,je),this.isMoved=!0,this.setSize(),this.sizeText()},Ue.prototype.setSize=function(){lt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ue.prototype.pointerUp=function(je){var rt=this.state;rt==="creating"&&(this._suppressMarkerCreateEvent=!0),lt.prototype.pointerUp.call(this,je),this.setSize(),(rt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ue.prototype.showTextEditor=function(){var je=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(rt){rt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var rt=Number.parseFloat(je.textEditor.style.fontSize);je.textEditor.clientWidth>=Number.parseInt(je.textEditor.style.maxWidth)&&rt>.9;)rt-=.1,je.textEditor.style.fontSize=Math.max(rt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(rt){rt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(rt){if(rt.clipboardData){var dt=rt.clipboardData.getData("text"),tt=window.getSelection();if(!tt.rangeCount)return!1;tt.deleteFromDocument(),tt.getRangeAt(0).insertNode(document.createTextNode(dt)),rt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){je.textEditDivClicked(je.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ue.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var je=this.getTextScale(),rt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),dt=this.textElement.getBBox(),tt={x:dt.width*je,y:dt.height*je};rt.x-=tt.x/2,rt.y-=tt.y/2,this.textEditor.style.top=rt.y+"px",this.textEditor.style.left=rt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-rt.x+"px",this.textEditor.style.fontSize=Math.max(16*je,12)+"px",this.textElement.style.display="none"}},Ue.prototype.textEditDivClicked=function(je){this.text=je.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ue.prototype.select=function(){lt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ue.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),lt.prototype.deselect.call(this)},Ue.prototype.dblClick=function(je,rt){lt.prototype.dblClick.call(this,je,rt),this.showTextEditor()},Ue.prototype.setColor=function(je){this.textElement&&xe.setAttributes(this.textElement,[["fill",je]]),this.color=je,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(je)},Ue.prototype.setFont=function(je){this.textElement&&xe.setAttributes(this.textElement,[["font-family",je]]),this.fontFamily=je,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ue.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ue.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},lt.prototype.getState.call(this));return je.typeName=Ue.typeName,je},Ue.prototype.restoreState=function(je){var rt=je;this.color=rt.color,this.fontFamily=rt.fontFamily,this.padding=rt.padding,this.text=rt.text,this.createVisual(),lt.prototype.restoreState.call(this,je),this.setSize()},Ue.prototype.scale=function(je,rt){lt.prototype.scale.call(this,je,rt),this.setSize(),this.sizeText(),this.positionTextEditor()},Ue.typeName="TextMarker",Ue.title="Text marker",Ue.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>',Ue}(me),gt=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.color="transparent",tt.lineWidth=3,tt.drawing=!1,tt.pixelRatio=1,tt.color=dt.defaultColor,tt.lineWidth=dt.defaultStrokeWidth,tt.pixelRatio=dt.freehandPixelRatio,tt.setColor=tt.setColor.bind(tt),tt.addCanvas=tt.addCanvas.bind(tt),tt.finishCreation=tt.finishCreation.bind(tt),tt.setLineWidth=tt.setLineWidth.bind(tt),tt.colorPanel=new z("Color",dt.defaultColorSet,dt.defaultColor),tt.colorPanel.onColorChanged=tt.setColor,tt.lineWidthPanel=new Pe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),tt.lineWidthPanel.onWidthChanged=tt.setLineWidth,tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){return!(!lt.prototype.ownsTarget.call(this,je)&&je!==this.visual&&je!==this.drawingImage)},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.drawingImage=xe.createImage(),this.visual.appendChild(this.drawingImage);var je=xe.createTransform();this.visual.transform.baseVal.appendItem(je),this.addMarkerVisualToContainer(this.visual)},Ue.prototype.pointerDown=function(je,rt){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(je.x,je.y),this.drawing=!0):lt.prototype.pointerDown.call(this,je,rt)},Ue.prototype.manipulate=function(je){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(je.x,je.y),this.canvasContext.stroke()):lt.prototype.manipulate.call(this,je)},Ue.prototype.resize=function(je){lt.prototype.resize.call(this,je),xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ue.prototype.pointerUp=function(je){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):lt.prototype.pointerUp.call(this,je)},Ue.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)},Ue.prototype.select=function(){this.state==="creating"&&this.finishCreation(),lt.prototype.select.call(this)},Ue.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),lt.prototype.deselect.call(this)},Ue.prototype.finishCreation=function(){for(var je=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),rt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],dt=rt[0],tt=rt[1],Ke=rt[2],De=rt[3],ze=!1,$e=0;$e<this.canvasElement.height;$e++)for(var We=0;We<this.canvasElement.width;We++)je.data[$e*this.canvasElement.width*4+4*We+3]>0&&(ze=!0,$e<tt&&(tt=$e),We<dt&&(dt=We),$e>De&&(De=$e),We>Ke&&(Ke=We));if(ze){this.left=dt/this.pixelRatio,this.top=tt/this.pixelRatio,this.width=(Ke-dt)/this.pixelRatio,this.height=(De-tt)/this.pixelRatio;var Ve=document.createElement("canvas");Ve.width=Ke-dt,Ve.height=De-tt,Ve.getContext("2d").putImageData(this.canvasContext.getImageData(dt,tt,Ke-dt,De-tt),0,0),this.drawingImgUrl=Ve.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ue.prototype.setDrawingImage=function(){xe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ue.prototype.setColor=function(je){this.color=je,this.colorChanged(je)},Ue.prototype.setLineWidth=function(je){this.lineWidth=je},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=Object.assign({drawingImgUrl:this.drawingImgUrl},lt.prototype.getState.call(this));return je.typeName=Ue.typeName,je},Ue.prototype.restoreState=function(je){this.createVisual(),lt.prototype.restoreState.call(this,je),this.drawingImgUrl=je.drawingImgUrl,this.setDrawingImage()},Ue.prototype.scale=function(je,rt){lt.prototype.scale.call(this,je,rt),this.setDrawingImage()},Ue.typeName="FreehandMarker",Ue.title="Freehand marker",Ue.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>',Ue}(me),Mt=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,dt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return tt.typeBoxes=[],tt.currentType=rt,tt.setCurrentType=tt.setCurrentType.bind(tt),tt}return Se(Ue,lt),Ue.prototype.getUi=function(){var je=this,rt=document.createElement("div");rt.style.display="flex",rt.style.overflow="hidden",rt.style.flexGrow="2";for(var dt=function(De){var ze="both";switch(De){case 0:ze="both";break;case 1:ze="start";break;case 2:ze="end";break;case 3:ze="none"}var $e=document.createElement("div");if($e.style.display="flex",$e.style.flexGrow="2",$e.style.alignItems="center",$e.style.justifyContent="space-between",$e.style.padding="5px",$e.style.borderWidth="2px",$e.style.borderStyle="solid",$e.style.borderColor=ze===tt.currentType?tt.uiStyleSettings.toolboxAccentColor:"transparent",$e.addEventListener("click",function(){je.setCurrentType(ze,$e)}),rt.appendChild($e),ze==="both"||ze==="start"){var We=document.createElement("div");We.style.display="flex",We.style.alignItems="center",We.style.minHeight="20px",We.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="`+(tt.uiStyleSettings!==void 0?tt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,We.style.marginLeft="5px",$e.appendChild(We)}var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.alignItems="center",Ve.style.minHeight="20px",Ve.style.flexGrow="2";var pt=document.createElement("hr");if(pt.style.minWidth="20px",pt.style.border="0px",pt.style.borderTop="3px solid "+(tt.uiStyleSettings!==void 0?tt.uiStyleSettings.toolboxColor:"#eeeeee"),pt.style.flexGrow="2",Ve.appendChild(pt),$e.appendChild(Ve),ze==="both"||ze==="end"){var Lt=document.createElement("div");Lt.style.display="flex",Lt.style.alignItems="center",Lt.style.minHeight="20px",Lt.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="`+(tt.uiStyleSettings!==void 0?tt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Lt.style.marginRight="5px",$e.appendChild(Lt)}tt.typeBoxes.push($e)},tt=this,Ke=0;Ke<4;Ke++)dt(Ke);return rt},Ue.prototype.setCurrentType=function(je,rt){var dt=this;this.currentType=je,this.typeBoxes.forEach(function(tt){tt.style.borderColor=tt===rt?dt.uiStyleSettings!==void 0?dt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ue}(ee),at=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.arrowType="end",tt.arrowBaseHeight=10,tt.arrowBaseWidth=10,tt.getArrowPoints=tt.getArrowPoints.bind(tt),tt.setArrowType=tt.setArrowType.bind(tt),tt.arrowTypePanel=new Mt("Arrow type","end"),tt.arrowTypePanel.onArrowTypeChanged=tt.setArrowType,tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){return!(!lt.prototype.ownsTarget.call(this,je)&&je!==this.arrow1&&je!==this.arrow2)},Ue.prototype.getArrowPoints=function(je,rt){var dt=this.arrowBaseWidth+2*this.strokeWidth,tt=this.arrowBaseHeight+2*this.strokeWidth;return je-dt/2+","+(rt+tt/2)+" "+je+","+(rt-tt/2)+" "+(je+dt/2)+","+(rt+tt/2)},Ue.prototype.createTips=function(){this.arrow1=xe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=xe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(xe.createTransform()),this.visual.appendChild(this.arrow2)},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.state==="creating"&&this.createTips()},Ue.prototype.adjustVisual=function(){if(lt.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",xe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),xe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var je=0;Math.abs(this.x1-this.x2)>.1&&(je=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var rt=this.arrow1.transform.baseVal.getItem(0);rt.setRotate(je,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(rt,0);var dt=this.arrow2.transform.baseVal.getItem(0);dt.setRotate(je+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(dt,0)}},Ue.prototype.setArrowType=function(je){this.arrowType=je,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=Object.assign({arrowType:this.arrowType},lt.prototype.getState.call(this));return je.typeName=Ue.typeName,je},Ue.prototype.restoreState=function(je){lt.prototype.restoreState.call(this,je);var rt=je;this.arrowType=rt.arrowType,this.createTips(),this.adjustVisual()},Ue.typeName="ArrowMarker",Ue.title="Arrow marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ue}(qe),_t=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.fillColor=dt.defaultFillColor,tt.strokeWidth=0,tt.fillPanel=new z("Color",dt.defaultColorSet,dt.defaultFillColor),tt.fillPanel.onColorChanged=tt.setFillColor,tt}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=lt.prototype.getState.call(this);return je.typeName=Ue.typeName,je},Ue.typeName="CoverMarker",Ue.title="Cover marker",Ue.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ue}(ve),ht=function(lt){function Ue(je,rt,dt,tt){var Ke=lt.call(this,je,tt||'<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 Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=rt,Ke.currentOpacity=dt,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return Se(Ue,lt),Ue.prototype.getUi=function(){var je=this,rt=document.createElement("div");return rt.style.display="flex",rt.style.overflow="hidden",rt.style.flexGrow="2",rt.style.justifyContent="space-between",this.opacities.forEach(function(dt){var tt=document.createElement("div");tt.style.display="flex",tt.style.alignItems="center",tt.style.justifyContent="center",tt.style.padding="5px",tt.style.borderWidth="2px",tt.style.borderStyle="solid",tt.style.borderColor=dt===je.currentOpacity?je.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){je.setCurrentOpacity(dt,tt)}),rt.appendChild(tt);var Ke=document.createElement("div");Ke.innerText=100*dt+"%",tt.appendChild(Ke),je.opacityBoxes.push(tt)}),rt},Ue.prototype.setCurrentOpacity=function(je,rt){var dt=this;this.currentOpacity=je,this.opacityBoxes.forEach(function(tt){tt.style.borderColor=tt===rt?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ue}(ee),Dt=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.setOpacity=tt.setOpacity.bind(tt),tt.fillColor=dt.defaultHighlightColor,tt.strokeWidth=0,tt.opacity=dt.defaultHighlightOpacity,tt.fillPanel=new z("Color",dt.defaultColorSet,tt.fillColor),tt.fillPanel.onColorChanged=tt.setFillColor,tt.opacityPanel=new ht("Opacity",dt.defaultOpacitySteps,tt.opacity),tt.opacityPanel.onOpacityChanged=tt.setOpacity,tt}return Se(Ue,lt),Ue.prototype.setOpacity=function(je){this.opacity=je,this.visual&&xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=lt.prototype.getState.call(this);return je.typeName=Ue.typeName,je},Ue.typeName="HighlightMarker",Ue.title="Highlight marker",Ue.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>',Ue}(_t),ut='<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>',ot='<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>',ct=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.bgColor="transparent",tt.tipPosition={x:0,y:0},tt.tipBase1Position={x:0,y:0},tt.tipBase2Position={x:0,y:0},tt.tipMoving=!1,tt.color=dt.defaultStrokeColor,tt.bgColor=dt.defaultFillColor,tt.fontFamily=dt.defaultFontFamily,tt.defaultSize={x:100,y:30},tt.setBgColor=tt.setBgColor.bind(tt),tt.getTipPoints=tt.getTipPoints.bind(tt),tt.positionTip=tt.positionTip.bind(tt),tt.setTipPoints=tt.setTipPoints.bind(tt),tt.colorPanel=new z("Text color",dt.defaultColorSet,tt.color,ut),tt.colorPanel.onColorChanged=tt.setColor,tt.bgColorPanel=new z("Fill color",dt.defaultColorSet,tt.bgColor,ot),tt.bgColorPanel.onColorChanged=tt.setBgColor,tt.fontFamilyPanel=new Je("Font",dt.defaultFontFamilies,dt.defaultFontFamily),tt.fontFamilyPanel.onFontChanged=tt.setFont,tt.tipGrip=new ae,tt.tipGrip.visual.transform.baseVal.appendItem(xe.createTransform()),tt.controlBox.appendChild(tt.tipGrip.visual),tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){return lt.prototype.ownsTarget.call(this,je)||this.tipGrip.ownsTarget(je)||this.tip===je},Ue.prototype.createTip=function(){xe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=xe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ue.prototype.pointerDown=function(je,rt){this.state==="new"&<.prototype.pointerDown.call(this,je,rt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(rt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):lt.prototype.pointerDown.call(this,je,rt)},Ue.prototype.pointerUp=function(je){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,lt.prototype.pointerUp.call(this,je);else{var rt=this.state==="creating";lt.prototype.pointerUp.call(this,je),this.setTipPoints(rt),this.positionTip()}},Ue.prototype.manipulate=function(je){if(this.tipMoving){var rt=this.unrotatePoint(je);this.tipPosition={x:rt.x-this.manipulationStartLeft,y:rt.y-this.manipulationStartTop},this.positionTip()}else lt.prototype.manipulate.call(this,je)},Ue.prototype.setBgColor=function(je){this.bgRectangle&&this.tip&&(xe.setAttributes(this.bgRectangle,[["fill",je]]),xe.setAttributes(this.tip,[["fill",je]])),this.bgColor=je,this.fillColorChanged(je)},Ue.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},Ue.prototype.setTipPoints=function(je){je===void 0&&(je=!1);var rt=Math.min(this.height/2,15),dt=this.height/5;je&&(this.tipPosition={x:rt+dt/2,y:this.height+20});var tt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?tt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,rt=Math.min(this.width/2,15),this.tipBase1Position={x:rt,y:0},this.tipBase2Position={x:rt+dt,y:0}):(this.tipBase1Position={x:0,y:rt},this.tipBase2Position={x:0,y:rt+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?tt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,rt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-rt-dt,y:0},this.tipBase2Position={x:this.width-rt,y:0}):(this.tipBase1Position={x:this.width,y:rt},this.tipBase2Position={x:this.width,y:rt+dt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?tt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(dt=this.width/5,rt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-rt-dt,y:this.height},this.tipBase2Position={x:this.width-rt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-rt-dt},this.tipBase2Position={x:this.width,y:this.height-rt}):tt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,rt=Math.min(this.width/2,15),this.tipBase1Position={x:rt,y:this.height},this.tipBase2Position={x:rt+dt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-rt},this.tipBase2Position={x:0,y:this.height-rt-dt})},Ue.prototype.resize=function(je){lt.prototype.resize.call(this,je),this.positionTip()},Ue.prototype.positionTip=function(){xe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var je=this.tipGrip.visual.transform.baseVal.getItem(0);je.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(je,0)},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ue.prototype.select=function(){this.positionTip(),lt.prototype.select.call(this)},Ue.prototype.getState=function(){var je=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},lt.prototype.getState.call(this));return je.typeName=Ue.typeName,je},Ue.prototype.restoreState=function(je){var rt=je;this.bgColor=rt.bgColor,this.tipPosition=rt.tipPosition,lt.prototype.restoreState.call(this,je),this.createTip(),this.setTipPoints()},Ue.prototype.scale=function(je,rt){lt.prototype.scale.call(this,je,rt),this.tipPosition={x:this.tipPosition.x*je,y:this.tipPosition.y*rt},this.positionTip()},Ue.typeName="CalloutMarker",Ue.title="Callout marker",Ue.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>',Ue}(mt),yt=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.fillColor="transparent",tt.strokeColor="transparent",tt.strokeWidth=0,tt.strokeDasharray="",tt.opacity=1,tt.strokeColor=dt.defaultColor,tt.strokeWidth=dt.defaultStrokeWidth,tt.strokeDasharray=dt.defaultStrokeDasharray,tt.fillColor=dt.defaultFillColor,tt.setStrokeColor=tt.setStrokeColor.bind(tt),tt.setFillColor=tt.setFillColor.bind(tt),tt.setStrokeWidth=tt.setStrokeWidth.bind(tt),tt.setStrokeDasharray=tt.setStrokeDasharray.bind(tt),tt.setOpacity=tt.setOpacity.bind(tt),tt.createVisual=tt.createVisual.bind(tt),tt.strokePanel=new z("Line color",Ce(dt.defaultColorSet,["transparent"]),dt.defaultColor),tt.strokePanel.onColorChanged=tt.setStrokeColor,tt.fillPanel=new z("Fill color",Ce(dt.defaultColorSet,["transparent"]),tt.fillColor,ot),tt.fillPanel.onColorChanged=tt.setFillColor,tt.strokeWidthPanel=new Pe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),tt.strokeWidthPanel.onWidthChanged=tt.setStrokeWidth,tt.strokeStylePanel=new Ae("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),tt.strokeStylePanel.onStyleChanged=tt.setStrokeDasharray,tt.opacityPanel=new ht("Opacity",dt.defaultOpacitySteps,tt.opacity),tt.opacityPanel.onOpacityChanged=tt.setOpacity,tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){return!(!lt.prototype.ownsTarget.call(this,je)&&je!==this.visual)},Ue.prototype.createVisual=function(){this.visual=xe.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)},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.state==="new"&&(this.createVisual(),this.moveVisual(je),this._state="creating")},Ue.prototype.manipulate=function(je){lt.prototype.manipulate.call(this,je)},Ue.prototype.resize=function(je){lt.prototype.resize.call(this,je),this.setSize()},Ue.prototype.setSize=function(){lt.prototype.setSize.call(this),xe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ue.prototype.pointerUp=function(je){lt.prototype.pointerUp.call(this,je),this.setSize()},Ue.prototype.setStrokeColor=function(je){this.strokeColor=je,this.visual&&xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(je),this.stateChanged()},Ue.prototype.setFillColor=function(je){this.fillColor=je,this.visual&&xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(je),this.stateChanged()},Ue.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.visual&&xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ue.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.visual&&xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ue.prototype.setOpacity=function(je){this.opacity=je,this.visual&&xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},lt.prototype.getState.call(this));return je.typeName=Ue.typeName,je},Ue.prototype.restoreState=function(je){var rt=je;this.fillColor=rt.fillColor,this.strokeColor=rt.strokeColor,this.strokeWidth=rt.strokeWidth,this.strokeDasharray=rt.strokeDasharray,this.opacity=rt.opacity,this.createVisual(),lt.prototype.restoreState.call(this,je),this.setSize()},Ue.prototype.scale=function(je,rt){lt.prototype.scale.call(this,je,rt),this.setSize()},Ue.typeName="EllipseMarker",Ue.title="Ellipse marker",Ue.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>',Ue}(me),wt=function(lt){function Ue(je,rt,dt){return lt.call(this,je,rt,dt)||this}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ue.prototype.ownsTarget=function(je){return!(!lt.prototype.ownsTarget.call(this,je)&&je!==this.tip1&&je!==this.tip2)},Ue.prototype.createTips=function(){this.tip1=xe.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(xe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=xe.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(xe.createTransform()),this.visual.appendChild(this.tip2)},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.state==="creating"&&this.createTips()},Ue.prototype.adjustVisual=function(){if(lt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(xe.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()]]),xe.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 je=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),rt=this.tip1.transform.baseVal.getItem(0);rt.setRotate(je,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(rt,0);var dt=this.tip2.transform.baseVal.getItem(0);dt.setRotate(je+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(dt,0)}},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=lt.prototype.getState.call(this);return je.typeName=Ue.typeName,je},Ue.prototype.restoreState=function(je){lt.prototype.restoreState.call(this,je),this.createTips(),this.adjustVisual()},Ue.typeName="MeasurementMarker",Ue.title="Measurement marker",Ue.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>',Ue}(qe),xt=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.strokePanel.colors=dt.defaultColorSet,tt.fillColor="transparent",tt}return Se(Ue,lt),Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=lt.prototype.getState.call(this);return je.typeName=Ue.typeName,je},Ue.typeName="EllipseFrameMarker",Ue.title="Ellipse frame marker",Ue.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>',Ue}(yt),zt=function(){function lt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(lt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),lt.prototype.addUndoStep=function(Ue){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ue)||(this.undoStack.push(Ue),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ue)&&this.redoStack.splice(0,this.redoStack.length))},lt.prototype.replaceLastUndoStep=function(Ue){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ue)},lt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},lt.prototype.undo=function(){if(this.undoStack.length>1){var Ue=this.undoStack.pop();return Ue!==void 0&&this.redoStack.push(Ue),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},lt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},lt}(),Ut=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.strokeColor="transparent",tt.strokeWidth=0,tt.strokeDasharray="",tt.curveX=0,tt.curveY=0,tt.manipulationStartCurveX=0,tt.manipulationStartCurveY=0,tt.setStrokeColor=tt.setStrokeColor.bind(tt),tt.setStrokeWidth=tt.setStrokeWidth.bind(tt),tt.setStrokeDasharray=tt.setStrokeDasharray.bind(tt),tt.positionGrips=tt.positionGrips.bind(tt),tt.addControlGrips=tt.addControlGrips.bind(tt),tt.adjustVisual=tt.adjustVisual.bind(tt),tt.setupControlBox=tt.setupControlBox.bind(tt),tt.resize=tt.resize.bind(tt),tt.strokeColor=dt.defaultColor,tt.strokeWidth=dt.defaultStrokeWidth,tt.strokeDasharray=dt.defaultStrokeDasharray,tt.strokePanel=new z("Line color",dt.defaultColorSet,dt.defaultColor),tt.strokePanel.onColorChanged=tt.setStrokeColor,tt.strokeWidthPanel=new Pe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),tt.strokeWidthPanel.onWidthChanged=tt.setStrokeWidth,tt.strokeStylePanel=new Ae("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),tt.strokeStylePanel.onStyleChanged=tt.setStrokeDasharray,tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){return!(!lt.prototype.ownsTarget.call(this,je)&&je!==this.visual&&je!==this.selectorCurve&&je!==this.visibleCurve&&!this.curveGrip.ownsTarget(je))},Ue.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.selectorCurve=xe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=xe.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)},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=je.x,this.curveY=je.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(rt)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ue.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),xe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),xe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),xe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ue.prototype.setupControlBox=function(){lt.prototype.setupControlBox.call(this),this.curveControlLine1=xe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=xe.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)},Ue.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,lt.prototype.addControlGrips.call(this)},Ue.prototype.positionGrips=function(){lt.prototype.positionGrips.call(this);var je=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-je/2,this.curveY-je/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()))},Ue.prototype.manipulate=function(je){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+je.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+je.y-this.manipulationStartY),lt.prototype.manipulate.call(this,je)},Ue.prototype.resize=function(je){this.activeGrip===this.curveGrip&&(this.curveX=je.x,this.curveY=je.y),lt.prototype.resize.call(this,je),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ue.prototype.setStrokeColor=function(je){this.strokeColor=je,this.adjustVisual(),this.colorChanged(je)},Ue.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.adjustVisual()},Ue.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.adjustVisual()},Ue.prototype.scale=function(je,rt){this.curveX=this.curveX*je,this.curveY=this.curveY*rt,lt.prototype.scale.call(this,je,rt)},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},lt.prototype.getState.call(this));return je.typeName=Ue.typeName,je},Ue.prototype.restoreState=function(je){lt.prototype.restoreState.call(this,je);var rt=je;this.strokeColor=rt.strokeColor,this.strokeWidth=rt.strokeWidth,this.strokeDasharray=rt.strokeDasharray,this.curveX=rt.curveX,this.curveY=rt.curveY,this.createVisual(),this.adjustVisual()},Ue.typeName="CurveMarker",Ue.title="Curve marker",Ue.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>',Ue}(Ze),cn=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,rt,dt)||this;return tt.fillColor="transparent",tt.strokeColor="transparent",tt.strokeWidth=0,tt.strokeDasharray="",tt.textColor="transparent",tt.fontSize="1rem",tt.isMoved=!1,tt.captionText="Caption",tt.PADDING=5,tt.captionBoxWidth=0,tt.captionBoxHeight=0,tt.strokeColor=dt.defaultColor,tt.strokeWidth=dt.defaultStrokeWidth,tt.strokeDasharray=dt.defaultStrokeDasharray,tt.fillColor=dt.defaultFillColor,tt.textColor=dt.defaultStrokeColor,tt.fontFamily=dt.defaultFontFamily,tt.fontSize=dt.defaultCaptionFontSize,tt.captionText=dt.defaultCaptionText,tt.setStrokeColor=tt.setStrokeColor.bind(tt),tt.setFillColor=tt.setFillColor.bind(tt),tt.setStrokeWidth=tt.setStrokeWidth.bind(tt),tt.setStrokeDasharray=tt.setStrokeDasharray.bind(tt),tt.createVisual=tt.createVisual.bind(tt),tt.sizeCaption=tt.sizeCaption.bind(tt),tt.setCaptionText=tt.setCaptionText.bind(tt),tt.showTextEditor=tt.showTextEditor.bind(tt),tt.positionTextEditor=tt.positionTextEditor.bind(tt),tt.finishTextEditing=tt.finishTextEditing.bind(tt),tt.setFont=tt.setFont.bind(tt),tt.setTextColor=tt.setTextColor.bind(tt),tt.strokePanel=new z("Line color",Ce(dt.defaultColorSet,["transparent"]),tt.strokeColor),tt.strokePanel.onColorChanged=tt.setStrokeColor,tt.fillPanel=new z("Fill color",Ce(dt.defaultColorSet,["transparent"]),tt.fillColor,ot),tt.fillPanel.onColorChanged=tt.setFillColor,tt.strokeWidthPanel=new Pe("Line width",dt.defaultStrokeWidths,dt.defaultStrokeWidth),tt.strokeWidthPanel.onWidthChanged=tt.setStrokeWidth,tt.strokeStylePanel=new Ae("Line style",dt.defaultStrokeDasharrays,dt.defaultStrokeDasharray),tt.strokeStylePanel.onStyleChanged=tt.setStrokeDasharray,tt.fontFamilyPanel=new Je("Font",dt.defaultFontFamilies,dt.defaultFontFamily),tt.fontFamilyPanel.onFontChanged=tt.setFont,tt.textColorPanel=new z("Text color",dt.defaultColorSet,tt.textColor,ut),tt.textColorPanel.onColorChanged=tt.setTextColor,tt}return Se(Ue,lt),Ue.prototype.ownsTarget=function(je){return!(!lt.prototype.ownsTarget.call(this,je)&&je!==this.visual&&je!==this.frame&&je!==this.captionBg&&je!==this.captionElement)},Ue.prototype.createVisual=function(){this.visual=xe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=xe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=xe.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=xe.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()},Ue.prototype.setCaptionText=function(je){this.captionText=je,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ue.prototype.pointerDown=function(je,rt){lt.prototype.pointerDown.call(this,je,rt),this.isMoved=!1,this.pointerDownPoint=je,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(je),this._state="creating")},Ue.prototype.manipulate=function(je){lt.prototype.manipulate.call(this,je),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(je.x-this.pointerDownPoint.x)>5||Math.abs(je.y-this.pointerDownPoint.y)>5)},Ue.prototype.resize=function(je){lt.prototype.resize.call(this,je),this.setSize()},Ue.prototype.sizeCaption=function(){var je=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=je.width+2*this.PADDING,this.captionBoxHeight=je.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),xe.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')"]]),xe.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')"]])},Ue.prototype.showTextEditor=function(){var je=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(rt){rt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(rt){rt.key==="Enter"&&je.finishTextEditing(je.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(rt){rt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){je.finishTextEditing(je.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){je.finishTextEditing(je.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ue.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"))},Ue.prototype.finishTextEditing=function(je){this.setCaptionText(je.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ue.prototype.setFont=function(je){this.captionElement&&xe.setAttributes(this.captionElement,[["font-family",je]]),this.fontFamily=je,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ue.prototype.setTextColor=function(je){this.captionElement&&xe.setAttributes(this.captionElement,[["fill",je]]),this.textColor=je,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ue.prototype.setSize=function(){lt.prototype.setSize.call(this),xe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ue.prototype.pointerUp=function(je){lt.prototype.pointerUp.call(this,je),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ue.prototype.dblClick=function(je,rt){lt.prototype.dblClick.call(this,je,rt),this.showTextEditor()},Ue.prototype.setStrokeColor=function(je){this.strokeColor=je,this.frame&&xe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(je),this.stateChanged()},Ue.prototype.setFillColor=function(je){this.fillColor=je,this.captionBg&&xe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(je),this.stateChanged()},Ue.prototype.setStrokeWidth=function(je){this.strokeWidth=je,this.frame&&xe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ue.prototype.setStrokeDasharray=function(je){this.strokeDasharray=je,this.frame&&xe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ue.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ue.prototype.getState=function(){var je=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},lt.prototype.getState.call(this));return je.typeName=this.typeName,je},Ue.prototype.restoreState=function(je){var rt=je;this.fillColor=rt.fillColor,this.strokeColor=rt.strokeColor,this.strokeWidth=rt.strokeWidth,this.strokeDasharray=rt.strokeDasharray,this.textColor=rt.textColor,this.fontFamily=rt.fontFamily,this.captionText=rt.captionText,this.fontSize=rt.fontSize,this.createVisual(),lt.prototype.restoreState.call(this,je),this.setSize()},Ue.prototype.scale=function(je,rt){lt.prototype.scale.call(this,je,rt),this.setSize()},Ue.typeName="CaptionFrameMarker",Ue.title="Caption frame marker",Ue.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>',Ue}(me),jt=function(){function lt(Ue,je){je===void 0&&(je=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ue,this.cancelable=je}return Object.defineProperty(lt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),lt.prototype.preventDefault=function(){this._defaultPrevented=!0},lt}(),mn=function(lt){function Ue(je,rt,dt){var tt=lt.call(this,je,!1)||this;return tt.dataUrl=rt,tt.state=dt,tt}return Se(Ue,lt),Ue}(jt),Ft=function(lt){function Ue(je,rt,dt){dt===void 0&&(dt=!1);var tt=lt.call(this,je,dt)||this;return tt.marker=rt,tt}return Se(Ue,lt),Ue}(jt),Yt=function(){function lt(){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 lt.prototype.addEventListener=function(Ue,je){this[Ue].push(je)},lt.prototype.removeEventListener=function(Ue,je){var rt=this[Ue].indexOf(je);rt>-1&&this[Ue].splice(rt,1)},lt}(),tn=function(){function lt(Ue){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ie,this._isOpen=!1,this.undoRedoManager=new zt,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 Yt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=lt.instanceCounter++,this.styles=new pe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ue,this.targetRoot=document.body,this.width=Ue.clientWidth,this.height=Ue.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(lt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Oe,gt,at,mt,xt,yt,Dt,ct,wt,_t,qe,Ut,cn]},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Oe,gt,at,mt,yt,Dt,ct]},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Oe,gt,at,mt,Dt]},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ue){var je=this;this._availableMarkerTypes.splice(0),Ue.forEach(function(rt){if(typeof rt=="string"){var dt=je.ALL_MARKER_TYPES.find(function(tt){return tt.typeName===rt});dt!==void 0&&je._availableMarkerTypes.push(dt)}else je._availableMarkerTypes.push(rt)})},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ue){this._zoomLevel=Ue,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(lt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),lt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),be.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},lt.prototype.show=function(){var Ue=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(je){return je(new jt(Ue))})},lt.prototype.render=function(){return Be(this,void 0,void 0,function(){var Ue;return Le(this,function(je){switch(je.label){case 0:return this.setCurrentMarker(),(Ue=new ye).naturalSize=this.renderAtNaturalSize,Ue.imageType=this.renderImageType,Ue.imageQuality=this.renderImageQuality,Ue.markersOnly=this.renderMarkersOnly,Ue.width=this.renderWidth,Ue.height=this.renderHeight,[4,Ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return je.sent(),[4,Ue.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,je.sent()]}})})},lt.prototype.close=function(Ue){var je=this;if(Ue===void 0&&(Ue=!1),this.isOpen){var rt=!1;Ue||this.eventListeners.beforeclose.forEach(function(dt){var tt=new jt(je,!0);dt(tt),tt.defaultPrevented&&(rt=!0)}),rt||(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(dt){return dt(new jt(je))}),this.detachEvents(),this._isOpen=!1)}},lt.prototype.addMarkersToToolbar=function(){for(var Ue,je=[],rt=0;rt<arguments.length;rt++)je[rt]=arguments[rt];(Ue=this._availableMarkerTypes).push.apply(Ue,je)},lt.prototype.addRenderEventListener=function(Ue){this.addEventListener("render",function(je){Ue(je.dataUrl,je.state)})},lt.prototype.removeRenderEventListener=function(Ue){},lt.prototype.addCloseEventListener=function(Ue){this.addEventListener("close",function(){Ue()})},lt.prototype.removeCloseEventListener=function(Ue){},lt.prototype.setupResizeObserver=function(){var Ue=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ue.resize(Ue.target.clientWidth,Ue.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ue.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},lt.prototype.onPopupTargetResize=function(){var Ue=1*this.target.clientWidth/this.target.clientHeight,je=this.editorCanvas.clientWidth/Ue>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ue:this.editorCanvas.clientWidth,rt=je<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ue;this.resize(je,rt)},lt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},lt.prototype.resize=function(Ue,je){this._isResizing=!0;var rt=Ue/this.imageWidth,dt=je/this.imageHeight;this.imageWidth=Math.round(Ue),this.imageHeight=Math.round(je),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(rt,dt),this._isResizing=!1},lt.prototype.scaleMarkers=function(Ue,je){var rt,dt=this;this._currentMarker&&this._currentMarker instanceof mt?this._currentMarker.scale(Ue,je):(rt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(tt){tt!==dt._currentMarker&&tt.scale(Ue,je)}),rt!==void 0&&this.setCurrentMarker(rt)},lt.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"},lt.prototype.setTopLeft=function(){var Ue=this.editingTarget.getBoundingClientRect(),je=this.editorCanvas.getBoundingClientRect();this.left=Ue.left-je.left,this.top=Ue.top-je.top},lt.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)},lt.prototype.addDefs=function(){for(var Ue,je=[],rt=0;rt<arguments.length;rt++)je[rt]=arguments[rt];this.defs=xe.createDefs(),this.addDefsToImage(),(Ue=this.defs).append.apply(Ue,je)},lt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},lt.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)},lt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},lt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},lt.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)},lt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},lt.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)},lt.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 Ue=document.createElement("a");Ue.href="https://markerjs.com/",Ue.target="_blank",Ue.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>',Ue.title="Powered by marker.js",Ue.style.display="grid",Ue.style.alignItems="center",Ue.style.justifyItems="center",Ue.style.padding="3px",Ue.style.width="20px",Ue.style.height="20px",this.logoUI.appendChild(Ue),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},lt.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")},lt.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"},lt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},lt.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 Ue=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=Ue+"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 fe(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 ue(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},lt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},lt.prototype.removeMarker=function(Ue){this.markerImage.removeChild(Ue.container),this.markers.indexOf(Ue)>-1&&this.markers.splice(this.markers.indexOf(Ue),1),Ue.dispose()},lt.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())},lt.prototype.toolbarButtonClicked=function(Ue,je){if(Ue==="marker"&&je!==void 0)this.createNewMarker(je);else if(Ue==="action")switch(je){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()}},lt.prototype.deleteSelectedMarker=function(){var Ue=this;if(this._currentMarker!==void 0){var je=!1;if(this.eventListeners.markerbeforedelete.forEach(function(dt){var tt=new Ft(Ue,Ue._currentMarker,!0);dt(tt),tt.defaultPrevented&&(je=!0)}),!je){var rt=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(dt){return dt(new Ft(Ue,rt))})}}},lt.prototype.clear=function(){var Ue=this,je=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var De=new Ft(Ue,void 0,!0);Ke(De),De.defaultPrevented&&(je=!0)}),!je)){this.setCurrentMarker();for(var rt=function(Ke){var De=dt.markers[Ke];dt.setCurrentMarker(dt.markers[Ke]),dt._currentMarker.dispose(),dt.markerImage.removeChild(dt._currentMarker.container),dt.markers.splice(dt.markers.indexOf(dt._currentMarker),1),dt.eventListeners.markerdelete.forEach(function(ze){return ze(new Ft(Ue,De))})},dt=this,tt=this.markers.length-1;tt>=0;tt--)rt(tt);this.addUndoStep()}},Object.defineProperty(lt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),lt.prototype.showNotesEditor=function(){var Ue;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=(Ue=this._currentMarker.notes)!==null&&Ue!==void 0?Ue:"",this.overlayContainer.appendChild(this.notesArea))},lt.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)},lt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},lt.prototype.addUndoStep=function(){var Ue=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var je=this.getState(),rt=this.undoRedoManager.getLastUndoStep();if(!rt||rt.width===je.width&&rt.height===je.height){var dt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(je),dt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(tt){return tt(new jt(Ue))})}else this.undoRedoManager.replaceLastUndoStep(je),this.eventListeners.statechange.forEach(function(tt){return tt(new jt(Ue))})}},lt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},lt.prototype.undoStep=function(){var Ue=this,je=this.undoRedoManager.undo();je!==void 0&&(this.restoreState(je),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(rt){return rt(new jt(Ue))}))},lt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},lt.prototype.redoStep=function(){var Ue=this,je=this.undoRedoManager.redo();je!==void 0&&(this.restoreState(je),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(rt){return rt(new jt(Ue))}))},lt.prototype.stepZoom=function(){var Ue=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ue<this.zoomSteps.length-1?this.zoomSteps[Ue+1]:this.zoomSteps[0]},lt.prototype.panTo=function(Ue){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ue.x,top:this.prevPanPoint.y-Ue.y}),this.prevPanPoint=Ue},lt.prototype.startRenderAndClose=function(){return Be(this,void 0,void 0,function(){var Ue,je,rt=this;return Le(this,function(dt){switch(dt.label){case 0:return[4,this.render()];case 1:return Ue=dt.sent(),je=this.getState(),this.eventListeners.render.forEach(function(tt){return tt(new mn(rt,Ue,je))}),this.close(!0),[2]}})})},lt.prototype.getState=function(Ue){Ue===!0&&this.setCurrentMarker();var je={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(rt){return je.markers.push(rt.getState())}),je},lt.prototype.restoreState=function(Ue){var je=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ue.markers.forEach(function(rt){var dt=je._availableMarkerTypes.find(function(Ke){return Ke.typeName===rt.typeName});if(dt!==void 0){var tt=je.addNewMarker(dt);tt.restoreState(rt),je.markers.push(tt)}}),Ue.width&&Ue.height&&(Ue.width!==this.imageWidth||Ue.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ue.width,this.imageHeight/Ue.height),this.eventListeners.restorestate.forEach(function(rt){return rt(new jt(je))})},lt.prototype.addNewMarker=function(Ue){var je=xe.createGroup();return this.markerImage.appendChild(je),new Ue(je,this.overlayContainer,this.settings)},lt.prototype.createNewMarker=function(Ue){var je,rt=this;(je=typeof Ue=="string"?this._availableMarkerTypes.find(function(dt){return dt.typeName===Ue}):Ue)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(je),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(je.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(dt){return dt(new Ft(rt,rt._currentMarker))}))},lt.prototype.markerCreated=function(Ue){var je=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ue),this.setCurrentMarker(Ue),Ue instanceof gt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(gt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(rt){return rt(new Ft(je,je._currentMarker))})},lt.prototype.colorChanged=function(Ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ue,this.settings.defaultStrokeColor=Ue)},lt.prototype.fillColorChanged=function(Ue){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ue)},lt.prototype.markerStateChanged=function(Ue){var je=this;this.eventListeners.markerchange.forEach(function(rt){return rt(new Ft(je,Ue))})},lt.prototype.setCurrentMarker=function(Ue){var je=this;this._currentMarker!==Ue&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(rt){return rt(new Ft(je,je._currentMarker))})),this._currentMarker=Ue,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(rt){return rt(new Ft(je,je._currentMarker))}))},lt.prototype.onPointerDown=function(Ue){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ue.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var je=this.markers.find(function(rt){return rt.ownsTarget(Ue.target)});je!==void 0?(this.setCurrentMarker(je),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY),Ue.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ue.clientX,y:Ue.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY))},lt.prototype.onDblClick=function(Ue){if(this._isFocused||this.focus(),this.mode==="select"){var je=this.markers.find(function(rt){return rt.ownsTarget(Ue.target)});je!==void 0&&je!==this._currentMarker&&this.setCurrentMarker(je),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY),Ue.target):this.setCurrentMarker()}},lt.prototype.onPointerMove=function(Ue){this.touchPoints!==1&&Ue.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ue.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY)):this.zoomLevel>1&&this.panTo({x:Ue.clientX,y:Ue.clientY}))},lt.prototype.onPointerUp=function(Ue){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ue.clientX,Ue.clientY)),this.isDragging=!1,this.addUndoStep()},lt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},lt.prototype.onKeyUp=function(Ue){this._currentMarker===void 0||this.notesArea!==void 0||Ue.key!=="Delete"&&Ue.key!=="Backspace"||this.deleteSelectedMarker()},lt.prototype.clientToLocalCoordinates=function(Ue,je){var rt=this.markerImage.getBoundingClientRect();return{x:(Ue-rt.left)/this.zoomLevel,y:(je-rt.top)/this.zoomLevel}},lt.prototype.onWindowResize=function(){this.positionUI()},lt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ue=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ue+"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()},lt.prototype.addLicenseKey=function(Ue){be.addKey(Ue)},lt.prototype.addEventListener=function(Ue,je){this.eventListeners.addEventListener(Ue,je)},lt.prototype.removeEventListener=function(Ue,je){this.eventListeners.removeEventListener(Ue,je)},lt.prototype.renderState=function(Ue){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ue),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(lt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),lt.prototype.focus=function(){var Ue=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(je){return je(new jt(Ue))}))},lt.prototype.blur=function(){var Ue=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(je){return je(new jt(Ue))}))},lt.instanceCounter=0,lt}()},66042:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return mt}});var ke=Re(77321),Se=Re(52487),Be=Re(43403),Le=Re(34280),Ce=Re(59301),xe=Ce.createContext(null),be=Ce.createContext({}),ye=xe,we=Re(49618),pe=Re(72308),de=Re(92310),ge=Re.n(de),fe=Re(77900),ue=Re(10228),ee=Re(26112),z=Re(74416),oe=Re(8654),re=["prefixCls","className","containerRef"],ae=function(Mt){var at=Mt.prefixCls,_t=Mt.className,ht=Mt.containerRef,Dt=(0,z.Z)(Mt,re),ut=Ce.useContext(be),ot=ut.panel,ct=(0,oe.x1)(ot,ht);return Ce.createElement("div",(0,pe.Z)({className:ge()("".concat(at,"-content"),_t),role:"dialog",ref:ct},(0,ee.Z)(Mt,{aria:!0}),{"aria-modal":"true"},Dt))},le=ae,me=Re(48736);function ve(gt){return typeof gt=="string"&&String(Number(gt))===gt?((0,me.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(gt)):gt}function Pe(gt){warning(!("wrapperClassName"in gt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!gt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ae={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Oe(gt,Mt){var at,_t,ht,Dt=gt.prefixCls,ut=gt.open,ot=gt.placement,ct=gt.inline,yt=gt.push,wt=gt.forceRender,xt=gt.autoFocus,zt=gt.keyboard,Ut=gt.classNames,cn=gt.rootClassName,jt=gt.rootStyle,mn=gt.zIndex,Ft=gt.className,Yt=gt.id,tn=gt.style,lt=gt.motion,Ue=gt.width,je=gt.height,rt=gt.children,dt=gt.mask,tt=gt.maskClosable,Ke=gt.maskMotion,De=gt.maskClassName,ze=gt.maskStyle,$e=gt.afterOpenChange,We=gt.onClose,Ve=gt.onMouseEnter,pt=gt.onMouseOver,Lt=gt.onMouseLeave,on=gt.onClick,Xt=gt.onKeyDown,Rt=gt.onKeyUp,fn=gt.styles,En=gt.drawerRender,Sn=Ce.useRef(),dn=Ce.useRef(),Zn=Ce.useRef();Ce.useImperativeHandle(Mt,function(){return Sn.current});var vn=function(ei){var Ii=ei.keyCode,mr=ei.shiftKey;switch(Ii){case ue.Z.TAB:{if(Ii===ue.Z.TAB){if(!mr&&document.activeElement===Zn.current){var cr;(cr=dn.current)===null||cr===void 0||cr.focus({preventScroll:!0})}else if(mr&&document.activeElement===dn.current){var ir;(ir=Zn.current)===null||ir===void 0||ir.focus({preventScroll:!0})}}break}case ue.Z.ESC:{We&&zt&&(ei.stopPropagation(),We(ei));break}}};Ce.useEffect(function(){if(ut&&xt){var Ti;(Ti=Sn.current)===null||Ti===void 0||Ti.focus({preventScroll:!0})}},[ut]);var Wn=Ce.useState(!1),ri=(0,Se.Z)(Wn,2),Ni=ri[0],Qn=ri[1],ki=Ce.useContext(ye),Hi;typeof yt=="boolean"?Hi=yt?{}:{distance:0}:Hi=yt||{};var Gi=(at=(_t=(ht=Hi)===null||ht===void 0?void 0:ht.distance)!==null&&_t!==void 0?_t:ki==null?void 0:ki.pushDistance)!==null&&at!==void 0?at:180,qi=Ce.useMemo(function(){return{pushDistance:Gi,push:function(){Qn(!0)},pull:function(){Qn(!1)}}},[Gi]);Ce.useEffect(function(){if(ut){var Ti;ki==null||(Ti=ki.push)===null||Ti===void 0||Ti.call(ki)}else{var ei;ki==null||(ei=ki.pull)===null||ei===void 0||ei.call(ki)}},[ut]),Ce.useEffect(function(){return function(){var Ti;ki==null||(Ti=ki.pull)===null||Ti===void 0||Ti.call(ki)}},[]);var Pr=dt&&Ce.createElement(fe.default,(0,pe.Z)({key:"mask"},Ke,{visible:ut}),function(Ti,ei){var Ii=Ti.className,mr=Ti.style;return Ce.createElement("div",{className:ge()("".concat(Dt,"-mask"),Ii,Ut==null?void 0:Ut.mask,De),style:(0,ke.Z)((0,ke.Z)((0,ke.Z)({},mr),ze),fn==null?void 0:fn.mask),onClick:tt&&ut?We:void 0,ref:ei})}),gr=typeof lt=="function"?lt(ot):lt,Ri={};if(Ni&&Gi)switch(ot){case"top":Ri.transform="translateY(".concat(Gi,"px)");break;case"bottom":Ri.transform="translateY(".concat(-Gi,"px)");break;case"left":Ri.transform="translateX(".concat(Gi,"px)");break;default:Ri.transform="translateX(".concat(-Gi,"px)");break}ot==="left"||ot==="right"?Ri.width=ve(Ue):Ri.height=ve(je);var Vi={onMouseEnter:Ve,onMouseOver:pt,onMouseLeave:Lt,onClick:on,onKeyDown:Xt,onKeyUp:Rt},sr=Ce.createElement(fe.default,(0,pe.Z)({key:"panel"},gr,{visible:ut,forceRender:wt,onVisibleChanged:function(ei){$e==null||$e(ei)},removeOnLeave:!1,leavedClassName:"".concat(Dt,"-content-wrapper-hidden")}),function(Ti,ei){var Ii=Ti.className,mr=Ti.style,cr=Ce.createElement(le,(0,pe.Z)({id:Yt,containerRef:ei,prefixCls:Dt,className:ge()(Ft,Ut==null?void 0:Ut.content),style:(0,ke.Z)((0,ke.Z)({},tn),fn==null?void 0:fn.content)},(0,ee.Z)(gt,{aria:!0}),Vi),rt);return Ce.createElement("div",(0,pe.Z)({className:ge()("".concat(Dt,"-content-wrapper"),Ut==null?void 0:Ut.wrapper,Ii),style:(0,ke.Z)((0,ke.Z)((0,ke.Z)({},Ri),mr),fn==null?void 0:fn.wrapper)},(0,ee.Z)(gt,{data:!0})),En?En(cr):cr)}),Qe=(0,ke.Z)({},jt);return mn&&(Qe.zIndex=mn),Ce.createElement(ye.Provider,{value:qi},Ce.createElement("div",{className:ge()(Dt,"".concat(Dt,"-").concat(ot),cn,(0,we.Z)((0,we.Z)({},"".concat(Dt,"-open"),ut),"".concat(Dt,"-inline"),ct)),style:Qe,tabIndex:-1,ref:Sn,onKeyDown:vn},Pr,Ce.createElement("div",{tabIndex:0,ref:dn,style:Ae,"aria-hidden":"true","data-sentinel":"start"}),sr,Ce.createElement("div",{tabIndex:0,ref:Zn,style:Ae,"aria-hidden":"true","data-sentinel":"end"})))}var Ie=Ce.forwardRef(Oe),Ze=Ie,qe=function(Mt){var at=Mt.open,_t=at===void 0?!1:at,ht=Mt.prefixCls,Dt=ht===void 0?"rc-drawer":ht,ut=Mt.placement,ot=ut===void 0?"right":ut,ct=Mt.autoFocus,yt=ct===void 0?!0:ct,wt=Mt.keyboard,xt=wt===void 0?!0:wt,zt=Mt.width,Ut=zt===void 0?378:zt,cn=Mt.mask,jt=cn===void 0?!0:cn,mn=Mt.maskClosable,Ft=mn===void 0?!0:mn,Yt=Mt.getContainer,tn=Mt.forceRender,lt=Mt.afterOpenChange,Ue=Mt.destroyOnClose,je=Mt.onMouseEnter,rt=Mt.onMouseOver,dt=Mt.onMouseLeave,tt=Mt.onClick,Ke=Mt.onKeyDown,De=Mt.onKeyUp,ze=Mt.panelRef,$e=Ce.useState(!1),We=(0,Se.Z)($e,2),Ve=We[0],pt=We[1],Lt=Ce.useState(!1),on=(0,Se.Z)(Lt,2),Xt=on[0],Rt=on[1];(0,Le.Z)(function(){Rt(!0)},[]);var fn=Xt?_t:!1,En=Ce.useRef(),Sn=Ce.useRef();(0,Le.Z)(function(){fn&&(Sn.current=document.activeElement)},[fn]);var dn=function(Ni){var Qn;if(pt(Ni),lt==null||lt(Ni),!Ni&&Sn.current&&!((Qn=En.current)!==null&&Qn!==void 0&&Qn.contains(Sn.current))){var ki;(ki=Sn.current)===null||ki===void 0||ki.focus({preventScroll:!0})}},Zn=Ce.useMemo(function(){return{panel:ze}},[ze]);if(!tn&&!Ve&&!fn&&Ue)return null;var vn={onMouseEnter:je,onMouseOver:rt,onMouseLeave:dt,onClick:tt,onKeyDown:Ke,onKeyUp:De},Wn=(0,ke.Z)((0,ke.Z)({},Mt),{},{open:fn,prefixCls:Dt,placement:ot,autoFocus:yt,keyboard:xt,width:Ut,mask:jt,maskClosable:Ft,inline:Yt===!1,afterOpenChange:dn,ref:En},vn);return Ce.createElement(be.Provider,{value:Zn},Ce.createElement(Be.Z,{open:fn||tn||Ve,autoDestroy:!1,getContainer:Yt,autoLock:jt&&(fn||Ve)},Ce.createElement(Ze,Wn)))},Je=qe,mt=Je},91574:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return on}});var ke=Re(72308),Se=Re(77321),Be=Re(49618),Le=Re(52487),Ce=Re(62853),xe=Re(74416),be=Re(92310),ye=Re.n(be),we=/margin|padding|width|height|max|min|offset/,pe={left:!0,top:!0},de={cssFloat:1,styleFloat:1,float:1};function ge(Xt){return Xt.nodeType===1?Xt.ownerDocument.defaultView.getComputedStyle(Xt,null):{}}function fe(Xt,Rt,fn){if(Rt=Rt.toLowerCase(),fn==="auto"){if(Rt==="height")return Xt.offsetHeight;if(Rt==="width")return Xt.offsetWidth}return Rt in pe||(pe[Rt]=we.test(Rt)),pe[Rt]?parseFloat(fn)||0:fn}function ue(Xt,Rt){var fn=arguments.length,En=ge(Xt);return Rt=de[Rt]?"cssFloat"in Xt.style?"cssFloat":"styleFloat":Rt,fn===1?En:fe(Xt,Rt,En[Rt]||Xt.style[Rt])}function ee(Xt,Rt,fn){var En=arguments.length;if(Rt=de[Rt]?"cssFloat"in Xt.style?"cssFloat":"styleFloat":Rt,En===3)return typeof fn=="number"&&we.test(Rt)&&(fn="".concat(fn,"px")),Xt.style[Rt]=fn,fn;for(var Sn in Rt)Rt.hasOwnProperty(Sn)&&ee(Xt,Sn,Rt[Sn]);return ge(Xt)}function z(Xt){return Xt===document.body?document.documentElement.clientWidth:Xt.offsetWidth}function oe(Xt){return Xt===document.body?window.innerHeight||document.documentElement.clientHeight:Xt.offsetHeight}function re(){var Xt=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),Rt=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Xt,height:Rt}}function ae(){var Xt=document.documentElement.clientWidth,Rt=window.innerHeight||document.documentElement.clientHeight;return{width:Xt,height:Rt}}function le(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function me(Xt){var Rt=Xt.getBoundingClientRect(),fn=document.documentElement;return{left:Rt.left+(window.pageXOffset||fn.scrollLeft)-(fn.clientLeft||document.body.clientLeft||0),top:Rt.top+(window.pageYOffset||fn.scrollTop)-(fn.clientTop||document.body.clientTop||0)}}var ve=Re(18929),Pe=Re(59301),Ae=Re(55311),Oe=Re(8224),Ie=Re(10228),Ze=Re(43403),qe=Re(77900),Je=Pe.createContext(null),mt=function(Rt){var fn=Rt.visible,En=Rt.maskTransitionName,Sn=Rt.getContainer,dn=Rt.prefixCls,Zn=Rt.rootClassName,vn=Rt.icons,Wn=Rt.countRender,ri=Rt.showSwitch,Ni=Rt.showProgress,Qn=Rt.current,ki=Rt.transform,Hi=Rt.count,Gi=Rt.scale,qi=Rt.minScale,Pr=Rt.maxScale,gr=Rt.closeIcon,Ri=Rt.onActive,Vi=Rt.onClose,sr=Rt.onZoomIn,Qe=Rt.onZoomOut,Ti=Rt.onRotateRight,ei=Rt.onRotateLeft,Ii=Rt.onFlipX,mr=Rt.onFlipY,cr=Rt.onReset,ir=Rt.toolbarRender,po=Rt.zIndex,Vn=Rt.image,He=(0,Pe.useContext)(Je),Xe=vn.rotateLeft,nt=vn.rotateRight,bt=vn.zoomIn,Nt=vn.zoomOut,sn=vn.close,Zt=vn.left,_n=vn.right,Kt=vn.flipX,qt=vn.flipY,Hn="".concat(dn,"-operations-operation");Pe.useEffect(function(){var Bn=function(Ei){Ei.keyCode===Ie.Z.ESC&&Vi()};return fn&&window.addEventListener("keydown",Bn),function(){window.removeEventListener("keydown",Bn)}},[fn]);var kt=function(bi,Ei){bi.preventDefault(),bi.stopPropagation(),Ri(Ei)},ln=Pe.useCallback(function(Bn){var bi=Bn.type,Ei=Bn.disabled,Di=Bn.onClick,yn=Bn.icon;return Pe.createElement("div",{key:bi,className:ye()(Hn,"".concat(dn,"-operations-operation-").concat(bi),(0,Be.Z)({},"".concat(dn,"-operations-operation-disabled"),!!Ei)),onClick:Di},yn)},[Hn,dn]),An=ri?ln({icon:Zt,onClick:function(bi){return kt(bi,-1)},type:"prev",disabled:Qn===0}):void 0,jn=ri?ln({icon:_n,onClick:function(bi){return kt(bi,1)},type:"next",disabled:Qn===Hi-1}):void 0,Qt=ln({icon:qt,onClick:mr,type:"flipY"}),rn=ln({icon:Kt,onClick:Ii,type:"flipX"}),Pn=ln({icon:Xe,onClick:ei,type:"rotateLeft"}),Dn=ln({icon:nt,onClick:Ti,type:"rotateRight"}),oi=ln({icon:Nt,onClick:Qe,type:"zoomOut",disabled:Gi<=qi}),ai=ln({icon:bt,onClick:sr,type:"zoomIn",disabled:Gi===Pr}),Gn=Pe.createElement("div",{className:"".concat(dn,"-operations")},Qt,rn,Pn,Dn,oi,ai);return Pe.createElement(qe.default,{visible:fn,motionName:En},function(Bn){var bi=Bn.className,Ei=Bn.style;return Pe.createElement(Ze.Z,{open:!0,getContainer:Sn!=null?Sn:document.body},Pe.createElement("div",{className:ye()("".concat(dn,"-operations-wrapper"),bi,Zn),style:(0,Se.Z)((0,Se.Z)({},Ei),{},{zIndex:po})},gr===null?null:Pe.createElement("button",{className:"".concat(dn,"-close"),onClick:Vi},gr||sn),ri&&Pe.createElement(Pe.Fragment,null,Pe.createElement("div",{className:ye()("".concat(dn,"-switch-left"),(0,Be.Z)({},"".concat(dn,"-switch-left-disabled"),Qn===0)),onClick:function(yn){return kt(yn,-1)}},Zt),Pe.createElement("div",{className:ye()("".concat(dn,"-switch-right"),(0,Be.Z)({},"".concat(dn,"-switch-right-disabled"),Qn===Hi-1)),onClick:function(yn){return kt(yn,1)}},_n)),Pe.createElement("div",{className:"".concat(dn,"-footer")},Ni&&Pe.createElement("div",{className:"".concat(dn,"-progress")},Wn?Wn(Qn+1,Hi):"".concat(Qn+1," / ").concat(Hi)),ir?ir(Gn,(0,Se.Z)((0,Se.Z)({icons:{prevIcon:An,nextIcon:jn,flipYIcon:Qt,flipXIcon:rn,rotateLeftIcon:Pn,rotateRightIcon:Dn,zoomOutIcon:oi,zoomInIcon:ai},actions:{onActive:Ri,onFlipY:mr,onFlipX:Ii,onRotateLeft:ei,onRotateRight:Ti,onZoomOut:Qe,onZoomIn:sr,onReset:cr,onClose:Vi},transform:ki},He?{current:Qn,total:Hi}:{}),{},{image:Vn})):Gn)))})},gt=mt,Mt=Re(13697),at=Re(16089),_t={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function ht(Xt,Rt,fn,En){var Sn=(0,Pe.useRef)(null),dn=(0,Pe.useRef)([]),Zn=(0,Pe.useState)(_t),vn=(0,Le.Z)(Zn,2),Wn=vn[0],ri=vn[1],Ni=function(Gi){ri(_t),(0,Mt.Z)(_t,Wn)||En==null||En({transform:_t,action:Gi})},Qn=function(Gi,qi){Sn.current===null&&(dn.current=[],Sn.current=(0,at.Z)(function(){ri(function(Pr){var gr=Pr;return dn.current.forEach(function(Ri){gr=(0,Se.Z)((0,Se.Z)({},gr),Ri)}),Sn.current=null,En==null||En({transform:gr,action:qi}),gr})})),dn.current.push((0,Se.Z)((0,Se.Z)({},Wn),Gi))},ki=function(Gi,qi,Pr,gr,Ri){var Vi=Xt.current,sr=Vi.width,Qe=Vi.height,Ti=Vi.offsetWidth,ei=Vi.offsetHeight,Ii=Vi.offsetLeft,mr=Vi.offsetTop,cr=Gi,ir=Wn.scale*Gi;ir>fn?(ir=fn,cr=fn/Wn.scale):ir<Rt&&(ir=Ri?ir:Rt,cr=ir/Wn.scale);var po=Pr!=null?Pr:innerWidth/2,Vn=gr!=null?gr:innerHeight/2,He=cr-1,Xe=He*sr*.5,nt=He*Qe*.5,bt=He*(po-Wn.x-Ii),Nt=He*(Vn-Wn.y-mr),sn=Wn.x-(bt-Xe),Zt=Wn.y-(Nt-nt);if(Gi<1&&ir===1){var _n=Ti*ir,Kt=ei*ir,qt=ae(),Hn=qt.width,kt=qt.height;_n<=Hn&&Kt<=kt&&(sn=0,Zt=0)}Qn({x:sn,y:Zt,scale:ir},qi)};return{transform:Wn,resetTransform:Ni,updateTransform:Qn,dispatchZoomChange:ki}}var Dt=Re(48736);function ut(Xt,Rt,fn,En){var Sn=Rt+fn,dn=(fn-En)/2;if(fn>En){if(Rt>0)return(0,Be.Z)({},Xt,dn);if(Rt<0&&Sn<En)return(0,Be.Z)({},Xt,-dn)}else if(Rt<0||Sn>En)return(0,Be.Z)({},Xt,Rt<0?dn:-dn);return{}}function ot(Xt,Rt,fn,En){var Sn=ae(),dn=Sn.width,Zn=Sn.height,vn=null;return Xt<=dn&&Rt<=Zn?vn={x:0,y:0}:(Xt>dn||Rt>Zn)&&(vn=(0,Se.Z)((0,Se.Z)({},ut("x",fn,Xt,dn)),ut("y",En,Rt,Zn))),vn}var ct=1,yt=1;function wt(Xt,Rt,fn,En,Sn,dn,Zn){var vn=Sn.rotate,Wn=Sn.scale,ri=Sn.x,Ni=Sn.y,Qn=(0,Pe.useState)(!1),ki=(0,Le.Z)(Qn,2),Hi=ki[0],Gi=ki[1],qi=(0,Pe.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),Pr=function(Qe){!Rt||Qe.button!==0||(Qe.preventDefault(),Qe.stopPropagation(),qi.current={diffX:Qe.pageX-ri,diffY:Qe.pageY-Ni,transformX:ri,transformY:Ni},Gi(!0))},gr=function(Qe){fn&&Hi&&dn({x:Qe.pageX-qi.current.diffX,y:Qe.pageY-qi.current.diffY},"move")},Ri=function(){if(fn&&Hi){Gi(!1);var Qe=qi.current,Ti=Qe.transformX,ei=Qe.transformY,Ii=ri!==Ti&&Ni!==ei;if(!Ii)return;var mr=Xt.current.offsetWidth*Wn,cr=Xt.current.offsetHeight*Wn,ir=Xt.current.getBoundingClientRect(),po=ir.left,Vn=ir.top,He=vn%180!==0,Xe=ot(He?cr:mr,He?mr:cr,po,Vn);Xe&&dn((0,Se.Z)({},Xe),"dragRebound")}},Vi=function(Qe){if(!(!fn||Qe.deltaY==0)){var Ti=Math.abs(Qe.deltaY/100),ei=Math.min(Ti,yt),Ii=ct+ei*En;Qe.deltaY>0&&(Ii=ct/Ii),Zn(Ii,"wheel",Qe.clientX,Qe.clientY)}};return(0,Pe.useEffect)(function(){var sr,Qe,Ti,ei;if(Rt){Ti=(0,Oe.Z)(window,"mouseup",Ri,!1),ei=(0,Oe.Z)(window,"mousemove",gr,!1);try{window.top!==window.self&&(sr=(0,Oe.Z)(window.top,"mouseup",Ri,!1),Qe=(0,Oe.Z)(window.top,"mousemove",gr,!1))}catch(Ii){(0,Dt.Kp)(!1,"[rc-image] ".concat(Ii))}}return function(){var Ii,mr,cr,ir;(Ii=Ti)===null||Ii===void 0||Ii.remove(),(mr=ei)===null||mr===void 0||mr.remove(),(cr=sr)===null||cr===void 0||cr.remove(),(ir=Qe)===null||ir===void 0||ir.remove()}},[fn,Hi,ri,Ni,vn,Rt]),{isMoving:Hi,onMouseDown:Pr,onMouseMove:gr,onMouseUp:Ri,onWheel:Vi}}function xt(Xt){return new Promise(function(Rt){if(!Xt){Rt(!1);return}var fn=document.createElement("img");fn.onerror=function(){return Rt(!1)},fn.onload=function(){return Rt(!0)},fn.src=Xt})}function zt(Xt){var Rt=Xt.src,fn=Xt.isCustomPlaceholder,En=Xt.fallback,Sn=(0,Pe.useState)(fn?"loading":"normal"),dn=(0,Le.Z)(Sn,2),Zn=dn[0],vn=dn[1],Wn=(0,Pe.useRef)(!1),ri=Zn==="error";(0,Pe.useEffect)(function(){var Hi=!0;return xt(Rt).then(function(Gi){!Gi&&Hi&&vn("error")}),function(){Hi=!1}},[Rt]),(0,Pe.useEffect)(function(){fn&&!Wn.current?vn("loading"):ri&&vn("normal")},[Rt]);var Ni=function(){vn("normal")},Qn=function(Gi){Wn.current=!1,Zn==="loading"&&Gi!==null&&Gi!==void 0&&Gi.complete&&(Gi.naturalWidth||Gi.naturalHeight)&&(Wn.current=!0,Ni())},ki=ri&&En?{src:En}:{onLoad:Ni,src:Rt};return[Qn,ki,Zn]}function Ut(Xt,Rt){var fn=Xt.x-Rt.x,En=Xt.y-Rt.y;return Math.hypot(fn,En)}function cn(Xt,Rt,fn,En){var Sn=Ut(Xt,fn),dn=Ut(Rt,En);if(Sn===0&&dn===0)return[Xt.x,Xt.y];var Zn=Sn/(Sn+dn),vn=Xt.x+Zn*(Rt.x-Xt.x),Wn=Xt.y+Zn*(Rt.y-Xt.y);return[vn,Wn]}function jt(Xt,Rt,fn,En,Sn,dn,Zn){var vn=Sn.rotate,Wn=Sn.scale,ri=Sn.x,Ni=Sn.y,Qn=(0,Pe.useState)(!1),ki=(0,Le.Z)(Qn,2),Hi=ki[0],Gi=ki[1],qi=(0,Pe.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),Pr=function(Qe){qi.current=(0,Se.Z)((0,Se.Z)({},qi.current),Qe)},gr=function(Qe){if(Rt){Qe.stopPropagation(),Gi(!0);var Ti=Qe.touches,ei=Ti===void 0?[]:Ti;ei.length>1?Pr({point1:{x:ei[0].clientX,y:ei[0].clientY},point2:{x:ei[1].clientX,y:ei[1].clientY},eventType:"touchZoom"}):Pr({point1:{x:ei[0].clientX-ri,y:ei[0].clientY-Ni},eventType:"move"})}},Ri=function(Qe){var Ti=Qe.touches,ei=Ti===void 0?[]:Ti,Ii=qi.current,mr=Ii.point1,cr=Ii.point2,ir=Ii.eventType;if(ei.length>1&&ir==="touchZoom"){var po={x:ei[0].clientX,y:ei[0].clientY},Vn={x:ei[1].clientX,y:ei[1].clientY},He=cn(mr,cr,po,Vn),Xe=(0,Le.Z)(He,2),nt=Xe[0],bt=Xe[1],Nt=Ut(po,Vn)/Ut(mr,cr);Zn(Nt,"touchZoom",nt,bt,!0),Pr({point1:po,point2:Vn,eventType:"touchZoom"})}else ir==="move"&&(dn({x:ei[0].clientX-mr.x,y:ei[0].clientY-mr.y},"move"),Pr({eventType:"move"}))},Vi=function(){if(fn){if(Hi&&Gi(!1),Pr({eventType:"none"}),En>Wn)return dn({x:0,y:0,scale:En},"touchZoom");var Qe=Xt.current.offsetWidth*Wn,Ti=Xt.current.offsetHeight*Wn,ei=Xt.current.getBoundingClientRect(),Ii=ei.left,mr=ei.top,cr=vn%180!==0,ir=ot(cr?Ti:Qe,cr?Qe:Ti,Ii,mr);ir&&dn((0,Se.Z)({},ir),"dragRebound")}};return(0,Pe.useEffect)(function(){var sr;return fn&&Rt&&(sr=(0,Oe.Z)(window,"touchmove",function(Qe){return Qe.preventDefault()},{passive:!1})),function(){var Qe;(Qe=sr)===null||Qe===void 0||Qe.remove()}},[fn,Rt]),{isTouching:Hi,onTouchStart:gr,onTouchMove:Ri,onTouchEnd:Vi}}var mn=["fallback","src","imgRef"],Ft=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],Yt=function(Rt){var fn=Rt.fallback,En=Rt.src,Sn=Rt.imgRef,dn=(0,xe.Z)(Rt,mn),Zn=zt({src:En,fallback:fn}),vn=(0,Le.Z)(Zn,2),Wn=vn[0],ri=vn[1];return Pe.createElement("img",(0,ke.Z)({ref:function(Qn){Sn.current=Qn,Wn(Qn)}},dn,ri))},tn=function(Rt){var fn=Rt.prefixCls,En=Rt.src,Sn=Rt.alt,dn=Rt.imageInfo,Zn=Rt.fallback,vn=Rt.movable,Wn=vn===void 0?!0:vn,ri=Rt.onClose,Ni=Rt.visible,Qn=Rt.icons,ki=Qn===void 0?{}:Qn,Hi=Rt.rootClassName,Gi=Rt.closeIcon,qi=Rt.getContainer,Pr=Rt.current,gr=Pr===void 0?0:Pr,Ri=Rt.count,Vi=Ri===void 0?1:Ri,sr=Rt.countRender,Qe=Rt.scaleStep,Ti=Qe===void 0?.5:Qe,ei=Rt.minScale,Ii=ei===void 0?1:ei,mr=Rt.maxScale,cr=mr===void 0?50:mr,ir=Rt.transitionName,po=ir===void 0?"zoom":ir,Vn=Rt.maskTransitionName,He=Vn===void 0?"fade":Vn,Xe=Rt.imageRender,nt=Rt.imgCommonProps,bt=Rt.toolbarRender,Nt=Rt.onTransform,sn=Rt.onChange,Zt=(0,xe.Z)(Rt,Ft),_n=(0,Pe.useRef)(),Kt=(0,Pe.useContext)(Je),qt=Kt&&Vi>1,Hn=Kt&&Vi>=1,kt=(0,Pe.useState)(!0),ln=(0,Le.Z)(kt,2),An=ln[0],jn=ln[1],Qt=ht(_n,Ii,cr,Nt),rn=Qt.transform,Pn=Qt.resetTransform,Dn=Qt.updateTransform,oi=Qt.dispatchZoomChange,ai=wt(_n,Wn,Ni,Ti,rn,Dn,oi),Gn=ai.isMoving,Bn=ai.onMouseDown,bi=ai.onWheel,Ei=jt(_n,Wn,Ni,Ii,rn,Dn,oi),Di=Ei.isTouching,yn=Ei.onTouchStart,Tr=Ei.onTouchMove,ur=Ei.onTouchEnd,wr=rn.rotate,pn=rn.scale,$n=ye()((0,Be.Z)({},"".concat(fn,"-moving"),Gn));(0,Pe.useEffect)(function(){An||jn(!0)},[An]);var yi=function(){Pn("close")},Mi=function(){oi(ct+Ti,"zoomIn")},mi=function(){oi(ct/(ct+Ti),"zoomOut")},Li=function(){Dn({rotate:wr+90},"rotateRight")},dr=function(){Dn({rotate:wr-90},"rotateLeft")},ar=function(){Dn({flipX:!rn.flipX},"flipX")},vr=function(){Dn({flipY:!rn.flipY},"flipY")},Cr=function(){Pn("reset")},Ln=function(lo){var oo=gr+lo;!Number.isInteger(oo)||oo<0||oo>Vi-1||(jn(!1),Pn(lo<0?"prev":"next"),sn==null||sn(oo,gr))},Yr=function(lo){!Ni||!qt||(lo.keyCode===Ie.Z.LEFT?Ln(-1):lo.keyCode===Ie.Z.RIGHT&&Ln(1))},Mn=function(lo){Ni&&(pn!==1?Dn({x:0,y:0,scale:1},"doubleClick"):oi(ct+Ti,"doubleClick",lo.clientX,lo.clientY))};(0,Pe.useEffect)(function(){var Xi=(0,Oe.Z)(window,"keydown",Yr,!1);return function(){Xi.remove()}},[Ni,qt,gr]);var Ai=Pe.createElement(Yt,(0,ke.Z)({},nt,{width:Rt.width,height:Rt.height,imgRef:_n,className:"".concat(fn,"-img"),alt:Sn,style:{transform:"translate3d(".concat(rn.x,"px, ").concat(rn.y,"px, 0) scale3d(").concat(rn.flipX?"-":"").concat(pn,", ").concat(rn.flipY?"-":"").concat(pn,", 1) rotate(").concat(wr,"deg)"),transitionDuration:(!An||Di)&&"0s"},fallback:Zn,src:En,onWheel:bi,onMouseDown:Bn,onDoubleClick:Mn,onTouchStart:yn,onTouchMove:Tr,onTouchEnd:ur,onTouchCancel:ur})),zi=(0,Se.Z)({url:En,alt:Sn},dn);return Pe.createElement(Pe.Fragment,null,Pe.createElement(Ae.Z,(0,ke.Z)({transitionName:po,maskTransitionName:He,closable:!1,keyboard:!0,prefixCls:fn,onClose:ri,visible:Ni,classNames:{wrapper:$n},rootClassName:Hi,getContainer:qi},Zt,{afterClose:yi}),Pe.createElement("div",{className:"".concat(fn,"-img-wrapper")},Xe?Xe(Ai,(0,Se.Z)({transform:rn,image:zi},Kt?{current:gr}:{})):Ai)),Pe.createElement(gt,{visible:Ni,transform:rn,maskTransitionName:He,closeIcon:Gi,getContainer:qi,prefixCls:fn,rootClassName:Hi,icons:ki,countRender:sr,showSwitch:qt,showProgress:Hn,current:gr,count:Vi,scale:pn,minScale:Ii,maxScale:cr,toolbarRender:bt,onActive:Ln,onZoomIn:Mi,onZoomOut:mi,onRotateRight:Li,onRotateLeft:dr,onFlipX:ar,onFlipY:vr,onClose:ri,onReset:Cr,zIndex:Zt.zIndex!==void 0?Zt.zIndex+1:void 0,image:zi}))},lt=tn,Ue=Re(80702),je=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function rt(Xt){var Rt=Pe.useState({}),fn=(0,Le.Z)(Rt,2),En=fn[0],Sn=fn[1],dn=Pe.useCallback(function(vn,Wn){return Sn(function(ri){return(0,Se.Z)((0,Se.Z)({},ri),{},(0,Be.Z)({},vn,Wn))}),function(){Sn(function(ri){var Ni=(0,Se.Z)({},ri);return delete Ni[vn],Ni})}},[]),Zn=Pe.useMemo(function(){return Xt?Xt.map(function(vn){if(typeof vn=="string")return{data:{src:vn}};var Wn={};return Object.keys(vn).forEach(function(ri){["src"].concat((0,Ue.Z)(je)).includes(ri)&&(Wn[ri]=vn[ri])}),{data:Wn}}):Object.keys(En).reduce(function(vn,Wn){var ri=En[Wn],Ni=ri.canPreview,Qn=ri.data;return Ni&&vn.push({data:Qn,id:Wn}),vn},[])},[Xt,En]);return[Zn,dn,!!Xt]}var dt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],tt=["src"],Ke=function(Rt){var fn,En=Rt.previewPrefixCls,Sn=En===void 0?"rc-image-preview":En,dn=Rt.children,Zn=Rt.icons,vn=Zn===void 0?{}:Zn,Wn=Rt.items,ri=Rt.preview,Ni=Rt.fallback,Qn=(0,Ce.Z)(ri)==="object"?ri:{},ki=Qn.visible,Hi=Qn.onVisibleChange,Gi=Qn.getContainer,qi=Qn.current,Pr=Qn.movable,gr=Qn.minScale,Ri=Qn.maxScale,Vi=Qn.countRender,sr=Qn.closeIcon,Qe=Qn.onChange,Ti=Qn.onTransform,ei=Qn.toolbarRender,Ii=Qn.imageRender,mr=(0,xe.Z)(Qn,dt),cr=rt(Wn),ir=(0,Le.Z)(cr,3),po=ir[0],Vn=ir[1],He=ir[2],Xe=(0,ve.Z)(0,{value:qi}),nt=(0,Le.Z)(Xe,2),bt=nt[0],Nt=nt[1],sn=(0,Pe.useState)(!1),Zt=(0,Le.Z)(sn,2),_n=Zt[0],Kt=Zt[1],qt=((fn=po[bt])===null||fn===void 0?void 0:fn.data)||{},Hn=qt.src,kt=(0,xe.Z)(qt,tt),ln=(0,ve.Z)(!!ki,{value:ki,onChange:function(Di,yn){Hi==null||Hi(Di,yn,bt)}}),An=(0,Le.Z)(ln,2),jn=An[0],Qt=An[1],rn=(0,Pe.useState)(null),Pn=(0,Le.Z)(rn,2),Dn=Pn[0],oi=Pn[1],ai=Pe.useCallback(function(Ei,Di,yn,Tr){var ur=He?po.findIndex(function(wr){return wr.data.src===Di}):po.findIndex(function(wr){return wr.id===Ei});Nt(ur<0?0:ur),Qt(!0),oi({x:yn,y:Tr}),Kt(!0)},[po,He]);Pe.useEffect(function(){jn?_n||Nt(0):Kt(!1)},[jn]);var Gn=function(Di,yn){Nt(Di),Qe==null||Qe(Di,yn)},Bn=function(){Qt(!1),oi(null)},bi=Pe.useMemo(function(){return{register:Vn,onPreview:ai}},[Vn,ai]);return Pe.createElement(Je.Provider,{value:bi},dn,Pe.createElement(lt,(0,ke.Z)({"aria-hidden":!jn,movable:Pr,visible:jn,prefixCls:Sn,closeIcon:sr,onClose:Bn,mousePosition:Dn,imgCommonProps:kt,src:Hn,fallback:Ni,icons:vn,minScale:gr,maxScale:Ri,getContainer:Gi,current:bt,count:po.length,countRender:Vi,onTransform:Ti,toolbarRender:ei,imageRender:Ii,onChange:Gn},mr)))},De=Ke,ze=0;function $e(Xt,Rt){var fn=Pe.useState(function(){return ze+=1,String(ze)}),En=(0,Le.Z)(fn,1),Sn=En[0],dn=Pe.useContext(Je),Zn={data:Rt,canPreview:Xt};return Pe.useEffect(function(){if(dn)return dn.register(Sn,Zn)},[]),Pe.useEffect(function(){dn&&dn.register(Sn,Zn)},[Xt,Rt]),Sn}var We=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Ve=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],pt=function(Rt){var fn=Rt.src,En=Rt.alt,Sn=Rt.onPreviewClose,dn=Rt.prefixCls,Zn=dn===void 0?"rc-image":dn,vn=Rt.previewPrefixCls,Wn=vn===void 0?"".concat(Zn,"-preview"):vn,ri=Rt.placeholder,Ni=Rt.fallback,Qn=Rt.width,ki=Rt.height,Hi=Rt.style,Gi=Rt.preview,qi=Gi===void 0?!0:Gi,Pr=Rt.className,gr=Rt.onClick,Ri=Rt.onError,Vi=Rt.wrapperClassName,sr=Rt.wrapperStyle,Qe=Rt.rootClassName,Ti=(0,xe.Z)(Rt,We),ei=ri&&ri!==!0,Ii=(0,Ce.Z)(qi)==="object"?qi:{},mr=Ii.src,cr=Ii.visible,ir=cr===void 0?void 0:cr,po=Ii.onVisibleChange,Vn=po===void 0?Sn:po,He=Ii.getContainer,Xe=He===void 0?void 0:He,nt=Ii.mask,bt=Ii.maskClassName,Nt=Ii.movable,sn=Ii.icons,Zt=Ii.scaleStep,_n=Ii.minScale,Kt=Ii.maxScale,qt=Ii.imageRender,Hn=Ii.toolbarRender,kt=(0,xe.Z)(Ii,Ve),ln=mr!=null?mr:fn,An=(0,ve.Z)(!!ir,{value:ir,onChange:Vn}),jn=(0,Le.Z)(An,2),Qt=jn[0],rn=jn[1],Pn=zt({src:fn,isCustomPlaceholder:ei,fallback:Ni}),Dn=(0,Le.Z)(Pn,3),oi=Dn[0],ai=Dn[1],Gn=Dn[2],Bn=(0,Pe.useState)(null),bi=(0,Le.Z)(Bn,2),Ei=bi[0],Di=bi[1],yn=(0,Pe.useContext)(Je),Tr=!!qi,ur=function(){rn(!1),Di(null)},wr=ye()(Zn,Vi,Qe,(0,Be.Z)({},"".concat(Zn,"-error"),Gn==="error")),pn=(0,Pe.useMemo)(function(){var mi={};return je.forEach(function(Li){Rt[Li]!==void 0&&(mi[Li]=Rt[Li])}),mi},je.map(function(mi){return Rt[mi]})),$n=(0,Pe.useMemo)(function(){return(0,Se.Z)((0,Se.Z)({},pn),{},{src:ln})},[ln,pn]),yi=$e(Tr,$n),Mi=function(Li){var dr=me(Li.target),ar=dr.left,vr=dr.top;yn?yn.onPreview(yi,ln,ar,vr):(Di({x:ar,y:vr}),rn(!0)),gr==null||gr(Li)};return Pe.createElement(Pe.Fragment,null,Pe.createElement("div",(0,ke.Z)({},Ti,{className:wr,onClick:Tr?Mi:gr,style:(0,Se.Z)({width:Qn,height:ki},sr)}),Pe.createElement("img",(0,ke.Z)({},pn,{className:ye()("".concat(Zn,"-img"),(0,Be.Z)({},"".concat(Zn,"-img-placeholder"),ri===!0),Pr),style:(0,Se.Z)({height:ki},Hi),ref:oi},ai,{width:Qn,height:ki,onError:Ri})),Gn==="loading"&&Pe.createElement("div",{"aria-hidden":"true",className:"".concat(Zn,"-placeholder")},ri),nt&&Tr&&Pe.createElement("div",{className:ye()("".concat(Zn,"-mask"),bt),style:{display:(Hi==null?void 0:Hi.display)==="none"?"none":void 0}},nt)),!yn&&Tr&&Pe.createElement(lt,(0,ke.Z)({"aria-hidden":!Qt,visible:Qt,prefixCls:Wn,onClose:ur,mousePosition:Ei,src:ln,alt:En,imageInfo:{width:Qn,height:ki},fallback:Ni,getContainer:Xe,icons:sn,movable:Nt,scaleStep:Zt,minScale:_n,maxScale:Kt,rootClassName:Qe,imageRender:qt,imgCommonProps:pn,toolbarRender:Hn},kt)))};pt.PreviewGroup=De;var Lt=pt,on=Lt},23425:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return Ae}});var ke=Re(49618),Se=Re(72308),Be=Re(62853),Le=Re(77321),Ce=Re(52487),xe=Re(92310),be=Re.n(xe),ye=Re(18929),we=Re(10228),pe=Re(26112),de=Re(48736),ge=Re(59301),fe=Re(17119),ue=[10,20,50,100],ee=function(Ie){var Ze=Ie.pageSizeOptions,qe=Ze===void 0?ue:Ze,Je=Ie.locale,mt=Ie.changeSize,gt=Ie.pageSize,Mt=Ie.goButton,at=Ie.quickGo,_t=Ie.rootPrefixCls,ht=Ie.disabled,Dt=Ie.buildOptionText,ut=Ie.showSizeChanger,ot=Ie.sizeChangerRender,ct=ge.useState(""),yt=(0,Ce.Z)(ct,2),wt=yt[0],xt=yt[1],zt=function(){return!wt||Number.isNaN(wt)?void 0:Number(wt)},Ut=typeof Dt=="function"?Dt:function(je){return"".concat(je," ").concat(Je.items_per_page)},cn=function(rt){xt(rt.target.value)},jt=function(rt){Mt||wt===""||(xt(""),!(rt.relatedTarget&&(rt.relatedTarget.className.indexOf("".concat(_t,"-item-link"))>=0||rt.relatedTarget.className.indexOf("".concat(_t,"-item"))>=0))&&(at==null||at(zt())))},mn=function(rt){wt!==""&&(rt.keyCode===we.Z.ENTER||rt.type==="click")&&(xt(""),at==null||at(zt()))},Ft=function(){return qe.some(function(rt){return rt.toString()===gt.toString()})?qe:qe.concat([gt]).sort(function(rt,dt){var tt=Number.isNaN(Number(rt))?0:Number(rt),Ke=Number.isNaN(Number(dt))?0:Number(dt);return tt-Ke})},Yt="".concat(_t,"-options");if(!ut&&!at)return null;var tn=null,lt=null,Ue=null;return ut&&ot&&(tn=ot({disabled:ht,size:gt,onSizeChange:function(rt){mt==null||mt(Number(rt))},"aria-label":Je.page_size,className:"".concat(Yt,"-size-changer"),options:Ft().map(function(je){return{label:Ut(je),value:je}})})),at&&(Mt&&(Ue=typeof Mt=="boolean"?ge.createElement("button",{type:"button",onClick:mn,onKeyUp:mn,disabled:ht,className:"".concat(Yt,"-quick-jumper-button")},Je.jump_to_confirm):ge.createElement("span",{onClick:mn,onKeyUp:mn},Mt)),lt=ge.createElement("div",{className:"".concat(Yt,"-quick-jumper")},Je.jump_to,ge.createElement("input",{disabled:ht,type:"text",value:wt,onChange:cn,onKeyUp:mn,onBlur:jt,"aria-label":Je.page}),Je.page,Ue)),ge.createElement("li",{className:Yt},tn,lt)},z=ee,oe=function(Ie){var Ze=Ie.rootPrefixCls,qe=Ie.page,Je=Ie.active,mt=Ie.className,gt=Ie.showTitle,Mt=Ie.onClick,at=Ie.onKeyPress,_t=Ie.itemRender,ht="".concat(Ze,"-item"),Dt=be()(ht,"".concat(ht,"-").concat(qe),(0,ke.Z)((0,ke.Z)({},"".concat(ht,"-active"),Je),"".concat(ht,"-disabled"),!qe),mt),ut=function(){Mt(qe)},ot=function(wt){at(wt,Mt,qe)},ct=_t(qe,"page",ge.createElement("a",{rel:"nofollow"},qe));return ct?ge.createElement("li",{title:gt?String(qe):null,className:Dt,onClick:ut,onKeyDown:ot,tabIndex:0},ct):null},re=oe,ae=function(Ie,Ze,qe){return qe};function le(){}function me(Oe){var Ie=Number(Oe);return typeof Ie=="number"&&!Number.isNaN(Ie)&&isFinite(Ie)&&Math.floor(Ie)===Ie}function ve(Oe,Ie,Ze){var qe=typeof Oe=="undefined"?Ie:Oe;return Math.floor((Ze-1)/qe)+1}var Pe=function(Ie){var Ze=Ie.prefixCls,qe=Ze===void 0?"rc-pagination":Ze,Je=Ie.selectPrefixCls,mt=Je===void 0?"rc-select":Je,gt=Ie.className,Mt=Ie.current,at=Ie.defaultCurrent,_t=at===void 0?1:at,ht=Ie.total,Dt=ht===void 0?0:ht,ut=Ie.pageSize,ot=Ie.defaultPageSize,ct=ot===void 0?10:ot,yt=Ie.onChange,wt=yt===void 0?le:yt,xt=Ie.hideOnSinglePage,zt=Ie.align,Ut=Ie.showPrevNextJumpers,cn=Ut===void 0?!0:Ut,jt=Ie.showQuickJumper,mn=Ie.showLessItems,Ft=Ie.showTitle,Yt=Ft===void 0?!0:Ft,tn=Ie.onShowSizeChange,lt=tn===void 0?le:tn,Ue=Ie.locale,je=Ue===void 0?fe.Z:Ue,rt=Ie.style,dt=Ie.totalBoundaryShowSizeChanger,tt=dt===void 0?50:dt,Ke=Ie.disabled,De=Ie.simple,ze=Ie.showTotal,$e=Ie.showSizeChanger,We=$e===void 0?Dt>tt:$e,Ve=Ie.sizeChangerRender,pt=Ie.pageSizeOptions,Lt=Ie.itemRender,on=Lt===void 0?ae:Lt,Xt=Ie.jumpPrevIcon,Rt=Ie.jumpNextIcon,fn=Ie.prevIcon,En=Ie.nextIcon,Sn=ge.useRef(null),dn=(0,ye.Z)(10,{value:ut,defaultValue:ct}),Zn=(0,Ce.Z)(dn,2),vn=Zn[0],Wn=Zn[1],ri=(0,ye.Z)(1,{value:Mt,defaultValue:_t,postState:function(zi){return Math.max(1,Math.min(zi,ve(void 0,vn,Dt)))}}),Ni=(0,Ce.Z)(ri,2),Qn=Ni[0],ki=Ni[1],Hi=ge.useState(Qn),Gi=(0,Ce.Z)(Hi,2),qi=Gi[0],Pr=Gi[1];(0,ge.useEffect)(function(){Pr(Qn)},[Qn]);var gr=wt!==le,Ri="current"in Ie,Vi=Math.max(1,Qn-(mn?3:5)),sr=Math.min(ve(void 0,vn,Dt),Qn+(mn?3:5));function Qe(Ai,zi){var Xi=Ai||ge.createElement("button",{type:"button","aria-label":zi,className:"".concat(qe,"-item-link")});return typeof Ai=="function"&&(Xi=ge.createElement(Ai,(0,Le.Z)({},Ie))),Xi}function Ti(Ai){var zi=Ai.target.value,Xi=ve(void 0,vn,Dt),lo;return zi===""?lo=zi:Number.isNaN(Number(zi))?lo=qi:zi>=Xi?lo=Xi:lo=Number(zi),lo}function ei(Ai){return me(Ai)&&Ai!==Qn&&me(Dt)&&Dt>0}var Ii=Dt>vn?jt:!1;function mr(Ai){(Ai.keyCode===we.Z.UP||Ai.keyCode===we.Z.DOWN)&&Ai.preventDefault()}function cr(Ai){var zi=Ti(Ai);switch(zi!==qi&&Pr(zi),Ai.keyCode){case we.Z.ENTER:Vn(zi);break;case we.Z.UP:Vn(zi-1);break;case we.Z.DOWN:Vn(zi+1);break;default:break}}function ir(Ai){Vn(Ti(Ai))}function po(Ai){var zi=ve(Ai,vn,Dt),Xi=Qn>zi&&zi!==0?zi:Qn;Wn(Ai),Pr(Xi),lt==null||lt(Qn,Ai),ki(Xi),wt==null||wt(Xi,Ai)}function Vn(Ai){if(ei(Ai)&&!Ke){var zi=ve(void 0,vn,Dt),Xi=Ai;return Ai>zi?Xi=zi:Ai<1&&(Xi=1),Xi!==qi&&Pr(Xi),ki(Xi),wt==null||wt(Xi,vn),Xi}return Qn}var He=Qn>1,Xe=Qn<ve(void 0,vn,Dt);function nt(){He&&Vn(Qn-1)}function bt(){Xe&&Vn(Qn+1)}function Nt(){Vn(Vi)}function sn(){Vn(sr)}function Zt(Ai,zi){if(Ai.key==="Enter"||Ai.charCode===we.Z.ENTER||Ai.keyCode===we.Z.ENTER){for(var Xi=arguments.length,lo=new Array(Xi>2?Xi-2:0),oo=2;oo<Xi;oo++)lo[oo-2]=arguments[oo];zi.apply(void 0,lo)}}function _n(Ai){Zt(Ai,nt)}function Kt(Ai){Zt(Ai,bt)}function qt(Ai){Zt(Ai,Nt)}function Hn(Ai){Zt(Ai,sn)}function kt(Ai){var zi=on(Ai,"prev",Qe(fn,"prev page"));return ge.isValidElement(zi)?ge.cloneElement(zi,{disabled:!He}):zi}function ln(Ai){var zi=on(Ai,"next",Qe(En,"next page"));return ge.isValidElement(zi)?ge.cloneElement(zi,{disabled:!Xe}):zi}function An(Ai){(Ai.type==="click"||Ai.keyCode===we.Z.ENTER)&&Vn(qi)}var jn=null,Qt=(0,pe.Z)(Ie,{aria:!0,data:!0}),rn=ze&&ge.createElement("li",{className:"".concat(qe,"-total-text")},ze(Dt,[Dt===0?0:(Qn-1)*vn+1,Qn*vn>Dt?Dt:Qn*vn])),Pn=null,Dn=ve(void 0,vn,Dt);if(xt&&Dt<=vn)return null;var oi=[],ai={rootPrefixCls:qe,onClick:Vn,onKeyPress:Zt,showTitle:Yt,itemRender:on,page:-1},Gn=Qn-1>0?Qn-1:0,Bn=Qn+1<Dn?Qn+1:Dn,bi=jt&&jt.goButton,Ei=(0,Be.Z)(De)==="object"?De.readOnly:!De,Di=bi,yn=null;De&&(bi&&(typeof bi=="boolean"?Di=ge.createElement("button",{type:"button",onClick:An,onKeyUp:An},je.jump_to_confirm):Di=ge.createElement("span",{onClick:An,onKeyUp:An},bi),Di=ge.createElement("li",{title:Yt?"".concat(je.jump_to).concat(Qn,"/").concat(Dn):null,className:"".concat(qe,"-simple-pager")},Di)),yn=ge.createElement("li",{title:Yt?"".concat(Qn,"/").concat(Dn):null,className:"".concat(qe,"-simple-pager")},Ei?qi:ge.createElement("input",{type:"text","aria-label":je.jump_to,value:qi,disabled:Ke,onKeyDown:mr,onKeyUp:cr,onChange:cr,onBlur:ir,size:3}),ge.createElement("span",{className:"".concat(qe,"-slash")},"/"),Dn));var Tr=mn?1:2;if(Dn<=3+Tr*2){Dn||oi.push(ge.createElement(re,(0,Se.Z)({},ai,{key:"noPager",page:1,className:"".concat(qe,"-item-disabled")})));for(var ur=1;ur<=Dn;ur+=1)oi.push(ge.createElement(re,(0,Se.Z)({},ai,{key:ur,page:ur,active:Qn===ur})))}else{var wr=mn?je.prev_3:je.prev_5,pn=mn?je.next_3:je.next_5,$n=on(Vi,"jump-prev",Qe(Xt,"prev page")),yi=on(sr,"jump-next",Qe(Rt,"next page"));cn&&(jn=$n?ge.createElement("li",{title:Yt?wr:null,key:"prev",onClick:Nt,tabIndex:0,onKeyDown:qt,className:be()("".concat(qe,"-jump-prev"),(0,ke.Z)({},"".concat(qe,"-jump-prev-custom-icon"),!!Xt))},$n):null,Pn=yi?ge.createElement("li",{title:Yt?pn:null,key:"next",onClick:sn,tabIndex:0,onKeyDown:Hn,className:be()("".concat(qe,"-jump-next"),(0,ke.Z)({},"".concat(qe,"-jump-next-custom-icon"),!!Rt))},yi):null);var Mi=Math.max(1,Qn-Tr),mi=Math.min(Qn+Tr,Dn);Qn-1<=Tr&&(mi=1+Tr*2),Dn-Qn<=Tr&&(Mi=Dn-Tr*2);for(var Li=Mi;Li<=mi;Li+=1)oi.push(ge.createElement(re,(0,Se.Z)({},ai,{key:Li,page:Li,active:Qn===Li})));if(Qn-1>=Tr*2&&Qn!==3&&(oi[0]=ge.cloneElement(oi[0],{className:be()("".concat(qe,"-item-after-jump-prev"),oi[0].props.className)}),oi.unshift(jn)),Dn-Qn>=Tr*2&&Qn!==Dn-2){var dr=oi[oi.length-1];oi[oi.length-1]=ge.cloneElement(dr,{className:be()("".concat(qe,"-item-before-jump-next"),dr.props.className)}),oi.push(Pn)}Mi!==1&&oi.unshift(ge.createElement(re,(0,Se.Z)({},ai,{key:1,page:1}))),mi!==Dn&&oi.push(ge.createElement(re,(0,Se.Z)({},ai,{key:Dn,page:Dn})))}var ar=kt(Gn);if(ar){var vr=!He||!Dn;ar=ge.createElement("li",{title:Yt?je.prev_page:null,onClick:nt,tabIndex:vr?null:0,onKeyDown:_n,className:be()("".concat(qe,"-prev"),(0,ke.Z)({},"".concat(qe,"-disabled"),vr)),"aria-disabled":vr},ar)}var Cr=ln(Bn);if(Cr){var Ln,Yr;De?(Ln=!Xe,Yr=He?0:null):(Ln=!Xe||!Dn,Yr=Ln?null:0),Cr=ge.createElement("li",{title:Yt?je.next_page:null,onClick:bt,tabIndex:Yr,onKeyDown:Kt,className:be()("".concat(qe,"-next"),(0,ke.Z)({},"".concat(qe,"-disabled"),Ln)),"aria-disabled":Ln},Cr)}var Mn=be()(qe,gt,(0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)({},"".concat(qe,"-start"),zt==="start"),"".concat(qe,"-center"),zt==="center"),"".concat(qe,"-end"),zt==="end"),"".concat(qe,"-simple"),De),"".concat(qe,"-disabled"),Ke));return ge.createElement("ul",(0,Se.Z)({className:Mn,style:rt,ref:Sn},Qt),rn,ar,De?yn:oi,Cr,ge.createElement(z,{locale:je,rootPrefixCls:qe,disabled:Ke,selectPrefixCls:mt,changeSize:po,pageSize:vn,pageSizeOptions:pt,quickGo:Ii?Vn:null,goButton:Di,showSizeChanger:We,sizeChangerRender:Ve}))},Ae=Pe},69582:function(xn,un,Re){"use strict";Re.d(un,{ZP:function(){return be}});var ke=Re(52487),Se=Re(59301),Be=Re(47273),Le=0,Ce=(0,Be.Z)();function xe(){var ye;return Ce?(ye=Le,Le+=1):ye="TEST_OR_SSR",ye}function be(ye){var we=Se.useState(),pe=(0,ke.Z)(we,2),de=pe[0],ge=pe[1];return Se.useEffect(function(){ge("rc_select_".concat(xe()))},[]),ye||de}},45560:function(xn,un,Re){"use strict";Re.d(un,{Ac:function(){return fn},Xo:function(){return Sn},Wx:function(){return Zn},ZP:function(){return _n},lk:function(){return le}});var ke=Re(72308),Se=Re(80702),Be=Re(49618),Le=Re(77321),Ce=Re(52487),xe=Re(74416),be=Re(62853),ye=Re(18929),we=Re(48736),pe=Re(59301),de=Re(92310),ge=Re.n(de),fe=Re(34280),ue=Re(49658),ee=Re(8654),z=function(qt){var Hn=qt.className,kt=qt.customizeIcon,ln=qt.customizeIconProps,An=qt.children,jn=qt.onMouseDown,Qt=qt.onClick,rn=typeof kt=="function"?kt(ln):kt;return pe.createElement("span",{className:Hn,onMouseDown:function(Dn){Dn.preventDefault(),jn==null||jn(Dn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Qt,"aria-hidden":!0},rn!==void 0?rn:pe.createElement("span",{className:ge()(Hn.split(/\s+/).map(function(Pn){return"".concat(Pn,"-icon")}))},An))},oe=z,re=function(qt,Hn,kt,ln,An){var jn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Qt=arguments.length>6?arguments[6]:void 0,rn=arguments.length>7?arguments[7]:void 0,Pn=pe.useMemo(function(){if((0,be.Z)(ln)==="object")return ln.clearIcon;if(An)return An},[ln,An]),Dn=pe.useMemo(function(){return!!(!jn&&ln&&(kt.length||Qt)&&!(rn==="combobox"&&Qt===""))},[ln,jn,kt.length,Qt,rn]);return{allowClear:Dn,clearIcon:pe.createElement(oe,{className:"".concat(qt,"-clear"),onMouseDown:Hn,customizeIcon:Pn},"\xD7")}},ae=pe.createContext(null);function le(){return pe.useContext(ae)}function me(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,qt=pe.useState(!1),Hn=(0,Ce.Z)(qt,2),kt=Hn[0],ln=Hn[1],An=pe.useRef(null),jn=function(){window.clearTimeout(An.current)};pe.useEffect(function(){return jn},[]);var Qt=function(Pn,Dn){jn(),An.current=window.setTimeout(function(){ln(Pn),Dn&&Dn()},Kt)};return[kt,Qt,jn]}function ve(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,qt=pe.useRef(null),Hn=pe.useRef(null);pe.useEffect(function(){return function(){window.clearTimeout(Hn.current)}},[]);function kt(ln){(ln||qt.current===null)&&(qt.current=ln),window.clearTimeout(Hn.current),Hn.current=window.setTimeout(function(){qt.current=null},Kt)}return[function(){return qt.current},kt]}function Pe(Kt,qt,Hn,kt){var ln=pe.useRef(null);ln.current={open:qt,triggerOpen:Hn,customizedTrigger:kt},pe.useEffect(function(){function An(jn){var Qt;if(!((Qt=ln.current)!==null&&Qt!==void 0&&Qt.customizedTrigger)){var rn=jn.target;rn.shadowRoot&&jn.composed&&(rn=jn.composedPath()[0]||rn),ln.current.open&&Kt().filter(function(Pn){return Pn}).every(function(Pn){return!Pn.contains(rn)&&Pn!==rn})&&ln.current.triggerOpen(!1)}}return window.addEventListener("mousedown",An),function(){return window.removeEventListener("mousedown",An)}},[])}var Ae=Re(10228);function Oe(Kt){return Kt&&![Ae.Z.ESC,Ae.Z.SHIFT,Ae.Z.BACKSPACE,Ae.Z.TAB,Ae.Z.WIN_KEY,Ae.Z.ALT,Ae.Z.META,Ae.Z.WIN_KEY_RIGHT,Ae.Z.CTRL,Ae.Z.SEMICOLON,Ae.Z.EQUALS,Ae.Z.CAPS_LOCK,Ae.Z.CONTEXT_MENU,Ae.Z.F1,Ae.Z.F2,Ae.Z.F3,Ae.Z.F4,Ae.Z.F5,Ae.Z.F6,Ae.Z.F7,Ae.Z.F8,Ae.Z.F9,Ae.Z.F10,Ae.Z.F11,Ae.Z.F12].includes(Kt)}var Ie=Re(26112),Ze=Re(11780),qe=function(qt,Hn){var kt,ln=qt.prefixCls,An=qt.id,jn=qt.inputElement,Qt=qt.disabled,rn=qt.tabIndex,Pn=qt.autoFocus,Dn=qt.autoComplete,oi=qt.editable,ai=qt.activeDescendantId,Gn=qt.value,Bn=qt.maxLength,bi=qt.onKeyDown,Ei=qt.onMouseDown,Di=qt.onChange,yn=qt.onPaste,Tr=qt.onCompositionStart,ur=qt.onCompositionEnd,wr=qt.onBlur,pn=qt.open,$n=qt.attrs,yi=jn||pe.createElement("input",null),Mi=yi,mi=Mi.ref,Li=Mi.props,dr=Li.onKeyDown,ar=Li.onChange,vr=Li.onMouseDown,Cr=Li.onCompositionStart,Ln=Li.onCompositionEnd,Yr=Li.onBlur,Mn=Li.style;return(0,we.Kp)(!("maxLength"in yi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),yi=pe.cloneElement(yi,(0,Le.Z)((0,Le.Z)((0,Le.Z)({type:"search"},Li),{},{id:An,ref:(0,ee.sQ)(Hn,mi),disabled:Qt,tabIndex:rn,autoComplete:Dn||"off",autoFocus:Pn,className:ge()("".concat(ln,"-selection-search-input"),(kt=yi)===null||kt===void 0||(kt=kt.props)===null||kt===void 0?void 0:kt.className),role:"combobox","aria-expanded":pn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(An,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(An,"_list"),"aria-activedescendant":pn?ai:void 0},$n),{},{value:oi?Gn:"",maxLength:Bn,readOnly:!oi,unselectable:oi?null:"on",style:(0,Le.Z)((0,Le.Z)({},Mn),{},{opacity:oi?null:0}),onKeyDown:function(zi){bi(zi),dr&&dr(zi)},onMouseDown:function(zi){Ei(zi),vr&&vr(zi)},onChange:function(zi){Di(zi),ar&&ar(zi)},onCompositionStart:function(zi){Tr(zi),Cr&&Cr(zi)},onCompositionEnd:function(zi){ur(zi),Ln&&Ln(zi)},onPaste:yn,onBlur:function(zi){wr(zi),Yr&&Yr(zi)}})),yi},Je=pe.forwardRef(qe),mt=Je;function gt(Kt){return Array.isArray(Kt)?Kt:Kt!==void 0?[Kt]:[]}var Mt=typeof window!="undefined"&&window.document&&window.document.documentElement,at=Mt;function _t(Kt){return Kt!=null}function ht(Kt){return!Kt&&Kt!==0}function Dt(Kt){return["string","number"].includes((0,be.Z)(Kt))}function ut(Kt){var qt=void 0;return Kt&&(Dt(Kt.title)?qt=Kt.title.toString():Dt(Kt.label)&&(qt=Kt.label.toString())),qt}function ot(Kt,qt){at?pe.useLayoutEffect(Kt,qt):pe.useEffect(Kt,qt)}function ct(Kt){var qt;return(qt=Kt.key)!==null&&qt!==void 0?qt:Kt.value}var yt=function(qt){qt.preventDefault(),qt.stopPropagation()},wt=function(qt){var Hn=qt.id,kt=qt.prefixCls,ln=qt.values,An=qt.open,jn=qt.searchValue,Qt=qt.autoClearSearchValue,rn=qt.inputRef,Pn=qt.placeholder,Dn=qt.disabled,oi=qt.mode,ai=qt.showSearch,Gn=qt.autoFocus,Bn=qt.autoComplete,bi=qt.activeDescendantId,Ei=qt.tabIndex,Di=qt.removeIcon,yn=qt.maxTagCount,Tr=qt.maxTagTextLength,ur=qt.maxTagPlaceholder,wr=ur===void 0?function(vi){return"+ ".concat(vi.length," ...")}:ur,pn=qt.tagRender,$n=qt.onToggleOpen,yi=qt.onRemove,Mi=qt.onInputChange,mi=qt.onInputPaste,Li=qt.onInputKeyDown,dr=qt.onInputMouseDown,ar=qt.onInputCompositionStart,vr=qt.onInputCompositionEnd,Cr=qt.onInputBlur,Ln=pe.useRef(null),Yr=(0,pe.useState)(0),Mn=(0,Ce.Z)(Yr,2),Ai=Mn[0],zi=Mn[1],Xi=(0,pe.useState)(!1),lo=(0,Ce.Z)(Xi,2),oo=lo[0],qr=lo[1],uo="".concat(kt,"-selection"),an=An||oi==="multiple"&&Qt===!1||oi==="tags"?jn:"",kn=oi==="tags"||oi==="multiple"&&Qt===!1||ai&&(An||oo);ot(function(){zi(Ln.current.scrollWidth)},[an]);var hn=function(On,Jn,qn,ti,ii){return pe.createElement("span",{title:ut(On),className:ge()("".concat(uo,"-item"),(0,Be.Z)({},"".concat(uo,"-item-disabled"),qn))},pe.createElement("span",{className:"".concat(uo,"-item-content")},Jn),ti&&pe.createElement(oe,{className:"".concat(uo,"-item-remove"),onMouseDown:yt,onClick:ii,customizeIcon:Di},"\xD7"))},ft=function(On,Jn,qn,ti,ii,Fi){var Si=function(Cn){yt(Cn),$n(!An)};return pe.createElement("span",{onMouseDown:Si},pn({label:Jn,value:On,disabled:qn,closable:ti,onClose:ii,isMaxTag:!!Fi}))},Yn=function(On){var Jn=On.disabled,qn=On.label,ti=On.value,ii=!Dn&&!Jn,Fi=qn;if(typeof Tr=="number"&&(typeof qn=="string"||typeof qn=="number")){var Si=String(Fi);Si.length>Tr&&(Fi="".concat(Si.slice(0,Tr),"..."))}var di=function(pi){pi&&pi.stopPropagation(),yi(On)};return typeof pn=="function"?ft(ti,Fi,Jn,ii,di):hn(On,Fi,Jn,ii,di)},Un=function(On){if(!ln.length)return null;var Jn=typeof wr=="function"?wr(On):wr;return typeof pn=="function"?ft(void 0,Jn,!1,!1,void 0,!0):hn({title:Jn},Jn,!1)},ni=pe.createElement("div",{className:"".concat(uo,"-search"),style:{width:Ai},onFocus:function(){qr(!0)},onBlur:function(){qr(!1)}},pe.createElement(mt,{ref:rn,open:An,prefixCls:kt,id:Hn,inputElement:null,disabled:Dn,autoFocus:Gn,autoComplete:Bn,editable:kn,activeDescendantId:bi,value:an,onKeyDown:Li,onMouseDown:dr,onChange:Mi,onPaste:mi,onCompositionStart:ar,onCompositionEnd:vr,onBlur:Cr,tabIndex:Ei,attrs:(0,Ie.Z)(qt,!0)}),pe.createElement("span",{ref:Ln,className:"".concat(uo,"-search-mirror"),"aria-hidden":!0},an,"\xA0")),li=pe.createElement(Ze.Z,{prefixCls:"".concat(uo,"-overflow"),data:ln,renderItem:Yn,renderRest:Un,suffix:ni,itemKey:ct,maxCount:yn});return pe.createElement("span",{className:"".concat(uo,"-wrap")},li,!ln.length&&!an&&pe.createElement("span",{className:"".concat(uo,"-placeholder")},Pn))},xt=wt,zt=function(qt){var Hn=qt.inputElement,kt=qt.prefixCls,ln=qt.id,An=qt.inputRef,jn=qt.disabled,Qt=qt.autoFocus,rn=qt.autoComplete,Pn=qt.activeDescendantId,Dn=qt.mode,oi=qt.open,ai=qt.values,Gn=qt.placeholder,Bn=qt.tabIndex,bi=qt.showSearch,Ei=qt.searchValue,Di=qt.activeValue,yn=qt.maxLength,Tr=qt.onInputKeyDown,ur=qt.onInputMouseDown,wr=qt.onInputChange,pn=qt.onInputPaste,$n=qt.onInputCompositionStart,yi=qt.onInputCompositionEnd,Mi=qt.onInputBlur,mi=qt.title,Li=pe.useState(!1),dr=(0,Ce.Z)(Li,2),ar=dr[0],vr=dr[1],Cr=Dn==="combobox",Ln=Cr||bi,Yr=ai[0],Mn=Ei||"";Cr&&Di&&!ar&&(Mn=Di),pe.useEffect(function(){Cr&&vr(!1)},[Cr,Di]);var Ai=Dn!=="combobox"&&!oi&&!bi?!1:!!Mn,zi=mi===void 0?ut(Yr):mi,Xi=pe.useMemo(function(){return Yr?null:pe.createElement("span",{className:"".concat(kt,"-selection-placeholder"),style:Ai?{visibility:"hidden"}:void 0},Gn)},[Yr,Ai,Gn,kt]);return pe.createElement("span",{className:"".concat(kt,"-selection-wrap")},pe.createElement("span",{className:"".concat(kt,"-selection-search")},pe.createElement(mt,{ref:An,prefixCls:kt,id:ln,open:oi,inputElement:Hn,disabled:jn,autoFocus:Qt,autoComplete:rn,editable:Ln,activeDescendantId:Pn,value:Mn,onKeyDown:Tr,onMouseDown:ur,onChange:function(oo){vr(!0),wr(oo)},onPaste:pn,onCompositionStart:$n,onCompositionEnd:yi,onBlur:Mi,tabIndex:Bn,attrs:(0,Ie.Z)(qt,!0),maxLength:Cr?yn:void 0})),!Cr&&Yr?pe.createElement("span",{className:"".concat(kt,"-selection-item"),title:zi,style:Ai?{visibility:"hidden"}:void 0},Yr.label):null,Xi)},Ut=zt,cn=function(qt,Hn){var kt=(0,pe.useRef)(null),ln=(0,pe.useRef)(!1),An=qt.prefixCls,jn=qt.open,Qt=qt.mode,rn=qt.showSearch,Pn=qt.tokenWithEnter,Dn=qt.disabled,oi=qt.prefix,ai=qt.autoClearSearchValue,Gn=qt.onSearch,Bn=qt.onSearchSubmit,bi=qt.onToggleOpen,Ei=qt.onInputKeyDown,Di=qt.onInputBlur,yn=qt.domRef;pe.useImperativeHandle(Hn,function(){return{focus:function(zi){kt.current.focus(zi)},blur:function(){kt.current.blur()}}});var Tr=ve(0),ur=(0,Ce.Z)(Tr,2),wr=ur[0],pn=ur[1],$n=function(zi){var Xi=zi.which,lo=kt.current instanceof HTMLTextAreaElement;!lo&&jn&&(Xi===Ae.Z.UP||Xi===Ae.Z.DOWN)&&zi.preventDefault(),Ei&&Ei(zi),Xi===Ae.Z.ENTER&&Qt==="tags"&&!ln.current&&!jn&&(Bn==null||Bn(zi.target.value)),!(lo&&!jn&&~[Ae.Z.UP,Ae.Z.DOWN,Ae.Z.LEFT,Ae.Z.RIGHT].indexOf(Xi))&&Oe(Xi)&&bi(!0)},yi=function(){pn(!0)},Mi=(0,pe.useRef)(null),mi=function(zi){Gn(zi,!0,ln.current)!==!1&&bi(!0)},Li=function(){ln.current=!0},dr=function(zi){ln.current=!1,Qt!=="combobox"&&mi(zi.target.value)},ar=function(zi){var Xi=zi.target.value;if(Pn&&Mi.current&&/[\r\n]/.test(Mi.current)){var lo=Mi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Xi=Xi.replace(lo,Mi.current)}Mi.current=null,mi(Xi)},vr=function(zi){var Xi=zi.clipboardData,lo=Xi==null?void 0:Xi.getData("text");Mi.current=lo||""},Cr=function(zi){var Xi=zi.target;if(Xi!==kt.current){var lo=document.body.style.msTouchAction!==void 0;lo?setTimeout(function(){kt.current.focus()}):kt.current.focus()}},Ln=function(zi){var Xi=wr();zi.target!==kt.current&&!Xi&&!(Qt==="combobox"&&Dn)&&zi.preventDefault(),(Qt!=="combobox"&&(!rn||!Xi)||!jn)&&(jn&&ai!==!1&&Gn("",!0,!1),bi())},Yr={inputRef:kt,onInputKeyDown:$n,onInputMouseDown:yi,onInputChange:ar,onInputPaste:vr,onInputCompositionStart:Li,onInputCompositionEnd:dr,onInputBlur:Di},Mn=Qt==="multiple"||Qt==="tags"?pe.createElement(xt,(0,ke.Z)({},qt,Yr)):pe.createElement(Ut,(0,ke.Z)({},qt,Yr));return pe.createElement("div",{ref:yn,className:"".concat(An,"-selector"),onClick:Cr,onMouseDown:Ln},oi&&pe.createElement("div",{className:"".concat(An,"-prefix")},oi),Mn)},jt=pe.forwardRef(cn),mn=jt,Ft=Re(65352),Yt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],tn=function(qt){var Hn=qt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Hn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Hn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Hn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Hn,adjustY:1},htmlRegion:"scroll"}}},lt=function(qt,Hn){var kt=qt.prefixCls,ln=qt.disabled,An=qt.visible,jn=qt.children,Qt=qt.popupElement,rn=qt.animation,Pn=qt.transitionName,Dn=qt.dropdownStyle,oi=qt.dropdownClassName,ai=qt.direction,Gn=ai===void 0?"ltr":ai,Bn=qt.placement,bi=qt.builtinPlacements,Ei=qt.dropdownMatchSelectWidth,Di=qt.dropdownRender,yn=qt.dropdownAlign,Tr=qt.getPopupContainer,ur=qt.empty,wr=qt.getTriggerDOMNode,pn=qt.onPopupVisibleChange,$n=qt.onPopupMouseEnter,yi=(0,xe.Z)(qt,Yt),Mi="".concat(kt,"-dropdown"),mi=Qt;Di&&(mi=Di(Qt));var Li=pe.useMemo(function(){return bi||tn(Ei)},[bi,Ei]),dr=rn?"".concat(Mi,"-").concat(rn):Pn,ar=typeof Ei=="number",vr=pe.useMemo(function(){return ar?null:Ei===!1?"minWidth":"width"},[Ei,ar]),Cr=Dn;ar&&(Cr=(0,Le.Z)((0,Le.Z)({},Cr),{},{width:Ei}));var Ln=pe.useRef(null);return pe.useImperativeHandle(Hn,function(){return{getPopupElement:function(){var Mn;return(Mn=Ln.current)===null||Mn===void 0?void 0:Mn.popupElement}}}),pe.createElement(Ft.Z,(0,ke.Z)({},yi,{showAction:pn?["click"]:[],hideAction:pn?["click"]:[],popupPlacement:Bn||(Gn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Li,prefixCls:Mi,popupTransitionName:dr,popup:pe.createElement("div",{onMouseEnter:$n},mi),ref:Ln,stretch:vr,popupAlign:yn,popupVisible:An,getPopupContainer:Tr,popupClassName:ge()(oi,(0,Be.Z)({},"".concat(Mi,"-empty"),ur)),popupStyle:Cr,getTriggerDOMNode:wr,onPopupVisibleChange:pn}),jn)},Ue=pe.forwardRef(lt),je=Ue,rt=Re(68413);function dt(Kt,qt){var Hn=Kt.key,kt;return"value"in Kt&&(kt=Kt.value),Hn!=null?Hn:kt!==void 0?kt:"rc-index-key-".concat(qt)}function tt(Kt){return typeof Kt!="undefined"&&!Number.isNaN(Kt)}function Ke(Kt,qt){var Hn=Kt||{},kt=Hn.label,ln=Hn.value,An=Hn.options,jn=Hn.groupLabel,Qt=kt||(qt?"children":"label");return{label:Qt,value:ln||"value",options:An||"options",groupLabel:jn||Qt}}function De(Kt){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Hn=qt.fieldNames,kt=qt.childrenAsData,ln=[],An=Ke(Hn,!1),jn=An.label,Qt=An.value,rn=An.options,Pn=An.groupLabel;function Dn(oi,ai){Array.isArray(oi)&&oi.forEach(function(Gn){if(ai||!(rn in Gn)){var Bn=Gn[Qt];ln.push({key:dt(Gn,ln.length),groupOption:ai,data:Gn,label:Gn[jn],value:Bn})}else{var bi=Gn[Pn];bi===void 0&&kt&&(bi=Gn.label),ln.push({key:dt(Gn,ln.length),group:!0,data:Gn,label:bi}),Dn(Gn[rn],!0)}})}return Dn(Kt,!1),ln}function ze(Kt){var qt=(0,Le.Z)({},Kt);return"props"in qt||Object.defineProperty(qt,"props",{get:function(){return(0,we.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),qt}}),qt}var $e=function(qt,Hn,kt){if(!Hn||!Hn.length)return null;var ln=!1,An=function Qt(rn,Pn){var Dn=(0,rt.Z)(Pn),oi=Dn[0],ai=Dn.slice(1);if(!oi)return[rn];var Gn=rn.split(oi);return ln=ln||Gn.length>1,Gn.reduce(function(Bn,bi){return[].concat((0,Se.Z)(Bn),(0,Se.Z)(Qt(bi,ai)))},[]).filter(Boolean)},jn=An(qt,Hn);return ln?typeof kt!="undefined"?jn.slice(0,kt):jn:null},We=pe.createContext(null),Ve=We;function pt(Kt){var qt=Kt.visible,Hn=Kt.values;if(!qt)return null;var kt=50;return pe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Hn.slice(0,kt).map(function(ln){var An=ln.label,jn=ln.value;return["number","string"].includes((0,be.Z)(An))?An:jn}).join(", ")),Hn.length>kt?", ...":null)}var Lt=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],on=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Xt=function(qt){return qt==="tags"||qt==="multiple"},Rt=pe.forwardRef(function(Kt,qt){var Hn,kt=Kt.id,ln=Kt.prefixCls,An=Kt.className,jn=Kt.showSearch,Qt=Kt.tagRender,rn=Kt.direction,Pn=Kt.omitDomProps,Dn=Kt.displayValues,oi=Kt.onDisplayValuesChange,ai=Kt.emptyOptions,Gn=Kt.notFoundContent,Bn=Gn===void 0?"Not Found":Gn,bi=Kt.onClear,Ei=Kt.mode,Di=Kt.disabled,yn=Kt.loading,Tr=Kt.getInputElement,ur=Kt.getRawInputElement,wr=Kt.open,pn=Kt.defaultOpen,$n=Kt.onDropdownVisibleChange,yi=Kt.activeValue,Mi=Kt.onActiveValueChange,mi=Kt.activeDescendantId,Li=Kt.searchValue,dr=Kt.autoClearSearchValue,ar=Kt.onSearch,vr=Kt.onSearchSplit,Cr=Kt.tokenSeparators,Ln=Kt.allowClear,Yr=Kt.prefix,Mn=Kt.suffixIcon,Ai=Kt.clearIcon,zi=Kt.OptionList,Xi=Kt.animation,lo=Kt.transitionName,oo=Kt.dropdownStyle,qr=Kt.dropdownClassName,uo=Kt.dropdownMatchSelectWidth,an=Kt.dropdownRender,kn=Kt.dropdownAlign,hn=Kt.placement,ft=Kt.builtinPlacements,Yn=Kt.getPopupContainer,Un=Kt.showAction,ni=Un===void 0?[]:Un,li=Kt.onFocus,vi=Kt.onBlur,On=Kt.onKeyUp,Jn=Kt.onKeyDown,qn=Kt.onMouseDown,ti=(0,xe.Z)(Kt,Lt),ii=Xt(Ei),Fi=(jn!==void 0?jn:ii)||Ei==="combobox",Si=(0,Le.Z)({},ti);on.forEach(function(zo){delete Si[zo]}),Pn==null||Pn.forEach(function(zo){delete Si[zo]});var di=pe.useState(!1),Cn=(0,Ce.Z)(di,2),pi=Cn[0],Ui=Cn[1];pe.useEffect(function(){Ui((0,ue.Z)())},[]);var xr=pe.useRef(null),pr=pe.useRef(null),Er=pe.useRef(null),Ar=pe.useRef(null),Lr=pe.useRef(null),co=pe.useRef(!1),so=me(),es=(0,Ce.Z)(so,3),nn=es[0],Fr=es[1],Vr=es[2];pe.useImperativeHandle(qt,function(){var zo,io;return{focus:(zo=Ar.current)===null||zo===void 0?void 0:zo.focus,blur:(io=Ar.current)===null||io===void 0?void 0:io.blur,scrollTo:function(Us){var Ls;return(Ls=Lr.current)===null||Ls===void 0?void 0:Ls.scrollTo(Us)},nativeElement:xr.current||pr.current}});var rr=pe.useMemo(function(){var zo;if(Ei!=="combobox")return Li;var io=(zo=Dn[0])===null||zo===void 0?void 0:zo.value;return typeof io=="string"||typeof io=="number"?String(io):""},[Li,Ei,Dn]),Mr=Ei==="combobox"&&typeof Tr=="function"&&Tr()||null,tr=typeof ur=="function"&&ur(),Oo=(0,ee.x1)(pr,tr==null||(Hn=tr.props)===null||Hn===void 0?void 0:Hn.ref),fo=pe.useState(!1),Br=(0,Ce.Z)(fo,2),Qr=Br[0],$s=Br[1];(0,fe.Z)(function(){$s(!0)},[]);var us=(0,ye.Z)(!1,{defaultValue:pn,value:wr}),ha=(0,Ce.Z)(us,2),ea=ha[0],Qi=ha[1],To=Qr?ea:!1,as=!Bn&&ai;(Di||as&&To&&Ei==="combobox")&&(To=!1);var Os=as?!1:To,Hr=pe.useCallback(function(zo){var io=zo!==void 0?zo:!To;Di||(Qi(io),To!==io&&($n==null||$n(io)))},[Di,To,Qi,$n]),zr=pe.useMemo(function(){return(Cr||[]).some(function(zo){return[`
|
|
|
`,`\r
|
|
|
`].includes(zo)})},[Cr]),zn=pe.useContext(Ve)||{},or=zn.maxCount,Gr=zn.rawValues,Zo=function(io,yo,Us){if(!(ii&&tt(or)&&(Gr==null?void 0:Gr.size)>=or)){var Ls=!0,Ns=io;Mi==null||Mi(null);var ji=$e(io,Cr,tt(or)?or-Gr.size:void 0),Za=Us?null:ji;return Ei!=="combobox"&&Za&&(Ns="",vr==null||vr(Za),Hr(!1),Ls=!1),ar&&rr!==Ns&&ar(Ns,{source:yo?"typing":"effect"}),Ls}},aa=function(io){!io||!io.trim()||ar(io,{source:"submit"})};pe.useEffect(function(){!To&&!ii&&Ei!=="combobox"&&Zo("",!1,!1)},[To]),pe.useEffect(function(){ea&&Di&&Qi(!1),Di&&!co.current&&Fr(!1)},[Di]);var Vs=ve(),_r=(0,Ce.Z)(Vs,2),Es=_r[0],xs=_r[1],fs=pe.useRef(!1),jo=function(io){var yo=Es(),Us=io.key,Ls=Us==="Enter";if(Ls&&(Ei!=="combobox"&&io.preventDefault(),To||Hr(!0)),xs(!!rr),Us==="Backspace"&&!yo&&ii&&!rr&&Dn.length){for(var Ns=(0,Se.Z)(Dn),ji=null,Za=Ns.length-1;Za>=0;Za-=1){var Wt=Ns[Za];if(!Wt.disabled){Ns.splice(Za,1),ji=Wt;break}}ji&&oi(Ns,{type:"remove",values:[ji]})}for(var Rn=arguments.length,Gl=new Array(Rn>1?Rn-1:0),Hu=1;Hu<Rn;Hu++)Gl[Hu-1]=arguments[Hu];if(To&&(!Ls||!fs.current)){var Hs;Ls&&(fs.current=!0),(Hs=Lr.current)===null||Hs===void 0||Hs.onKeyDown.apply(Hs,[io].concat(Gl))}Jn==null||Jn.apply(void 0,[io].concat(Gl))},ta=function(io){for(var yo=arguments.length,Us=new Array(yo>1?yo-1:0),Ls=1;Ls<yo;Ls++)Us[Ls-1]=arguments[Ls];if(To){var Ns;(Ns=Lr.current)===null||Ns===void 0||Ns.onKeyUp.apply(Ns,[io].concat(Us))}io.key==="Enter"&&(fs.current=!1),On==null||On.apply(void 0,[io].concat(Us))},Pa=function(io){var yo=Dn.filter(function(Us){return Us!==io});oi(yo,{type:"remove",values:[io]})},Xo=function(){fs.current=!1},Sa=pe.useRef(!1),Wa=function(){Fr(!0),Di||(li&&!Sa.current&&li.apply(void 0,arguments),ni.includes("focus")&&Hr(!0)),Sa.current=!0},xu=function(){co.current=!0,Fr(!1,function(){Sa.current=!1,co.current=!1,Hr(!1)}),!Di&&(rr&&(Ei==="tags"?ar(rr,{source:"submit"}):Ei==="multiple"&&ar("",{source:"blur"})),vi&&vi.apply(void 0,arguments))},hs=[];pe.useEffect(function(){return function(){hs.forEach(function(zo){return clearTimeout(zo)}),hs.splice(0,hs.length)}},[]);var tl=function(io){var yo,Us=io.target,Ls=(yo=Er.current)===null||yo===void 0?void 0:yo.getPopupElement();if(Ls&&Ls.contains(Us)){var Ns=setTimeout(function(){var Rn=hs.indexOf(Ns);if(Rn!==-1&&hs.splice(Rn,1),Vr(),!pi&&!Ls.contains(document.activeElement)){var Gl;(Gl=Ar.current)===null||Gl===void 0||Gl.focus()}});hs.push(Ns)}for(var ji=arguments.length,Za=new Array(ji>1?ji-1:0),Wt=1;Wt<ji;Wt++)Za[Wt-1]=arguments[Wt];qn==null||qn.apply(void 0,[io].concat(Za))},zu=pe.useState({}),wu=(0,Ce.Z)(zu,2),Tl=wu[1];function nl(){Tl({})}var ru;tr&&(ru=function(io){Hr(io)}),Pe(function(){var zo;return[xr.current,(zo=Er.current)===null||zo===void 0?void 0:zo.getPopupElement()]},Os,Hr,!!tr);var eh=pe.useMemo(function(){return(0,Le.Z)((0,Le.Z)({},Kt),{},{notFoundContent:Bn,open:To,triggerOpen:Os,id:kt,showSearch:Fi,multiple:ii,toggleOpen:Hr})},[Kt,Bn,Os,To,kt,Fi,ii,Hr]),Hl=!!Mn||yn,Ts;Hl&&(Ts=pe.createElement(oe,{className:ge()("".concat(ln,"-arrow"),(0,Be.Z)({},"".concat(ln,"-arrow-loading"),yn)),customizeIcon:Mn,customizeIconProps:{loading:yn,searchValue:rr,open:To,focused:nn,showSearch:Fi}}));var Uu=function(){var io;bi==null||bi(),(io=Ar.current)===null||io===void 0||io.focus(),oi([],{type:"clear",values:Dn}),Zo("",!1,!1)},th=re(ln,Uu,Dn,Ln,Ai,Di,rr,Ei),_u=th.allowClear,ou=th.clearIcon,ga=pe.createElement(zi,{ref:Lr}),ma=ge()(ln,An,(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(ln,"-focused"),nn),"".concat(ln,"-multiple"),ii),"".concat(ln,"-single"),!ii),"".concat(ln,"-allow-clear"),Ln),"".concat(ln,"-show-arrow"),Hl),"".concat(ln,"-disabled"),Di),"".concat(ln,"-loading"),yn),"".concat(ln,"-open"),To),"".concat(ln,"-customize-input"),Mr),"".concat(ln,"-show-search"),Fi)),As=pe.createElement(je,{ref:Er,disabled:Di,prefixCls:ln,visible:Os,popupElement:ga,animation:Xi,transitionName:lo,dropdownStyle:oo,dropdownClassName:qr,direction:rn,dropdownMatchSelectWidth:uo,dropdownRender:an,dropdownAlign:kn,placement:hn,builtinPlacements:ft,getPopupContainer:Yn,empty:ai,getTriggerDOMNode:function(io){return pr.current||io},onPopupVisibleChange:ru,onPopupMouseEnter:nl},tr?pe.cloneElement(tr,{ref:Oo}):pe.createElement(mn,(0,ke.Z)({},Kt,{domRef:pr,prefixCls:ln,inputElement:Mr,ref:Ar,id:kt,prefix:Yr,showSearch:Fi,autoClearSearchValue:dr,mode:Ei,activeDescendantId:mi,tagRender:Qt,values:Dn,open:To,onToggleOpen:Hr,activeValue:yi,searchValue:rr,onSearch:Zo,onSearchSubmit:aa,onRemove:Pa,tokenWithEnter:zr,onInputBlur:Xo}))),zs;return tr?zs=As:zs=pe.createElement("div",(0,ke.Z)({className:ma},Si,{ref:xr,onMouseDown:tl,onKeyDown:jo,onKeyUp:ta,onFocus:Wa,onBlur:xu}),pe.createElement(pt,{visible:nn&&!To,values:Dn}),As,Ts,_u&&ou),pe.createElement(ae.Provider,{value:eh},zs)}),fn=Rt,En=function(){return null};En.isSelectOptGroup=!0;var Sn=En,dn=function(){return null};dn.isSelectOption=!0;var Zn=dn,vn=Re(80547),Wn=Re(2738),ri=Re(45680);function Ni(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Qn=["disabled","title","children","style","className"];function ki(Kt){return typeof Kt=="string"||typeof Kt=="number"}var Hi=function(qt,Hn){var kt=le(),ln=kt.prefixCls,An=kt.id,jn=kt.open,Qt=kt.multiple,rn=kt.mode,Pn=kt.searchValue,Dn=kt.toggleOpen,oi=kt.notFoundContent,ai=kt.onPopupScroll,Gn=pe.useContext(Ve),Bn=Gn.maxCount,bi=Gn.flattenOptions,Ei=Gn.onActiveValue,Di=Gn.defaultActiveFirstOption,yn=Gn.onSelect,Tr=Gn.menuItemSelectedIcon,ur=Gn.rawValues,wr=Gn.fieldNames,pn=Gn.virtual,$n=Gn.direction,yi=Gn.listHeight,Mi=Gn.listItemHeight,mi=Gn.optionRender,Li="".concat(ln,"-item"),dr=(0,vn.Z)(function(){return bi},[jn,bi],function(Un,ni){return ni[0]&&Un[1]!==ni[1]}),ar=pe.useRef(null),vr=pe.useMemo(function(){return Qt&&tt(Bn)&&(ur==null?void 0:ur.size)>=Bn},[Qt,Bn,ur==null?void 0:ur.size]),Cr=function(ni){ni.preventDefault()},Ln=function(ni){var li;(li=ar.current)===null||li===void 0||li.scrollTo(typeof ni=="number"?{index:ni}:ni)},Yr=pe.useCallback(function(Un){return rn==="combobox"?!1:ur.has(Un)},[rn,(0,Se.Z)(ur).toString(),ur.size]),Mn=function(ni){for(var li=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,vi=dr.length,On=0;On<vi;On+=1){var Jn=(ni+On*li+vi)%vi,qn=dr[Jn]||{},ti=qn.group,ii=qn.data;if(!ti&&!(ii!=null&&ii.disabled)&&(Yr(ii.value)||!vr))return Jn}return-1},Ai=pe.useState(function(){return Mn(0)}),zi=(0,Ce.Z)(Ai,2),Xi=zi[0],lo=zi[1],oo=function(ni){var li=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;lo(ni);var vi={source:li?"keyboard":"mouse"},On=dr[ni];if(!On){Ei(null,-1,vi);return}Ei(On.value,ni,vi)};(0,pe.useEffect)(function(){oo(Di!==!1?Mn(0):-1)},[dr.length,Pn]);var qr=pe.useCallback(function(Un){return rn==="combobox"?String(Un).toLowerCase()===Pn.toLowerCase():ur.has(Un)},[rn,Pn,(0,Se.Z)(ur).toString(),ur.size]);(0,pe.useEffect)(function(){var Un=setTimeout(function(){if(!Qt&&jn&&ur.size===1){var li=Array.from(ur)[0],vi=dr.findIndex(function(On){var Jn=On.data;return Jn.value===li});vi!==-1&&(oo(vi),Ln(vi))}});if(jn){var ni;(ni=ar.current)===null||ni===void 0||ni.scrollTo(void 0)}return function(){return clearTimeout(Un)}},[jn,Pn]);var uo=function(ni){ni!==void 0&&yn(ni,{selected:!ur.has(ni)}),Qt||Dn(!1)};if(pe.useImperativeHandle(Hn,function(){return{onKeyDown:function(ni){var li=ni.which,vi=ni.ctrlKey;switch(li){case Ae.Z.N:case Ae.Z.P:case Ae.Z.UP:case Ae.Z.DOWN:{var On=0;if(li===Ae.Z.UP?On=-1:li===Ae.Z.DOWN?On=1:Ni()&&vi&&(li===Ae.Z.N?On=1:li===Ae.Z.P&&(On=-1)),On!==0){var Jn=Mn(Xi+On,On);Ln(Jn),oo(Jn,!0)}break}case Ae.Z.TAB:case Ae.Z.ENTER:{var qn,ti=dr[Xi];ti&&!(ti!=null&&(qn=ti.data)!==null&&qn!==void 0&&qn.disabled)&&!vr?uo(ti.value):uo(void 0),jn&&ni.preventDefault();break}case Ae.Z.ESC:Dn(!1),jn&&ni.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ni){Ln(ni)}}}),dr.length===0)return pe.createElement("div",{role:"listbox",id:"".concat(An,"_list"),className:"".concat(Li,"-empty"),onMouseDown:Cr},oi);var an=Object.keys(wr).map(function(Un){return wr[Un]}),kn=function(ni){return ni.label};function hn(Un,ni){var li=Un.group;return{role:li?"presentation":"option",id:"".concat(An,"_list_").concat(ni)}}var ft=function(ni){var li=dr[ni];if(!li)return null;var vi=li.data||{},On=vi.value,Jn=li.group,qn=(0,Ie.Z)(vi,!0),ti=kn(li);return li?pe.createElement("div",(0,ke.Z)({"aria-label":typeof ti=="string"&&!Jn?ti:null},qn,{key:ni},hn(li,ni),{"aria-selected":qr(On)}),On):null},Yn={role:"listbox",id:"".concat(An,"_list")};return pe.createElement(pe.Fragment,null,pn&&pe.createElement("div",(0,ke.Z)({},Yn,{style:{height:0,width:0,overflow:"hidden"}}),ft(Xi-1),ft(Xi),ft(Xi+1)),pe.createElement(ri.Z,{itemKey:"key",ref:ar,data:dr,height:yi,itemHeight:Mi,fullHeight:!1,onMouseDown:Cr,onScroll:ai,virtual:pn,direction:$n,innerProps:pn?null:Yn},function(Un,ni){var li=Un.group,vi=Un.groupOption,On=Un.data,Jn=Un.label,qn=Un.value,ti=On.key;if(li){var ii,Fi=(ii=On.title)!==null&&ii!==void 0?ii:ki(Jn)?Jn.toString():void 0;return pe.createElement("div",{className:ge()(Li,"".concat(Li,"-group"),On.className),title:Fi},Jn!==void 0?Jn:ti)}var Si=On.disabled,di=On.title,Cn=On.children,pi=On.style,Ui=On.className,xr=(0,xe.Z)(On,Qn),pr=(0,Wn.Z)(xr,an),Er=Yr(qn),Ar=Si||!Er&&vr,Lr="".concat(Li,"-option"),co=ge()(Li,Lr,Ui,(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)({},"".concat(Lr,"-grouped"),vi),"".concat(Lr,"-active"),Xi===ni&&!Ar),"".concat(Lr,"-disabled"),Ar),"".concat(Lr,"-selected"),Er)),so=kn(Un),es=!Tr||typeof Tr=="function"||Er,nn=typeof so=="number"?so:so||qn,Fr=ki(nn)?nn.toString():void 0;return di!==void 0&&(Fr=di),pe.createElement("div",(0,ke.Z)({},(0,Ie.Z)(pr),pn?{}:hn(Un,ni),{"aria-selected":qr(qn),className:co,title:Fr,onMouseMove:function(){Xi===ni||Ar||oo(ni)},onClick:function(){Ar||uo(qn)},style:pi}),pe.createElement("div",{className:"".concat(Lr,"-content")},typeof mi=="function"?mi(Un,{index:ni}):nn),pe.isValidElement(Tr)||Er,es&&pe.createElement(oe,{className:"".concat(Li,"-option-state"),customizeIcon:Tr,customizeIconProps:{value:qn,disabled:Ar,isSelected:Er}},Er?"\u2713":null))}))},Gi=pe.forwardRef(Hi),qi=Gi,Pr=function(Kt,qt){var Hn=pe.useRef({values:new Map,options:new Map}),kt=pe.useMemo(function(){var An=Hn.current,jn=An.values,Qt=An.options,rn=Kt.map(function(oi){if(oi.label===void 0){var ai;return(0,Le.Z)((0,Le.Z)({},oi),{},{label:(ai=jn.get(oi.value))===null||ai===void 0?void 0:ai.label})}return oi}),Pn=new Map,Dn=new Map;return rn.forEach(function(oi){Pn.set(oi.value,oi),Dn.set(oi.value,qt.get(oi.value)||Qt.get(oi.value))}),Hn.current.values=Pn,Hn.current.options=Dn,rn},[Kt,qt]),ln=pe.useCallback(function(An){return qt.get(An)||Hn.current.options.get(An)},[qt]);return[kt,ln]};function gr(Kt,qt){return gt(Kt).join("").toUpperCase().includes(qt)}var Ri=function(Kt,qt,Hn,kt,ln){return pe.useMemo(function(){if(!Hn||kt===!1)return Kt;var An=qt.options,jn=qt.label,Qt=qt.value,rn=[],Pn=typeof kt=="function",Dn=Hn.toUpperCase(),oi=Pn?kt:function(Gn,Bn){return ln?gr(Bn[ln],Dn):Bn[An]?gr(Bn[jn!=="children"?jn:"label"],Dn):gr(Bn[Qt],Dn)},ai=Pn?function(Gn){return ze(Gn)}:function(Gn){return Gn};return Kt.forEach(function(Gn){if(Gn[An]){var Bn=oi(Hn,ai(Gn));if(Bn)rn.push(Gn);else{var bi=Gn[An].filter(function(Ei){return oi(Hn,ai(Ei))});bi.length&&rn.push((0,Le.Z)((0,Le.Z)({},Gn),{},(0,Be.Z)({},An,bi)))}return}oi(Hn,ai(Gn))&&rn.push(Gn)}),rn},[Kt,kt,ln,Hn,qt])},Vi=Re(69582),sr=Re(11592),Qe=["children","value"],Ti=["children"];function ei(Kt){var qt=Kt,Hn=qt.key,kt=qt.props,ln=kt.children,An=kt.value,jn=(0,xe.Z)(kt,Qe);return(0,Le.Z)({key:Hn,value:An!==void 0?An:Hn,children:ln},jn)}function Ii(Kt){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,sr.Z)(Kt).map(function(Hn,kt){if(!pe.isValidElement(Hn)||!Hn.type)return null;var ln=Hn,An=ln.type.isSelectOptGroup,jn=ln.key,Qt=ln.props,rn=Qt.children,Pn=(0,xe.Z)(Qt,Ti);return qt||!An?ei(Hn):(0,Le.Z)((0,Le.Z)({key:"__RC_SELECT_GRP__".concat(jn===null?kt:jn,"__"),label:jn},Pn),{},{options:Ii(rn)})}).filter(function(Hn){return Hn})}var mr=function(qt,Hn,kt,ln,An){return pe.useMemo(function(){var jn=qt,Qt=!qt;Qt&&(jn=Ii(Hn));var rn=new Map,Pn=new Map,Dn=function(Gn,Bn,bi){bi&&typeof bi=="string"&&Gn.set(Bn[bi],Bn)},oi=function ai(Gn){for(var Bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,bi=0;bi<Gn.length;bi+=1){var Ei=Gn[bi];!Ei[kt.options]||Bn?(rn.set(Ei[kt.value],Ei),Dn(Pn,Ei,kt.label),Dn(Pn,Ei,ln),Dn(Pn,Ei,An)):ai(Ei[kt.options],!0)}};return oi(jn),{options:jn,valueOptions:rn,labelOptions:Pn}},[qt,Hn,kt,ln,An])},cr=mr;function ir(Kt){var qt=pe.useRef();qt.current=Kt;var Hn=pe.useCallback(function(){return qt.current.apply(qt,arguments)},[]);return Hn}function po(Kt){var qt=Kt.mode,Hn=Kt.options,kt=Kt.children,ln=Kt.backfill,An=Kt.allowClear,jn=Kt.placeholder,Qt=Kt.getInputElement,rn=Kt.showSearch,Pn=Kt.onSearch,Dn=Kt.defaultOpen,oi=Kt.autoFocus,ai=Kt.labelInValue,Gn=Kt.value,Bn=Kt.inputValue,bi=Kt.optionLabelProp,Ei=isMultiple(qt),Di=rn!==void 0?rn:Ei||qt==="combobox",yn=Hn||convertChildrenToData(kt);if(warning(qt!=="tags"||yn.every(function(pn){return!pn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),qt==="tags"||qt==="combobox"){var Tr=yn.some(function(pn){return pn.options?pn.options.some(function($n){return typeof("value"in $n?$n.value:$n.key)=="number"}):typeof("value"in pn?pn.value:pn.key)=="number"});warning(!Tr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(qt!=="combobox"||!bi,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(qt==="combobox"||!ln,"`backfill` only works with `combobox` mode."),warning(qt==="combobox"||!Qt,"`getInputElement` only work with `combobox` mode."),noteOnce(qt!=="combobox"||!Qt||!An||!jn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Pn&&!Di&&qt!=="combobox"&&qt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Dn||oi,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Gn!=null){var ur=toArray(Gn);warning(!ai||ur.every(function(pn){return _typeof(pn)==="object"&&("key"in pn||"value"in pn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ei||Array.isArray(Gn),"`value` should be array when `mode` is `multiple` or `tags`")}if(kt){var wr=null;toNodeArray(kt).some(function(pn){if(!React.isValidElement(pn)||!pn.type)return!1;var $n=pn,yi=$n.type;if(yi.isSelectOption)return!1;if(yi.isSelectOptGroup){var Mi=toNodeArray(pn.props.children).every(function(mi){return!React.isValidElement(mi)||!pn.type||mi.type.isSelectOption?!0:(wr=mi.type,!1)});return!Mi}return wr=yi,!0}),wr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(wr.displayName||wr.name||wr,"`.")),warning(Bn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Vn(Kt,qt){if(Kt){var Hn=function kt(ln){for(var An=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,jn=0;jn<ln.length;jn++){var Qt=ln[jn];if(Qt[qt==null?void 0:qt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!An&&Array.isArray(Qt[qt==null?void 0:qt.options])&&kt(Qt[qt==null?void 0:qt.options],!0))break}};Hn(Kt)}}var He=null,Xe=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],nt=["inputValue"];function bt(Kt){return!Kt||(0,be.Z)(Kt)!=="object"}var Nt=pe.forwardRef(function(Kt,qt){var Hn=Kt.id,kt=Kt.mode,ln=Kt.prefixCls,An=ln===void 0?"rc-select":ln,jn=Kt.backfill,Qt=Kt.fieldNames,rn=Kt.inputValue,Pn=Kt.searchValue,Dn=Kt.onSearch,oi=Kt.autoClearSearchValue,ai=oi===void 0?!0:oi,Gn=Kt.onSelect,Bn=Kt.onDeselect,bi=Kt.dropdownMatchSelectWidth,Ei=bi===void 0?!0:bi,Di=Kt.filterOption,yn=Kt.filterSort,Tr=Kt.optionFilterProp,ur=Kt.optionLabelProp,wr=Kt.options,pn=Kt.optionRender,$n=Kt.children,yi=Kt.defaultActiveFirstOption,Mi=Kt.menuItemSelectedIcon,mi=Kt.virtual,Li=Kt.direction,dr=Kt.listHeight,ar=dr===void 0?200:dr,vr=Kt.listItemHeight,Cr=vr===void 0?20:vr,Ln=Kt.labelRender,Yr=Kt.value,Mn=Kt.defaultValue,Ai=Kt.labelInValue,zi=Kt.onChange,Xi=Kt.maxCount,lo=(0,xe.Z)(Kt,Xe),oo=(0,Vi.ZP)(Hn),qr=Xt(kt),uo=!!(!wr&&$n),an=pe.useMemo(function(){return Di===void 0&&kt==="combobox"?!1:Di},[Di,kt]),kn=pe.useMemo(function(){return Ke(Qt,uo)},[JSON.stringify(Qt),uo]),hn=(0,ye.Z)("",{value:Pn!==void 0?Pn:rn,postState:function(zr){return zr||""}}),ft=(0,Ce.Z)(hn,2),Yn=ft[0],Un=ft[1],ni=cr(wr,$n,kn,Tr,ur),li=ni.valueOptions,vi=ni.labelOptions,On=ni.options,Jn=pe.useCallback(function(Hr){var zr=gt(Hr);return zr.map(function(zn){var or,Gr,Zo,aa,Vs;if(bt(zn))or=zn;else{var _r;Zo=zn.key,Gr=zn.label,or=(_r=zn.value)!==null&&_r!==void 0?_r:Zo}var Es=li.get(or);if(Es){var xs;if(Gr===void 0&&(Gr=Es==null?void 0:Es[ur||kn.label]),Zo===void 0&&(Zo=(xs=Es==null?void 0:Es.key)!==null&&xs!==void 0?xs:or),aa=Es==null?void 0:Es.disabled,Vs=Es==null?void 0:Es.title,0)var fs}return{label:Gr,value:or,key:Zo,disabled:aa,title:Vs}})},[kn,ur,li]),qn=(0,ye.Z)(Mn,{value:Yr}),ti=(0,Ce.Z)(qn,2),ii=ti[0],Fi=ti[1],Si=pe.useMemo(function(){var Hr,zr=qr&&ii===null?[]:ii,zn=Jn(zr);return kt==="combobox"&&ht((Hr=zn[0])===null||Hr===void 0?void 0:Hr.value)?[]:zn},[ii,Jn,kt,qr]),di=Pr(Si,li),Cn=(0,Ce.Z)(di,2),pi=Cn[0],Ui=Cn[1],xr=pe.useMemo(function(){if(!kt&&pi.length===1){var Hr=pi[0];if(Hr.value===null&&(Hr.label===null||Hr.label===void 0))return[]}return pi.map(function(zr){var zn;return(0,Le.Z)((0,Le.Z)({},zr),{},{label:(zn=typeof Ln=="function"?Ln(zr):zr.label)!==null&&zn!==void 0?zn:zr.value})})},[kt,pi,Ln]),pr=pe.useMemo(function(){return new Set(pi.map(function(Hr){return Hr.value}))},[pi]);pe.useEffect(function(){if(kt==="combobox"){var Hr,zr=(Hr=pi[0])===null||Hr===void 0?void 0:Hr.value;Un(_t(zr)?String(zr):"")}},[pi]);var Er=ir(function(Hr,zr){var zn=zr!=null?zr:Hr;return(0,Be.Z)((0,Be.Z)({},kn.value,Hr),kn.label,zn)}),Ar=pe.useMemo(function(){if(kt!=="tags")return On;var Hr=(0,Se.Z)(On),zr=function(or){return li.has(or)};return(0,Se.Z)(pi).sort(function(zn,or){return zn.value<or.value?-1:1}).forEach(function(zn){var or=zn.value;zr(or)||Hr.push(Er(or,zn.label))}),Hr},[Er,On,li,pi,kt]),Lr=Ri(Ar,kn,Yn,an,Tr),co=pe.useMemo(function(){return kt!=="tags"||!Yn||Lr.some(function(Hr){return Hr[Tr||"value"]===Yn})||Lr.some(function(Hr){return Hr[kn.value]===Yn})?Lr:[Er(Yn)].concat((0,Se.Z)(Lr))},[Er,Tr,kt,Lr,Yn,kn]),so=function Hr(zr){var zn=(0,Se.Z)(zr).sort(function(or,Gr){return yn(or,Gr,{searchValue:Yn})});return zn.map(function(or){return Array.isArray(or.options)?(0,Le.Z)((0,Le.Z)({},or),{},{options:or.options.length>0?Hr(or.options):or.options}):or})},es=pe.useMemo(function(){return yn?so(co):co},[co,yn,Yn]),nn=pe.useMemo(function(){return De(es,{fieldNames:kn,childrenAsData:uo})},[es,kn,uo]),Fr=function(zr){var zn=Jn(zr);if(Fi(zn),zi&&(zn.length!==pi.length||zn.some(function(Zo,aa){var Vs;return((Vs=pi[aa])===null||Vs===void 0?void 0:Vs.value)!==(Zo==null?void 0:Zo.value)}))){var or=Ai?zn:zn.map(function(Zo){return Zo.value}),Gr=zn.map(function(Zo){return ze(Ui(Zo.value))});zi(qr?or:or[0],qr?Gr:Gr[0])}},Vr=pe.useState(null),rr=(0,Ce.Z)(Vr,2),Mr=rr[0],tr=rr[1],Oo=pe.useState(0),fo=(0,Ce.Z)(Oo,2),Br=fo[0],Qr=fo[1],$s=yi!==void 0?yi:kt!=="combobox",us=pe.useCallback(function(Hr,zr){var zn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},or=zn.source,Gr=or===void 0?"keyboard":or;Qr(zr),jn&&kt==="combobox"&&Hr!==null&&Gr==="keyboard"&&tr(String(Hr))},[jn,kt]),ha=function(zr,zn,or){var Gr=function(){var Pa,Xo=Ui(zr);return[Ai?{label:Xo==null?void 0:Xo[kn.label],value:zr,key:(Pa=Xo==null?void 0:Xo.key)!==null&&Pa!==void 0?Pa:zr}:zr,ze(Xo)]};if(zn&&Gn){var Zo=Gr(),aa=(0,Ce.Z)(Zo,2),Vs=aa[0],_r=aa[1];Gn(Vs,_r)}else if(!zn&&Bn&&or!=="clear"){var Es=Gr(),xs=(0,Ce.Z)(Es,2),fs=xs[0],jo=xs[1];Bn(fs,jo)}},ea=ir(function(Hr,zr){var zn,or=qr?zr.selected:!0;or?zn=qr?[].concat((0,Se.Z)(pi),[Hr]):[Hr]:zn=pi.filter(function(Gr){return Gr.value!==Hr}),Fr(zn),ha(Hr,or),kt==="combobox"?tr(""):(!Xt||ai)&&(Un(""),tr(""))}),Qi=function(zr,zn){Fr(zr);var or=zn.type,Gr=zn.values;(or==="remove"||or==="clear")&&Gr.forEach(function(Zo){ha(Zo.value,!1,or)})},To=function(zr,zn){if(Un(zr),tr(null),zn.source==="submit"){var or=(zr||"").trim();if(or){var Gr=Array.from(new Set([].concat((0,Se.Z)(pr),[or])));Fr(Gr),ha(or,!0),Un("")}return}zn.source!=="blur"&&(kt==="combobox"&&Fr(zr),Dn==null||Dn(zr))},as=function(zr){var zn=zr;kt!=="tags"&&(zn=zr.map(function(Gr){var Zo=vi.get(Gr);return Zo==null?void 0:Zo.value}).filter(function(Gr){return Gr!==void 0}));var or=Array.from(new Set([].concat((0,Se.Z)(pr),(0,Se.Z)(zn))));Fr(or),or.forEach(function(Gr){ha(Gr,!0)})},Os=pe.useMemo(function(){var Hr=mi!==!1&&Ei!==!1;return(0,Le.Z)((0,Le.Z)({},ni),{},{flattenOptions:nn,onActiveValue:us,defaultActiveFirstOption:$s,onSelect:ea,menuItemSelectedIcon:Mi,rawValues:pr,fieldNames:kn,virtual:Hr,direction:Li,listHeight:ar,listItemHeight:Cr,childrenAsData:uo,maxCount:Xi,optionRender:pn})},[Xi,ni,nn,us,$s,ea,Mi,pr,kn,mi,Ei,Li,ar,Cr,uo,pn]);return pe.createElement(Ve.Provider,{value:Os},pe.createElement(fn,(0,ke.Z)({},lo,{id:oo,prefixCls:An,ref:qt,omitDomProps:nt,mode:kt,displayValues:xr,onDisplayValuesChange:Qi,direction:Li,searchValue:Yn,onSearch:To,autoClearSearchValue:ai,onSearchSplit:as,dropdownMatchSelectWidth:Ei,OptionList:qi,emptyOptions:!nn.length,activeValue:Mr,activeDescendantId:"".concat(oo,"_list_").concat(Br)})))}),sn=Nt;sn.Option=Zn,sn.OptGroup=Sn;var Zt=sn,_n=Zt},63158:function(xn,un,Re){"use strict";var ke=Re(72308),Se=Re(49618),Be=Re(52487),Le=Re(74416),Ce=Re(59301),xe=Re(92310),be=Re.n(xe),ye=Re(18929),we=Re(10228),pe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],de=Ce.forwardRef(function(ge,fe){var ue,ee=ge.prefixCls,z=ee===void 0?"rc-switch":ee,oe=ge.className,re=ge.checked,ae=ge.defaultChecked,le=ge.disabled,me=ge.loadingIcon,ve=ge.checkedChildren,Pe=ge.unCheckedChildren,Ae=ge.onClick,Oe=ge.onChange,Ie=ge.onKeyDown,Ze=(0,Le.Z)(ge,pe),qe=(0,ye.Z)(!1,{value:re,defaultValue:ae}),Je=(0,Be.Z)(qe,2),mt=Je[0],gt=Je[1];function Mt(Dt,ut){var ot=mt;return le||(ot=Dt,gt(ot),Oe==null||Oe(ot,ut)),ot}function at(Dt){Dt.which===we.Z.LEFT?Mt(!1,Dt):Dt.which===we.Z.RIGHT&&Mt(!0,Dt),Ie==null||Ie(Dt)}function _t(Dt){var ut=Mt(!mt,Dt);Ae==null||Ae(ut,Dt)}var ht=be()(z,oe,(ue={},(0,Se.Z)(ue,"".concat(z,"-checked"),mt),(0,Se.Z)(ue,"".concat(z,"-disabled"),le),ue));return Ce.createElement("button",(0,ke.Z)({},Ze,{type:"button",role:"switch","aria-checked":mt,disabled:le,className:ht,ref:fe,onKeyDown:at,onClick:_t}),me,Ce.createElement("span",{className:"".concat(z,"-inner")},Ce.createElement("span",{className:"".concat(z,"-inner-checked")},ve),Ce.createElement("span",{className:"".concat(z,"-inner-unchecked")},Pe)))});de.displayName="Switch",un.Z=de},67204:function(xn,un,Re){"use strict";Re.d(un,{R:function(){return Se},w:function(){return ke}});var ke={},Se="rc-table-internal-hook"},78612:function(xn,un,Re){"use strict";Re.d(un,{L:function(){return z},Z:function(){return me}});var ke=Re(52487),Se=Re(49618),Be=Re(80702),Le=Re(62853),Ce=Re(77321),xe=Re(74416),be=Re(11592),ye=Re(48736),we=Re(59301),pe=Re(67204),de=Re(90494);function ge(ve){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Pe=="number"?Pe:Pe.endsWith("%")?ve*parseFloat(Pe)/100:null}function fe(ve,Pe,Ae){return we.useMemo(function(){if(Pe&&Pe>0){var Oe=0,Ie=0;ve.forEach(function(_t){var ht=ge(Pe,_t.width);ht?Oe+=ht:Ie+=1});var Ze=Math.max(Pe,Ae),qe=Math.max(Ze-Oe,Ie),Je=Ie,mt=qe/Ie,gt=0,Mt=ve.map(function(_t){var ht=(0,Ce.Z)({},_t),Dt=ge(Pe,ht.width);if(Dt)ht.width=Dt;else{var ut=Math.floor(mt);ht.width=Je===1?qe:ut,qe-=ut,Je-=1}return gt+=ht.width,ht});if(gt<Ze){var at=Ze/gt;qe=Ze,Mt.forEach(function(_t,ht){var Dt=Math.floor(_t.width*at);_t.width=ht===Mt.length-1?qe:Dt,qe-=Dt})}return[Mt,Math.max(gt,Ze)]}return[ve,Pe]},[ve,Pe,Ae])}var ue=["children"],ee=["fixed"];function z(ve){return(0,be.Z)(ve).filter(function(Pe){return we.isValidElement(Pe)}).map(function(Pe){var Ae=Pe.key,Oe=Pe.props,Ie=Oe.children,Ze=(0,xe.Z)(Oe,ue),qe=(0,Ce.Z)({key:Ae},Ze);return Ie&&(qe.children=z(Ie)),qe})}function oe(ve){return ve.filter(function(Pe){return Pe&&(0,Le.Z)(Pe)==="object"&&!Pe.hidden}).map(function(Pe){var Ae=Pe.children;return Ae&&Ae.length>0?(0,Ce.Z)((0,Ce.Z)({},Pe),{},{children:oe(Ae)}):Pe})}function re(ve){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return ve.filter(function(Ae){return Ae&&(0,Le.Z)(Ae)==="object"}).reduce(function(Ae,Oe,Ie){var Ze=Oe.fixed,qe=Ze===!0?"left":Ze,Je="".concat(Pe,"-").concat(Ie),mt=Oe.children;return mt&&mt.length>0?[].concat((0,Be.Z)(Ae),(0,Be.Z)(re(mt,Je).map(function(gt){return(0,Ce.Z)({fixed:qe},gt)}))):[].concat((0,Be.Z)(Ae),[(0,Ce.Z)((0,Ce.Z)({key:Je},Oe),{},{fixed:qe})])},[])}function ae(ve){return ve.map(function(Pe){var Ae=Pe.fixed,Oe=(0,xe.Z)(Pe,ee),Ie=Ae;return Ae==="left"?Ie="right":Ae==="right"&&(Ie="left"),(0,Ce.Z)({fixed:Ie},Oe)})}function le(ve,Pe){var Ae=ve.prefixCls,Oe=ve.columns,Ie=ve.children,Ze=ve.expandable,qe=ve.expandedKeys,Je=ve.columnTitle,mt=ve.getRowKey,gt=ve.onTriggerExpand,Mt=ve.expandIcon,at=ve.rowExpandable,_t=ve.expandIconColumnIndex,ht=ve.direction,Dt=ve.expandRowByClick,ut=ve.columnWidth,ot=ve.fixed,ct=ve.scrollWidth,yt=ve.clientWidth,wt=we.useMemo(function(){var tn=Oe||z(Ie)||[];return oe(tn.slice())},[Oe,Ie]),xt=we.useMemo(function(){if(Ze){var tn=wt.slice();if(!tn.includes(pe.w)){var lt=_t||0;lt>=0&&(lt||ot==="left"||!ot)&&tn.splice(lt,0,pe.w),ot==="right"&&tn.splice(wt.length,0,pe.w)}var Ue=tn.indexOf(pe.w);tn=tn.filter(function(tt,Ke){return tt!==pe.w||Ke===Ue});var je=wt[Ue],rt;ot?rt=ot:rt=je?je.fixed:null;var dt=(0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)({},de.v,{className:"".concat(Ae,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Je),"fixed",rt),"className","".concat(Ae,"-row-expand-icon-cell")),"width",ut),"render",function(Ke,De,ze){var $e=mt(De,ze),We=qe.has($e),Ve=at?at(De):!0,pt=Mt({prefixCls:Ae,expanded:We,expandable:Ve,record:De,onExpand:gt});return Dt?we.createElement("span",{onClick:function(on){return on.stopPropagation()}},pt):pt});return tn.map(function(tt){return tt===pe.w?dt:tt})}return wt.filter(function(tt){return tt!==pe.w})},[Ze,wt,mt,qe,Mt,ht]),zt=we.useMemo(function(){var tn=xt;return Pe&&(tn=Pe(tn)),tn.length||(tn=[{render:function(){return null}}]),tn},[Pe,xt,ht]),Ut=we.useMemo(function(){return ht==="rtl"?ae(re(zt)):re(zt)},[zt,ht,ct]),cn=we.useMemo(function(){for(var tn=-1,lt=Ut.length-1;lt>=0;lt-=1){var Ue=Ut[lt].fixed;if(Ue==="left"||Ue===!0){tn=lt;break}}if(tn>=0)for(var je=0;je<=tn;je+=1){var rt=Ut[je].fixed;if(rt!=="left"&&rt!==!0)return!0}var dt=Ut.findIndex(function(De){var ze=De.fixed;return ze==="right"});if(dt>=0)for(var tt=dt;tt<Ut.length;tt+=1){var Ke=Ut[tt].fixed;if(Ke!=="right")return!0}return!1},[Ut]),jt=fe(Ut,ct,yt),mn=(0,ke.Z)(jt,2),Ft=mn[0],Yt=mn[1];return[zt,Ft,Yt,cn]}var me=le},16596:function(xn,un,Re){"use strict";Re.d(un,{w2:function(){return ke.w},vP:function(){return qi.v},RQ:function(){return ke.R},ER:function(){return $e},Q$:function(){return ur},TN:function(){return oo}});var ke=Re(67204),Se=Re(52487),Be=Re(6089),Le=Re(34280),Ce=Re(13697),xe=Re(59301),be=Re(4676);function ye(an){var kn=xe.createContext(void 0),hn=function(Yn){var Un=Yn.value,ni=Yn.children,li=xe.useRef(Un);li.current=Un;var vi=xe.useState(function(){return{getValue:function(){return li.current},listeners:new Set}}),On=(0,Se.Z)(vi,1),Jn=On[0];return(0,Le.Z)(function(){(0,be.unstable_batchedUpdates)(function(){Jn.listeners.forEach(function(qn){qn(Un)})})},[Un]),xe.createElement(kn.Provider,{value:Jn},ni)};return{Context:kn,Provider:hn,defaultValue:an}}function we(an,kn){var hn=(0,Be.Z)(typeof kn=="function"?kn:function(qn){if(kn===void 0)return qn;if(!Array.isArray(kn))return qn[kn];var ti={};return kn.forEach(function(ii){ti[ii]=qn[ii]}),ti}),ft=xe.useContext(an==null?void 0:an.Context),Yn=ft||{},Un=Yn.listeners,ni=Yn.getValue,li=xe.useRef();li.current=hn(ft?ni():an==null?void 0:an.defaultValue);var vi=xe.useState({}),On=(0,Se.Z)(vi,2),Jn=On[1];return(0,Le.Z)(function(){if(!ft)return;function qn(ti){var ii=hn(ti);(0,Ce.Z)(li.current,ii,!0)||Jn({})}return Un.add(qn),function(){Un.delete(qn)}},[ft]),li.current}var pe=Re(72308),de=Re(8654);function ge(){var an=xe.createContext(null);function kn(){return xe.useContext(an)}function hn(Yn,Un){var ni=(0,de.Yr)(Yn),li=function(On,Jn){var qn=ni?{ref:Jn}:{},ti=xe.useRef(0),ii=xe.useRef(On),Fi=kn();return Fi!==null?xe.createElement(Yn,(0,pe.Z)({},On,qn)):((!Un||Un(ii.current,On))&&(ti.current+=1),ii.current=On,xe.createElement(an.Provider,{value:ti.current},xe.createElement(Yn,(0,pe.Z)({},On,qn))))};return ni?xe.forwardRef(li):li}function ft(Yn,Un){var ni=(0,de.Yr)(Yn),li=function(On,Jn){var qn=ni?{ref:Jn}:{};return kn(),xe.createElement(Yn,(0,pe.Z)({},On,qn))};return ni?xe.memo(xe.forwardRef(li),Un):xe.memo(li,Un)}return{makeImmutable:hn,responseImmutable:ft,useImmutableMark:kn}}var fe=ge(),ue=fe.makeImmutable,ee=fe.responseImmutable,z=fe.useImmutableMark,oe=ge(),re=oe.makeImmutable,ae=oe.responseImmutable,le=oe.useImmutableMark,me=ye(),ve=me;function Pe(an,kn){var hn=React.useRef(0);hn.current+=1;var ft=React.useRef(an),Yn=[];Object.keys(an||{}).map(function(ni){var li;(an==null?void 0:an[ni])!==((li=ft.current)===null||li===void 0?void 0:li[ni])&&Yn.push(ni)}),ft.current=an;var Un=React.useRef([]);return Yn.length&&(Un.current=Yn),React.useDebugValue(hn.current),React.useDebugValue(Un.current.join(", ")),kn&&console.log("".concat(kn,":"),hn.current,Un.current),hn.current}var Ae=null,Oe=null,Ie=Re(62853),Ze=Re(77321),qe=Re(49618),Je=Re(92310),mt=Re.n(Je),gt=Re(80547),Mt=Re(97938),at=Re(48736),_t=xe.createContext({renderWithProps:!1}),ht=_t,Dt="RC_TABLE_KEY";function ut(an){return an==null?[]:Array.isArray(an)?an:[an]}function ot(an){var kn=[],hn={};return an.forEach(function(ft){for(var Yn=ft||{},Un=Yn.key,ni=Yn.dataIndex,li=Un||ut(ni).join("-")||Dt;hn[li];)li="".concat(li,"_next");hn[li]=!0,kn.push(li)}),kn}function ct(an){return an!=null}function yt(an){return typeof an=="number"&&!Number.isNaN(an)}function wt(an){return an&&(0,Ie.Z)(an)==="object"&&!Array.isArray(an)&&!xe.isValidElement(an)}function xt(an,kn,hn,ft,Yn,Un){var ni=xe.useContext(ht),li=le(),vi=(0,gt.Z)(function(){if(ct(ft))return[ft];var On=kn==null||kn===""?[]:Array.isArray(kn)?kn:[kn],Jn=(0,Mt.Z)(an,On),qn=Jn,ti=void 0;if(Yn){var ii=Yn(Jn,an,hn);wt(ii)?(qn=ii.children,ti=ii.props,ni.renderWithProps=!0):qn=ii}return[qn,ti]},[li,an,ft,kn,Yn,hn],function(On,Jn){if(Un){var qn=(0,Se.Z)(On,2),ti=qn[1],ii=(0,Se.Z)(Jn,2),Fi=ii[1];return Un(Fi,ti)}return ni.renderWithProps?!0:!(0,Ce.Z)(On,Jn,!0)});return vi}function zt(an,kn,hn,ft){var Yn=an+kn-1;return an<=ft&&Yn>=hn}function Ut(an,kn){return we(ve,function(hn){var ft=zt(an,kn||1,hn.hoverStartRow,hn.hoverEndRow);return[ft,hn.onHover]})}var cn=Re(70425),jt=function(kn){var hn=kn.ellipsis,ft=kn.rowType,Yn=kn.children,Un,ni=hn===!0?{showTitle:!0}:hn;return ni&&(ni.showTitle||ft==="header")&&(typeof Yn=="string"||typeof Yn=="number"?Un=Yn.toString():xe.isValidElement(Yn)&&typeof Yn.props.children=="string"&&(Un=Yn.props.children)),Un};function mn(an){var kn,hn,ft,Yn,Un,ni,li,vi,On=an.component,Jn=an.children,qn=an.ellipsis,ti=an.scope,ii=an.prefixCls,Fi=an.className,Si=an.align,di=an.record,Cn=an.render,pi=an.dataIndex,Ui=an.renderIndex,xr=an.shouldCellUpdate,pr=an.index,Er=an.rowType,Ar=an.colSpan,Lr=an.rowSpan,co=an.fixLeft,so=an.fixRight,es=an.firstFixLeft,nn=an.lastFixLeft,Fr=an.firstFixRight,Vr=an.lastFixRight,rr=an.appendNode,Mr=an.additionalProps,tr=Mr===void 0?{}:Mr,Oo=an.isSticky,fo="".concat(ii,"-cell"),Br=we(ve,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Qr=Br.supportSticky,$s=Br.allColumnsFixedLeft,us=Br.rowHoverable,ha=xt(di,pi,Ui,Jn,Cn,xr),ea=(0,Se.Z)(ha,2),Qi=ea[0],To=ea[1],as={},Os=typeof co=="number"&&Qr,Hr=typeof so=="number"&&Qr;Os&&(as.position="sticky",as.left=co),Hr&&(as.position="sticky",as.right=so);var zr=(kn=(hn=(ft=To==null?void 0:To.colSpan)!==null&&ft!==void 0?ft:tr.colSpan)!==null&&hn!==void 0?hn:Ar)!==null&&kn!==void 0?kn:1,zn=(Yn=(Un=(ni=To==null?void 0:To.rowSpan)!==null&&ni!==void 0?ni:tr.rowSpan)!==null&&Un!==void 0?Un:Lr)!==null&&Yn!==void 0?Yn:1,or=Ut(pr,zn),Gr=(0,Se.Z)(or,2),Zo=Gr[0],aa=Gr[1],Vs=(0,cn.zX)(function(Pa){var Xo;di&&aa(pr,pr+zn-1),tr==null||(Xo=tr.onMouseEnter)===null||Xo===void 0||Xo.call(tr,Pa)}),_r=(0,cn.zX)(function(Pa){var Xo;di&&aa(-1,-1),tr==null||(Xo=tr.onMouseLeave)===null||Xo===void 0||Xo.call(tr,Pa)});if(zr===0||zn===0)return null;var Es=(li=tr.title)!==null&&li!==void 0?li:jt({rowType:Er,ellipsis:qn,children:Qi}),xs=mt()(fo,Fi,(vi={},(0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)(vi,"".concat(fo,"-fix-left"),Os&&Qr),"".concat(fo,"-fix-left-first"),es&&Qr),"".concat(fo,"-fix-left-last"),nn&&Qr),"".concat(fo,"-fix-left-all"),nn&&$s&&Qr),"".concat(fo,"-fix-right"),Hr&&Qr),"".concat(fo,"-fix-right-first"),Fr&&Qr),"".concat(fo,"-fix-right-last"),Vr&&Qr),"".concat(fo,"-ellipsis"),qn),"".concat(fo,"-with-append"),rr),"".concat(fo,"-fix-sticky"),(Os||Hr)&&Oo&&Qr),(0,qe.Z)(vi,"".concat(fo,"-row-hover"),!To&&Zo)),tr.className,To==null?void 0:To.className),fs={};Si&&(fs.textAlign=Si);var jo=(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},To==null?void 0:To.style),as),fs),tr.style),ta=Qi;return(0,Ie.Z)(ta)==="object"&&!Array.isArray(ta)&&!xe.isValidElement(ta)&&(ta=null),qn&&(nn||Fr)&&(ta=xe.createElement("span",{className:"".concat(fo,"-content")},ta)),xe.createElement(On,(0,pe.Z)({},To,tr,{className:xs,style:jo,title:Es,scope:ti,onMouseEnter:us?Vs:void 0,onMouseLeave:us?_r:void 0,colSpan:zr!==1?zr:null,rowSpan:zn!==1?zn:null}),rr,ta)}var Ft=xe.memo(mn);function Yt(an,kn,hn,ft,Yn){var Un=hn[an]||{},ni=hn[kn]||{},li,vi;Un.fixed==="left"?li=ft.left[Yn==="rtl"?kn:an]:ni.fixed==="right"&&(vi=ft.right[Yn==="rtl"?an:kn]);var On=!1,Jn=!1,qn=!1,ti=!1,ii=hn[kn+1],Fi=hn[an-1],Si=ii&&!ii.fixed||Fi&&!Fi.fixed||hn.every(function(xr){return xr.fixed==="left"});if(Yn==="rtl"){if(li!==void 0){var di=Fi&&Fi.fixed==="left";ti=!di&&Si}else if(vi!==void 0){var Cn=ii&&ii.fixed==="right";qn=!Cn&&Si}}else if(li!==void 0){var pi=ii&&ii.fixed==="left";On=!pi&&Si}else if(vi!==void 0){var Ui=Fi&&Fi.fixed==="right";Jn=!Ui&&Si}return{fixLeft:li,fixRight:vi,lastFixLeft:On,firstFixRight:Jn,lastFixRight:qn,firstFixLeft:ti,isSticky:ft.isSticky}}var tn=xe.createContext({}),lt=tn;function Ue(an){var kn=an.className,hn=an.index,ft=an.children,Yn=an.colSpan,Un=Yn===void 0?1:Yn,ni=an.rowSpan,li=an.align,vi=we(ve,["prefixCls","direction"]),On=vi.prefixCls,Jn=vi.direction,qn=xe.useContext(lt),ti=qn.scrollColumnIndex,ii=qn.stickyOffsets,Fi=qn.flattenColumns,Si=hn+Un-1,di=Si+1===ti?Un+1:Un,Cn=Yt(hn,hn+di-1,Fi,ii,Jn);return xe.createElement(Ft,(0,pe.Z)({className:kn,index:hn,component:"td",prefixCls:On,record:null,dataIndex:null,align:li,colSpan:di,rowSpan:ni,render:function(){return ft}},Cn))}var je=Re(74416),rt=["children"];function dt(an){var kn=an.children,hn=(0,je.Z)(an,rt);return xe.createElement("tr",hn,kn)}function tt(an){var kn=an.children;return kn}tt.Row=dt,tt.Cell=Ue;var Ke=tt;function De(an){var kn=an.children,hn=an.stickyOffsets,ft=an.flattenColumns,Yn=we(ve,"prefixCls"),Un=ft.length-1,ni=ft[Un],li=xe.useMemo(function(){return{stickyOffsets:hn,flattenColumns:ft,scrollColumnIndex:ni!=null&&ni.scrollbar?Un:null}},[ni,ft,Un,hn]);return xe.createElement(lt.Provider,{value:li},xe.createElement("tfoot",{className:"".concat(Yn,"-summary")},kn))}var ze=ae(De),$e=Ke,We=Re(29301),Ve=Re(29194),pt=Re(24514),Lt=Re(75152),on=Re(26112);function Xt(an,kn,hn,ft,Yn,Un,ni){an.push({record:kn,indent:hn,index:ni});var li=Un(kn),vi=Yn==null?void 0:Yn.has(li);if(kn&&Array.isArray(kn[ft])&&vi)for(var On=0;On<kn[ft].length;On+=1)Xt(an,kn[ft][On],hn+1,ft,Yn,Un,On)}function Rt(an,kn,hn,ft){var Yn=xe.useMemo(function(){if(hn!=null&&hn.size){for(var Un=[],ni=0;ni<(an==null?void 0:an.length);ni+=1){var li=an[ni];Xt(Un,li,0,kn,hn,ft,ni)}return Un}return an==null?void 0:an.map(function(vi,On){return{record:vi,indent:0,index:On}})},[an,kn,hn,ft]);return Yn}function fn(an,kn,hn,ft){var Yn=we(ve,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Un=Yn.flattenColumns,ni=Yn.expandableType,li=Yn.expandedKeys,vi=Yn.childrenColumnName,On=Yn.onTriggerExpand,Jn=Yn.rowExpandable,qn=Yn.onRow,ti=Yn.expandRowByClick,ii=Yn.rowClassName,Fi=ni==="nest",Si=ni==="row"&&(!Jn||Jn(an)),di=Si||Fi,Cn=li&&li.has(kn),pi=vi&&an&&an[vi],Ui=(0,cn.zX)(On),xr=qn==null?void 0:qn(an,hn),pr=xr==null?void 0:xr.onClick,Er=function(so){ti&&di&&On(an,so);for(var es=arguments.length,nn=new Array(es>1?es-1:0),Fr=1;Fr<es;Fr++)nn[Fr-1]=arguments[Fr];pr==null||pr.apply(void 0,[so].concat(nn))},Ar;typeof ii=="string"?Ar=ii:typeof ii=="function"&&(Ar=ii(an,hn,ft));var Lr=ot(Un);return(0,Ze.Z)((0,Ze.Z)({},Yn),{},{columnsKey:Lr,nestExpandable:Fi,expanded:Cn,hasNestChildren:pi,record:an,onTriggerExpand:Ui,rowSupportExpand:Si,expandable:di,rowProps:(0,Ze.Z)((0,Ze.Z)({},xr),{},{className:mt()(Ar,xr==null?void 0:xr.className),onClick:Er})})}function En(an){var kn=an.prefixCls,hn=an.children,ft=an.component,Yn=an.cellComponent,Un=an.className,ni=an.expanded,li=an.colSpan,vi=an.isEmpty,On=we(ve,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Jn=On.scrollbarSize,qn=On.fixHeader,ti=On.fixColumn,ii=On.componentWidth,Fi=On.horizonScroll,Si=hn;return(vi?Fi&&ii:ti)&&(Si=xe.createElement("div",{style:{width:ii-(qn&&!vi?Jn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(kn,"-expanded-row-fixed")},Si)),xe.createElement(ft,{className:Un,style:{display:ni?null:"none"}},xe.createElement(Ft,{component:Yn,prefixCls:kn,colSpan:li},Si))}var Sn=En;function dn(an){var kn=an.prefixCls,hn=an.record,ft=an.onExpand,Yn=an.expanded,Un=an.expandable,ni="".concat(kn,"-row-expand-icon");if(!Un)return xe.createElement("span",{className:mt()(ni,"".concat(kn,"-row-spaced"))});var li=function(On){ft(hn,On),On.stopPropagation()};return xe.createElement("span",{className:mt()(ni,(0,qe.Z)((0,qe.Z)({},"".concat(kn,"-row-expanded"),Yn),"".concat(kn,"-row-collapsed"),!Yn)),onClick:li})}function Zn(an,kn,hn){var ft=[];function Yn(Un){(Un||[]).forEach(function(ni,li){ft.push(kn(ni,li)),Yn(ni[hn])})}return Yn(an),ft}function vn(an,kn,hn,ft){return typeof an=="string"?an:typeof an=="function"?an(kn,hn,ft):""}function Wn(an,kn,hn,ft,Yn){var Un=an.record,ni=an.prefixCls,li=an.columnsKey,vi=an.fixedInfoList,On=an.expandIconColumnIndex,Jn=an.nestExpandable,qn=an.indentSize,ti=an.expandIcon,ii=an.expanded,Fi=an.hasNestChildren,Si=an.onTriggerExpand,di=li[hn],Cn=vi[hn],pi;hn===(On||0)&&Jn&&(pi=xe.createElement(xe.Fragment,null,xe.createElement("span",{style:{paddingLeft:"".concat(qn*ft,"px")},className:"".concat(ni,"-row-indent indent-level-").concat(ft)}),ti({prefixCls:ni,expanded:ii,expandable:Fi,record:Un,onExpand:Si})));var Ui;return kn.onCell&&(Ui=kn.onCell(Un,Yn)),{key:di,fixedInfo:Cn,appendCellNode:pi,additionalCellProps:Ui||{}}}function ri(an){var kn=an.className,hn=an.style,ft=an.record,Yn=an.index,Un=an.renderIndex,ni=an.rowKey,li=an.indent,vi=li===void 0?0:li,On=an.rowComponent,Jn=an.cellComponent,qn=an.scopeCellComponent,ti=fn(ft,ni,Yn,vi),ii=ti.prefixCls,Fi=ti.flattenColumns,Si=ti.expandedRowClassName,di=ti.expandedRowRender,Cn=ti.rowProps,pi=ti.expanded,Ui=ti.rowSupportExpand,xr=xe.useRef(!1);xr.current||(xr.current=pi);var pr=vn(Si,ft,Yn,vi),Er=xe.createElement(On,(0,pe.Z)({},Cn,{"data-row-key":ni,className:mt()(kn,"".concat(ii,"-row"),"".concat(ii,"-row-level-").concat(vi),Cn==null?void 0:Cn.className,(0,qe.Z)({},pr,vi>=1)),style:(0,Ze.Z)((0,Ze.Z)({},hn),Cn==null?void 0:Cn.style)}),Fi.map(function(co,so){var es=co.render,nn=co.dataIndex,Fr=co.className,Vr=Wn(ti,co,so,vi,Yn),rr=Vr.key,Mr=Vr.fixedInfo,tr=Vr.appendCellNode,Oo=Vr.additionalCellProps;return xe.createElement(Ft,(0,pe.Z)({className:Fr,ellipsis:co.ellipsis,align:co.align,scope:co.rowScope,component:co.rowScope?qn:Jn,prefixCls:ii,key:rr,record:ft,index:Yn,renderIndex:Un,dataIndex:nn,render:es,shouldCellUpdate:co.shouldCellUpdate},Mr,{appendNode:tr,additionalProps:Oo}))})),Ar;if(Ui&&(xr.current||pi)){var Lr=di(ft,Yn,vi+1,pi);Ar=xe.createElement(Sn,{expanded:pi,className:mt()("".concat(ii,"-expanded-row"),"".concat(ii,"-expanded-row-level-").concat(vi+1),pr),prefixCls:ii,component:On,cellComponent:Jn,colSpan:Fi.length,isEmpty:!1},Lr)}return xe.createElement(xe.Fragment,null,Er,Ar)}var Ni=ae(ri);function Qn(an){var kn=an.columnKey,hn=an.onColumnResize,ft=xe.useRef();return xe.useEffect(function(){ft.current&&hn(kn,ft.current.offsetWidth)},[]),xe.createElement(We.Z,{data:kn},xe.createElement("td",{ref:ft,style:{padding:0,border:0,height:0}},xe.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ki(an){var kn=an.prefixCls,hn=an.columnsKey,ft=an.onColumnResize;return xe.createElement("tr",{"aria-hidden":"true",className:"".concat(kn,"-measure-row"),style:{height:0,fontSize:0}},xe.createElement(We.Z.Collection,{onBatchResize:function(Un){Un.forEach(function(ni){var li=ni.data,vi=ni.size;ft(li,vi.offsetWidth)})}},hn.map(function(Yn){return xe.createElement(Qn,{key:Yn,columnKey:Yn,onColumnResize:ft})})))}function Hi(an){var kn=an.data,hn=an.measureColumnWidth,ft=we(ve,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Yn=ft.prefixCls,Un=ft.getComponent,ni=ft.onColumnResize,li=ft.flattenColumns,vi=ft.getRowKey,On=ft.expandedKeys,Jn=ft.childrenColumnName,qn=ft.emptyNode,ti=Rt(kn,Jn,On,vi),ii=xe.useRef({renderWithProps:!1}),Fi=Un(["body","wrapper"],"tbody"),Si=Un(["body","row"],"tr"),di=Un(["body","cell"],"td"),Cn=Un(["body","cell"],"th"),pi;kn.length?pi=ti.map(function(xr,pr){var Er=xr.record,Ar=xr.indent,Lr=xr.index,co=vi(Er,pr);return xe.createElement(Ni,{key:co,rowKey:co,record:Er,index:pr,renderIndex:Lr,rowComponent:Si,cellComponent:di,scopeCellComponent:Cn,indent:Ar})}):pi=xe.createElement(Sn,{expanded:!0,className:"".concat(Yn,"-placeholder"),prefixCls:Yn,component:Si,cellComponent:di,colSpan:li.length,isEmpty:!0},qn);var Ui=ot(li);return xe.createElement(ht.Provider,{value:ii.current},xe.createElement(Fi,{className:"".concat(Yn,"-tbody")},hn&&xe.createElement(ki,{prefixCls:Yn,columnsKey:Ui,onColumnResize:ni}),pi))}var Gi=ae(Hi),qi=Re(90494),Pr=["columnType"];function gr(an){for(var kn=an.colWidths,hn=an.columns,ft=an.columCount,Yn=we(ve,["tableLayout"]),Un=Yn.tableLayout,ni=[],li=ft||hn.length,vi=!1,On=li-1;On>=0;On-=1){var Jn=kn[On],qn=hn&&hn[On],ti=void 0,ii=void 0;if(qn&&(ti=qn[qi.v],Un==="auto"&&(ii=qn.minWidth)),Jn||ii||ti||vi){var Fi=ti||{},Si=Fi.columnType,di=(0,je.Z)(Fi,Pr);ni.unshift(xe.createElement("col",(0,pe.Z)({key:On,style:{width:Jn,minWidth:ii}},di))),vi=!0}}return xe.createElement("colgroup",null,ni)}var Ri=gr,Vi=Re(80702),sr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Qe(an,kn){return(0,xe.useMemo)(function(){for(var hn=[],ft=0;ft<kn;ft+=1){var Yn=an[ft];if(Yn!==void 0)hn[ft]=Yn;else return null}return hn},[an.join("_"),kn])}var Ti=xe.forwardRef(function(an,kn){var hn=an.className,ft=an.noData,Yn=an.columns,Un=an.flattenColumns,ni=an.colWidths,li=an.columCount,vi=an.stickyOffsets,On=an.direction,Jn=an.fixHeader,qn=an.stickyTopOffset,ti=an.stickyBottomOffset,ii=an.stickyClassName,Fi=an.onScroll,Si=an.maxContentScroll,di=an.children,Cn=(0,je.Z)(an,sr),pi=we(ve,["prefixCls","scrollbarSize","isSticky","getComponent"]),Ui=pi.prefixCls,xr=pi.scrollbarSize,pr=pi.isSticky,Er=pi.getComponent,Ar=Er(["header","table"],"table"),Lr=pr&&!Jn?0:xr,co=xe.useRef(null),so=xe.useCallback(function(Oo){(0,de.mH)(kn,Oo),(0,de.mH)(co,Oo)},[]);xe.useEffect(function(){var Oo;function fo(Br){var Qr=Br,$s=Qr.currentTarget,us=Qr.deltaX;us&&(Fi({currentTarget:$s,scrollLeft:$s.scrollLeft+us}),Br.preventDefault())}return(Oo=co.current)===null||Oo===void 0||Oo.addEventListener("wheel",fo,{passive:!1}),function(){var Br;(Br=co.current)===null||Br===void 0||Br.removeEventListener("wheel",fo)}},[]);var es=xe.useMemo(function(){return Un.every(function(Oo){return Oo.width})},[Un]),nn=Un[Un.length-1],Fr={fixed:nn?nn.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ui,"-cell-scrollbar")}}},Vr=(0,xe.useMemo)(function(){return Lr?[].concat((0,Vi.Z)(Yn),[Fr]):Yn},[Lr,Yn]),rr=(0,xe.useMemo)(function(){return Lr?[].concat((0,Vi.Z)(Un),[Fr]):Un},[Lr,Un]),Mr=(0,xe.useMemo)(function(){var Oo=vi.right,fo=vi.left;return(0,Ze.Z)((0,Ze.Z)({},vi),{},{left:On==="rtl"?[].concat((0,Vi.Z)(fo.map(function(Br){return Br+Lr})),[0]):fo,right:On==="rtl"?Oo:[].concat((0,Vi.Z)(Oo.map(function(Br){return Br+Lr})),[0]),isSticky:pr})},[Lr,vi,pr]),tr=Qe(ni,li);return xe.createElement("div",{style:(0,Ze.Z)({overflow:"hidden"},pr?{top:qn,bottom:ti}:{}),ref:so,className:mt()(hn,(0,qe.Z)({},ii,!!ii))},xe.createElement(Ar,{style:{tableLayout:"fixed",visibility:ft||tr?null:"hidden"}},(!ft||!Si||es)&&xe.createElement(Ri,{colWidths:tr?[].concat((0,Vi.Z)(tr),[Lr]):[],columCount:li+1,columns:rr}),di((0,Ze.Z)((0,Ze.Z)({},Cn),{},{stickyOffsets:Mr,columns:Vr,flattenColumns:rr}))))}),ei=xe.memo(Ti),Ii=function(kn){var hn=kn.cells,ft=kn.stickyOffsets,Yn=kn.flattenColumns,Un=kn.rowComponent,ni=kn.cellComponent,li=kn.onHeaderRow,vi=kn.index,On=we(ve,["prefixCls","direction"]),Jn=On.prefixCls,qn=On.direction,ti;li&&(ti=li(hn.map(function(Fi){return Fi.column}),vi));var ii=ot(hn.map(function(Fi){return Fi.column}));return xe.createElement(Un,ti,hn.map(function(Fi,Si){var di=Fi.column,Cn=Yt(Fi.colStart,Fi.colEnd,Yn,ft,qn),pi;return di&&di.onHeaderCell&&(pi=Fi.column.onHeaderCell(di)),xe.createElement(Ft,(0,pe.Z)({},Fi,{scope:di.title?Fi.colSpan>1?"colgroup":"col":null,ellipsis:di.ellipsis,align:di.align,component:ni,prefixCls:Jn,key:ii[Si]},Cn,{additionalProps:pi,rowType:"header"}))}))},mr=Ii;function cr(an){var kn=[];function hn(ni,li){var vi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;kn[vi]=kn[vi]||[];var On=li,Jn=ni.filter(Boolean).map(function(qn){var ti={key:qn.key,className:qn.className||"",children:qn.title,column:qn,colStart:On},ii=1,Fi=qn.children;return Fi&&Fi.length>0&&(ii=hn(Fi,On,vi+1).reduce(function(Si,di){return Si+di},0),ti.hasSubColumns=!0),"colSpan"in qn&&(ii=qn.colSpan),"rowSpan"in qn&&(ti.rowSpan=qn.rowSpan),ti.colSpan=ii,ti.colEnd=ti.colStart+ii-1,kn[vi].push(ti),On+=ii,ii});return Jn}hn(an,0);for(var ft=kn.length,Yn=function(li){kn[li].forEach(function(vi){!("rowSpan"in vi)&&!vi.hasSubColumns&&(vi.rowSpan=ft-li)})},Un=0;Un<ft;Un+=1)Yn(Un);return kn}var ir=function(kn){var hn=kn.stickyOffsets,ft=kn.columns,Yn=kn.flattenColumns,Un=kn.onHeaderRow,ni=we(ve,["prefixCls","getComponent"]),li=ni.prefixCls,vi=ni.getComponent,On=xe.useMemo(function(){return cr(ft)},[ft]),Jn=vi(["header","wrapper"],"thead"),qn=vi(["header","row"],"tr"),ti=vi(["header","cell"],"th");return xe.createElement(Jn,{className:"".concat(li,"-thead")},On.map(function(ii,Fi){var Si=xe.createElement(mr,{key:Fi,flattenColumns:Yn,cells:ii,stickyOffsets:hn,rowComponent:qn,cellComponent:ti,onHeaderRow:Un,index:Fi});return Si}))},po=ae(ir),Vn=Re(78612);function He(an,kn,hn){var ft=(0,qi.g)(an),Yn=ft.expandIcon,Un=ft.expandedRowKeys,ni=ft.defaultExpandedRowKeys,li=ft.defaultExpandAllRows,vi=ft.expandedRowRender,On=ft.onExpand,Jn=ft.onExpandedRowsChange,qn=ft.childrenColumnName,ti=Yn||dn,ii=qn||"children",Fi=xe.useMemo(function(){return vi?"row":an.expandable&&an.internalHooks===ke.R&&an.expandable.__PARENT_RENDER_ICON__||kn.some(function(pr){return pr&&(0,Ie.Z)(pr)==="object"&&pr[ii]})?"nest":!1},[!!vi,kn]),Si=xe.useState(function(){return ni||(li?Zn(kn,hn,ii):[])}),di=(0,Se.Z)(Si,2),Cn=di[0],pi=di[1],Ui=xe.useMemo(function(){return new Set(Un||Cn||[])},[Un,Cn]),xr=xe.useCallback(function(pr){var Er=hn(pr,kn.indexOf(pr)),Ar,Lr=Ui.has(Er);Lr?(Ui.delete(Er),Ar=(0,Vi.Z)(Ui)):Ar=[].concat((0,Vi.Z)(Ui),[Er]),pi(Ar),On&&On(!Lr,pr),Jn&&Jn(Ar)},[hn,Ui,kn,On,Jn]);return[ft,Fi,Ui,ti,ii,xr]}function Xe(an,kn,hn){var ft=an.map(function(Yn,Un){return Yt(Un,Un,an,kn,hn)});return(0,gt.Z)(function(){return ft},[ft],function(Yn,Un){return!(0,Ce.Z)(Yn,Un)})}function nt(an){var kn=(0,xe.useRef)(an),hn=(0,xe.useState)({}),ft=(0,Se.Z)(hn,2),Yn=ft[1],Un=(0,xe.useRef)(null),ni=(0,xe.useRef)([]);function li(vi){ni.current.push(vi);var On=Promise.resolve();Un.current=On,On.then(function(){if(Un.current===On){var Jn=ni.current,qn=kn.current;ni.current=[],Jn.forEach(function(ti){kn.current=ti(kn.current)}),Un.current=null,qn!==kn.current&&Yn({})}})}return(0,xe.useEffect)(function(){return function(){Un.current=null}},[]),[kn.current,li]}function bt(an){var kn=(0,xe.useRef)(an||null),hn=(0,xe.useRef)();function ft(){window.clearTimeout(hn.current)}function Yn(ni){kn.current=ni,ft(),hn.current=window.setTimeout(function(){kn.current=null,hn.current=void 0},100)}function Un(){return kn.current}return(0,xe.useEffect)(function(){return ft},[]),[Yn,Un]}function Nt(){var an=xe.useState(-1),kn=(0,Se.Z)(an,2),hn=kn[0],ft=kn[1],Yn=xe.useState(-1),Un=(0,Se.Z)(Yn,2),ni=Un[0],li=Un[1],vi=xe.useCallback(function(On,Jn){ft(On),li(Jn)},[]);return[hn,ni,vi]}var sn=Re(47273),Zt=(0,sn.Z)()?window:null;function _n(an,kn){var hn=(0,Ie.Z)(an)==="object"?an:{},ft=hn.offsetHeader,Yn=ft===void 0?0:ft,Un=hn.offsetSummary,ni=Un===void 0?0:Un,li=hn.offsetScroll,vi=li===void 0?0:li,On=hn.getContainer,Jn=On===void 0?function(){return Zt}:On,qn=Jn()||Zt,ti=!!an;return xe.useMemo(function(){return{isSticky:ti,stickyClassName:ti?"".concat(kn,"-sticky-holder"):"",offsetHeader:Yn,offsetSummary:ni,offsetScroll:vi,container:qn}},[ti,vi,Yn,ni,kn,qn])}function Kt(an,kn,hn){var ft=(0,xe.useMemo)(function(){var Yn=kn.length,Un=function(On,Jn,qn){for(var ti=[],ii=0,Fi=On;Fi!==Jn;Fi+=qn)ti.push(ii),kn[Fi].fixed&&(ii+=an[Fi]||0);return ti},ni=Un(0,Yn,1),li=Un(Yn-1,-1,-1).reverse();return hn==="rtl"?{left:li,right:ni}:{left:ni,right:li}},[an,kn,hn]);return ft}var qt=Kt;function Hn(an){var kn=an.className,hn=an.children;return xe.createElement("div",{className:kn},hn)}var kt=Hn,ln=Re(8224),An=Re(16089),jn=Re(76846);function Qt(an){var kn=(0,jn.bn)(an),hn=kn.getBoundingClientRect(),ft=document.documentElement;return{left:hn.left+(window.pageXOffset||ft.scrollLeft)-(ft.clientLeft||document.body.clientLeft||0),top:hn.top+(window.pageYOffset||ft.scrollTop)-(ft.clientTop||document.body.clientTop||0)}}var rn=function(kn,hn){var ft,Yn,Un=kn.scrollBodyRef,ni=kn.onScroll,li=kn.offsetScroll,vi=kn.container,On=kn.direction,Jn=we(ve,"prefixCls"),qn=((ft=Un.current)===null||ft===void 0?void 0:ft.scrollWidth)||0,ti=((Yn=Un.current)===null||Yn===void 0?void 0:Yn.clientWidth)||0,ii=qn&&ti*(ti/qn),Fi=xe.useRef(),Si=nt({scrollLeft:0,isHiddenScrollBar:!0}),di=(0,Se.Z)(Si,2),Cn=di[0],pi=di[1],Ui=xe.useRef({delta:0,x:0}),xr=xe.useState(!1),pr=(0,Se.Z)(xr,2),Er=pr[0],Ar=pr[1],Lr=xe.useRef(null);xe.useEffect(function(){return function(){An.Z.cancel(Lr.current)}},[]);var co=function(){Ar(!1)},so=function(rr){rr.persist(),Ui.current.delta=rr.pageX-Cn.scrollLeft,Ui.current.x=0,Ar(!0),rr.preventDefault()},es=function(rr){var Mr,tr=rr||((Mr=window)===null||Mr===void 0?void 0:Mr.event),Oo=tr.buttons;if(!Er||Oo===0){Er&&Ar(!1);return}var fo=Ui.current.x+rr.pageX-Ui.current.x-Ui.current.delta,Br=On==="rtl";fo=Math.max(Br?ii-ti:0,Math.min(Br?0:ti-ii,fo));var Qr=!Br||Math.abs(fo)+Math.abs(ii)<ti;Qr&&(ni({scrollLeft:fo/ti*(qn+2)}),Ui.current.x=rr.pageX)},nn=function(){An.Z.cancel(Lr.current),Lr.current=(0,An.Z)(function(){if(Un.current){var rr=Qt(Un.current).top,Mr=rr+Un.current.offsetHeight,tr=vi===window?document.documentElement.scrollTop+window.innerHeight:Qt(vi).top+vi.clientHeight;Mr-(0,Lt.Z)()<=tr||rr>=tr-li?pi(function(Oo){return(0,Ze.Z)((0,Ze.Z)({},Oo),{},{isHiddenScrollBar:!0})}):pi(function(Oo){return(0,Ze.Z)((0,Ze.Z)({},Oo),{},{isHiddenScrollBar:!1})})}})},Fr=function(rr){pi(function(Mr){return(0,Ze.Z)((0,Ze.Z)({},Mr),{},{scrollLeft:rr/qn*ti||0})})};return xe.useImperativeHandle(hn,function(){return{setScrollLeft:Fr,checkScrollBarVisible:nn}}),xe.useEffect(function(){var Vr=(0,ln.Z)(document.body,"mouseup",co,!1),rr=(0,ln.Z)(document.body,"mousemove",es,!1);return nn(),function(){Vr.remove(),rr.remove()}},[ii,Er]),xe.useEffect(function(){if(Un.current){for(var Vr=[],rr=(0,jn.bn)(Un.current);rr;)Vr.push(rr),rr=rr.parentElement;return Vr.forEach(function(Mr){return Mr.addEventListener("scroll",nn,!1)}),window.addEventListener("resize",nn,!1),window.addEventListener("scroll",nn,!1),vi.addEventListener("scroll",nn,!1),function(){Vr.forEach(function(Mr){return Mr.removeEventListener("scroll",nn)}),window.removeEventListener("resize",nn),window.removeEventListener("scroll",nn),vi.removeEventListener("scroll",nn)}}},[vi]),xe.useEffect(function(){Cn.isHiddenScrollBar||pi(function(Vr){var rr=Un.current;return rr?(0,Ze.Z)((0,Ze.Z)({},Vr),{},{scrollLeft:rr.scrollLeft/rr.scrollWidth*rr.clientWidth}):Vr})},[Cn.isHiddenScrollBar]),qn<=ti||!ii||Cn.isHiddenScrollBar?null:xe.createElement("div",{style:{height:(0,Lt.Z)(),width:ti,bottom:li},className:"".concat(Jn,"-sticky-scroll")},xe.createElement("div",{onMouseDown:so,ref:Fi,className:mt()("".concat(Jn,"-sticky-scroll-bar"),(0,qe.Z)({},"".concat(Jn,"-sticky-scroll-bar-active"),Er)),style:{width:"".concat(ii,"px"),transform:"translate3d(".concat(Cn.scrollLeft,"px, 0, 0)")}}))},Pn=xe.forwardRef(rn);function Dn(an){return null}var oi=Dn;function ai(an){return null}var Gn=ai,Bn="rc-table",bi=[],Ei={};function Di(){return"No Data"}function yn(an,kn){var hn=(0,Ze.Z)({rowKey:"key",prefixCls:Bn,emptyText:Di},an),ft=hn.prefixCls,Yn=hn.className,Un=hn.rowClassName,ni=hn.style,li=hn.data,vi=hn.rowKey,On=hn.scroll,Jn=hn.tableLayout,qn=hn.direction,ti=hn.title,ii=hn.footer,Fi=hn.summary,Si=hn.caption,di=hn.id,Cn=hn.showHeader,pi=hn.components,Ui=hn.emptyText,xr=hn.onRow,pr=hn.onHeaderRow,Er=hn.onScroll,Ar=hn.internalHooks,Lr=hn.transformColumns,co=hn.internalRefs,so=hn.tailor,es=hn.getContainerWidth,nn=hn.sticky,Fr=hn.rowHoverable,Vr=Fr===void 0?!0:Fr,rr=li||bi,Mr=!!rr.length,tr=Ar===ke.R,Oo=xe.useCallback(function(mo,Dr){return(0,Mt.Z)(pi,mo)||Dr},[pi]),fo=xe.useMemo(function(){return typeof vi=="function"?vi:function(mo){var Dr=mo&&mo[vi];return Dr}},[vi]),Br=Oo(["body"]),Qr=Nt(),$s=(0,Se.Z)(Qr,3),us=$s[0],ha=$s[1],ea=$s[2],Qi=He(hn,rr,fo),To=(0,Se.Z)(Qi,6),as=To[0],Os=To[1],Hr=To[2],zr=To[3],zn=To[4],or=To[5],Gr=On==null?void 0:On.x,Zo=xe.useState(0),aa=(0,Se.Z)(Zo,2),Vs=aa[0],_r=aa[1],Es=(0,Vn.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},hn),as),{},{expandable:!!as.expandedRowRender,columnTitle:as.columnTitle,expandedKeys:Hr,getRowKey:fo,onTriggerExpand:or,expandIcon:zr,expandIconColumnIndex:as.expandIconColumnIndex,direction:qn,scrollWidth:tr&&so&&typeof Gr=="number"?Gr:null,clientWidth:Vs}),tr?Lr:null),xs=(0,Se.Z)(Es,4),fs=xs[0],jo=xs[1],ta=xs[2],Pa=xs[3],Xo=ta!=null?ta:Gr,Sa=xe.useMemo(function(){return{columns:fs,flattenColumns:jo}},[fs,jo]),Wa=xe.useRef(),xu=xe.useRef(),hs=xe.useRef(),tl=xe.useRef();xe.useImperativeHandle(kn,function(){return{nativeElement:Wa.current,scrollTo:function(Dr){var No;if(hs.current instanceof HTMLElement){var ya=Dr.index,ls=Dr.top,Wu=Dr.key;if(yt(ls)){var au;(au=hs.current)===null||au===void 0||au.scrollTo({top:ls})}else{var Eu,Ka=Wu!=null?Wu:fo(rr[ya]);(Eu=hs.current.querySelector('[data-row-key="'.concat(Ka,'"]')))===null||Eu===void 0||Eu.scrollIntoView()}}else(No=hs.current)!==null&&No!==void 0&&No.scrollTo&&hs.current.scrollTo(Dr)}}});var zu=xe.useRef(),wu=xe.useState(!1),Tl=(0,Se.Z)(wu,2),nl=Tl[0],ru=Tl[1],eh=xe.useState(!1),Hl=(0,Se.Z)(eh,2),Ts=Hl[0],Uu=Hl[1],th=nt(new Map),_u=(0,Se.Z)(th,2),ou=_u[0],ga=_u[1],ma=ot(jo),As=ma.map(function(mo){return ou.get(mo)}),zs=xe.useMemo(function(){return As},[As.join("_")]),zo=qt(zs,jo,qn),io=On&&ct(On.y),yo=On&&ct(Xo)||!!as.fixed,Us=yo&&jo.some(function(mo){var Dr=mo.fixed;return Dr}),Ls=xe.useRef(),Ns=_n(nn,ft),ji=Ns.isSticky,Za=Ns.offsetHeader,Wt=Ns.offsetSummary,Rn=Ns.offsetScroll,Gl=Ns.stickyClassName,Hu=Ns.container,Hs=xe.useMemo(function(){return Fi==null?void 0:Fi(rr)},[Fi,rr]),cl=(io||ji)&&xe.isValidElement(Hs)&&Hs.type===Ke&&Hs.props.fixed,su,Gu,bu;io&&(Gu={overflowY:Mr?"scroll":"auto",maxHeight:On.y}),yo&&(su={overflowX:"auto"},io||(Gu={overflowY:"hidden"}),bu={width:Xo===!0?"auto":Xo,minWidth:"100%"});var ps=xe.useCallback(function(mo,Dr){(0,Ve.Z)(Wa.current)&&ga(function(No){if(No.get(mo)!==Dr){var ya=new Map(No);return ya.set(mo,Dr),ya}return No})},[]),Rr=bt(null),va=(0,Se.Z)(Rr,2),Is=va[0],gs=va[1];function $r(mo,Dr){Dr&&(typeof Dr=="function"?Dr(mo):Dr.scrollLeft!==mo&&(Dr.scrollLeft=mo,Dr.scrollLeft!==mo&&setTimeout(function(){Dr.scrollLeft=mo},0)))}var ws=(0,Be.Z)(function(mo){var Dr=mo.currentTarget,No=mo.scrollLeft,ya=qn==="rtl",ls=typeof No=="number"?No:Dr.scrollLeft,Wu=Dr||Ei;if(!gs()||gs()===Wu){var au;Is(Wu),$r(ls,xu.current),$r(ls,hs.current),$r(ls,zu.current),$r(ls,(au=Ls.current)===null||au===void 0?void 0:au.setScrollLeft)}var Eu=Dr||xu.current;if(Eu){var Ka=tr&&so&&typeof Xo=="number"?Xo:Eu.scrollWidth,Vl=Eu.clientWidth;if(Ka===Vl){ru(!1),Uu(!1);return}ya?(ru(-ls<Ka-Vl),Uu(-ls>0)):(ru(ls>0),Uu(ls<Ka-Vl))}}),Ta=(0,Be.Z)(function(mo){ws(mo),Er==null||Er(mo)}),Jo=function(){if(yo&&hs.current){var Dr;ws({currentTarget:(0,jn.bn)(hs.current),scrollLeft:(Dr=hs.current)===null||Dr===void 0?void 0:Dr.scrollLeft})}else ru(!1),Uu(!1)},Va=function(Dr){var No,ya=Dr.width;(No=Ls.current)===null||No===void 0||No.checkScrollBarVisible();var ls=Wa.current?Wa.current.offsetWidth:ya;tr&&es&&Wa.current&&(ls=es(Wa.current,ls)||ls),ls!==Vs&&(Jo(),_r(ls))},na=xe.useRef(!1);xe.useEffect(function(){na.current&&Jo()},[yo,li,fs.length]),xe.useEffect(function(){na.current=!0},[]);var Pu=xe.useState(0),Io=(0,Se.Z)(Pu,2),ca=Io[0],Ro=Io[1],ns=xe.useState(!0),qo=(0,Se.Z)(ns,2),cs=qo[0],Ao=qo[1];xe.useEffect(function(){(!so||!tr)&&(hs.current instanceof Element?Ro((0,Lt.o)(hs.current).width):Ro((0,Lt.o)(tl.current).width)),Ao((0,pt.G)("position","sticky"))},[]),xe.useEffect(function(){tr&&co&&(co.body.current=hs.current)});var nh=xe.useCallback(function(mo){return xe.createElement(xe.Fragment,null,xe.createElement(po,mo),cl==="top"&&xe.createElement(ze,mo,Hs))},[cl,Hs]),Nr=xe.useCallback(function(mo){return xe.createElement(ze,mo,Hs)},[Hs]),vc=Oo(["table"],"table"),_o=xe.useMemo(function(){return Jn||(Us?Xo==="max-content"?"auto":"fixed":io||ji||jo.some(function(mo){var Dr=mo.ellipsis;return Dr})?"fixed":"auto")},[io,Us,jo,Jn,ji]),Gh,Cu={colWidths:zs,columCount:jo.length,stickyOffsets:zo,onHeaderRow:pr,fixHeader:io,scroll:On},ih=xe.useMemo(function(){return Mr?null:typeof Ui=="function"?Ui():Ui},[Mr,Ui]),Wh=xe.createElement(Gi,{data:rr,measureColumnWidth:io||yo||ji}),Ph=xe.createElement(Ri,{colWidths:jo.map(function(mo){var Dr=mo.width;return Dr}),columns:jo}),Wl=Si!=null?xe.createElement("caption",{className:"".concat(ft,"-caption")},Si):void 0,Kr=(0,on.Z)(hn,{data:!0}),Ho=(0,on.Z)(hn,{aria:!0});if(io||ji){var xl;typeof Br=="function"?(xl=Br(rr,{scrollbarSize:ca,ref:hs,onScroll:ws}),Cu.colWidths=jo.map(function(mo,Dr){var No=mo.width,ya=Dr===jo.length-1?No-ca:No;return typeof ya=="number"&&!Number.isNaN(ya)?ya:0})):xl=xe.createElement("div",{style:(0,Ze.Z)((0,Ze.Z)({},su),Gu),onScroll:Ta,ref:hs,className:mt()("".concat(ft,"-body"))},xe.createElement(vc,(0,pe.Z)({style:(0,Ze.Z)((0,Ze.Z)({},bu),{},{tableLayout:_o})},Ho),Wl,Ph,Wh,!cl&&Hs&&xe.createElement(ze,{stickyOffsets:zo,flattenColumns:jo},Hs)));var Ch=(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({noData:!rr.length,maxContentScroll:yo&&Xo==="max-content"},Cu),Sa),{},{direction:qn,stickyClassName:Gl,onScroll:ws});Gh=xe.createElement(xe.Fragment,null,Cn!==!1&&xe.createElement(ei,(0,pe.Z)({},Ch,{stickyTopOffset:Za,className:"".concat(ft,"-header"),ref:xu}),nh),xl,cl&&cl!=="top"&&xe.createElement(ei,(0,pe.Z)({},Ch,{stickyBottomOffset:Wt,className:"".concat(ft,"-summary"),ref:zu}),Nr),ji&&hs.current&&hs.current instanceof Element&&xe.createElement(Pn,{ref:Ls,offsetScroll:Rn,scrollBodyRef:hs,onScroll:ws,container:Hu,direction:qn}))}else Gh=xe.createElement("div",{style:(0,Ze.Z)((0,Ze.Z)({},su),Gu),className:mt()("".concat(ft,"-content")),onScroll:ws,ref:hs},xe.createElement(vc,(0,pe.Z)({style:(0,Ze.Z)((0,Ze.Z)({},bu),{},{tableLayout:_o})},Ho),Wl,Ph,Cn!==!1&&xe.createElement(po,(0,pe.Z)({},Cu,Sa)),Wh,Hs&&xe.createElement(ze,{stickyOffsets:zo,flattenColumns:jo},Hs)));var wl=xe.createElement("div",(0,pe.Z)({className:mt()(ft,Yn,(0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)((0,qe.Z)({},"".concat(ft,"-rtl"),qn==="rtl"),"".concat(ft,"-ping-left"),nl),"".concat(ft,"-ping-right"),Ts),"".concat(ft,"-layout-fixed"),Jn==="fixed"),"".concat(ft,"-fixed-header"),io),"".concat(ft,"-fixed-column"),Us),"".concat(ft,"-fixed-column-gapped"),Us&&Pa),"".concat(ft,"-scroll-horizontal"),yo),"".concat(ft,"-has-fix-left"),jo[0]&&jo[0].fixed),"".concat(ft,"-has-fix-right"),jo[jo.length-1]&&jo[jo.length-1].fixed==="right")),style:ni,id:di,ref:Wa},Kr),ti&&xe.createElement(kt,{className:"".concat(ft,"-title")},ti(rr)),xe.createElement("div",{ref:tl,className:"".concat(ft,"-container")},Gh),ii&&xe.createElement(kt,{className:"".concat(ft,"-footer")},ii(rr)));yo&&(wl=xe.createElement(We.Z,{onResize:Va},wl));var Eh=Xe(jo,zo,qn),Zl=xe.useMemo(function(){return{scrollX:Xo,prefixCls:ft,getComponent:Oo,scrollbarSize:ca,direction:qn,fixedInfoList:Eh,isSticky:ji,supportSticky:cs,componentWidth:Vs,fixHeader:io,fixColumn:Us,horizonScroll:yo,tableLayout:_o,rowClassName:Un,expandedRowClassName:as.expandedRowClassName,expandIcon:zr,expandableType:Os,expandRowByClick:as.expandRowByClick,expandedRowRender:as.expandedRowRender,onTriggerExpand:or,expandIconColumnIndex:as.expandIconColumnIndex,indentSize:as.indentSize,allColumnsFixedLeft:jo.every(function(mo){return mo.fixed==="left"}),emptyNode:ih,columns:fs,flattenColumns:jo,onColumnResize:ps,hoverStartRow:us,hoverEndRow:ha,onHover:ea,rowExpandable:as.rowExpandable,onRow:xr,getRowKey:fo,expandedKeys:Hr,childrenColumnName:zn,rowHoverable:Vr}},[Xo,ft,Oo,ca,qn,Eh,ji,cs,Vs,io,Us,yo,_o,Un,as.expandedRowClassName,zr,Os,as.expandRowByClick,as.expandedRowRender,or,as.expandIconColumnIndex,as.indentSize,ih,fs,jo,ps,us,ha,ea,as.rowExpandable,xr,fo,Hr,zn,Vr]);return xe.createElement(ve.Provider,{value:Zl},wl)}var Tr=xe.forwardRef(yn);function ur(an){return re(Tr,an)}var wr=ur();wr.EXPAND_COLUMN=ke.w,wr.INTERNAL_HOOKS=ke.R,wr.Column=oi,wr.ColumnGroup=Gn,wr.Summary=$e;var pn=wr,$n=Re(45680),yi=ye(null),Mi=ye(null);function mi(an,kn,hn){var ft=kn||1;return hn[an+ft]-(hn[an]||0)}function Li(an){var kn=an.rowInfo,hn=an.column,ft=an.colIndex,Yn=an.indent,Un=an.index,ni=an.component,li=an.renderIndex,vi=an.record,On=an.style,Jn=an.className,qn=an.inverse,ti=an.getHeight,ii=hn.render,Fi=hn.dataIndex,Si=hn.className,di=hn.width,Cn=we(Mi,["columnsOffset"]),pi=Cn.columnsOffset,Ui=Wn(kn,hn,ft,Yn,Un),xr=Ui.key,pr=Ui.fixedInfo,Er=Ui.appendCellNode,Ar=Ui.additionalCellProps,Lr=Ar.style,co=Ar.colSpan,so=co===void 0?1:co,es=Ar.rowSpan,nn=es===void 0?1:es,Fr=ft-1,Vr=mi(Fr,so,pi),rr=so>1?di-Vr:0,Mr=(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},Lr),On),{},{flex:"0 0 ".concat(Vr,"px"),width:"".concat(Vr,"px"),marginRight:rr,pointerEvents:"auto"}),tr=xe.useMemo(function(){return qn?nn<=1:so===0||nn===0||nn>1},[nn,so,qn]);tr?Mr.visibility="hidden":qn&&(Mr.height=ti==null?void 0:ti(nn));var Oo=tr?function(){return null}:ii,fo={};return(nn===0||so===0)&&(fo.rowSpan=1,fo.colSpan=1),xe.createElement(Ft,(0,pe.Z)({className:mt()(Si,Jn),ellipsis:hn.ellipsis,align:hn.align,scope:hn.rowScope,component:ni,prefixCls:kn.prefixCls,key:xr,record:vi,index:Un,renderIndex:li,dataIndex:Fi,render:Oo,shouldCellUpdate:hn.shouldCellUpdate},pr,{appendNode:Er,additionalProps:(0,Ze.Z)((0,Ze.Z)({},Ar),{},{style:Mr},fo)}))}var dr=Li,ar=["data","index","className","rowKey","style","extra","getHeight"],vr=xe.forwardRef(function(an,kn){var hn=an.data,ft=an.index,Yn=an.className,Un=an.rowKey,ni=an.style,li=an.extra,vi=an.getHeight,On=(0,je.Z)(an,ar),Jn=hn.record,qn=hn.indent,ti=hn.index,ii=we(ve,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Fi=ii.scrollX,Si=ii.flattenColumns,di=ii.prefixCls,Cn=ii.fixColumn,pi=ii.componentWidth,Ui=we(yi,["getComponent"]),xr=Ui.getComponent,pr=fn(Jn,Un,ft,qn),Er=xr(["body","row"],"div"),Ar=xr(["body","cell"],"div"),Lr=pr.rowSupportExpand,co=pr.expanded,so=pr.rowProps,es=pr.expandedRowRender,nn=pr.expandedRowClassName,Fr;if(Lr&&co){var Vr=es(Jn,ft,qn+1,co),rr=vn(nn,Jn,ft,qn),Mr={};Cn&&(Mr={style:(0,qe.Z)({},"--virtual-width","".concat(pi,"px"))});var tr="".concat(di,"-expanded-row-cell");Fr=xe.createElement(Er,{className:mt()("".concat(di,"-expanded-row"),"".concat(di,"-expanded-row-level-").concat(qn+1),rr)},xe.createElement(Ft,{component:Ar,prefixCls:di,className:mt()(tr,(0,qe.Z)({},"".concat(tr,"-fixed"),Cn)),additionalProps:Mr},Vr))}var Oo=(0,Ze.Z)((0,Ze.Z)({},ni),{},{width:Fi});li&&(Oo.position="absolute",Oo.pointerEvents="none");var fo=xe.createElement(Er,(0,pe.Z)({},so,On,{"data-row-key":Un,ref:Lr?null:kn,className:mt()(Yn,"".concat(di,"-row"),so==null?void 0:so.className,(0,qe.Z)({},"".concat(di,"-row-extra"),li)),style:(0,Ze.Z)((0,Ze.Z)({},Oo),so==null?void 0:so.style)}),Si.map(function(Br,Qr){return xe.createElement(dr,{key:Qr,component:Ar,rowInfo:pr,column:Br,colIndex:Qr,indent:qn,index:ft,renderIndex:ti,record:Jn,inverse:li,getHeight:vi})}));return Lr?xe.createElement("div",{ref:kn},fo,Fr):fo}),Cr=ae(vr),Ln=Cr,Yr=xe.forwardRef(function(an,kn){var hn=an.data,ft=an.onScroll,Yn=we(ve,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Un=Yn.flattenColumns,ni=Yn.onColumnResize,li=Yn.getRowKey,vi=Yn.expandedKeys,On=Yn.prefixCls,Jn=Yn.childrenColumnName,qn=Yn.scrollX,ti=Yn.direction,ii=we(yi),Fi=ii.sticky,Si=ii.scrollY,di=ii.listItemHeight,Cn=ii.getComponent,pi=ii.onScroll,Ui=xe.useRef(),xr=Rt(hn,Jn,vi,li),pr=xe.useMemo(function(){var Fr=0;return Un.map(function(Vr){var rr=Vr.width,Mr=Vr.key;return Fr+=rr,[Mr,rr,Fr]})},[Un]),Er=xe.useMemo(function(){return pr.map(function(Fr){return Fr[2]})},[pr]);xe.useEffect(function(){pr.forEach(function(Fr){var Vr=(0,Se.Z)(Fr,2),rr=Vr[0],Mr=Vr[1];ni(rr,Mr)})},[pr]),xe.useImperativeHandle(kn,function(){var Fr,Vr={scrollTo:function(Mr){var tr;(tr=Ui.current)===null||tr===void 0||tr.scrollTo(Mr)},nativeElement:(Fr=Ui.current)===null||Fr===void 0?void 0:Fr.nativeElement};return Object.defineProperty(Vr,"scrollLeft",{get:function(){var Mr;return((Mr=Ui.current)===null||Mr===void 0?void 0:Mr.getScrollInfo().x)||0},set:function(Mr){var tr;(tr=Ui.current)===null||tr===void 0||tr.scrollTo({left:Mr})}}),Vr});var Ar=function(Vr,rr){var Mr,tr=(Mr=xr[rr])===null||Mr===void 0?void 0:Mr.record,Oo=Vr.onCell;if(Oo){var fo,Br=Oo(tr,rr);return(fo=Br==null?void 0:Br.rowSpan)!==null&&fo!==void 0?fo:1}return 1},Lr=function(Vr){var rr=Vr.start,Mr=Vr.end,tr=Vr.getSize,Oo=Vr.offsetY;if(Mr<0)return null;for(var fo=Un.filter(function(zr){return Ar(zr,rr)===0}),Br=rr,Qr=function(zn){if(fo=fo.filter(function(or){return Ar(or,zn)===0}),!fo.length)return Br=zn,1},$s=rr;$s>=0&&!Qr($s);$s-=1);for(var us=Un.filter(function(zr){return Ar(zr,Mr)!==1}),ha=Mr,ea=function(zn){if(us=us.filter(function(or){return Ar(or,zn)!==1}),!us.length)return ha=Math.max(zn-1,Mr),1},Qi=Mr;Qi<xr.length&&!ea(Qi);Qi+=1);for(var To=[],as=function(zn){var or=xr[zn];if(!or)return 1;Un.some(function(Gr){return Ar(Gr,zn)>1})&&To.push(zn)},Os=Br;Os<=ha;Os+=1)as(Os);var Hr=To.map(function(zr){var zn=xr[zr],or=li(zn.record,zr),Gr=function(Vs){var _r=zr+Vs-1,Es=li(xr[_r].record,_r),xs=tr(or,Es);return xs.bottom-xs.top},Zo=tr(or);return xe.createElement(Ln,{key:zr,data:zn,rowKey:or,index:zr,style:{top:-Oo+Zo.top},extra:!0,getHeight:Gr})});return Hr},co=xe.useMemo(function(){return{columnsOffset:Er}},[Er]),so="".concat(On,"-tbody"),es=Cn(["body","wrapper"]),nn={};return Fi&&(nn.position="sticky",nn.bottom=0,(0,Ie.Z)(Fi)==="object"&&Fi.offsetScroll&&(nn.bottom=Fi.offsetScroll)),xe.createElement(Mi.Provider,{value:co},xe.createElement($n.Z,{fullHeight:!1,ref:Ui,prefixCls:"".concat(so,"-virtual"),styles:{horizontalScrollBar:nn},className:so,height:Si,itemHeight:di||24,data:xr,itemKey:function(Vr){return li(Vr.record)},component:es,scrollWidth:qn,direction:ti,onVirtualScroll:function(Vr){var rr,Mr=Vr.x;ft({currentTarget:(rr=Ui.current)===null||rr===void 0?void 0:rr.nativeElement,scrollLeft:Mr})},onScroll:pi,extraRender:Lr},function(Fr,Vr,rr){var Mr=li(Fr.record,Vr);return xe.createElement(Ln,{data:Fr,rowKey:Mr,index:Vr,style:rr.style})}))}),Mn=ae(Yr),Ai=Mn,zi=function(kn,hn){var ft=hn.ref,Yn=hn.onScroll;return xe.createElement(Ai,{ref:ft,data:kn,onScroll:Yn})};function Xi(an,kn){var hn=an.data,ft=an.columns,Yn=an.scroll,Un=an.sticky,ni=an.prefixCls,li=ni===void 0?Bn:ni,vi=an.className,On=an.listItemHeight,Jn=an.components,qn=an.onScroll,ti=Yn||{},ii=ti.x,Fi=ti.y;typeof ii!="number"&&(ii=1),typeof Fi!="number"&&(Fi=500);var Si=(0,cn.zX)(function(pi,Ui){return(0,Mt.Z)(Jn,pi)||Ui}),di=(0,cn.zX)(qn),Cn=xe.useMemo(function(){return{sticky:Un,scrollY:Fi,listItemHeight:On,getComponent:Si,onScroll:di}},[Un,Fi,On,Si,di]);return xe.createElement(yi.Provider,{value:Cn},xe.createElement(pn,(0,pe.Z)({},an,{className:mt()(vi,"".concat(li,"-virtual")),scroll:(0,Ze.Z)((0,Ze.Z)({},Yn),{},{x:ii}),components:(0,Ze.Z)((0,Ze.Z)({},Jn),{},{body:hn!=null&&hn.length?zi:void 0}),columns:ft,internalHooks:ke.R,tailor:!0,ref:kn})))}var lo=xe.forwardRef(Xi);function oo(an){return re(lo,an)}var qr=oo(),uo=null},90494:function(xn,un,Re){"use strict";Re.d(un,{g:function(){return xe},v:function(){return Ce}});var ke=Re(77321),Se=Re(74416),Be=Re(48736),Le=["expandable"],Ce="RC_TABLE_INTERNAL_COL_DEFINE";function xe(be){var ye=be.expandable,we=(0,Se.Z)(be,Le),pe;return"expandable"in be?pe=(0,ke.Z)((0,ke.Z)({},we),ye):pe=we,pe.showExpandColumn===!1&&(pe.expandIconColumnIndex=-1),pe}},22711:function(xn,un,Re){"use strict";Re.r(un),Re.d(un,{ResizableTextArea:function(){return Je},default:function(){return at}});var ke=Re(72308),Se=Re(49618),Be=Re(77321),Le=Re(80702),Ce=Re(52487),xe=Re(74416),be=Re(92310),ye=Re.n(be),we=Re(36901),pe=Re(66003),de=Re(30292),ge=Re(18929),fe=Re(59301),ue=Re(62853),ee=Re(29301),z=Re(34280),oe=Re(16089),re=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,ae=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],le={},me;function ve(_t){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dt=_t.getAttribute("id")||_t.getAttribute("data-reactid")||_t.getAttribute("name");if(ht&&le[Dt])return le[Dt];var ut=window.getComputedStyle(_t),ot=ut.getPropertyValue("box-sizing")||ut.getPropertyValue("-moz-box-sizing")||ut.getPropertyValue("-webkit-box-sizing"),ct=parseFloat(ut.getPropertyValue("padding-bottom"))+parseFloat(ut.getPropertyValue("padding-top")),yt=parseFloat(ut.getPropertyValue("border-bottom-width"))+parseFloat(ut.getPropertyValue("border-top-width")),wt=ae.map(function(zt){return"".concat(zt,":").concat(ut.getPropertyValue(zt))}).join(";"),xt={sizingStyle:wt,paddingSize:ct,borderSize:yt,boxSizing:ot};return ht&&Dt&&(le[Dt]=xt),xt}function Pe(_t){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;me||(me=document.createElement("textarea"),me.setAttribute("tab-index","-1"),me.setAttribute("aria-hidden","true"),me.setAttribute("name","hiddenTextarea"),document.body.appendChild(me)),_t.getAttribute("wrap")?me.setAttribute("wrap",_t.getAttribute("wrap")):me.removeAttribute("wrap");var ot=ve(_t,ht),ct=ot.paddingSize,yt=ot.borderSize,wt=ot.boxSizing,xt=ot.sizingStyle;me.setAttribute("style","".concat(xt,";").concat(re)),me.value=_t.value||_t.placeholder||"";var zt=void 0,Ut=void 0,cn,jt=me.scrollHeight;if(wt==="border-box"?jt+=yt:wt==="content-box"&&(jt-=ct),Dt!==null||ut!==null){me.value=" ";var mn=me.scrollHeight-ct;Dt!==null&&(zt=mn*Dt,wt==="border-box"&&(zt=zt+ct+yt),jt=Math.max(zt,jt)),ut!==null&&(Ut=mn*ut,wt==="border-box"&&(Ut=Ut+ct+yt),cn=jt>Ut?"":"hidden",jt=Math.min(Ut,jt))}var Ft={height:jt,overflowY:cn,resize:"none"};return zt&&(Ft.minHeight=zt),Ut&&(Ft.maxHeight=Ut),Ft}var Ae=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Oe=0,Ie=1,Ze=2,qe=fe.forwardRef(function(_t,ht){var Dt=_t,ut=Dt.prefixCls,ot=Dt.defaultValue,ct=Dt.value,yt=Dt.autoSize,wt=Dt.onResize,xt=Dt.className,zt=Dt.style,Ut=Dt.disabled,cn=Dt.onChange,jt=Dt.onInternalAutoSize,mn=(0,xe.Z)(Dt,Ae),Ft=(0,ge.Z)(ot,{value:ct,postState:function(ri){return ri!=null?ri:""}}),Yt=(0,Ce.Z)(Ft,2),tn=Yt[0],lt=Yt[1],Ue=function(ri){lt(ri.target.value),cn==null||cn(ri)},je=fe.useRef();fe.useImperativeHandle(ht,function(){return{textArea:je.current}});var rt=fe.useMemo(function(){return yt&&(0,ue.Z)(yt)==="object"?[yt.minRows,yt.maxRows]:[]},[yt]),dt=(0,Ce.Z)(rt,2),tt=dt[0],Ke=dt[1],De=!!yt,ze=function(){try{if(document.activeElement===je.current){var ri=je.current,Ni=ri.selectionStart,Qn=ri.selectionEnd,ki=ri.scrollTop;je.current.setSelectionRange(Ni,Qn),je.current.scrollTop=ki}}catch(Hi){}},$e=fe.useState(Ze),We=(0,Ce.Z)($e,2),Ve=We[0],pt=We[1],Lt=fe.useState(),on=(0,Ce.Z)(Lt,2),Xt=on[0],Rt=on[1],fn=function(){pt(Oe)};(0,z.Z)(function(){De&&fn()},[ct,tt,Ke,De]),(0,z.Z)(function(){if(Ve===Oe)pt(Ie);else if(Ve===Ie){var Wn=Pe(je.current,!1,tt,Ke);pt(Ze),Rt(Wn)}else ze()},[Ve]);var En=fe.useRef(),Sn=function(){oe.Z.cancel(En.current)},dn=function(ri){Ve===Ze&&(wt==null||wt(ri),yt&&(Sn(),En.current=(0,oe.Z)(function(){fn()})))};fe.useEffect(function(){return Sn},[]);var Zn=De?Xt:null,vn=(0,Be.Z)((0,Be.Z)({},zt),Zn);return(Ve===Oe||Ve===Ie)&&(vn.overflowY="hidden",vn.overflowX="hidden"),fe.createElement(ee.Z,{onResize:dn,disabled:!(yt||wt)},fe.createElement("textarea",(0,ke.Z)({},mn,{ref:je,style:vn,className:ye()(ut,xt,(0,Se.Z)({},"".concat(ut,"-disabled"),Ut)),disabled:Ut,value:tn,onChange:Ue})))}),Je=qe,mt=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],gt=fe.forwardRef(function(_t,ht){var Dt,ut=_t.defaultValue,ot=_t.value,ct=_t.onFocus,yt=_t.onBlur,wt=_t.onChange,xt=_t.allowClear,zt=_t.maxLength,Ut=_t.onCompositionStart,cn=_t.onCompositionEnd,jt=_t.suffix,mn=_t.prefixCls,Ft=mn===void 0?"rc-textarea":mn,Yt=_t.showCount,tn=_t.count,lt=_t.className,Ue=_t.style,je=_t.disabled,rt=_t.hidden,dt=_t.classNames,tt=_t.styles,Ke=_t.onResize,De=_t.onClear,ze=_t.onPressEnter,$e=_t.readOnly,We=_t.autoSize,Ve=_t.onKeyDown,pt=(0,xe.Z)(_t,mt),Lt=(0,ge.Z)(ut,{value:ot,defaultValue:ut}),on=(0,Ce.Z)(Lt,2),Xt=on[0],Rt=on[1],fn=Xt==null?"":String(Xt),En=fe.useState(!1),Sn=(0,Ce.Z)(En,2),dn=Sn[0],Zn=Sn[1],vn=fe.useRef(!1),Wn=fe.useState(null),ri=(0,Ce.Z)(Wn,2),Ni=ri[0],Qn=ri[1],ki=(0,fe.useRef)(null),Hi=(0,fe.useRef)(null),Gi=function(){var Kt;return(Kt=Hi.current)===null||Kt===void 0?void 0:Kt.textArea},qi=function(){Gi().focus()};(0,fe.useImperativeHandle)(ht,function(){var _n;return{resizableTextArea:Hi.current,focus:qi,blur:function(){Gi().blur()},nativeElement:((_n=ki.current)===null||_n===void 0?void 0:_n.nativeElement)||Gi()}}),(0,fe.useEffect)(function(){Zn(function(_n){return!je&&_n})},[je]);var Pr=fe.useState(null),gr=(0,Ce.Z)(Pr,2),Ri=gr[0],Vi=gr[1];fe.useEffect(function(){if(Ri){var _n;(_n=Gi()).setSelectionRange.apply(_n,(0,Le.Z)(Ri))}},[Ri]);var sr=(0,pe.Z)(tn,Yt),Qe=(Dt=sr.max)!==null&&Dt!==void 0?Dt:zt,Ti=Number(Qe)>0,ei=sr.strategy(fn),Ii=!!Qe&&ei>Qe,mr=function(Kt,qt){var Hn=qt;!vn.current&&sr.exceedFormatter&&sr.max&&sr.strategy(qt)>sr.max&&(Hn=sr.exceedFormatter(qt,{max:sr.max}),qt!==Hn&&Vi([Gi().selectionStart||0,Gi().selectionEnd||0])),Rt(Hn),(0,de.rJ)(Kt.currentTarget,Kt,wt,Hn)},cr=function(Kt){vn.current=!0,Ut==null||Ut(Kt)},ir=function(Kt){vn.current=!1,mr(Kt,Kt.currentTarget.value),cn==null||cn(Kt)},po=function(Kt){mr(Kt,Kt.target.value)},Vn=function(Kt){Kt.key==="Enter"&&ze&&ze(Kt),Ve==null||Ve(Kt)},He=function(Kt){Zn(!0),ct==null||ct(Kt)},Xe=function(Kt){Zn(!1),yt==null||yt(Kt)},nt=function(Kt){Rt(""),qi(),(0,de.rJ)(Gi(),Kt,wt)},bt=jt,Nt;sr.show&&(sr.showFormatter?Nt=sr.showFormatter({value:fn,count:ei,maxLength:Qe}):Nt="".concat(ei).concat(Ti?" / ".concat(Qe):""),bt=fe.createElement(fe.Fragment,null,bt,fe.createElement("span",{className:ye()("".concat(Ft,"-data-count"),dt==null?void 0:dt.count),style:tt==null?void 0:tt.count},Nt)));var sn=function(Kt){var qt;Ke==null||Ke(Kt),(qt=Gi())!==null&&qt!==void 0&&qt.style.height&&Qn(!0)},Zt=!We&&!Yt&&!xt;return fe.createElement(we.BaseInput,{ref:ki,value:fn,allowClear:xt,handleReset:nt,suffix:bt,prefixCls:Ft,classNames:(0,Be.Z)((0,Be.Z)({},dt),{},{affixWrapper:ye()(dt==null?void 0:dt.affixWrapper,(0,Se.Z)((0,Se.Z)({},"".concat(Ft,"-show-count"),Yt),"".concat(Ft,"-textarea-allow-clear"),xt))}),disabled:je,focused:dn,className:ye()(lt,Ii&&"".concat(Ft,"-out-of-range")),style:(0,Be.Z)((0,Be.Z)({},Ue),Ni&&!Zt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Nt=="string"?Nt:void 0}},hidden:rt,readOnly:$e,onClear:De},fe.createElement(Je,(0,ke.Z)({},pt,{autoSize:We,maxLength:zt,onKeyDown:Vn,onChange:po,onFocus:He,onBlur:Xe,onCompositionStart:cr,onCompositionEnd:ir,className:ye()(dt==null?void 0:dt.textarea),style:(0,Be.Z)((0,Be.Z)({},tt==null?void 0:tt.textarea),{},{resize:Ue==null?void 0:Ue.resize}),disabled:je,prefixCls:Ft,onResize:sn,ref:Hi,readOnly:$e})))}),Mt=gt,at=Mt},639:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return le}});var ke=Re(72308),Se=Re(49618),Be=Re(77321),Le=Re(52487),Ce=Re(74416),xe=Re(59301),be=Re(92310),ye=Re.n(be),we=Re(26112),pe=Re(30699),de=function(ve){for(var Pe=ve.prefixCls,Ae=ve.level,Oe=ve.isStart,Ie=ve.isEnd,Ze="".concat(Pe,"-indent-unit"),qe=[],Je=0;Je<Ae;Je+=1)qe.push(xe.createElement("span",{key:Je,className:ye()(Ze,(0,Se.Z)((0,Se.Z)({},"".concat(Ze,"-start"),Oe[Je]),"".concat(Ze,"-end"),Ie[Je]))}));return xe.createElement("span",{"aria-hidden":"true",className:"".concat(Pe,"-indent")},qe)},ge=xe.memo(de),fe=Re(65065),ue=Re(34061),ee=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],z="open",oe="close",re="---",ae=function(ve){var Pe,Ae,Oe,Ie=ve.eventKey,Ze=ve.className,qe=ve.style,Je=ve.dragOver,mt=ve.dragOverGapTop,gt=ve.dragOverGapBottom,Mt=ve.isLeaf,at=ve.isStart,_t=ve.isEnd,ht=ve.expanded,Dt=ve.selected,ut=ve.checked,ot=ve.halfChecked,ct=ve.loading,yt=ve.domRef,wt=ve.active,xt=ve.data,zt=ve.onMouseMove,Ut=ve.selectable,cn=(0,Ce.Z)(ve,ee),jt=xe.useContext(pe.k),mn=xe.useContext(pe.y),Ft=xe.useRef(null),Yt=xe.useState(!1),tn=(0,Le.Z)(Yt,2),lt=tn[0],Ue=tn[1],je=!!(jt.disabled||ve.disabled||(Pe=mn.nodeDisabled)!==null&&Pe!==void 0&&Pe.call(mn,xt)),rt=xe.useMemo(function(){return!jt.checkable||ve.checkable===!1?!1:jt.checkable},[jt.checkable,ve.checkable]),dt=function(ei){je||jt.onNodeSelect(ei,(0,ue.F)(ve))},tt=function(ei){je||!rt||ve.disableCheckbox||jt.onNodeCheck(ei,(0,ue.F)(ve),!ut)},Ke=xe.useMemo(function(){return typeof Ut=="boolean"?Ut:jt.selectable},[Ut,jt.selectable]),De=function(ei){jt.onNodeClick(ei,(0,ue.F)(ve)),Ke?dt(ei):tt(ei)},ze=function(ei){jt.onNodeDoubleClick(ei,(0,ue.F)(ve))},$e=function(ei){jt.onNodeMouseEnter(ei,(0,ue.F)(ve))},We=function(ei){jt.onNodeMouseLeave(ei,(0,ue.F)(ve))},Ve=function(ei){jt.onNodeContextMenu(ei,(0,ue.F)(ve))},pt=xe.useMemo(function(){return!!(jt.draggable&&(!jt.draggable.nodeDraggable||jt.draggable.nodeDraggable(xt)))},[jt.draggable,xt]),Lt=function(ei){ei.stopPropagation(),Ue(!0),jt.onNodeDragStart(ei,ve);try{ei.dataTransfer.setData("text/plain","")}catch(Ii){}},on=function(ei){ei.preventDefault(),ei.stopPropagation(),jt.onNodeDragEnter(ei,ve)},Xt=function(ei){ei.preventDefault(),ei.stopPropagation(),jt.onNodeDragOver(ei,ve)},Rt=function(ei){ei.stopPropagation(),jt.onNodeDragLeave(ei,ve)},fn=function(ei){ei.stopPropagation(),Ue(!1),jt.onNodeDragEnd(ei,ve)},En=function(ei){ei.preventDefault(),ei.stopPropagation(),Ue(!1),jt.onNodeDrop(ei,ve)},Sn=function(ei){ct||jt.onNodeExpand(ei,(0,ue.F)(ve))},dn=xe.useMemo(function(){var Ti=(0,fe.Z)(jt.keyEntities,Ie)||{},ei=Ti.children;return!!(ei||[]).length},[jt.keyEntities,Ie]),Zn=xe.useMemo(function(){return Mt===!1?!1:Mt||!jt.loadData&&!dn||jt.loadData&&ve.loaded&&!dn},[Mt,jt.loadData,dn,ve.loaded]);xe.useEffect(function(){ct||typeof jt.loadData=="function"&&ht&&!Zn&&!ve.loaded&&jt.onNodeLoad((0,ue.F)(ve))},[ct,jt.loadData,jt.onNodeLoad,ht,Zn,ve]);var vn=xe.useMemo(function(){var Ti;return(Ti=jt.draggable)!==null&&Ti!==void 0&&Ti.icon?xe.createElement("span",{className:"".concat(jt.prefixCls,"-draggable-icon")},jt.draggable.icon):null},[jt.draggable]),Wn=function(ei){var Ii=ve.switcherIcon||jt.switcherIcon;return typeof Ii=="function"?Ii((0,Be.Z)((0,Be.Z)({},ve),{},{isLeaf:ei})):Ii},ri=function(){if(Zn){var ei=Wn(!0);return ei!==!1?xe.createElement("span",{className:ye()("".concat(jt.prefixCls,"-switcher"),"".concat(jt.prefixCls,"-switcher-noop"))},ei):null}var Ii=Wn(!1);return Ii!==!1?xe.createElement("span",{onClick:Sn,className:ye()("".concat(jt.prefixCls,"-switcher"),"".concat(jt.prefixCls,"-switcher_").concat(ht?z:oe))},Ii):null},Ni=xe.useMemo(function(){if(!rt)return null;var Ti=typeof rt!="boolean"?rt:null;return xe.createElement("span",{className:ye()("".concat(jt.prefixCls,"-checkbox"),(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(jt.prefixCls,"-checkbox-checked"),ut),"".concat(jt.prefixCls,"-checkbox-indeterminate"),!ut&&ot),"".concat(jt.prefixCls,"-checkbox-disabled"),je||ve.disableCheckbox)),onClick:tt,role:"checkbox","aria-checked":ot?"mixed":ut,"aria-disabled":je||ve.disableCheckbox,"aria-label":"Select ".concat(typeof ve.title=="string"?ve.title:"tree node")},Ti)},[rt,ut,ot,je,ve.disableCheckbox,ve.title]),Qn=xe.useMemo(function(){return Zn?null:ht?z:oe},[Zn,ht]),ki=xe.useMemo(function(){return xe.createElement("span",{className:ye()("".concat(jt.prefixCls,"-iconEle"),"".concat(jt.prefixCls,"-icon__").concat(Qn||"docu"),(0,Se.Z)({},"".concat(jt.prefixCls,"-icon_loading"),ct))})},[jt.prefixCls,Qn,ct]),Hi=xe.useMemo(function(){var Ti=!!jt.draggable,ei=!ve.disabled&&Ti&&jt.dragOverNodeKey===Ie;return ei?jt.dropIndicatorRender({dropPosition:jt.dropPosition,dropLevelOffset:jt.dropLevelOffset,indent:jt.indent,prefixCls:jt.prefixCls,direction:jt.direction}):null},[jt.dropPosition,jt.dropLevelOffset,jt.indent,jt.prefixCls,jt.direction,jt.draggable,jt.dragOverNodeKey,jt.dropIndicatorRender]),Gi=xe.useMemo(function(){var Ti=ve.title,ei=Ti===void 0?re:Ti,Ii="".concat(jt.prefixCls,"-node-content-wrapper"),mr;if(jt.showIcon){var cr=ve.icon||jt.icon;mr=cr?xe.createElement("span",{className:ye()("".concat(jt.prefixCls,"-iconEle"),"".concat(jt.prefixCls,"-icon__customize"))},typeof cr=="function"?cr(ve):cr):ki}else jt.loadData&&ct&&(mr=ki);var ir;return typeof ei=="function"?ir=ei(xt):jt.titleRender?ir=jt.titleRender(xt):ir=ei,xe.createElement("span",{ref:Ft,title:typeof ei=="string"?ei:"",className:ye()(Ii,"".concat(Ii,"-").concat(Qn||"normal"),(0,Se.Z)({},"".concat(jt.prefixCls,"-node-selected"),!je&&(Dt||lt))),onMouseEnter:$e,onMouseLeave:We,onContextMenu:Ve,onClick:De,onDoubleClick:ze},mr,xe.createElement("span",{className:"".concat(jt.prefixCls,"-title")},ir),Hi)},[jt.prefixCls,jt.showIcon,ve,jt.icon,ki,jt.titleRender,xt,Qn,$e,We,Ve,De,ze]),qi=(0,we.Z)(cn,{aria:!0,data:!0}),Pr=(0,fe.Z)(jt.keyEntities,Ie)||{},gr=Pr.level,Ri=_t[_t.length-1],Vi=!je&&pt,sr=jt.draggingNodeKey===Ie,Qe=Ut!==void 0?{"aria-selected":!!Ut}:void 0;return xe.createElement("div",(0,ke.Z)({ref:yt,role:"treeitem","aria-expanded":Mt?void 0:ht,className:ye()(Ze,"".concat(jt.prefixCls,"-treenode"),(Oe={},(0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)(Oe,"".concat(jt.prefixCls,"-treenode-disabled"),je),"".concat(jt.prefixCls,"-treenode-switcher-").concat(ht?"open":"close"),!Mt),"".concat(jt.prefixCls,"-treenode-checkbox-checked"),ut),"".concat(jt.prefixCls,"-treenode-checkbox-indeterminate"),ot),"".concat(jt.prefixCls,"-treenode-selected"),Dt),"".concat(jt.prefixCls,"-treenode-loading"),ct),"".concat(jt.prefixCls,"-treenode-active"),wt),"".concat(jt.prefixCls,"-treenode-leaf-last"),Ri),"".concat(jt.prefixCls,"-treenode-draggable"),pt),"dragging",sr),(0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)(Oe,"drop-target",jt.dropTargetKey===Ie),"drop-container",jt.dropContainerKey===Ie),"drag-over",!je&&Je),"drag-over-gap-top",!je&&mt),"drag-over-gap-bottom",!je&>),"filter-node",(Ae=jt.filterTreeNode)===null||Ae===void 0?void 0:Ae.call(jt,(0,ue.F)(ve))),"".concat(jt.prefixCls,"-treenode-leaf"),Zn))),style:qe,draggable:Vi,onDragStart:Vi?Lt:void 0,onDragEnter:pt?on:void 0,onDragOver:pt?Xt:void 0,onDragLeave:pt?Rt:void 0,onDrop:pt?En:void 0,onDragEnd:pt?fn:void 0,onMouseMove:zt},Qe,qi),xe.createElement(ge,{prefixCls:jt.prefixCls,level:gr,isStart:at,isEnd:_t}),vn,ri(),Ni,Gi)};ae.isTreeNode=1;var le=ae},30699:function(xn,un,Re){"use strict";Re.d(un,{k:function(){return Se},y:function(){return Be}});var ke=Re(59301),Se=ke.createContext(null),Be=ke.createContext({})},15018:function(xn,un,Re){"use strict";Re.d(un,{OF:function(){return Ie.Z},y6:function(){return oe.y},ZP:function(){return je}});var ke=Re(72308),Se=Re(62853),Be=Re(77321),Le=Re(80702),Ce=Re(96949),xe=Re(55090),be=Re(80237),ye=Re(77205),we=Re(38793),pe=Re(49618),de=Re(92310),ge=Re.n(de),fe=Re(10228),ue=Re(26112),ee=Re(48736),z=Re(59301),oe=Re(30699),re=function(dt){var tt=dt.dropPosition,Ke=dt.dropLevelOffset,De=dt.indent,ze={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(tt){case-1:ze.top=0,ze.left=-Ke*De;break;case 1:ze.bottom=0,ze.left=-Ke*De;break;case 0:ze.bottom=0,ze.left=De;break}return z.createElement("div",{style:ze})},ae=re;function le(rt){if(rt==null)throw new TypeError("Cannot destructure "+rt)}var me=Re(52487),ve=Re(74416),Pe=Re(34280),Ae=Re(45680),Oe=Re(77900),Ie=Re(639);function Ze(rt,dt){var tt=z.useState(!1),Ke=(0,me.Z)(tt,2),De=Ke[0],ze=Ke[1];(0,Pe.Z)(function(){if(De)return rt(),function(){dt()}},[De]),(0,Pe.Z)(function(){return ze(!0),function(){ze(!1)}},[])}var qe=Ze,Je=Re(34061),mt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],gt=z.forwardRef(function(rt,dt){var tt=rt.className,Ke=rt.style,De=rt.motion,ze=rt.motionNodes,$e=rt.motionType,We=rt.onMotionStart,Ve=rt.onMotionEnd,pt=rt.active,Lt=rt.treeNodeRequiredProps,on=(0,ve.Z)(rt,mt),Xt=z.useState(!0),Rt=(0,me.Z)(Xt,2),fn=Rt[0],En=Rt[1],Sn=z.useContext(oe.k),dn=Sn.prefixCls,Zn=ze&&$e!=="hide";(0,Pe.Z)(function(){ze&&Zn!==fn&&En(Zn)},[ze]);var vn=function(){ze&&We()},Wn=z.useRef(!1),ri=function(){ze&&!Wn.current&&(Wn.current=!0,Ve())};qe(vn,ri);var Ni=function(ki){Zn===ki&&ri()};return ze?z.createElement(Oe.default,(0,ke.Z)({ref:dt,visible:fn},De,{motionAppear:$e==="show",onVisibleChanged:Ni}),function(Qn,ki){var Hi=Qn.className,Gi=Qn.style;return z.createElement("div",{ref:ki,className:ge()("".concat(dn,"-treenode-motion"),Hi),style:Gi},ze.map(function(qi){var Pr=Object.assign({},(le(qi.data),qi.data)),gr=qi.title,Ri=qi.key,Vi=qi.isStart,sr=qi.isEnd;delete Pr.children;var Qe=(0,Je.H8)(Ri,Lt);return z.createElement(Ie.Z,(0,ke.Z)({},Pr,Qe,{title:gr,active:pt,data:qi.data,key:Ri,isStart:Vi,isEnd:sr}))}))}):z.createElement(Ie.Z,(0,ke.Z)({domRef:dt,className:tt,style:Ke},on,{active:pt}))}),Mt=gt;function at(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],tt=rt.length,Ke=dt.length;if(Math.abs(tt-Ke)!==1)return{add:!1,key:null};function De(ze,$e){var We=new Map;ze.forEach(function(pt){We.set(pt,!0)});var Ve=$e.filter(function(pt){return!We.has(pt)});return Ve.length===1?Ve[0]:null}return tt<Ke?{add:!0,key:De(rt,dt)}:{add:!1,key:De(dt,rt)}}function _t(rt,dt,tt){var Ke=rt.findIndex(function(We){return We.key===tt}),De=rt[Ke+1],ze=dt.findIndex(function(We){return We.key===tt});if(De){var $e=dt.findIndex(function(We){return We.key===De.key});return dt.slice(ze+1,$e)}return dt.slice(ze+1)}var ht=["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"],Dt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},ut=function(){},ot="RC_TREE_MOTION_".concat(Math.random()),ct={key:ot},yt={key:ot,level:0,index:0,pos:"0",node:ct,nodes:[ct]},wt={parent:null,children:[],pos:yt.pos,data:ct,title:null,key:ot,isStart:[],isEnd:[]};function xt(rt,dt,tt,Ke){return dt===!1||!tt?rt:rt.slice(0,Math.ceil(tt/Ke)+1)}function zt(rt){var dt=rt.key,tt=rt.pos;return(0,Je.km)(dt,tt)}function Ut(rt){for(var dt=String(rt.data.key),tt=rt;tt.parent;)tt=tt.parent,dt="".concat(tt.data.key," > ").concat(dt);return dt}var cn=z.forwardRef(function(rt,dt){var tt=rt.prefixCls,Ke=rt.data,De=rt.selectable,ze=rt.checkable,$e=rt.expandedKeys,We=rt.selectedKeys,Ve=rt.checkedKeys,pt=rt.loadedKeys,Lt=rt.loadingKeys,on=rt.halfCheckedKeys,Xt=rt.keyEntities,Rt=rt.disabled,fn=rt.dragging,En=rt.dragOverNodeKey,Sn=rt.dropPosition,dn=rt.motion,Zn=rt.height,vn=rt.itemHeight,Wn=rt.virtual,ri=rt.scrollWidth,Ni=rt.focusable,Qn=rt.activeItem,ki=rt.focused,Hi=rt.tabIndex,Gi=rt.onKeyDown,qi=rt.onFocus,Pr=rt.onBlur,gr=rt.onActiveChange,Ri=rt.onListChangeStart,Vi=rt.onListChangeEnd,sr=(0,ve.Z)(rt,ht),Qe=z.useRef(null),Ti=z.useRef(null);z.useImperativeHandle(dt,function(){return{scrollTo:function(Dn){Qe.current.scrollTo(Dn)},getIndentWidth:function(){return Ti.current.offsetWidth}}});var ei=z.useState($e),Ii=(0,me.Z)(ei,2),mr=Ii[0],cr=Ii[1],ir=z.useState(Ke),po=(0,me.Z)(ir,2),Vn=po[0],He=po[1],Xe=z.useState(Ke),nt=(0,me.Z)(Xe,2),bt=nt[0],Nt=nt[1],sn=z.useState([]),Zt=(0,me.Z)(sn,2),_n=Zt[0],Kt=Zt[1],qt=z.useState(null),Hn=(0,me.Z)(qt,2),kt=Hn[0],ln=Hn[1],An=z.useRef(Ke);An.current=Ke;function jn(){var Pn=An.current;He(Pn),Nt(Pn),Kt([]),ln(null),Vi()}(0,Pe.Z)(function(){cr($e);var Pn=at(mr,$e);if(Pn.key!==null)if(Pn.add){var Dn=Vn.findIndex(function(Ei){var Di=Ei.key;return Di===Pn.key}),oi=xt(_t(Vn,Ke,Pn.key),Wn,Zn,vn),ai=Vn.slice();ai.splice(Dn+1,0,wt),Nt(ai),Kt(oi),ln("show")}else{var Gn=Ke.findIndex(function(Ei){var Di=Ei.key;return Di===Pn.key}),Bn=xt(_t(Ke,Vn,Pn.key),Wn,Zn,vn),bi=Ke.slice();bi.splice(Gn+1,0,wt),Nt(bi),Kt(Bn),ln("hide")}else Vn!==Ke&&(He(Ke),Nt(Ke))},[$e,Ke]),z.useEffect(function(){fn||jn()},[fn]);var Qt=dn?bt:Ke,rn={expandedKeys:$e,selectedKeys:We,loadedKeys:pt,loadingKeys:Lt,checkedKeys:Ve,halfCheckedKeys:on,dragOverNodeKey:En,dropPosition:Sn,keyEntities:Xt};return z.createElement(z.Fragment,null,ki&&Qn&&z.createElement("span",{style:Dt,"aria-live":"assertive"},Ut(Qn)),z.createElement("div",null,z.createElement("input",{style:Dt,disabled:Ni===!1||Rt,tabIndex:Ni!==!1?Hi:null,onKeyDown:Gi,onFocus:qi,onBlur:Pr,value:"",onChange:ut,"aria-label":"for screen reader"})),z.createElement("div",{className:"".concat(tt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},z.createElement("div",{className:"".concat(tt,"-indent")},z.createElement("div",{ref:Ti,className:"".concat(tt,"-indent-unit")}))),z.createElement(Ae.Z,(0,ke.Z)({},sr,{data:Qt,itemKey:zt,height:Zn,fullHeight:!1,virtual:Wn,itemHeight:vn,scrollWidth:ri,prefixCls:"".concat(tt,"-list"),ref:Qe,role:"tree",onVisibleChange:function(Dn){Dn.every(function(oi){return zt(oi)!==ot})&&jn()}}),function(Pn){var Dn=Pn.pos,oi=Object.assign({},(le(Pn.data),Pn.data)),ai=Pn.title,Gn=Pn.key,Bn=Pn.isStart,bi=Pn.isEnd,Ei=(0,Je.km)(Gn,Dn);delete oi.key,delete oi.children;var Di=(0,Je.H8)(Ei,rn);return z.createElement(Mt,(0,ke.Z)({},oi,Di,{title:ai,active:!!Qn&&Gn===Qn.key,pos:Dn,data:Pn.data,isStart:Bn,isEnd:bi,motion:dn,motionNodes:Gn===ot?_n:null,motionType:kt,onMotionStart:Ri,onMotionEnd:jn,treeNodeRequiredProps:rn,onMouseMove:function(){gr(null)}}))}))}),jt=cn,mn=Re(82661),Ft=Re(34643),Yt=Re(65065),tn=10,lt=function(rt){(0,ye.Z)(tt,rt);var dt=(0,we.Z)(tt);function tt(){var Ke;(0,Ce.Z)(this,tt);for(var De=arguments.length,ze=new Array(De),$e=0;$e<De;$e++)ze[$e]=arguments[$e];return Ke=dt.call.apply(dt,[this].concat(ze)),(0,pe.Z)((0,be.Z)(Ke),"destroyed",!1),(0,pe.Z)((0,be.Z)(Ke),"delayedDragEnterLogic",void 0),(0,pe.Z)((0,be.Z)(Ke),"loadingRetryTimes",{}),(0,pe.Z)((0,be.Z)(Ke),"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,Je.w$)()}),(0,pe.Z)((0,be.Z)(Ke),"dragStartMousePosition",null),(0,pe.Z)((0,be.Z)(Ke),"dragNodeProps",null),(0,pe.Z)((0,be.Z)(Ke),"currentMouseOverDroppableNodeKey",null),(0,pe.Z)((0,be.Z)(Ke),"listRef",z.createRef()),(0,pe.Z)((0,be.Z)(Ke),"onNodeDragStart",function(We,Ve){var pt=Ke.state,Lt=pt.expandedKeys,on=pt.keyEntities,Xt=Ke.props.onDragStart,Rt=Ve.eventKey;Ke.dragNodeProps=Ve,Ke.dragStartMousePosition={x:We.clientX,y:We.clientY};var fn=(0,mn._5)(Lt,Rt);Ke.setState({draggingNodeKey:Rt,dragChildrenKeys:(0,mn.wA)(Rt,on),indent:Ke.listRef.current.getIndentWidth()}),Ke.setExpandedKeys(fn),window.addEventListener("dragend",Ke.onWindowDragEnd),Xt==null||Xt({event:We,node:(0,Je.F)(Ve)})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDragEnter",function(We,Ve){var pt=Ke.state,Lt=pt.expandedKeys,on=pt.keyEntities,Xt=pt.dragChildrenKeys,Rt=pt.flattenNodes,fn=pt.indent,En=Ke.props,Sn=En.onDragEnter,dn=En.onExpand,Zn=En.allowDrop,vn=En.direction,Wn=Ve.pos,ri=Ve.eventKey;if(Ke.currentMouseOverDroppableNodeKey!==ri&&(Ke.currentMouseOverDroppableNodeKey=ri),!Ke.dragNodeProps){Ke.resetDragState();return}var Ni=(0,mn.OM)(We,Ke.dragNodeProps,Ve,fn,Ke.dragStartMousePosition,Zn,Rt,on,Lt,vn),Qn=Ni.dropPosition,ki=Ni.dropLevelOffset,Hi=Ni.dropTargetKey,Gi=Ni.dropContainerKey,qi=Ni.dropTargetPos,Pr=Ni.dropAllowed,gr=Ni.dragOverNodeKey;if(Xt.includes(Hi)||!Pr){Ke.resetDragState();return}if(Ke.delayedDragEnterLogic||(Ke.delayedDragEnterLogic={}),Object.keys(Ke.delayedDragEnterLogic).forEach(function(Ri){clearTimeout(Ke.delayedDragEnterLogic[Ri])}),Ke.dragNodeProps.eventKey!==Ve.eventKey&&(We.persist(),Ke.delayedDragEnterLogic[Wn]=window.setTimeout(function(){if(Ke.state.draggingNodeKey!==null){var Ri=(0,Le.Z)(Lt),Vi=(0,Yt.Z)(on,Ve.eventKey);Vi&&(Vi.children||[]).length&&(Ri=(0,mn.L0)(Lt,Ve.eventKey)),Ke.props.hasOwnProperty("expandedKeys")||Ke.setExpandedKeys(Ri),dn==null||dn(Ri,{node:(0,Je.F)(Ve),expanded:!0,nativeEvent:We.nativeEvent})}},800)),Ke.dragNodeProps.eventKey===Hi&&ki===0){Ke.resetDragState();return}Ke.setState({dragOverNodeKey:gr,dropPosition:Qn,dropLevelOffset:ki,dropTargetKey:Hi,dropContainerKey:Gi,dropTargetPos:qi,dropAllowed:Pr}),Sn==null||Sn({event:We,node:(0,Je.F)(Ve),expandedKeys:Lt})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDragOver",function(We,Ve){var pt=Ke.state,Lt=pt.dragChildrenKeys,on=pt.flattenNodes,Xt=pt.keyEntities,Rt=pt.expandedKeys,fn=pt.indent,En=Ke.props,Sn=En.onDragOver,dn=En.allowDrop,Zn=En.direction;if(Ke.dragNodeProps){var vn=(0,mn.OM)(We,Ke.dragNodeProps,Ve,fn,Ke.dragStartMousePosition,dn,on,Xt,Rt,Zn),Wn=vn.dropPosition,ri=vn.dropLevelOffset,Ni=vn.dropTargetKey,Qn=vn.dropContainerKey,ki=vn.dropTargetPos,Hi=vn.dropAllowed,Gi=vn.dragOverNodeKey;Lt.includes(Ni)||!Hi||(Ke.dragNodeProps.eventKey===Ni&&ri===0?Ke.state.dropPosition===null&&Ke.state.dropLevelOffset===null&&Ke.state.dropTargetKey===null&&Ke.state.dropContainerKey===null&&Ke.state.dropTargetPos===null&&Ke.state.dropAllowed===!1&&Ke.state.dragOverNodeKey===null||Ke.resetDragState():Wn===Ke.state.dropPosition&&ri===Ke.state.dropLevelOffset&&Ni===Ke.state.dropTargetKey&&Qn===Ke.state.dropContainerKey&&ki===Ke.state.dropTargetPos&&Hi===Ke.state.dropAllowed&&Gi===Ke.state.dragOverNodeKey||Ke.setState({dropPosition:Wn,dropLevelOffset:ri,dropTargetKey:Ni,dropContainerKey:Qn,dropTargetPos:ki,dropAllowed:Hi,dragOverNodeKey:Gi}),Sn==null||Sn({event:We,node:(0,Je.F)(Ve)}))}}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDragLeave",function(We,Ve){Ke.currentMouseOverDroppableNodeKey===Ve.eventKey&&!We.currentTarget.contains(We.relatedTarget)&&(Ke.resetDragState(),Ke.currentMouseOverDroppableNodeKey=null);var pt=Ke.props.onDragLeave;pt==null||pt({event:We,node:(0,Je.F)(Ve)})}),(0,pe.Z)((0,be.Z)(Ke),"onWindowDragEnd",function(We){Ke.onNodeDragEnd(We,null,!0),window.removeEventListener("dragend",Ke.onWindowDragEnd)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDragEnd",function(We,Ve){var pt=Ke.props.onDragEnd;Ke.setState({dragOverNodeKey:null}),Ke.cleanDragState(),pt==null||pt({event:We,node:(0,Je.F)(Ve)}),Ke.dragNodeProps=null,window.removeEventListener("dragend",Ke.onWindowDragEnd)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDrop",function(We,Ve){var pt,Lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,on=Ke.state,Xt=on.dragChildrenKeys,Rt=on.dropPosition,fn=on.dropTargetKey,En=on.dropTargetPos,Sn=on.dropAllowed;if(Sn){var dn=Ke.props.onDrop;if(Ke.setState({dragOverNodeKey:null}),Ke.cleanDragState(),fn!==null){var Zn=(0,Be.Z)((0,Be.Z)({},(0,Je.H8)(fn,Ke.getTreeNodeRequiredProps())),{},{active:((pt=Ke.getActiveItem())===null||pt===void 0?void 0:pt.key)===fn,data:(0,Yt.Z)(Ke.state.keyEntities,fn).node}),vn=Xt.includes(fn);(0,ee.ZP)(!vn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Wn=(0,mn.yx)(En),ri={event:We,node:(0,Je.F)(Zn),dragNode:Ke.dragNodeProps?(0,Je.F)(Ke.dragNodeProps):null,dragNodesKeys:[Ke.dragNodeProps.eventKey].concat(Xt),dropToGap:Rt!==0,dropPosition:Rt+Number(Wn[Wn.length-1])};Lt||dn==null||dn(ri),Ke.dragNodeProps=null}}}),(0,pe.Z)((0,be.Z)(Ke),"cleanDragState",function(){var We=Ke.state.draggingNodeKey;We!==null&&Ke.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Ke.dragStartMousePosition=null,Ke.currentMouseOverDroppableNodeKey=null}),(0,pe.Z)((0,be.Z)(Ke),"triggerExpandActionExpand",function(We,Ve){var pt=Ke.state,Lt=pt.expandedKeys,on=pt.flattenNodes,Xt=Ve.expanded,Rt=Ve.key,fn=Ve.isLeaf;if(!(fn||We.shiftKey||We.metaKey||We.ctrlKey)){var En=on.filter(function(dn){return dn.key===Rt})[0],Sn=(0,Je.F)((0,Be.Z)((0,Be.Z)({},(0,Je.H8)(Rt,Ke.getTreeNodeRequiredProps())),{},{data:En.data}));Ke.setExpandedKeys(Xt?(0,mn._5)(Lt,Rt):(0,mn.L0)(Lt,Rt)),Ke.onNodeExpand(We,Sn)}}),(0,pe.Z)((0,be.Z)(Ke),"onNodeClick",function(We,Ve){var pt=Ke.props,Lt=pt.onClick,on=pt.expandAction;on==="click"&&Ke.triggerExpandActionExpand(We,Ve),Lt==null||Lt(We,Ve)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDoubleClick",function(We,Ve){var pt=Ke.props,Lt=pt.onDoubleClick,on=pt.expandAction;on==="doubleClick"&&Ke.triggerExpandActionExpand(We,Ve),Lt==null||Lt(We,Ve)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeSelect",function(We,Ve){var pt=Ke.state.selectedKeys,Lt=Ke.state,on=Lt.keyEntities,Xt=Lt.fieldNames,Rt=Ke.props,fn=Rt.onSelect,En=Rt.multiple,Sn=Ve.selected,dn=Ve[Xt.key],Zn=!Sn;Zn?En?pt=(0,mn.L0)(pt,dn):pt=[dn]:pt=(0,mn._5)(pt,dn);var vn=pt.map(function(Wn){var ri=(0,Yt.Z)(on,Wn);return ri?ri.node:null}).filter(Boolean);Ke.setUncontrolledState({selectedKeys:pt}),fn==null||fn(pt,{event:"select",selected:Zn,node:Ve,selectedNodes:vn,nativeEvent:We.nativeEvent})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeCheck",function(We,Ve,pt){var Lt=Ke.state,on=Lt.keyEntities,Xt=Lt.checkedKeys,Rt=Lt.halfCheckedKeys,fn=Ke.props,En=fn.checkStrictly,Sn=fn.onCheck,dn=Ve.key,Zn,vn={event:"check",node:Ve,checked:pt,nativeEvent:We.nativeEvent};if(En){var Wn=pt?(0,mn.L0)(Xt,dn):(0,mn._5)(Xt,dn),ri=(0,mn._5)(Rt,dn);Zn={checked:Wn,halfChecked:ri},vn.checkedNodes=Wn.map(function(qi){return(0,Yt.Z)(on,qi)}).filter(Boolean).map(function(qi){return qi.node}),Ke.setUncontrolledState({checkedKeys:Wn})}else{var Ni=(0,Ft.S)([].concat((0,Le.Z)(Xt),[dn]),!0,on),Qn=Ni.checkedKeys,ki=Ni.halfCheckedKeys;if(!pt){var Hi=new Set(Qn);Hi.delete(dn);var Gi=(0,Ft.S)(Array.from(Hi),{checked:!1,halfCheckedKeys:ki},on);Qn=Gi.checkedKeys,ki=Gi.halfCheckedKeys}Zn=Qn,vn.checkedNodes=[],vn.checkedNodesPositions=[],vn.halfCheckedKeys=ki,Qn.forEach(function(qi){var Pr=(0,Yt.Z)(on,qi);if(Pr){var gr=Pr.node,Ri=Pr.pos;vn.checkedNodes.push(gr),vn.checkedNodesPositions.push({node:gr,pos:Ri})}}),Ke.setUncontrolledState({checkedKeys:Qn},!1,{halfCheckedKeys:ki})}Sn==null||Sn(Zn,vn)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeLoad",function(We){var Ve,pt=We.key,Lt=Ke.state.keyEntities,on=(0,Yt.Z)(Lt,pt);if(!(on!=null&&(Ve=on.children)!==null&&Ve!==void 0&&Ve.length)){var Xt=new Promise(function(Rt,fn){Ke.setState(function(En){var Sn=En.loadedKeys,dn=Sn===void 0?[]:Sn,Zn=En.loadingKeys,vn=Zn===void 0?[]:Zn,Wn=Ke.props,ri=Wn.loadData,Ni=Wn.onLoad;if(!ri||dn.includes(pt)||vn.includes(pt))return null;var Qn=ri(We);return Qn.then(function(){var ki=Ke.state.loadedKeys,Hi=(0,mn.L0)(ki,pt);Ni==null||Ni(Hi,{event:"load",node:We}),Ke.setUncontrolledState({loadedKeys:Hi}),Ke.setState(function(Gi){return{loadingKeys:(0,mn._5)(Gi.loadingKeys,pt)}}),Rt()}).catch(function(ki){if(Ke.setState(function(Gi){return{loadingKeys:(0,mn._5)(Gi.loadingKeys,pt)}}),Ke.loadingRetryTimes[pt]=(Ke.loadingRetryTimes[pt]||0)+1,Ke.loadingRetryTimes[pt]>=tn){var Hi=Ke.state.loadedKeys;(0,ee.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ke.setUncontrolledState({loadedKeys:(0,mn.L0)(Hi,pt)}),Rt()}fn(ki)}),{loadingKeys:(0,mn.L0)(vn,pt)}})});return Xt.catch(function(){}),Xt}}),(0,pe.Z)((0,be.Z)(Ke),"onNodeMouseEnter",function(We,Ve){var pt=Ke.props.onMouseEnter;pt==null||pt({event:We,node:Ve})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeMouseLeave",function(We,Ve){var pt=Ke.props.onMouseLeave;pt==null||pt({event:We,node:Ve})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeContextMenu",function(We,Ve){var pt=Ke.props.onRightClick;pt&&(We.preventDefault(),pt({event:We,node:Ve}))}),(0,pe.Z)((0,be.Z)(Ke),"onFocus",function(){var We=Ke.props.onFocus;Ke.setState({focused:!0});for(var Ve=arguments.length,pt=new Array(Ve),Lt=0;Lt<Ve;Lt++)pt[Lt]=arguments[Lt];We==null||We.apply(void 0,pt)}),(0,pe.Z)((0,be.Z)(Ke),"onBlur",function(){var We=Ke.props.onBlur;Ke.setState({focused:!1}),Ke.onActiveChange(null);for(var Ve=arguments.length,pt=new Array(Ve),Lt=0;Lt<Ve;Lt++)pt[Lt]=arguments[Lt];We==null||We.apply(void 0,pt)}),(0,pe.Z)((0,be.Z)(Ke),"getTreeNodeRequiredProps",function(){var We=Ke.state,Ve=We.expandedKeys,pt=We.selectedKeys,Lt=We.loadedKeys,on=We.loadingKeys,Xt=We.checkedKeys,Rt=We.halfCheckedKeys,fn=We.dragOverNodeKey,En=We.dropPosition,Sn=We.keyEntities;return{expandedKeys:Ve||[],selectedKeys:pt||[],loadedKeys:Lt||[],loadingKeys:on||[],checkedKeys:Xt||[],halfCheckedKeys:Rt||[],dragOverNodeKey:fn,dropPosition:En,keyEntities:Sn}}),(0,pe.Z)((0,be.Z)(Ke),"setExpandedKeys",function(We){var Ve=Ke.state,pt=Ve.treeData,Lt=Ve.fieldNames,on=(0,Je.oH)(pt,We,Lt);Ke.setUncontrolledState({expandedKeys:We,flattenNodes:on},!0)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeExpand",function(We,Ve){var pt=Ke.state.expandedKeys,Lt=Ke.state,on=Lt.listChanging,Xt=Lt.fieldNames,Rt=Ke.props,fn=Rt.onExpand,En=Rt.loadData,Sn=Ve.expanded,dn=Ve[Xt.key];if(!on){var Zn=pt.includes(dn),vn=!Sn;if((0,ee.ZP)(Sn&&Zn||!Sn&&!Zn,"Expand state not sync with index check"),pt=vn?(0,mn.L0)(pt,dn):(0,mn._5)(pt,dn),Ke.setExpandedKeys(pt),fn==null||fn(pt,{node:Ve,expanded:vn,nativeEvent:We.nativeEvent}),vn&&En){var Wn=Ke.onNodeLoad(Ve);Wn&&Wn.then(function(){var ri=(0,Je.oH)(Ke.state.treeData,pt,Xt);Ke.setUncontrolledState({flattenNodes:ri})}).catch(function(){var ri=Ke.state.expandedKeys,Ni=(0,mn._5)(ri,dn);Ke.setExpandedKeys(Ni)})}}}),(0,pe.Z)((0,be.Z)(Ke),"onListChangeStart",function(){Ke.setUncontrolledState({listChanging:!0})}),(0,pe.Z)((0,be.Z)(Ke),"onListChangeEnd",function(){setTimeout(function(){Ke.setUncontrolledState({listChanging:!1})})}),(0,pe.Z)((0,be.Z)(Ke),"onActiveChange",function(We){var Ve=Ke.state.activeKey,pt=Ke.props,Lt=pt.onActiveChange,on=pt.itemScrollOffset,Xt=on===void 0?0:on;Ve!==We&&(Ke.setState({activeKey:We}),We!==null&&Ke.scrollTo({key:We,offset:Xt}),Lt==null||Lt(We))}),(0,pe.Z)((0,be.Z)(Ke),"getActiveItem",function(){var We=Ke.state,Ve=We.activeKey,pt=We.flattenNodes;return Ve===null?null:pt.find(function(Lt){var on=Lt.key;return on===Ve})||null}),(0,pe.Z)((0,be.Z)(Ke),"offsetActiveKey",function(We){var Ve=Ke.state,pt=Ve.flattenNodes,Lt=Ve.activeKey,on=pt.findIndex(function(fn){var En=fn.key;return En===Lt});on===-1&&We<0&&(on=pt.length),on=(on+We+pt.length)%pt.length;var Xt=pt[on];if(Xt){var Rt=Xt.key;Ke.onActiveChange(Rt)}else Ke.onActiveChange(null)}),(0,pe.Z)((0,be.Z)(Ke),"onKeyDown",function(We){var Ve=Ke.state,pt=Ve.activeKey,Lt=Ve.expandedKeys,on=Ve.checkedKeys,Xt=Ve.fieldNames,Rt=Ke.props,fn=Rt.onKeyDown,En=Rt.checkable,Sn=Rt.selectable;switch(We.which){case fe.Z.UP:{Ke.offsetActiveKey(-1),We.preventDefault();break}case fe.Z.DOWN:{Ke.offsetActiveKey(1),We.preventDefault();break}}var dn=Ke.getActiveItem();if(dn&&dn.data){var Zn=Ke.getTreeNodeRequiredProps(),vn=dn.data.isLeaf===!1||!!(dn.data[Xt.children]||[]).length,Wn=(0,Je.F)((0,Be.Z)((0,Be.Z)({},(0,Je.H8)(pt,Zn)),{},{data:dn.data,active:!0}));switch(We.which){case fe.Z.LEFT:{vn&&Lt.includes(pt)?Ke.onNodeExpand({},Wn):dn.parent&&Ke.onActiveChange(dn.parent.key),We.preventDefault();break}case fe.Z.RIGHT:{vn&&!Lt.includes(pt)?Ke.onNodeExpand({},Wn):dn.children&&dn.children.length&&Ke.onActiveChange(dn.children[0].key),We.preventDefault();break}case fe.Z.ENTER:case fe.Z.SPACE:{En&&!Wn.disabled&&Wn.checkable!==!1&&!Wn.disableCheckbox?Ke.onNodeCheck({},Wn,!on.includes(pt)):!En&&Sn&&!Wn.disabled&&Wn.selectable!==!1&&Ke.onNodeSelect({},Wn);break}}}fn==null||fn(We)}),(0,pe.Z)((0,be.Z)(Ke),"setUncontrolledState",function(We){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Ke.destroyed){var Lt=!1,on=!0,Xt={};Object.keys(We).forEach(function(Rt){if(Ke.props.hasOwnProperty(Rt)){on=!1;return}Lt=!0,Xt[Rt]=We[Rt]}),Lt&&(!Ve||on)&&Ke.setState((0,Be.Z)((0,Be.Z)({},Xt),pt))}}),(0,pe.Z)((0,be.Z)(Ke),"scrollTo",function(We){Ke.listRef.current.scrollTo(We)}),Ke}return(0,xe.Z)(tt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var De=this.props,ze=De.activeKey,$e=De.itemScrollOffset,We=$e===void 0?0:$e;ze!==void 0&&ze!==this.state.activeKey&&(this.setState({activeKey:ze}),ze!==null&&this.scrollTo({key:ze,offset:We}))}},{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 De=this.state,ze=De.focused,$e=De.flattenNodes,We=De.keyEntities,Ve=De.draggingNodeKey,pt=De.activeKey,Lt=De.dropLevelOffset,on=De.dropContainerKey,Xt=De.dropTargetKey,Rt=De.dropPosition,fn=De.dragOverNodeKey,En=De.indent,Sn=this.props,dn=Sn.prefixCls,Zn=Sn.className,vn=Sn.style,Wn=Sn.showLine,ri=Sn.focusable,Ni=Sn.tabIndex,Qn=Ni===void 0?0:Ni,ki=Sn.selectable,Hi=Sn.showIcon,Gi=Sn.icon,qi=Sn.switcherIcon,Pr=Sn.draggable,gr=Sn.checkable,Ri=Sn.checkStrictly,Vi=Sn.disabled,sr=Sn.motion,Qe=Sn.loadData,Ti=Sn.filterTreeNode,ei=Sn.height,Ii=Sn.itemHeight,mr=Sn.scrollWidth,cr=Sn.virtual,ir=Sn.titleRender,po=Sn.dropIndicatorRender,Vn=Sn.onContextMenu,He=Sn.onScroll,Xe=Sn.direction,nt=Sn.rootClassName,bt=Sn.rootStyle,Nt=(0,ue.Z)(this.props,{aria:!0,data:!0}),sn;Pr&&((0,Se.Z)(Pr)==="object"?sn=Pr:typeof Pr=="function"?sn={nodeDraggable:Pr}:sn={});var Zt={prefixCls:dn,selectable:ki,showIcon:Hi,icon:Gi,switcherIcon:qi,draggable:sn,draggingNodeKey:Ve,checkable:gr,checkStrictly:Ri,disabled:Vi,keyEntities:We,dropLevelOffset:Lt,dropContainerKey:on,dropTargetKey:Xt,dropPosition:Rt,dragOverNodeKey:fn,indent:En,direction:Xe,dropIndicatorRender:po,loadData:Qe,filterTreeNode:Ti,titleRender:ir,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:Zt},z.createElement("div",{className:ge()(dn,Zn,nt,(0,pe.Z)((0,pe.Z)((0,pe.Z)({},"".concat(dn,"-show-line"),Wn),"".concat(dn,"-focused"),ze),"".concat(dn,"-active-focused"),pt!==null)),style:bt},z.createElement(jt,(0,ke.Z)({ref:this.listRef,prefixCls:dn,style:vn,data:$e,disabled:Vi,selectable:ki,checkable:!!gr,motion:sr,dragging:Ve!==null,height:ei,itemHeight:Ii,virtual:cr,focusable:ri,focused:ze,tabIndex:Qn,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Vn,onScroll:He,scrollWidth:mr},this.getTreeNodeRequiredProps(),Nt))))}}],[{key:"getDerivedStateFromProps",value:function(De,ze){var $e=ze.prevProps,We={prevProps:De};function Ve(Qn){return!$e&&De.hasOwnProperty(Qn)||$e&&$e[Qn]!==De[Qn]}var pt,Lt=ze.fieldNames;if(Ve("fieldNames")&&(Lt=(0,Je.w$)(De.fieldNames),We.fieldNames=Lt),Ve("treeData")?pt=De.treeData:Ve("children")&&((0,ee.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),pt=(0,Je.zn)(De.children)),pt){We.treeData=pt;var on=(0,Je.I8)(pt,{fieldNames:Lt});We.keyEntities=(0,Be.Z)((0,pe.Z)({},ot,yt),on.keyEntities)}var Xt=We.keyEntities||ze.keyEntities;if(Ve("expandedKeys")||$e&&Ve("autoExpandParent"))We.expandedKeys=De.autoExpandParent||!$e&&De.defaultExpandParent?(0,mn.r7)(De.expandedKeys,Xt):De.expandedKeys;else if(!$e&&De.defaultExpandAll){var Rt=(0,Be.Z)({},Xt);delete Rt[ot];var fn=[];Object.keys(Rt).forEach(function(Qn){var ki=Rt[Qn];ki.children&&ki.children.length&&fn.push(ki.key)}),We.expandedKeys=fn}else!$e&&De.defaultExpandedKeys&&(We.expandedKeys=De.autoExpandParent||De.defaultExpandParent?(0,mn.r7)(De.defaultExpandedKeys,Xt):De.defaultExpandedKeys);if(We.expandedKeys||delete We.expandedKeys,pt||We.expandedKeys){var En=(0,Je.oH)(pt||ze.treeData,We.expandedKeys||ze.expandedKeys,Lt);We.flattenNodes=En}if(De.selectable&&(Ve("selectedKeys")?We.selectedKeys=(0,mn.BT)(De.selectedKeys,De):!$e&&De.defaultSelectedKeys&&(We.selectedKeys=(0,mn.BT)(De.defaultSelectedKeys,De))),De.checkable){var Sn;if(Ve("checkedKeys")?Sn=(0,mn.E6)(De.checkedKeys)||{}:!$e&&De.defaultCheckedKeys?Sn=(0,mn.E6)(De.defaultCheckedKeys)||{}:pt&&(Sn=(0,mn.E6)(De.checkedKeys)||{checkedKeys:ze.checkedKeys,halfCheckedKeys:ze.halfCheckedKeys}),Sn){var dn=Sn,Zn=dn.checkedKeys,vn=Zn===void 0?[]:Zn,Wn=dn.halfCheckedKeys,ri=Wn===void 0?[]:Wn;if(!De.checkStrictly){var Ni=(0,Ft.S)(vn,!0,Xt);vn=Ni.checkedKeys,ri=Ni.halfCheckedKeys}We.checkedKeys=vn,We.halfCheckedKeys=ri}}return Ve("loadedKeys")&&(We.loadedKeys=De.loadedKeys),We}}]),tt}(z.Component);(0,pe.Z)(lt,"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:ae,allowDrop:function(){return!0},expandAction:!1}),(0,pe.Z)(lt,"TreeNode",Ie.Z);var Ue=lt,je=Ue},82661:function(xn,un,Re){"use strict";Re.d(un,{BT:function(){return z},E6:function(){return ae},L0:function(){return pe},OM:function(){return ee},_5:function(){return we},r7:function(){return le},wA:function(){return ge},yx:function(){return de}});var ke=Re(80702),Se=Re(62853),Be=Re(48736),Le=Re(59301),Ce=Re(639),xe=Re(65065),be=Re(34061),ye=null;function we(me,ve){if(!me)return[];var Pe=me.slice(),Ae=Pe.indexOf(ve);return Ae>=0&&Pe.splice(Ae,1),Pe}function pe(me,ve){var Pe=(me||[]).slice();return Pe.indexOf(ve)===-1&&Pe.push(ve),Pe}function de(me){return me.split("-")}function ge(me,ve){var Pe=[],Ae=(0,xe.Z)(ve,me);function Oe(){var Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ie.forEach(function(Ze){var qe=Ze.key,Je=Ze.children;Pe.push(qe),Oe(Je)})}return Oe(Ae.children),Pe}function fe(me){if(me.parent){var ve=de(me.pos);return Number(ve[ve.length-1])===me.parent.children.length-1}return!1}function ue(me){var ve=de(me.pos);return Number(ve[ve.length-1])===0}function ee(me,ve,Pe,Ae,Oe,Ie,Ze,qe,Je,mt){var gt,Mt=me.clientX,at=me.clientY,_t=me.target.getBoundingClientRect(),ht=_t.top,Dt=_t.height,ut=(mt==="rtl"?-1:1)*(((Oe==null?void 0:Oe.x)||0)-Mt),ot=(ut-12)/Ae,ct=Je.filter(function(je){var rt;return(rt=qe[je])===null||rt===void 0||(rt=rt.children)===null||rt===void 0?void 0:rt.length}),yt=(0,xe.Z)(qe,Pe.eventKey);if(at<ht+Dt/2){var wt=Ze.findIndex(function(je){return je.key===yt.key}),xt=wt<=0?0:wt-1,zt=Ze[xt].key;yt=(0,xe.Z)(qe,zt)}var Ut=yt.key,cn=yt,jt=yt.key,mn=0,Ft=0;if(!ct.includes(Ut))for(var Yt=0;Yt<ot&&fe(yt);Yt+=1)yt=yt.parent,Ft+=1;var tn=ve.data,lt=yt.node,Ue=!0;return ue(yt)&&yt.level===0&&at<ht+Dt/2&&Ie({dragNode:tn,dropNode:lt,dropPosition:-1})&&yt.key===Pe.eventKey?mn=-1:(cn.children||[]).length&&ct.includes(jt)?Ie({dragNode:tn,dropNode:lt,dropPosition:0})?mn=0:Ue=!1:Ft===0?ot>-1.5?Ie({dragNode:tn,dropNode:lt,dropPosition:1})?mn=1:Ue=!1:Ie({dragNode:tn,dropNode:lt,dropPosition:0})?mn=0:Ie({dragNode:tn,dropNode:lt,dropPosition:1})?mn=1:Ue=!1:Ie({dragNode:tn,dropNode:lt,dropPosition:1})?mn=1:Ue=!1,{dropPosition:mn,dropLevelOffset:Ft,dropTargetKey:yt.key,dropTargetPos:yt.pos,dragOverNodeKey:jt,dropContainerKey:mn===0?null:((gt=yt.parent)===null||gt===void 0?void 0:gt.key)||null,dropAllowed:Ue}}function z(me,ve){if(me){var Pe=ve.multiple;return Pe?me.slice():me.length?[me[0]]:me}}var oe=function(ve){return ve};function re(me,ve){if(!me)return[];var Pe=ve||{},Ae=Pe.processProps,Oe=Ae===void 0?oe:Ae,Ie=Array.isArray(me)?me:[me];return Ie.map(function(Ze){var qe=Ze.children,Je=_objectWithoutProperties(Ze,ye),mt=re(qe,ve);return React.createElement(TreeNode,_extends({key:Je.key},Oe(Je)),mt)})}function ae(me){if(!me)return null;var ve;if(Array.isArray(me))ve={checkedKeys:me,halfCheckedKeys:void 0};else if((0,Se.Z)(me)==="object")ve={checkedKeys:me.checked||void 0,halfCheckedKeys:me.halfChecked||void 0};else return(0,Be.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return ve}function le(me,ve){var Pe=new Set;function Ae(Oe){if(!Pe.has(Oe)){var Ie=(0,xe.Z)(ve,Oe);if(Ie){Pe.add(Oe);var Ze=Ie.parent,qe=Ie.node;qe.disabled||Ze&&Ae(Ze.key)}}}return(me||[]).forEach(function(Oe){Ae(Oe)}),(0,ke.Z)(Pe)}},34643:function(xn,un,Re){"use strict";Re.d(un,{S:function(){return be}});var ke=Re(48736),Se=Re(65065);function Be(ye,we){var pe=new Set;return ye.forEach(function(de){we.has(de)||pe.add(de)}),pe}function Le(ye){var we=ye||{},pe=we.disabled,de=we.disableCheckbox,ge=we.checkable;return!!(pe||de)||ge===!1}function Ce(ye,we,pe,de){for(var ge=new Set(ye),fe=new Set,ue=0;ue<=pe;ue+=1){var ee=we.get(ue)||new Set;ee.forEach(function(ae){var le=ae.key,me=ae.node,ve=ae.children,Pe=ve===void 0?[]:ve;ge.has(le)&&!de(me)&&Pe.filter(function(Ae){return!de(Ae.node)}).forEach(function(Ae){ge.add(Ae.key)})})}for(var z=new Set,oe=pe;oe>=0;oe-=1){var re=we.get(oe)||new Set;re.forEach(function(ae){var le=ae.parent,me=ae.node;if(!(de(me)||!ae.parent||z.has(ae.parent.key))){if(de(ae.parent.node)){z.add(le.key);return}var ve=!0,Pe=!1;(le.children||[]).filter(function(Ae){return!de(Ae.node)}).forEach(function(Ae){var Oe=Ae.key,Ie=ge.has(Oe);ve&&!Ie&&(ve=!1),!Pe&&(Ie||fe.has(Oe))&&(Pe=!0)}),ve&&ge.add(le.key),Pe&&fe.add(le.key),z.add(le.key)}})}return{checkedKeys:Array.from(ge),halfCheckedKeys:Array.from(Be(fe,ge))}}function xe(ye,we,pe,de,ge){for(var fe=new Set(ye),ue=new Set(we),ee=0;ee<=de;ee+=1){var z=pe.get(ee)||new Set;z.forEach(function(le){var me=le.key,ve=le.node,Pe=le.children,Ae=Pe===void 0?[]:Pe;!fe.has(me)&&!ue.has(me)&&!ge(ve)&&Ae.filter(function(Oe){return!ge(Oe.node)}).forEach(function(Oe){fe.delete(Oe.key)})})}ue=new Set;for(var oe=new Set,re=de;re>=0;re-=1){var ae=pe.get(re)||new Set;ae.forEach(function(le){var me=le.parent,ve=le.node;if(!(ge(ve)||!le.parent||oe.has(le.parent.key))){if(ge(le.parent.node)){oe.add(me.key);return}var Pe=!0,Ae=!1;(me.children||[]).filter(function(Oe){return!ge(Oe.node)}).forEach(function(Oe){var Ie=Oe.key,Ze=fe.has(Ie);Pe&&!Ze&&(Pe=!1),!Ae&&(Ze||ue.has(Ie))&&(Ae=!0)}),Pe||fe.delete(me.key),Ae&&ue.add(me.key),oe.add(me.key)}})}return{checkedKeys:Array.from(fe),halfCheckedKeys:Array.from(Be(ue,fe))}}function be(ye,we,pe,de){var ge=[],fe;de?fe=de:fe=Le;var ue=new Set(ye.filter(function(re){var ae=!!(0,Se.Z)(pe,re);return ae||ge.push(re),ae})),ee=new Map,z=0;Object.keys(pe).forEach(function(re){var ae=pe[re],le=ae.level,me=ee.get(le);me||(me=new Set,ee.set(le,me)),me.add(ae),z=Math.max(z,le)}),(0,ke.ZP)(!ge.length,"Tree missing follow keys: ".concat(ge.slice(0,100).map(function(re){return"'".concat(re,"'")}).join(", ")));var oe;return we===!0?oe=Ce(ue,ee,z,fe):oe=xe(ue,we.halfCheckedKeys,ee,z,fe),oe}},65065:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return ke}});function ke(Se,Be){return Se[Be]}},34061:function(xn,un,Re){"use strict";Re.d(un,{F:function(){return le},H8:function(){return ae},I8:function(){return re},km:function(){return ge},oH:function(){return z},w$:function(){return fe},zn:function(){return ee}});var ke=Re(62853),Se=Re(80702),Be=Re(77321),Le=Re(74416),Ce=Re(11592),xe=Re(2738),be=Re(48736),ye=Re(65065),we=["children"];function pe(me,ve){return"".concat(me,"-").concat(ve)}function de(me){return me&&me.type&&me.type.isTreeNode}function ge(me,ve){return me!=null?me:ve}function fe(me){var ve=me||{},Pe=ve.title,Ae=ve._title,Oe=ve.key,Ie=ve.children,Ze=Pe||"title";return{title:Ze,_title:Ae||[Ze],key:Oe||"key",children:Ie||"children"}}function ue(me,ve){var Pe=new Map;function Ae(Oe){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Oe||[]).forEach(function(Ze){var qe=Ze[ve.key],Je=Ze[ve.children];warning(qe!=null,"Tree node must have a certain key: [".concat(Ie).concat(qe,"]"));var mt=String(qe);warning(!Pe.has(mt)||qe===null||qe===void 0,"Same 'key' exist in the Tree: ".concat(mt)),Pe.set(mt,!0),Ae(Je,"".concat(Ie).concat(mt," > "))})}Ae(me)}function ee(me){function ve(Pe){var Ae=(0,Ce.Z)(Pe);return Ae.map(function(Oe){if(!de(Oe))return(0,be.ZP)(!Oe,"Tree/TreeNode can only accept TreeNode as children."),null;var Ie=Oe.key,Ze=Oe.props,qe=Ze.children,Je=(0,Le.Z)(Ze,we),mt=(0,Be.Z)({key:Ie},Je),gt=ve(qe);return gt.length&&(mt.children=gt),mt}).filter(function(Oe){return Oe})}return ve(me)}function z(me,ve,Pe){var Ae=fe(Pe),Oe=Ae._title,Ie=Ae.key,Ze=Ae.children,qe=new Set(ve===!0?[]:ve),Je=[];function mt(gt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return gt.map(function(at,_t){for(var ht=pe(Mt?Mt.pos:"0",_t),Dt=ge(at[Ie],ht),ut,ot=0;ot<Oe.length;ot+=1){var ct=Oe[ot];if(at[ct]!==void 0){ut=at[ct];break}}var yt=Object.assign((0,xe.Z)(at,[].concat((0,Se.Z)(Oe),[Ie,Ze])),{title:ut,key:Dt,parent:Mt,pos:ht,children:null,data:at,isStart:[].concat((0,Se.Z)(Mt?Mt.isStart:[]),[_t===0]),isEnd:[].concat((0,Se.Z)(Mt?Mt.isEnd:[]),[_t===gt.length-1])});return Je.push(yt),ve===!0||qe.has(Dt)?yt.children=mt(at[Ze]||[],yt):yt.children=[],yt})}return mt(me),Je}function oe(me,ve,Pe){var Ae={};(0,ke.Z)(Pe)==="object"?Ae=Pe:Ae={externalGetKey:Pe},Ae=Ae||{};var Oe=Ae,Ie=Oe.childrenPropName,Ze=Oe.externalGetKey,qe=Oe.fieldNames,Je=fe(qe),mt=Je.key,gt=Je.children,Mt=Ie||gt,at;Ze?typeof Ze=="string"?at=function(Dt){return Dt[Ze]}:typeof Ze=="function"&&(at=function(Dt){return Ze(Dt)}):at=function(Dt,ut){return ge(Dt[mt],ut)};function _t(ht,Dt,ut,ot){var ct=ht?ht[Mt]:me,yt=ht?pe(ut.pos,Dt):"0",wt=ht?[].concat((0,Se.Z)(ot),[ht]):[];if(ht){var xt=at(ht,yt),zt={node:ht,index:Dt,pos:yt,key:xt,parentPos:ut.node?ut.pos:null,level:ut.level+1,nodes:wt};ve(zt)}ct&&ct.forEach(function(Ut,cn){_t(Ut,cn,{node:ht,pos:yt,level:ut?ut.level+1:-1},wt)})}_t(null)}function re(me){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=ve.initWrapper,Ae=ve.processEntity,Oe=ve.onProcessFinished,Ie=ve.externalGetKey,Ze=ve.childrenPropName,qe=ve.fieldNames,Je=arguments.length>2?arguments[2]:void 0,mt=Ie||Je,gt={},Mt={},at={posEntities:gt,keyEntities:Mt};return Pe&&(at=Pe(at)||at),oe(me,function(_t){var ht=_t.node,Dt=_t.index,ut=_t.pos,ot=_t.key,ct=_t.parentPos,yt=_t.level,wt=_t.nodes,xt={node:ht,nodes:wt,index:Dt,key:ot,pos:ut,level:yt},zt=ge(ot,ut);gt[ut]=xt,Mt[zt]=xt,xt.parent=gt[ct],xt.parent&&(xt.parent.children=xt.parent.children||[],xt.parent.children.push(xt)),Ae&&Ae(xt,at)},{externalGetKey:mt,childrenPropName:Ze,fieldNames:qe}),Oe&&Oe(at),at}function ae(me,ve){var Pe=ve.expandedKeys,Ae=ve.selectedKeys,Oe=ve.loadedKeys,Ie=ve.loadingKeys,Ze=ve.checkedKeys,qe=ve.halfCheckedKeys,Je=ve.dragOverNodeKey,mt=ve.dropPosition,gt=ve.keyEntities,Mt=(0,ye.Z)(gt,me),at={eventKey:me,expanded:Pe.indexOf(me)!==-1,selected:Ae.indexOf(me)!==-1,loaded:Oe.indexOf(me)!==-1,loading:Ie.indexOf(me)!==-1,checked:Ze.indexOf(me)!==-1,halfChecked:qe.indexOf(me)!==-1,pos:String(Mt?Mt.pos:""),dragOver:Je===me&&mt===0,dragOverGapTop:Je===me&&mt===-1,dragOverGapBottom:Je===me&&mt===1};return at}function le(me){var ve=me.data,Pe=me.expanded,Ae=me.selected,Oe=me.checked,Ie=me.loaded,Ze=me.loading,qe=me.halfChecked,Je=me.dragOver,mt=me.dragOverGapTop,gt=me.dragOverGapBottom,Mt=me.pos,at=me.active,_t=me.eventKey,ht=(0,Be.Z)((0,Be.Z)({},ve),{},{expanded:Pe,selected:Ae,checked:Oe,loaded:Ie,loading:Ze,halfChecked:qe,dragOver:Je,dragOverGapTop:mt,dragOverGapBottom:gt,pos:Mt,active:at,key:_t});return"props"in ht||Object.defineProperty(ht,"props",{get:function(){return(0,be.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),me}}),ht}},8224:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return Se}});var ke=Re(4676);function Se(Be,Le,Ce,xe){var be=ke.unstable_batchedUpdates?function(we){ke.unstable_batchedUpdates(Ce,we)}:Ce;return Be!=null&&Be.addEventListener&&Be.addEventListener(Le,be,xe),{remove:function(){Be!=null&&Be.removeEventListener&&Be.removeEventListener(Le,be,xe)}}}},24514:function(xn,un,Re){"use strict";Re.d(un,{G:function(){return Le}});var ke=Re(47273),Se=function(xe){if((0,ke.Z)()&&window.document.documentElement){var be=Array.isArray(xe)?xe:[xe],ye=window.document.documentElement;return be.some(function(we){return we in ye.style})}return!1},Be=function(xe,be){if(!Se(xe))return!1;var ye=document.createElement("div"),we=ye.style[xe];return ye.style[xe]=be,ye.style[xe]!==we};function Le(Ce,xe){return!Array.isArray(Ce)&&xe!==void 0?Be(Ce,xe):Se(Ce)}},45680:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return tn}});var ke=Re(72308),Se=Re(62853),Be=Re(77321),Le=Re(49618),Ce=Re(52487),xe=Re(74416),be=Re(92310),ye=Re.n(be),we=Re(29301),pe=Re(70425),de=Re(34280),ge=Re(59301),fe=Re(4676),ue=ge.forwardRef(function(lt,Ue){var je=lt.height,rt=lt.offsetY,dt=lt.offsetX,tt=lt.children,Ke=lt.prefixCls,De=lt.onInnerResize,ze=lt.innerProps,$e=lt.rtl,We=lt.extra,Ve={},pt={display:"flex",flexDirection:"column"};return rt!==void 0&&(Ve={height:je,position:"relative",overflow:"hidden"},pt=(0,Be.Z)((0,Be.Z)({},pt),{},(0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)({transform:"translateY(".concat(rt,"px)")},$e?"marginRight":"marginLeft",-dt),"position","absolute"),"left",0),"right",0),"top",0))),ge.createElement("div",{style:Ve},ge.createElement(we.Z,{onResize:function(on){var Xt=on.offsetHeight;Xt&&De&&De()}},ge.createElement("div",(0,ke.Z)({style:pt,className:ye()((0,Le.Z)({},"".concat(Ke,"-holder-inner"),Ke)),ref:Ue},ze),tt,We)))});ue.displayName="Filler";var ee=ue;function z(lt){var Ue=lt.children,je=lt.setRef,rt=ge.useCallback(function(dt){je(dt)},[]);return ge.cloneElement(Ue,{ref:rt})}function oe(lt,Ue,je,rt,dt,tt,Ke,De){var ze=De.getKey;return lt.slice(Ue,je+1).map(function($e,We){var Ve=Ue+We,pt=Ke($e,Ve,{style:{width:rt},offsetX:dt}),Lt=ze($e);return ge.createElement(z,{key:Lt,setRef:function(Xt){return tt($e,Xt)}},pt)})}function re(lt,Ue,je,rt){var dt=je-lt,tt=Ue-je,Ke=Math.min(dt,tt)*2;if(rt<=Ke){var De=Math.floor(rt/2);return rt%2?je+De+1:je-De}return dt>tt?je-(rt-tt):je+(rt-dt)}function ae(lt,Ue,je){var rt=lt.length,dt=Ue.length,tt,Ke;if(rt===0&&dt===0)return null;rt<dt?(tt=lt,Ke=Ue):(tt=Ue,Ke=lt);var De={__EMPTY_ITEM__:!0};function ze(on){return on!==void 0?je(on):De}for(var $e=null,We=Math.abs(rt-dt)!==1,Ve=0;Ve<Ke.length;Ve+=1){var pt=ze(tt[Ve]),Lt=ze(Ke[Ve]);if(pt!==Lt){$e=Ve,We=We||pt!==ze(Ke[Ve+1]);break}}return $e===null?null:{index:$e,multiple:We}}function le(lt,Ue,je){var rt=ge.useState(lt),dt=(0,Ce.Z)(rt,2),tt=dt[0],Ke=dt[1],De=ge.useState(null),ze=(0,Ce.Z)(De,2),$e=ze[0],We=ze[1];return ge.useEffect(function(){var Ve=ae(tt||[],lt||[],Ue);(Ve==null?void 0:Ve.index)!==void 0&&(je==null||je(Ve.index),We(lt[Ve.index])),Ke(lt)},[lt]),[$e]}var me=Re(16089),ve=(typeof navigator=="undefined"?"undefined":(0,Se.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Pe=ve,Ae=function(lt,Ue,je,rt){var dt=(0,ge.useRef)(!1),tt=(0,ge.useRef)(null);function Ke(){clearTimeout(tt.current),dt.current=!0,tt.current=setTimeout(function(){dt.current=!1},50)}var De=(0,ge.useRef)({top:lt,bottom:Ue,left:je,right:rt});return De.current.top=lt,De.current.bottom=Ue,De.current.left=je,De.current.right=rt,function(ze,$e){var We=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ve=ze?$e<0&&De.current.left||$e>0&&De.current.right:$e<0&&De.current.top||$e>0&&De.current.bottom;return We&&Ve?(clearTimeout(tt.current),dt.current=!1):(!Ve||dt.current)&&Ke(),!dt.current&&Ve}};function Oe(lt,Ue,je,rt,dt,tt,Ke){var De=(0,ge.useRef)(0),ze=(0,ge.useRef)(null),$e=(0,ge.useRef)(null),We=(0,ge.useRef)(!1),Ve=Ae(Ue,je,rt,dt);function pt(En,Sn){if(me.Z.cancel(ze.current),!Ve(!1,Sn)){var dn=En;if(!dn._virtualHandled)dn._virtualHandled=!0;else return;De.current+=Sn,$e.current=Sn,Pe||dn.preventDefault(),ze.current=(0,me.Z)(function(){var Zn=We.current?10:1;Ke(De.current*Zn,!1),De.current=0})}}function Lt(En,Sn){Ke(Sn,!0),Pe||En.preventDefault()}var on=(0,ge.useRef)(null),Xt=(0,ge.useRef)(null);function Rt(En){if(lt){me.Z.cancel(Xt.current),Xt.current=(0,me.Z)(function(){on.current=null},2);var Sn=En.deltaX,dn=En.deltaY,Zn=En.shiftKey,vn=Sn,Wn=dn;(on.current==="sx"||!on.current&&Zn&&dn&&!Sn)&&(vn=dn,Wn=0,on.current="sx");var ri=Math.abs(vn),Ni=Math.abs(Wn);on.current===null&&(on.current=tt&&ri>Ni?"x":"y"),on.current==="y"?pt(En,Wn):Lt(En,vn)}}function fn(En){lt&&(We.current=En.detail===$e.current)}return[Rt,fn]}function Ie(lt,Ue,je,rt){var dt=ge.useMemo(function(){return[new Map,[]]},[lt,je.id,rt]),tt=(0,Ce.Z)(dt,2),Ke=tt[0],De=tt[1],ze=function(We){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:We,pt=Ke.get(We),Lt=Ke.get(Ve);if(pt===void 0||Lt===void 0)for(var on=lt.length,Xt=De.length;Xt<on;Xt+=1){var Rt,fn=lt[Xt],En=Ue(fn);Ke.set(En,Xt);var Sn=(Rt=je.get(En))!==null&&Rt!==void 0?Rt:rt;if(De[Xt]=(De[Xt-1]||0)+Sn,En===We&&(pt=Xt),En===Ve&&(Lt=Xt),pt!==void 0&&Lt!==void 0)break}return{top:De[pt-1]||0,bottom:De[Lt]}};return ze}var Ze=Re(96949),qe=Re(55090),Je=function(){function lt(){(0,Ze.Z)(this,lt),(0,Le.Z)(this,"maps",void 0),(0,Le.Z)(this,"id",0),(0,Le.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,qe.Z)(lt,[{key:"set",value:function(je,rt){this.maps[je]=rt,this.id+=1,this.diffKeys.add(je)}},{key:"get",value:function(je){return this.maps[je]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),lt}(),mt=Je;function gt(lt){var Ue=parseFloat(lt);return isNaN(Ue)?0:Ue}function Mt(lt,Ue,je){var rt=ge.useState(0),dt=(0,Ce.Z)(rt,2),tt=dt[0],Ke=dt[1],De=(0,ge.useRef)(new Map),ze=(0,ge.useRef)(new mt),$e=(0,ge.useRef)(0);function We(){$e.current+=1}function Ve(){var Lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;We();var on=function(){var fn=!1;De.current.forEach(function(En,Sn){if(En&&En.offsetParent){var dn=En.offsetHeight,Zn=getComputedStyle(En),vn=Zn.marginTop,Wn=Zn.marginBottom,ri=gt(vn),Ni=gt(Wn),Qn=dn+ri+Ni;ze.current.get(Sn)!==Qn&&(ze.current.set(Sn,Qn),fn=!0)}}),fn&&Ke(function(En){return En+1})};if(Lt)on();else{$e.current+=1;var Xt=$e.current;Promise.resolve().then(function(){Xt===$e.current&&on()})}}function pt(Lt,on){var Xt=lt(Lt),Rt=De.current.get(Xt);on?(De.current.set(Xt,on),Ve()):De.current.delete(Xt),!Rt!=!on&&(on?Ue==null||Ue(Lt):je==null||je(Lt))}return(0,ge.useEffect)(function(){return We},[]),[pt,Ve,ze.current,tt]}var at=14/15;function _t(lt,Ue,je){var rt=(0,ge.useRef)(!1),dt=(0,ge.useRef)(0),tt=(0,ge.useRef)(0),Ke=(0,ge.useRef)(null),De=(0,ge.useRef)(null),ze,$e=function(Lt){if(rt.current){var on=Math.ceil(Lt.touches[0].pageX),Xt=Math.ceil(Lt.touches[0].pageY),Rt=dt.current-on,fn=tt.current-Xt,En=Math.abs(Rt)>Math.abs(fn);En?dt.current=on:tt.current=Xt;var Sn=je(En,En?Rt:fn,!1,Lt);Sn&&Lt.preventDefault(),clearInterval(De.current),Sn&&(De.current=setInterval(function(){En?Rt*=at:fn*=at;var dn=Math.floor(En?Rt:fn);(!je(En,dn,!0)||Math.abs(dn)<=.1)&&clearInterval(De.current)},16))}},We=function(){rt.current=!1,ze()},Ve=function(Lt){ze(),Lt.touches.length===1&&!rt.current&&(rt.current=!0,dt.current=Math.ceil(Lt.touches[0].pageX),tt.current=Math.ceil(Lt.touches[0].pageY),Ke.current=Lt.target,Ke.current.addEventListener("touchmove",$e,{passive:!1}),Ke.current.addEventListener("touchend",We,{passive:!0}))};ze=function(){Ke.current&&(Ke.current.removeEventListener("touchmove",$e),Ke.current.removeEventListener("touchend",We))},(0,de.Z)(function(){return lt&&Ue.current.addEventListener("touchstart",Ve,{passive:!0}),function(){var pt;(pt=Ue.current)===null||pt===void 0||pt.removeEventListener("touchstart",Ve),ze(),clearInterval(De.current)}},[lt])}function ht(lt){return Math.floor(Math.pow(lt,.5))}function Dt(lt,Ue){var je="touches"in lt?lt.touches[0]:lt;return je[Ue?"pageX":"pageY"]-window[Ue?"scrollX":"scrollY"]}function ut(lt,Ue,je){ge.useEffect(function(){var rt=Ue.current;if(lt&&rt){var dt=!1,tt,Ke,De=function(){me.Z.cancel(tt)},ze=function pt(){De(),tt=(0,me.Z)(function(){je(Ke),pt()})},$e=function(Lt){if(!(Lt.target.draggable||Lt.button!==0)){var on=Lt;on._virtualHandled||(on._virtualHandled=!0,dt=!0)}},We=function(){dt=!1,De()},Ve=function(Lt){if(dt){var on=Dt(Lt,!1),Xt=rt.getBoundingClientRect(),Rt=Xt.top,fn=Xt.bottom;if(on<=Rt){var En=Rt-on;Ke=-ht(En),ze()}else if(on>=fn){var Sn=on-fn;Ke=ht(Sn),ze()}else De()}};return rt.addEventListener("mousedown",$e),rt.ownerDocument.addEventListener("mouseup",We),rt.ownerDocument.addEventListener("mousemove",Ve),function(){rt.removeEventListener("mousedown",$e),rt.ownerDocument.removeEventListener("mouseup",We),rt.ownerDocument.removeEventListener("mousemove",Ve),De()}}},[lt])}var ot=10;function ct(lt,Ue,je,rt,dt,tt,Ke,De){var ze=ge.useRef(),$e=ge.useState(null),We=(0,Ce.Z)($e,2),Ve=We[0],pt=We[1];return(0,de.Z)(function(){if(Ve&&Ve.times<ot){if(!lt.current){pt(function(sr){return(0,Be.Z)({},sr)});return}tt();var Lt=Ve.targetAlign,on=Ve.originAlign,Xt=Ve.index,Rt=Ve.offset,fn=lt.current.clientHeight,En=!1,Sn=Lt,dn=null;if(fn){for(var Zn=Lt||on,vn=0,Wn=0,ri=0,Ni=Math.min(Ue.length-1,Xt),Qn=0;Qn<=Ni;Qn+=1){var ki=dt(Ue[Qn]);Wn=vn;var Hi=je.get(ki);ri=Wn+(Hi===void 0?rt:Hi),vn=ri}for(var Gi=Zn==="top"?Rt:fn-Rt,qi=Ni;qi>=0;qi-=1){var Pr=dt(Ue[qi]),gr=je.get(Pr);if(gr===void 0){En=!0;break}if(Gi-=gr,Gi<=0)break}switch(Zn){case"top":dn=Wn-Rt;break;case"bottom":dn=ri-fn+Rt;break;default:{var Ri=lt.current.scrollTop,Vi=Ri+fn;Wn<Ri?Sn="top":ri>Vi&&(Sn="bottom")}}dn!==null&&Ke(dn),dn!==Ve.lastTop&&(En=!0)}En&&pt((0,Be.Z)((0,Be.Z)({},Ve),{},{times:Ve.times+1,targetAlign:Sn,lastTop:dn}))}},[Ve,lt.current]),function(Lt){if(Lt==null){De();return}if(me.Z.cancel(ze.current),typeof Lt=="number")Ke(Lt);else if(Lt&&(0,Se.Z)(Lt)==="object"){var on,Xt=Lt.align;"index"in Lt?on=Lt.index:on=Ue.findIndex(function(En){return dt(En)===Lt.key});var Rt=Lt.offset,fn=Rt===void 0?0:Rt;pt({times:0,index:on,offset:fn,originAlign:Xt})}}}var yt=ge.forwardRef(function(lt,Ue){var je=lt.prefixCls,rt=lt.rtl,dt=lt.scrollOffset,tt=lt.scrollRange,Ke=lt.onStartMove,De=lt.onStopMove,ze=lt.onScroll,$e=lt.horizontal,We=lt.spinSize,Ve=lt.containerSize,pt=lt.style,Lt=lt.thumbStyle,on=lt.showScrollBar,Xt=ge.useState(!1),Rt=(0,Ce.Z)(Xt,2),fn=Rt[0],En=Rt[1],Sn=ge.useState(null),dn=(0,Ce.Z)(Sn,2),Zn=dn[0],vn=dn[1],Wn=ge.useState(null),ri=(0,Ce.Z)(Wn,2),Ni=ri[0],Qn=ri[1],ki=!rt,Hi=ge.useRef(),Gi=ge.useRef(),qi=ge.useState(on),Pr=(0,Ce.Z)(qi,2),gr=Pr[0],Ri=Pr[1],Vi=ge.useRef(),sr=function(){on===!0||on===!1||(clearTimeout(Vi.current),Ri(!0),Vi.current=setTimeout(function(){Ri(!1)},3e3))},Qe=tt-Ve||0,Ti=Ve-We||0,ei=ge.useMemo(function(){if(dt===0||Qe===0)return 0;var nt=dt/Qe;return nt*Ti},[dt,Qe,Ti]),Ii=function(bt){bt.stopPropagation(),bt.preventDefault()},mr=ge.useRef({top:ei,dragging:fn,pageY:Zn,startTop:Ni});mr.current={top:ei,dragging:fn,pageY:Zn,startTop:Ni};var cr=function(bt){En(!0),vn(Dt(bt,$e)),Qn(mr.current.top),Ke(),bt.stopPropagation(),bt.preventDefault()};ge.useEffect(function(){var nt=function(Zt){Zt.preventDefault()},bt=Hi.current,Nt=Gi.current;return bt.addEventListener("touchstart",nt,{passive:!1}),Nt.addEventListener("touchstart",cr,{passive:!1}),function(){bt.removeEventListener("touchstart",nt),Nt.removeEventListener("touchstart",cr)}},[]);var ir=ge.useRef();ir.current=Qe;var po=ge.useRef();po.current=Ti,ge.useEffect(function(){if(fn){var nt,bt=function(Zt){var _n=mr.current,Kt=_n.dragging,qt=_n.pageY,Hn=_n.startTop;me.Z.cancel(nt);var kt=Hi.current.getBoundingClientRect(),ln=Ve/($e?kt.width:kt.height);if(Kt){var An=(Dt(Zt,$e)-qt)*ln,jn=Hn;!ki&&$e?jn-=An:jn+=An;var Qt=ir.current,rn=po.current,Pn=rn?jn/rn:0,Dn=Math.ceil(Pn*Qt);Dn=Math.max(Dn,0),Dn=Math.min(Dn,Qt),nt=(0,me.Z)(function(){ze(Dn,$e)})}},Nt=function(){En(!1),De()};return window.addEventListener("mousemove",bt,{passive:!0}),window.addEventListener("touchmove",bt,{passive:!0}),window.addEventListener("mouseup",Nt,{passive:!0}),window.addEventListener("touchend",Nt,{passive:!0}),function(){window.removeEventListener("mousemove",bt),window.removeEventListener("touchmove",bt),window.removeEventListener("mouseup",Nt),window.removeEventListener("touchend",Nt),me.Z.cancel(nt)}}},[fn]),ge.useEffect(function(){return sr(),function(){clearTimeout(Vi.current)}},[dt]),ge.useImperativeHandle(Ue,function(){return{delayHidden:sr}});var Vn="".concat(je,"-scrollbar"),He={position:"absolute",visibility:gr?null:"hidden"},Xe={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return $e?(He.height=8,He.left=0,He.right=0,He.bottom=0,Xe.height="100%",Xe.width=We,ki?Xe.left=ei:Xe.right=ei):(He.width=8,He.top=0,He.bottom=0,ki?He.right=0:He.left=0,Xe.width="100%",Xe.height=We,Xe.top=ei),ge.createElement("div",{ref:Hi,className:ye()(Vn,(0,Le.Z)((0,Le.Z)((0,Le.Z)({},"".concat(Vn,"-horizontal"),$e),"".concat(Vn,"-vertical"),!$e),"".concat(Vn,"-visible"),gr)),style:(0,Be.Z)((0,Be.Z)({},He),pt),onMouseDown:Ii,onMouseMove:sr},ge.createElement("div",{ref:Gi,className:ye()("".concat(Vn,"-thumb"),(0,Le.Z)({},"".concat(Vn,"-thumb-moving"),fn)),style:(0,Be.Z)((0,Be.Z)({},Xe),Lt),onMouseDown:cr}))}),wt=yt,xt=20;function zt(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,je=lt/Ue*lt;return isNaN(je)&&(je=0),je=Math.max(je,xt),Math.floor(je)}var Ut=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],cn=[],jt={overflowY:"auto",overflowAnchor:"none"};function mn(lt,Ue){var je=lt.prefixCls,rt=je===void 0?"rc-virtual-list":je,dt=lt.className,tt=lt.height,Ke=lt.itemHeight,De=lt.fullHeight,ze=De===void 0?!0:De,$e=lt.style,We=lt.data,Ve=lt.children,pt=lt.itemKey,Lt=lt.virtual,on=lt.direction,Xt=lt.scrollWidth,Rt=lt.component,fn=Rt===void 0?"div":Rt,En=lt.onScroll,Sn=lt.onVirtualScroll,dn=lt.onVisibleChange,Zn=lt.innerProps,vn=lt.extraRender,Wn=lt.styles,ri=lt.showScrollBar,Ni=ri===void 0?"optional":ri,Qn=(0,xe.Z)(lt,Ut),ki=ge.useCallback(function(On){return typeof pt=="function"?pt(On):On==null?void 0:On[pt]},[pt]),Hi=Mt(ki,null,null),Gi=(0,Ce.Z)(Hi,4),qi=Gi[0],Pr=Gi[1],gr=Gi[2],Ri=Gi[3],Vi=!!(Lt!==!1&&tt&&Ke),sr=ge.useMemo(function(){return Object.values(gr.maps).reduce(function(On,Jn){return On+Jn},0)},[gr.id,gr.maps]),Qe=Vi&&We&&(Math.max(Ke*We.length,sr)>tt||!!Xt),Ti=on==="rtl",ei=ye()(rt,(0,Le.Z)({},"".concat(rt,"-rtl"),Ti),dt),Ii=We||cn,mr=(0,ge.useRef)(),cr=(0,ge.useRef)(),ir=(0,ge.useRef)(),po=(0,ge.useState)(0),Vn=(0,Ce.Z)(po,2),He=Vn[0],Xe=Vn[1],nt=(0,ge.useState)(0),bt=(0,Ce.Z)(nt,2),Nt=bt[0],sn=bt[1],Zt=(0,ge.useState)(!1),_n=(0,Ce.Z)(Zt,2),Kt=_n[0],qt=_n[1],Hn=function(){qt(!0)},kt=function(){qt(!1)},ln={getKey:ki};function An(On){Xe(function(Jn){var qn;typeof On=="function"?qn=On(Jn):qn=On;var ti=Li(qn);return mr.current.scrollTop=ti,ti})}var jn=(0,ge.useRef)({start:0,end:Ii.length}),Qt=(0,ge.useRef)(),rn=le(Ii,ki),Pn=(0,Ce.Z)(rn,1),Dn=Pn[0];Qt.current=Dn;var oi=ge.useMemo(function(){if(!Vi)return{scrollHeight:void 0,start:0,end:Ii.length-1,offset:void 0};if(!Qe){var On;return{scrollHeight:((On=cr.current)===null||On===void 0?void 0:On.offsetHeight)||0,start:0,end:Ii.length-1,offset:void 0}}for(var Jn=0,qn,ti,ii,Fi=Ii.length,Si=0;Si<Fi;Si+=1){var di=Ii[Si],Cn=ki(di),pi=gr.get(Cn),Ui=Jn+(pi===void 0?Ke:pi);Ui>=He&&qn===void 0&&(qn=Si,ti=Jn),Ui>He+tt&&ii===void 0&&(ii=Si),Jn=Ui}return qn===void 0&&(qn=0,ti=0,ii=Math.ceil(tt/Ke)),ii===void 0&&(ii=Ii.length-1),ii=Math.min(ii+1,Ii.length-1),{scrollHeight:Jn,start:qn,end:ii,offset:ti}},[Qe,Vi,He,Ii,Ri,tt]),ai=oi.scrollHeight,Gn=oi.start,Bn=oi.end,bi=oi.offset;jn.current.start=Gn,jn.current.end=Bn,ge.useLayoutEffect(function(){var On=gr.getRecord();if(On.size===1){var Jn=Array.from(On)[0],qn=Ii[Gn];if(qn){var ti=ki(qn);if(ti===Jn){var ii=gr.get(Jn),Fi=ii-Ke;An(function(Si){return Si+Fi})}}}gr.resetRecord()},[ai]);var Ei=ge.useState({width:0,height:tt}),Di=(0,Ce.Z)(Ei,2),yn=Di[0],Tr=Di[1],ur=function(Jn){Tr({width:Jn.offsetWidth,height:Jn.offsetHeight})},wr=(0,ge.useRef)(),pn=(0,ge.useRef)(),$n=ge.useMemo(function(){return zt(yn.width,Xt)},[yn.width,Xt]),yi=ge.useMemo(function(){return zt(yn.height,ai)},[yn.height,ai]),Mi=ai-tt,mi=(0,ge.useRef)(Mi);mi.current=Mi;function Li(On){var Jn=On;return Number.isNaN(mi.current)||(Jn=Math.min(Jn,mi.current)),Jn=Math.max(Jn,0),Jn}var dr=He<=0,ar=He>=Mi,vr=Nt<=0,Cr=Nt>=Xt,Ln=Ae(dr,ar,vr,Cr),Yr=function(){return{x:Ti?-Nt:Nt,y:He}},Mn=(0,ge.useRef)(Yr()),Ai=(0,pe.zX)(function(On){if(Sn){var Jn=(0,Be.Z)((0,Be.Z)({},Yr()),On);(Mn.current.x!==Jn.x||Mn.current.y!==Jn.y)&&(Sn(Jn),Mn.current=Jn)}});function zi(On,Jn){var qn=On;Jn?((0,fe.flushSync)(function(){sn(qn)}),Ai()):An(qn)}function Xi(On){var Jn=On.currentTarget.scrollTop;Jn!==He&&An(Jn),En==null||En(On),Ai()}var lo=function(Jn){var qn=Jn,ti=Xt?Xt-yn.width:0;return qn=Math.max(qn,0),qn=Math.min(qn,ti),qn},oo=(0,pe.zX)(function(On,Jn){Jn?((0,fe.flushSync)(function(){sn(function(qn){var ti=qn+(Ti?-On:On);return lo(ti)})}),Ai()):An(function(qn){var ti=qn+On;return ti})}),qr=Oe(Vi,dr,ar,vr,Cr,!!Xt,oo),uo=(0,Ce.Z)(qr,2),an=uo[0],kn=uo[1];_t(Vi,mr,function(On,Jn,qn,ti){var ii=ti;return Ln(On,Jn,qn)?!1:!ii||!ii._virtualHandled?(ii&&(ii._virtualHandled=!0),an({preventDefault:function(){},deltaX:On?Jn:0,deltaY:On?0:Jn}),!0):!1}),ut(Qe,mr,function(On){An(function(Jn){return Jn+On})}),(0,de.Z)(function(){function On(qn){var ti=dr&&qn.detail<0,ii=ar&&qn.detail>0;Vi&&!ti&&!ii&&qn.preventDefault()}var Jn=mr.current;return Jn.addEventListener("wheel",an,{passive:!1}),Jn.addEventListener("DOMMouseScroll",kn,{passive:!0}),Jn.addEventListener("MozMousePixelScroll",On,{passive:!1}),function(){Jn.removeEventListener("wheel",an),Jn.removeEventListener("DOMMouseScroll",kn),Jn.removeEventListener("MozMousePixelScroll",On)}},[Vi,dr,ar]),(0,de.Z)(function(){if(Xt){var On=lo(Nt);sn(On),Ai({x:On})}},[yn.width,Xt]);var hn=function(){var Jn,qn;(Jn=wr.current)===null||Jn===void 0||Jn.delayHidden(),(qn=pn.current)===null||qn===void 0||qn.delayHidden()},ft=ct(mr,Ii,gr,Ke,ki,function(){return Pr(!0)},An,hn);ge.useImperativeHandle(Ue,function(){return{nativeElement:ir.current,getScrollInfo:Yr,scrollTo:function(Jn){function qn(ti){return ti&&(0,Se.Z)(ti)==="object"&&("left"in ti||"top"in ti)}qn(Jn)?(Jn.left!==void 0&&sn(lo(Jn.left)),ft(Jn.top)):ft(Jn)}}}),(0,de.Z)(function(){if(dn){var On=Ii.slice(Gn,Bn+1);dn(On,Ii)}},[Gn,Bn,Ii]);var Yn=Ie(Ii,ki,gr,Ke),Un=vn==null?void 0:vn({start:Gn,end:Bn,virtual:Qe,offsetX:Nt,offsetY:bi,rtl:Ti,getSize:Yn}),ni=oe(Ii,Gn,Bn,Xt,Nt,qi,Ve,ln),li=null;tt&&(li=(0,Be.Z)((0,Le.Z)({},ze?"height":"maxHeight",tt),jt),Vi&&(li.overflowY="hidden",Xt&&(li.overflowX="hidden"),Kt&&(li.pointerEvents="none")));var vi={};return Ti&&(vi.dir="rtl"),ge.createElement("div",(0,ke.Z)({ref:ir,style:(0,Be.Z)((0,Be.Z)({},$e),{},{position:"relative"}),className:ei},vi,Qn),ge.createElement(we.Z,{onResize:ur},ge.createElement(fn,{className:"".concat(rt,"-holder"),style:li,ref:mr,onScroll:Xi,onMouseEnter:hn},ge.createElement(ee,{prefixCls:rt,height:ai,offsetX:Nt,offsetY:bi,scrollWidth:Xt,onInnerResize:Pr,ref:cr,innerProps:Zn,rtl:Ti,extra:Un},ni))),Qe&&ai>tt&&ge.createElement(wt,{ref:wr,prefixCls:rt,scrollOffset:He,scrollRange:ai,rtl:Ti,onScroll:zi,onStartMove:Hn,onStopMove:kt,spinSize:yi,containerSize:yn.height,style:Wn==null?void 0:Wn.verticalScrollBar,thumbStyle:Wn==null?void 0:Wn.verticalScrollBarThumb,showScrollBar:Ni}),Qe&&Xt>yn.width&&ge.createElement(wt,{ref:pn,prefixCls:rt,scrollOffset:Nt,scrollRange:Xt,rtl:Ti,onScroll:zi,onStartMove:Hn,onStopMove:kt,spinSize:$n,containerSize:yn.width,horizontal:!0,style:Wn==null?void 0:Wn.horizontalScrollBar,thumbStyle:Wn==null?void 0:Wn.horizontalScrollBarThumb,showScrollBar:Ni}))}var Ft=ge.forwardRef(mn);Ft.displayName="List";var Yt=Ft,tn=Yt},7062:function(xn,un,Re){var ke=Re(19637),Se=Re(97573),Be=[Re(96627)];xn.exports=ke.createStore(Se,Be)},96627:function(xn,un,Re){xn.exports=ke;function ke(){return Re(42424),{}}},42424:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(xn){return xn<10?"0"+xn:xn}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(xn){return rx_escapable.lastIndex=0,rx_escapable.test(xn)?'"'+xn.replace(rx_escapable,function(un){var Re=meta[un];return typeof Re=="string"?Re:"\\u"+("0000"+un.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+xn+'"'}function str(xn,un){var Re,ke,Se,Be,Le=gap,Ce,xe=un[xn];switch(xe&&typeof xe=="object"&&typeof xe.toJSON=="function"&&(xe=xe.toJSON(xn)),typeof rep=="function"&&(xe=rep.call(un,xn,xe)),typeof xe){case"string":return quote(xe);case"number":return isFinite(xe)?String(xe):"null";case"boolean":case"null":return String(xe);case"object":if(!xe)return"null";if(gap+=indent,Ce=[],Object.prototype.toString.apply(xe)==="[object Array]"){for(Be=xe.length,Re=0;Re<Be;Re+=1)Ce[Re]=str(Re,xe)||"null";return Se=Ce.length===0?"[]":gap?`[
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+Le+"]":"["+Ce.join(",")+"]",gap=Le,Se}if(rep&&typeof rep=="object")for(Be=rep.length,Re=0;Re<Be;Re+=1)typeof rep[Re]=="string"&&(ke=rep[Re],Se=str(ke,xe),Se&&Ce.push(quote(ke)+(gap?": ":":")+Se));else for(ke in xe)Object.prototype.hasOwnProperty.call(xe,ke)&&(Se=str(ke,xe),Se&&Ce.push(quote(ke)+(gap?": ":":")+Se));return Se=Ce.length===0?"{}":gap?`{
|
|
|
`+gap+Ce.join(`,
|
|
|
`+gap)+`
|
|
|
`+Le+"}":"{"+Ce.join(",")+"}",gap=Le,Se}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(xn,un,Re){var ke;if(gap="",indent="",typeof Re=="number")for(ke=0;ke<Re;ke+=1)indent+=" ";else typeof Re=="string"&&(indent=Re);if(rep=un,un&&typeof un!="function"&&(typeof un!="object"||typeof un.length!="number"))throw new Error("JSON.stringify");return str("",{"":xn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(xn,un){var Re,ke,Se=xn[un];if(Se&&typeof Se=="object")for(Re in Se)Object.prototype.hasOwnProperty.call(Se,Re)&&(ke=walk(Se,Re),ke!==void 0?Se[Re]=ke:delete Se[Re]);return reviver.call(xn,un,Se)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(xn){return"\\u"+("0000"+xn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(xn,un,Re){var ke=Re(67039),Se=ke.slice,Be=ke.pluck,Le=ke.each,Ce=ke.bind,xe=ke.create,be=ke.isList,ye=ke.isFunction,we=ke.isObject;xn.exports={createStore:ge};var pe={version:"2.0.12",enabled:!1,get:function(fe,ue){var ee=this.storage.read(this._namespacePrefix+fe);return this._deserialize(ee,ue)},set:function(fe,ue){return ue===void 0?this.remove(fe):(this.storage.write(this._namespacePrefix+fe,this._serialize(ue)),ue)},remove:function(fe){this.storage.remove(this._namespacePrefix+fe)},each:function(fe){var ue=this;this.storage.each(function(ee,z){fe.call(ue,ue._deserialize(ee),(z||"").replace(ue._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(fe){return this._namespacePrefix=="__storejs_"+fe+"_"},createStore:function(){return ge.apply(this,arguments)},addPlugin:function(fe){this._addPlugin(fe)},namespace:function(fe){return ge(this.storage,this.plugins,fe)}};function de(){var fe=typeof console=="undefined"?null:console;if(fe){var ue=fe.warn?fe.warn:fe.log;ue.apply(fe,arguments)}}function ge(fe,ue,ee){ee||(ee=""),fe&&!be(fe)&&(fe=[fe]),ue&&!be(ue)&&(ue=[ue]);var z=ee?"__storejs_"+ee+"_":"",oe=ee?new RegExp("^"+z):null,re=/^[a-zA-Z0-9_\-]*$/;if(!re.test(ee))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var ae={_namespacePrefix:z,_namespaceRegexp:oe,_testStorage:function(me){try{var ve="__storejs__test__";me.write(ve,ve);var Pe=me.read(ve)===ve;return me.remove(ve),Pe}catch(Ae){return!1}},_assignPluginFnProp:function(me,ve){var Pe=this[ve];this[ve]=function(){var Oe=Se(arguments,0),Ie=this;function Ze(){if(Pe)return Le(arguments,function(Je,mt){Oe[mt]=Je}),Pe.apply(Ie,Oe)}var qe=[Ze].concat(Oe);return me.apply(Ie,qe)}},_serialize:function(me){return JSON.stringify(me)},_deserialize:function(me,ve){if(!me)return ve;var Pe="";try{Pe=JSON.parse(me)}catch(Ae){Pe=me}return Pe!==void 0?Pe:ve},_addStorage:function(me){this.enabled||this._testStorage(me)&&(this.storage=me,this.enabled=!0)},_addPlugin:function(me){var ve=this;if(be(me)){Le(me,function(Oe){ve._addPlugin(Oe)});return}var Pe=Be(this.plugins,function(Oe){return me===Oe});if(!Pe){if(this.plugins.push(me),!ye(me))throw new Error("Plugins must be function values that return objects");var Ae=me.call(this);if(!we(Ae))throw new Error("Plugins must return an object of function properties");Le(Ae,function(Oe,Ie){if(!ye(Oe))throw new Error("Bad plugin property: "+Ie+" from plugin "+me.name+". Plugins should only return functions.");ve._assignPluginFnProp(Oe,Ie)})}},addStorage:function(me){de("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(me)}},le=xe(ae,pe,{plugins:[]});return le.raw={},Le(le,function(me,ve){ye(me)&&(le.raw[ve]=Ce(le,me))}),Le(fe,function(me){le._addStorage(me)}),Le(ue,function(me){le._addPlugin(me)}),le}},67039:function(xn,un,Re){var ke=Ce(),Se=xe(),Be=be(),Le=typeof window!="undefined"?window:Re.g;xn.exports={assign:ke,create:Se,trim:Be,bind:ye,slice:we,each:pe,map:de,pluck:ge,isList:fe,isFunction:ue,isObject:ee,Global:Le};function Ce(){return Object.assign?Object.assign:function(oe,re,ae,le){for(var me=1;me<arguments.length;me++)pe(Object(arguments[me]),function(ve,Pe){oe[Pe]=ve});return oe}}function xe(){if(Object.create)return function(re,ae,le,me){var ve=we(arguments,1);return ke.apply(this,[Object.create(re)].concat(ve))};{let oe=function(){};var z=oe;return function(ae,le,me,ve){var Pe=we(arguments,1);return oe.prototype=ae,ke.apply(this,[new oe].concat(Pe))}}}function be(){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 ye(z,oe){return function(){return oe.apply(z,Array.prototype.slice.call(arguments,0))}}function we(z,oe){return Array.prototype.slice.call(z,oe||0)}function pe(z,oe){ge(z,function(re,ae){return oe(re,ae),!1})}function de(z,oe){var re=fe(z)?[]:{};return ge(z,function(ae,le){return re[le]=oe(ae,le),!1}),re}function ge(z,oe){if(fe(z)){for(var re=0;re<z.length;re++)if(oe(z[re],re))return z[re]}else for(var ae in z)if(z.hasOwnProperty(ae)&&oe(z[ae],ae))return z[ae]}function fe(z){return z!=null&&typeof z!="function"&&typeof z.length=="number"}function ue(z){return z&&{}.toString.call(z)==="[object Function]"}function ee(z){return z&&{}.toString.call(z)==="[object Object]"}},97573:function(xn,un,Re){xn.exports=[Re(52496),Re(16436),Re(76673),Re(35701),Re(65578),Re(65300)]},35701:function(xn,un,Re){var ke=Re(67039),Se=ke.Global,Be=ke.trim;xn.exports={name:"cookieStorage",read:Ce,write:be,each:xe,remove:ye,clearAll:we};var Le=Se.document;function Ce(de){if(!de||!pe(de))return null;var ge="(?:^|.*;\\s*)"+escape(de).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Le.cookie.replace(new RegExp(ge),"$1"))}function xe(de){for(var ge=Le.cookie.split(/; ?/g),fe=ge.length-1;fe>=0;fe--)if(Be(ge[fe])){var ue=ge[fe].split("="),ee=unescape(ue[0]),z=unescape(ue[1]);de(z,ee)}}function be(de,ge){de&&(Le.cookie=escape(de)+"="+escape(ge)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ye(de){!de||!pe(de)||(Le.cookie=escape(de)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function we(){xe(function(de,ge){ye(ge)})}function pe(de){return new RegExp("(?:^|;\\s*)"+escape(de).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Le.cookie)}},52496:function(xn,un,Re){var ke=Re(67039),Se=ke.Global;xn.exports={name:"localStorage",read:Le,write:Ce,each:xe,remove:be,clearAll:ye};function Be(){return Se.localStorage}function Le(we){return Be().getItem(we)}function Ce(we,pe){return Be().setItem(we,pe)}function xe(we){for(var pe=Be().length-1;pe>=0;pe--){var de=Be().key(pe);we(Le(de),de)}}function be(we){return Be().removeItem(we)}function ye(){return Be().clear()}},65300:function(xn){xn.exports={name:"memoryStorage",read:Re,write:ke,each:Se,remove:Be,clearAll:Le};var un={};function Re(Ce){return un[Ce]}function ke(Ce,xe){un[Ce]=xe}function Se(Ce){for(var xe in un)un.hasOwnProperty(xe)&&Ce(un[xe],xe)}function Be(Ce){delete un[Ce]}function Le(Ce){un={}}},16436:function(xn,un,Re){var ke=Re(67039),Se=ke.Global;xn.exports={name:"oldFF-globalStorage",read:Le,write:Ce,each:xe,remove:be,clearAll:ye};var Be=Se.globalStorage;function Le(we){return Be[we]}function Ce(we,pe){Be[we]=pe}function xe(we){for(var pe=Be.length-1;pe>=0;pe--){var de=Be.key(pe);we(Be[de],de)}}function be(we){return Be.removeItem(we)}function ye(){xe(function(we,pe){delete Be[we]})}},76673:function(xn,un,Re){var ke=Re(67039),Se=ke.Global;xn.exports={name:"oldIE-userDataStorage",write:be,read:ye,each:we,remove:pe,clearAll:de};var Be="storejs",Le=Se.document,Ce=ue(),xe=(Se.navigator?Se.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function be(ee,z){if(!xe){var oe=fe(ee);Ce(function(re){re.setAttribute(oe,z),re.save(Be)})}}function ye(ee){if(!xe){var z=fe(ee),oe=null;return Ce(function(re){oe=re.getAttribute(z)}),oe}}function we(ee){Ce(function(z){for(var oe=z.XMLDocument.documentElement.attributes,re=oe.length-1;re>=0;re--){var ae=oe[re];ee(z.getAttribute(ae.name),ae.name)}})}function pe(ee){var z=fe(ee);Ce(function(oe){oe.removeAttribute(z),oe.save(Be)})}function de(){Ce(function(ee){var z=ee.XMLDocument.documentElement.attributes;ee.load(Be);for(var oe=z.length-1;oe>=0;oe--)ee.removeAttribute(z[oe].name);ee.save(Be)})}var ge=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function fe(ee){return ee.replace(/^\d/,"___$&").replace(ge,"___")}function ue(){if(!Le||!Le.documentElement||!Le.documentElement.addBehavior)return null;var ee="script",z,oe,re;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,re=z.createElement("div")}catch(ae){re=Le.createElement("div"),z=Le.body}return function(ae){var le=[].slice.call(arguments,0);le.unshift(re),z.appendChild(re),re.addBehavior("#default#userData"),re.load(Be),ae.apply(this,le),z.removeChild(re)}}},65578:function(xn,un,Re){var ke=Re(67039),Se=ke.Global;xn.exports={name:"sessionStorage",read:Le,write:Ce,each:xe,remove:be,clearAll:ye};function Be(){return Se.sessionStorage}function Le(we){return Be().getItem(we)}function Ce(we,pe){return Be().setItem(we,pe)}function xe(we){for(var pe=Be().length-1;pe>=0;pe--){var de=Be().key(pe);we(Le(de),de)}}function be(we){return Be().removeItem(we)}function ye(){return Be().clear()}},82059:function(xn){var un=arguments[3],Re=arguments[4],ke=arguments[5],Se=JSON.stringify;xn.exports=function(Be,Le){for(var Ce,xe=Object.keys(ke),be=0,ye=xe.length;be<ye;be++){var we=xe[be],pe=ke[we].exports;if(pe===Be||pe&&pe.default===Be){Ce=we;break}}if(!Ce){Ce=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var de={},be=0,ye=xe.length;be<ye;be++){var we=xe[be];de[we]=we}Re[Ce]=["function(require,module,exports){"+Be+"(self); }",de]}var ge=Math.floor(Math.pow(16,8)*Math.random()).toString(16),fe={};fe[Ce]=Ce,Re[ge]=["function(require,module,exports){var f = require("+Se(Ce)+");(f.default ? f.default : f)(self);}",fe];var ue={};ee(ge);function ee(me){ue[me]=!0;for(var ve in Re[me][1]){var Pe=Re[me][1][ve];ue[Pe]||ee(Pe)}}var z="("+un+")({"+Object.keys(ue).map(function(me){return Se(me)+":["+Re[me][0]+","+Se(Re[me][1])+"]"}).join(",")+"},{},["+Se(ge)+"])",oe=window.URL||window.webkitURL||window.mozURL||window.msURL,re=new Blob([z],{type:"text/javascript"});if(Le&&Le.bare)return re;var ae=oe.createObjectURL(re),le=new Worker(ae);return le.objectURL=ae,le}},34376:function(xn){(function(un,Re){if(1)xn.exports=Re();else var ke,Se})(window,function(){return function(un){var Re={};function ke(Se){if(Re[Se])return Re[Se].exports;var Be=Re[Se]={i:Se,l:!1,exports:{}};return un[Se].call(Be.exports,Be,Be.exports,ke),Be.l=!0,Be.exports}return ke.m=un,ke.c=Re,ke.d=function(Se,Be,Le){ke.o(Se,Be)||Object.defineProperty(Se,Be,{enumerable:!0,get:Le})},ke.r=function(Se){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Se,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Se,"__esModule",{value:!0})},ke.t=function(Se,Be){if(1&Be&&(Se=ke(Se)),8&Be||4&Be&&typeof Se=="object"&&Se&&Se.__esModule)return Se;var Le=Object.create(null);if(ke.r(Le),Object.defineProperty(Le,"default",{enumerable:!0,value:Se}),2&Be&&typeof Se!="string")for(var Ce in Se)ke.d(Le,Ce,function(xe){return Se[xe]}.bind(null,Ce));return Le},ke.n=function(Se){var Be=Se&&Se.__esModule?function(){return Se.default}:function(){return Se};return ke.d(Be,"a",Be),Be},ke.o=function(Se,Be){return Object.prototype.hasOwnProperty.call(Se,Be)},ke.p="",ke(ke.s=34)}([function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.forwardEvent=Re.EventEmitter=void 0;var Se=function(){function Be(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Be.prototype,"event",{get:function(){var Le=this;return this._event||(this._event=function(Ce){return Le._listeners.push(Ce),{dispose:function(){if(!Le._disposed){for(var xe=0;xe<Le._listeners.length;xe++)if(Le._listeners[xe]===Ce)return void Le._listeners.splice(xe,1)}}}}),this._event},enumerable:!1,configurable:!0}),Be.prototype.fire=function(Le,Ce){for(var xe=[],be=0;be<this._listeners.length;be++)xe.push(this._listeners[be]);for(be=0;be<xe.length;be++)xe[be].call(void 0,Le,Ce)},Be.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Be}();Re.EventEmitter=Se,Re.forwardEvent=function(Be,Le){return Be(function(Ce){return Le.fire(Ce)})}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.IUnicodeService=Re.IOptionsService=Re.ILogService=Re.IInstantiationService=Re.IDirtyRowService=Re.ICharsetService=Re.ICoreService=Re.ICoreMouseService=Re.IBufferService=void 0;var Se=ke(14);Re.IBufferService=Se.createDecorator("BufferService"),Re.ICoreMouseService=Se.createDecorator("CoreMouseService"),Re.ICoreService=Se.createDecorator("CoreService"),Re.ICharsetService=Se.createDecorator("CharsetService"),Re.IDirtyRowService=Se.createDecorator("DirtyRowService"),Re.IInstantiationService=Se.createDecorator("InstantiationService"),Re.ILogService=Se.createDecorator("LogService"),Re.IOptionsService=Se.createDecorator("OptionsService"),Re.IUnicodeService=Se.createDecorator("UnicodeService")},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.getDisposeArrayDisposable=Re.disposeArray=Re.Disposable=void 0;var Se=function(){function Le(){this._disposables=[],this._isDisposed=!1}return Le.prototype.dispose=function(){this._isDisposed=!0;for(var Ce=0,xe=this._disposables;Ce<xe.length;Ce++)xe[Ce].dispose();this._disposables.length=0},Le.prototype.register=function(Ce){return this._disposables.push(Ce),Ce},Le.prototype.unregister=function(Ce){var xe=this._disposables.indexOf(Ce);xe!==-1&&this._disposables.splice(xe,1)},Le}();function Be(Le){for(var Ce=0,xe=Le;Ce<xe.length;Ce++)xe[Ce].dispose();Le.length=0}Re.Disposable=Se,Re.disposeArray=Be,Re.getDisposeArrayDisposable=function(Le){return{dispose:function(){return Be(Le)}}}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.WHITESPACE_CELL_CODE=Re.WHITESPACE_CELL_WIDTH=Re.WHITESPACE_CELL_CHAR=Re.NULL_CELL_CODE=Re.NULL_CELL_WIDTH=Re.NULL_CELL_CHAR=Re.CHAR_DATA_CODE_INDEX=Re.CHAR_DATA_WIDTH_INDEX=Re.CHAR_DATA_CHAR_INDEX=Re.CHAR_DATA_ATTR_INDEX=Re.DEFAULT_ATTR=Re.DEFAULT_COLOR=void 0,Re.DEFAULT_COLOR=256,Re.DEFAULT_ATTR=256|Re.DEFAULT_COLOR<<9,Re.CHAR_DATA_ATTR_INDEX=0,Re.CHAR_DATA_CHAR_INDEX=1,Re.CHAR_DATA_WIDTH_INDEX=2,Re.CHAR_DATA_CODE_INDEX=3,Re.NULL_CELL_CHAR="",Re.NULL_CELL_WIDTH=1,Re.NULL_CELL_CODE=0,Re.WHITESPACE_CELL_CHAR=" ",Re.WHITESPACE_CELL_WIDTH=1,Re.WHITESPACE_CELL_CODE=32},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(ye,we){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,de){pe.__proto__=de}||function(pe,de){for(var ge in de)de.hasOwnProperty(ge)&&(pe[ge]=de[ge])})(ye,we)},function(ye,we){function pe(){this.constructor=ye}Se(ye,we),ye.prototype=we===null?Object.create(we):(pe.prototype=we.prototype,new pe)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.CellData=void 0;var Le=ke(8),Ce=ke(3),xe=ke(6),be=function(ye){function we(){var pe=ye!==null&&ye.apply(this,arguments)||this;return pe.content=0,pe.fg=0,pe.bg=0,pe.extended=new xe.ExtendedAttrs,pe.combinedData="",pe}return Be(we,ye),we.fromCharData=function(pe){var de=new we;return de.setFromCharData(pe),de},we.prototype.isCombined=function(){return 2097152&this.content},we.prototype.getWidth=function(){return this.content>>22},we.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?Le.stringFromCodePoint(2097151&this.content):""},we.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},we.prototype.setFromCharData=function(pe){this.fg=pe[Ce.CHAR_DATA_ATTR_INDEX],this.bg=0;var de=!1;if(pe[Ce.CHAR_DATA_CHAR_INDEX].length>2)de=!0;else if(pe[Ce.CHAR_DATA_CHAR_INDEX].length===2){var ge=pe[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=ge&&ge<=56319){var fe=pe[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=fe&&fe<=57343?this.content=1024*(ge-55296)+fe-56320+65536|pe[Ce.CHAR_DATA_WIDTH_INDEX]<<22:de=!0}else de=!0}else this.content=pe[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|pe[Ce.CHAR_DATA_WIDTH_INDEX]<<22;de&&(this.combinedData=pe[Ce.CHAR_DATA_CHAR_INDEX],this.content=2097152|pe[Ce.CHAR_DATA_WIDTH_INDEX]<<22)},we.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},we}(xe.AttributeData);Re.CellData=be},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.ISoundService=Re.ISelectionService=Re.IRenderService=Re.IMouseService=Re.ICoreBrowserService=Re.ICharSizeService=void 0;var Se=ke(14);Re.ICharSizeService=Se.createDecorator("CharSizeService"),Re.ICoreBrowserService=Se.createDecorator("CoreBrowserService"),Re.IMouseService=Se.createDecorator("MouseService"),Re.IRenderService=Se.createDecorator("RenderService"),Re.ISelectionService=Se.createDecorator("SelectionService"),Re.ISoundService=Se.createDecorator("SoundService")},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.ExtendedAttrs=Re.AttributeData=void 0;var Se=function(){function Le(){this.fg=0,this.bg=0,this.extended=new Be}return Le.toColorRGB=function(Ce){return[Ce>>>16&255,Ce>>>8&255,255&Ce]},Le.fromColorRGB=function(Ce){return(255&Ce[0])<<16|(255&Ce[1])<<8|255&Ce[2]},Le.prototype.clone=function(){var Ce=new Le;return Ce.fg=this.fg,Ce.bg=this.bg,Ce.extended=this.extended.clone(),Ce},Le.prototype.isInverse=function(){return 67108864&this.fg},Le.prototype.isBold=function(){return 134217728&this.fg},Le.prototype.isUnderline=function(){return 268435456&this.fg},Le.prototype.isBlink=function(){return 536870912&this.fg},Le.prototype.isInvisible=function(){return 1073741824&this.fg},Le.prototype.isItalic=function(){return 67108864&this.bg},Le.prototype.isDim=function(){return 134217728&this.bg},Le.prototype.getFgColorMode=function(){return 50331648&this.fg},Le.prototype.getBgColorMode=function(){return 50331648&this.bg},Le.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},Le.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},Le.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},Le.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},Le.prototype.isFgDefault=function(){return(50331648&this.fg)==0},Le.prototype.isBgDefault=function(){return(50331648&this.bg)==0},Le.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},Le.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},Le.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},Le.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},Le.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},Le.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},Le.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},Le.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},Le.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},Le.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},Le.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},Le}();Re.AttributeData=Se;var Be=function(){function Le(Ce,xe){Ce===void 0&&(Ce=0),xe===void 0&&(xe=-1),this.underlineStyle=Ce,this.underlineColor=xe}return Le.prototype.clone=function(){return new Le(this.underlineStyle,this.underlineColor)},Le.prototype.isEmpty=function(){return this.underlineStyle===0},Le}();Re.ExtendedAttrs=Be},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.addDisposableDomListener=void 0,Re.addDisposableDomListener=function(Se,Be,Le,Ce){Se.addEventListener(Be,Le,Ce);var xe=!1;return{dispose:function(){xe||(xe=!0,Se.removeEventListener(Be,Le,Ce))}}}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.Utf8ToUtf32=Re.StringToUtf32=Re.utf32ToString=Re.stringFromCodePoint=void 0,Re.stringFromCodePoint=function(Le){return Le>65535?(Le-=65536,String.fromCharCode(55296+(Le>>10))+String.fromCharCode(Le%1024+56320)):String.fromCharCode(Le)},Re.utf32ToString=function(Le,Ce,xe){Ce===void 0&&(Ce=0),xe===void 0&&(xe=Le.length);for(var be="",ye=Ce;ye<xe;++ye){var we=Le[ye];we>65535?(we-=65536,be+=String.fromCharCode(55296+(we>>10))+String.fromCharCode(we%1024+56320)):be+=String.fromCharCode(we)}return be};var Se=function(){function Le(){this._interim=0}return Le.prototype.clear=function(){this._interim=0},Le.prototype.decode=function(Ce,xe){var be=Ce.length;if(!be)return 0;var ye=0,we=0;this._interim&&(56320<=(ge=Ce.charCodeAt(we++))&&ge<=57343?xe[ye++]=1024*(this._interim-55296)+ge-56320+65536:(xe[ye++]=this._interim,xe[ye++]=ge),this._interim=0);for(var pe=we;pe<be;++pe){var de=Ce.charCodeAt(pe);if(55296<=de&&de<=56319){if(++pe>=be)return this._interim=de,ye;var ge;56320<=(ge=Ce.charCodeAt(pe))&&ge<=57343?xe[ye++]=1024*(de-55296)+ge-56320+65536:(xe[ye++]=de,xe[ye++]=ge)}else xe[ye++]=de}return ye},Le}();Re.StringToUtf32=Se;var Be=function(){function Le(){this.interim=new Uint8Array(3)}return Le.prototype.clear=function(){this.interim.fill(0)},Le.prototype.decode=function(Ce,xe){var be=Ce.length;if(!be)return 0;var ye,we,pe,de,ge=0,fe=0,ue=0;if(this.interim[0]){var ee=!1,z=this.interim[0];z&=(224&z)==192?31:(240&z)==224?15:7;for(var oe=0,re=void 0;(re=63&this.interim[++oe])&&oe<4;)z<<=6,z|=re;for(var ae=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,le=ae-oe;ue<le;){if(ue>=be)return 0;if((192&(re=Ce[ue++]))!=128){ue--,ee=!0;break}this.interim[oe++]=re,z<<=6,z|=63&re}ee||(ae===2?z<128?ue--:xe[ge++]=z:ae===3?z<2048||z>=55296&&z<=57343||(xe[ge++]=z):z<65536||z>1114111||(xe[ge++]=z)),this.interim.fill(0)}for(var me=be-4,ve=ue;ve<be;){for(;!(!(ve<me)||128&(ye=Ce[ve])||128&(we=Ce[ve+1])||128&(pe=Ce[ve+2])||128&(de=Ce[ve+3]));)xe[ge++]=ye,xe[ge++]=we,xe[ge++]=pe,xe[ge++]=de,ve+=4;if((ye=Ce[ve++])<128)xe[ge++]=ye;else if((224&ye)==192){if(ve>=be)return this.interim[0]=ye,ge;if((192&(we=Ce[ve++]))!=128){ve--;continue}if((fe=(31&ye)<<6|63&we)<128){ve--;continue}xe[ge++]=fe}else if((240&ye)==224){if(ve>=be)return this.interim[0]=ye,ge;if((192&(we=Ce[ve++]))!=128){ve--;continue}if(ve>=be)return this.interim[0]=ye,this.interim[1]=we,ge;if((192&(pe=Ce[ve++]))!=128){ve--;continue}if((fe=(15&ye)<<12|(63&we)<<6|63&pe)<2048||fe>=55296&&fe<=57343)continue;xe[ge++]=fe}else if((248&ye)==240){if(ve>=be)return this.interim[0]=ye,ge;if((192&(we=Ce[ve++]))!=128){ve--;continue}if(ve>=be)return this.interim[0]=ye,this.interim[1]=we,ge;if((192&(pe=Ce[ve++]))!=128){ve--;continue}if(ve>=be)return this.interim[0]=ye,this.interim[1]=we,this.interim[2]=pe,ge;if((192&(de=Ce[ve++]))!=128){ve--;continue}if((fe=(7&ye)<<18|(63&we)<<12|(63&pe)<<6|63&de)<65536||fe>1114111)continue;xe[ge++]=fe}}return ge},Le}();Re.Utf8ToUtf32=Be},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.CHAR_ATLAS_CELL_SPACING=Re.DIM_OPACITY=Re.INVERTED_DEFAULT_COLOR=void 0,Re.INVERTED_DEFAULT_COLOR=257,Re.DIM_OPACITY=.5,Re.CHAR_ATLAS_CELL_SPACING=1},function(un,Re,ke){"use strict";var Se,Be,Le,Ce;function xe(ye){var we=ye.toString(16);return we.length<2?"0"+we:we}function be(ye,we){return ye<we?(we+.05)/(ye+.05):(ye+.05)/(we+.05)}Object.defineProperty(Re,"__esModule",{value:!0}),Re.contrastRatio=Re.toPaddedHex=Re.rgba=Re.rgb=Re.css=Re.color=Re.channels=void 0,function(ye){ye.toCss=function(we,pe,de,ge){return ge!==void 0?"#"+xe(we)+xe(pe)+xe(de)+xe(ge):"#"+xe(we)+xe(pe)+xe(de)},ye.toRgba=function(we,pe,de,ge){return ge===void 0&&(ge=255),(we<<24|pe<<16|de<<8|ge)>>>0}}(Se=Re.channels||(Re.channels={})),(Be=Re.color||(Re.color={})).blend=function(ye,we){var pe=(255&we.rgba)/255;if(pe===1)return{css:we.css,rgba:we.rgba};var de=we.rgba>>24&255,ge=we.rgba>>16&255,fe=we.rgba>>8&255,ue=ye.rgba>>24&255,ee=ye.rgba>>16&255,z=ye.rgba>>8&255,oe=ue+Math.round((de-ue)*pe),re=ee+Math.round((ge-ee)*pe),ae=z+Math.round((fe-z)*pe);return{css:Se.toCss(oe,re,ae),rgba:Se.toRgba(oe,re,ae)}},Be.isOpaque=function(ye){return(255&ye.rgba)==255},Be.ensureContrastRatio=function(ye,we,pe){var de=Ce.ensureContrastRatio(ye.rgba,we.rgba,pe);if(de)return Ce.toColor(de>>24&255,de>>16&255,de>>8&255)},Be.opaque=function(ye){var we=(255|ye.rgba)>>>0,pe=Ce.toChannels(we),de=pe[0],ge=pe[1],fe=pe[2];return{css:Se.toCss(de,ge,fe),rgba:we}},Be.opacity=function(ye,we){var pe=Math.round(255*we),de=Ce.toChannels(ye.rgba),ge=de[0],fe=de[1],ue=de[2];return{css:Se.toCss(ge,fe,ue,pe),rgba:Se.toRgba(ge,fe,ue,pe)}},(Re.css||(Re.css={})).toColor=function(ye){switch(ye.length){case 7:return{css:ye,rgba:(parseInt(ye.slice(1),16)<<8|255)>>>0};case 9:return{css:ye,rgba:parseInt(ye.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(ye){function we(pe,de,ge){var fe=pe/255,ue=de/255,ee=ge/255;return .2126*(fe<=.03928?fe/12.92:Math.pow((fe+.055)/1.055,2.4))+.7152*(ue<=.03928?ue/12.92:Math.pow((ue+.055)/1.055,2.4))+.0722*(ee<=.03928?ee/12.92:Math.pow((ee+.055)/1.055,2.4))}ye.relativeLuminance=function(pe){return we(pe>>16&255,pe>>8&255,255&pe)},ye.relativeLuminance2=we}(Le=Re.rgb||(Re.rgb={})),function(ye){function we(de,ge,fe){for(var ue=de>>24&255,ee=de>>16&255,z=de>>8&255,oe=ge>>24&255,re=ge>>16&255,ae=ge>>8&255,le=be(Le.relativeLuminance2(oe,ae,re),Le.relativeLuminance2(ue,ee,z));le<fe&&(oe>0||re>0||ae>0);)oe-=Math.max(0,Math.ceil(.1*oe)),re-=Math.max(0,Math.ceil(.1*re)),ae-=Math.max(0,Math.ceil(.1*ae)),le=be(Le.relativeLuminance2(oe,ae,re),Le.relativeLuminance2(ue,ee,z));return(oe<<24|re<<16|ae<<8|255)>>>0}function pe(de,ge,fe){for(var ue=de>>24&255,ee=de>>16&255,z=de>>8&255,oe=ge>>24&255,re=ge>>16&255,ae=ge>>8&255,le=be(Le.relativeLuminance2(oe,ae,re),Le.relativeLuminance2(ue,ee,z));le<fe&&(oe<255||re<255||ae<255);)oe=Math.min(255,oe+Math.ceil(.1*(255-oe))),re=Math.min(255,re+Math.ceil(.1*(255-re))),ae=Math.min(255,ae+Math.ceil(.1*(255-ae))),le=be(Le.relativeLuminance2(oe,ae,re),Le.relativeLuminance2(ue,ee,z));return(oe<<24|re<<16|ae<<8|255)>>>0}ye.ensureContrastRatio=function(de,ge,fe){var ue=Le.relativeLuminance(de>>8),ee=Le.relativeLuminance(ge>>8);if(be(ue,ee)<fe)return ee<ue?we(de,ge,fe):pe(de,ge,fe)},ye.reduceLuminance=we,ye.increaseLuminance=pe,ye.toChannels=function(de){return[de>>24&255,de>>16&255,de>>8&255,255&de]},ye.toColor=function(de,ge,fe){return{css:Se.toCss(de,ge,fe),rgba:Se.toRgba(de,ge,fe)}}}(Ce=Re.rgba||(Re.rgba={})),Re.toPaddedHex=xe,Re.contrastRatio=be},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.isLinux=Re.isWindows=Re.isIphone=Re.isIpad=Re.isMac=Re.isSafari=Re.isFirefox=void 0;var Se=typeof navigator=="undefined",Be=Se?"node":navigator.userAgent,Le=Se?"node":navigator.platform;function Ce(xe,be){return xe.indexOf(be)>=0}Re.isFirefox=!!~Be.indexOf("Firefox"),Re.isSafari=/^((?!chrome|android).)*safari/i.test(Be),Re.isMac=Ce(["Macintosh","MacIntel","MacPPC","Mac68K"],Le),Re.isIpad=Le==="iPad",Re.isIphone=Le==="iPhone",Re.isWindows=Ce(["Windows","Win16","Win32","WinCE"],Le),Re.isLinux=Le.indexOf("Linux")>=0},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.C1=Re.C0=void 0,function(Se){Se.NUL="\0",Se.SOH="",Se.STX="",Se.ETX="",Se.EOT="",Se.ENQ="",Se.ACK="",Se.BEL="\x07",Se.BS="\b",Se.HT=" ",Se.LF=`
|
|
|
`,Se.VT="\v",Se.FF="\f",Se.CR="\r",Se.SO="",Se.SI="",Se.DLE="",Se.DC1="",Se.DC2="",Se.DC3="",Se.DC4="",Se.NAK="",Se.SYN="",Se.ETB="",Se.CAN="",Se.EM="",Se.SUB="",Se.ESC="\x1B",Se.FS="",Se.GS="",Se.RS="",Se.US="",Se.SP=" ",Se.DEL="\x7F"}(Re.C0||(Re.C0={})),function(Se){Se.PAD="\x80",Se.HOP="\x81",Se.BPH="\x82",Se.NBH="\x83",Se.IND="\x84",Se.NEL="\x85",Se.SSA="\x86",Se.ESA="\x87",Se.HTS="\x88",Se.HTJ="\x89",Se.VTS="\x8A",Se.PLD="\x8B",Se.PLU="\x8C",Se.RI="\x8D",Se.SS2="\x8E",Se.SS3="\x8F",Se.DCS="\x90",Se.PU1="\x91",Se.PU2="\x92",Se.STS="\x93",Se.CCH="\x94",Se.MW="\x95",Se.SPA="\x96",Se.EPA="\x97",Se.SOS="\x98",Se.SGCI="\x99",Se.SCI="\x9A",Se.CSI="\x9B",Se.ST="\x9C",Se.OSC="\x9D",Se.PM="\x9E",Se.APC="\x9F"}(Re.C1||(Re.C1={}))},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.BaseRenderLayer=void 0;var Se=ke(3),Be=ke(9),Le=ke(25),Ce=ke(6),xe=ke(28),be=ke(10),ye=ke(17),we=function(){function pe(de,ge,fe,ue,ee,z,oe,re){this._container=de,this._alpha=ue,this._colors=ee,this._rendererId=z,this._bufferService=oe,this._optionsService=re,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+ge+"-layer"),this._canvas.style.zIndex=fe.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return pe.prototype.dispose=function(){var de;ye.removeElementFromParent(this._canvas),(de=this._charAtlas)===null||de===void 0||de.dispose()},pe.prototype._initCanvas=function(){this._ctx=xe.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},pe.prototype.onOptionsChanged=function(){},pe.prototype.onBlur=function(){},pe.prototype.onFocus=function(){},pe.prototype.onCursorMove=function(){},pe.prototype.onGridChanged=function(de,ge){},pe.prototype.onSelectionChanged=function(de,ge,fe){fe===void 0&&(fe=!1)},pe.prototype.setColors=function(de){this._refreshCharAtlas(de)},pe.prototype._setTransparency=function(de){if(de!==this._alpha){var ge=this._canvas;this._alpha=de,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,ge),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},pe.prototype._refreshCharAtlas=function(de){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=Le.acquireCharAtlas(this._optionsService.options,this._rendererId,de,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},pe.prototype.resize=function(de){this._scaledCellWidth=de.scaledCellWidth,this._scaledCellHeight=de.scaledCellHeight,this._scaledCharWidth=de.scaledCharWidth,this._scaledCharHeight=de.scaledCharHeight,this._scaledCharLeft=de.scaledCharLeft,this._scaledCharTop=de.scaledCharTop,this._canvas.width=de.scaledCanvasWidth,this._canvas.height=de.scaledCanvasHeight,this._canvas.style.width=de.canvasWidth+"px",this._canvas.style.height=de.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},pe.prototype._fillCells=function(de,ge,fe,ue){this._ctx.fillRect(de*this._scaledCellWidth,ge*this._scaledCellHeight,fe*this._scaledCellWidth,ue*this._scaledCellHeight)},pe.prototype._fillBottomLineAtCells=function(de,ge,fe){fe===void 0&&(fe=1),this._ctx.fillRect(de*this._scaledCellWidth,(ge+1)*this._scaledCellHeight-window.devicePixelRatio-1,fe*this._scaledCellWidth,window.devicePixelRatio)},pe.prototype._fillLeftLineAtCell=function(de,ge,fe){this._ctx.fillRect(de*this._scaledCellWidth,ge*this._scaledCellHeight,window.devicePixelRatio*fe,this._scaledCellHeight)},pe.prototype._strokeRectAtCell=function(de,ge,fe,ue){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(de*this._scaledCellWidth+window.devicePixelRatio/2,ge*this._scaledCellHeight+window.devicePixelRatio/2,fe*this._scaledCellWidth-window.devicePixelRatio,ue*this._scaledCellHeight-window.devicePixelRatio)},pe.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},pe.prototype._clearCells=function(de,ge,fe,ue){this._alpha?this._ctx.clearRect(de*this._scaledCellWidth,ge*this._scaledCellHeight,fe*this._scaledCellWidth,ue*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(de*this._scaledCellWidth,ge*this._scaledCellHeight,fe*this._scaledCellWidth,ue*this._scaledCellHeight))},pe.prototype._fillCharTrueColor=function(de,ge,fe){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(fe),this._ctx.fillText(de.getChars(),ge*this._scaledCellWidth+this._scaledCharLeft,fe*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},pe.prototype._drawChars=function(de,ge,fe){var ue,ee,z=this._getContrastColor(de);z||de.isFgRGB()||de.isBgRGB()?this._drawUncachedChars(de,ge,fe,z):(de.isInverse()?(ue=de.isBgDefault()?Be.INVERTED_DEFAULT_COLOR:de.getBgColor(),ee=de.isFgDefault()?Be.INVERTED_DEFAULT_COLOR:de.getFgColor()):(ee=de.isBgDefault()?Se.DEFAULT_COLOR:de.getBgColor(),ue=de.isFgDefault()?Se.DEFAULT_COLOR:de.getFgColor()),ue+=this._optionsService.options.drawBoldTextInBrightColors&&de.isBold()&&ue<8?8:0,this._currentGlyphIdentifier.chars=de.getChars()||Se.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=de.getCode()||Se.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=ee,this._currentGlyphIdentifier.fg=ue,this._currentGlyphIdentifier.bold=!!de.isBold(),this._currentGlyphIdentifier.dim=!!de.isDim(),this._currentGlyphIdentifier.italic=!!de.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,ge*this._scaledCellWidth+this._scaledCharLeft,fe*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(de,ge,fe))},pe.prototype._drawUncachedChars=function(de,ge,fe,ue){if(this._ctx.save(),this._ctx.font=this._getFont(!!de.isBold(),!!de.isItalic()),this._ctx.textBaseline="middle",de.isInverse())if(ue)this._ctx.fillStyle=ue.css;else if(de.isBgDefault())this._ctx.fillStyle=be.color.opaque(this._colors.background).css;else if(de.isBgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(de.getBgColor()).join(",")+")";else{var ee=de.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&de.isBold()&&ee<8&&(ee+=8),this._ctx.fillStyle=this._colors.ansi[ee].css}else if(ue)this._ctx.fillStyle=ue.css;else if(de.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(de.isFgRGB())this._ctx.fillStyle="rgb("+Ce.AttributeData.toColorRGB(de.getFgColor()).join(",")+")";else{var z=de.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&de.isBold()&&z<8&&(z+=8),this._ctx.fillStyle=this._colors.ansi[z].css}this._clipRow(fe),de.isDim()&&(this._ctx.globalAlpha=Be.DIM_OPACITY),this._ctx.fillText(de.getChars(),ge*this._scaledCellWidth+this._scaledCharLeft,fe*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},pe.prototype._clipRow=function(de){this._ctx.beginPath(),this._ctx.rect(0,de*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},pe.prototype._getFont=function(de,ge){return(ge?"italic":"")+" "+(de?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},pe.prototype._getContrastColor=function(de){if(this._optionsService.options.minimumContrastRatio!==1){var ge=this._colors.contrastCache.getColor(de.bg,de.fg);if(ge!==void 0)return ge||void 0;var fe=de.getFgColor(),ue=de.getFgColorMode(),ee=de.getBgColor(),z=de.getBgColorMode(),oe=!!de.isInverse(),re=!!de.isInverse();if(oe){var ae=fe;fe=ee,ee=ae;var le=ue;ue=z,z=le}var me=this._resolveBackgroundRgba(z,ee,oe),ve=this._resolveForegroundRgba(ue,fe,oe,re),Pe=be.rgba.ensureContrastRatio(me,ve,this._optionsService.options.minimumContrastRatio);if(Pe){var Ae={css:be.channels.toCss(Pe>>24&255,Pe>>16&255,Pe>>8&255),rgba:Pe};return this._colors.contrastCache.setColor(de.bg,de.fg,Ae),Ae}this._colors.contrastCache.setColor(de.bg,de.fg,null)}},pe.prototype._resolveBackgroundRgba=function(de,ge,fe){switch(de){case 16777216:case 33554432:return this._colors.ansi[ge].rgba;case 50331648:return ge<<8;case 0:default:return fe?this._colors.foreground.rgba:this._colors.background.rgba}},pe.prototype._resolveForegroundRgba=function(de,ge,fe,ue){switch(de){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ue&&ge<8&&(ge+=8),this._colors.ansi[ge].rgba;case 50331648:return ge<<8;case 0:default:return fe?this._colors.background.rgba:this._colors.foreground.rgba}},pe}();Re.BaseRenderLayer=we},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.createDecorator=Re.getServiceDependencies=Re.serviceRegistry=void 0;function Se(Be,Le,Ce){Le.di$target===Le?Le.di$dependencies.push({id:Be,index:Ce}):(Le.di$dependencies=[{id:Be,index:Ce}],Le.di$target=Le)}Re.serviceRegistry=new Map,Re.getServiceDependencies=function(Be){return Be.di$dependencies||[]},Re.createDecorator=function(Be){if(Re.serviceRegistry.has(Be))return Re.serviceRegistry.get(Be);var Le=function(Ce,xe,be){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Se(Le,Ce,be)};return Le.toString=function(){return Be},Re.serviceRegistry.set(Be,Le),Le}},function(un,Re,ke){"use strict";function Se(Be,Le,Ce,xe){if(Ce===void 0&&(Ce=0),xe===void 0&&(xe=Be.length),Ce>=Be.length)return Be;Ce=(Be.length+Ce)%Be.length,xe=xe>=Be.length?Be.length:(Be.length+xe)%Be.length;for(var be=Ce;be<xe;++be)Be[be]=Le;return Be}Object.defineProperty(Re,"__esModule",{value:!0}),Re.concat=Re.fillFallback=Re.fill=void 0,Re.fill=function(Be,Le,Ce,xe){return Be.fill?Be.fill(Le,Ce,xe):Se(Be,Le,Ce,xe)},Re.fillFallback=Se,Re.concat=function(Be,Le){var Ce=new Be.constructor(Be.length+Le.length);return Ce.set(Be),Ce.set(Le,Be.length),Ce}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.BufferLine=Re.DEFAULT_ATTR_DATA=void 0;var Se=ke(8),Be=ke(3),Le=ke(4),Ce=ke(6);Re.DEFAULT_ATTR_DATA=Object.freeze(new Ce.AttributeData);var xe=function(){function be(ye,we,pe){pe===void 0&&(pe=!1),this.isWrapped=pe,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*ye);for(var de=we||Le.CellData.fromCharData([0,Be.NULL_CELL_CHAR,Be.NULL_CELL_WIDTH,Be.NULL_CELL_CODE]),ge=0;ge<ye;++ge)this.setCell(ge,de);this.length=ye}return be.prototype.get=function(ye){var we=this._data[3*ye+0],pe=2097151&we;return[this._data[3*ye+1],2097152&we?this._combined[ye]:pe?Se.stringFromCodePoint(pe):"",we>>22,2097152&we?this._combined[ye].charCodeAt(this._combined[ye].length-1):pe]},be.prototype.set=function(ye,we){this._data[3*ye+1]=we[Be.CHAR_DATA_ATTR_INDEX],we[Be.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[ye]=we[1],this._data[3*ye+0]=2097152|ye|we[Be.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*ye+0]=we[Be.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|we[Be.CHAR_DATA_WIDTH_INDEX]<<22},be.prototype.getWidth=function(ye){return this._data[3*ye+0]>>22},be.prototype.hasWidth=function(ye){return 12582912&this._data[3*ye+0]},be.prototype.getFg=function(ye){return this._data[3*ye+1]},be.prototype.getBg=function(ye){return this._data[3*ye+2]},be.prototype.hasContent=function(ye){return 4194303&this._data[3*ye+0]},be.prototype.getCodePoint=function(ye){var we=this._data[3*ye+0];return 2097152&we?this._combined[ye].charCodeAt(this._combined[ye].length-1):2097151&we},be.prototype.isCombined=function(ye){return 2097152&this._data[3*ye+0]},be.prototype.getString=function(ye){var we=this._data[3*ye+0];return 2097152&we?this._combined[ye]:2097151&we?Se.stringFromCodePoint(2097151&we):""},be.prototype.loadCell=function(ye,we){var pe=3*ye;return we.content=this._data[pe+0],we.fg=this._data[pe+1],we.bg=this._data[pe+2],2097152&we.content&&(we.combinedData=this._combined[ye]),268435456&we.bg&&(we.extended=this._extendedAttrs[ye]),we},be.prototype.setCell=function(ye,we){2097152&we.content&&(this._combined[ye]=we.combinedData),268435456&we.bg&&(this._extendedAttrs[ye]=we.extended),this._data[3*ye+0]=we.content,this._data[3*ye+1]=we.fg,this._data[3*ye+2]=we.bg},be.prototype.setCellFromCodePoint=function(ye,we,pe,de,ge,fe){268435456&ge&&(this._extendedAttrs[ye]=fe),this._data[3*ye+0]=we|pe<<22,this._data[3*ye+1]=de,this._data[3*ye+2]=ge},be.prototype.addCodepointToCell=function(ye,we){var pe=this._data[3*ye+0];2097152&pe?this._combined[ye]+=Se.stringFromCodePoint(we):(2097151&pe?(this._combined[ye]=Se.stringFromCodePoint(2097151&pe)+Se.stringFromCodePoint(we),pe&=-2097152,pe|=2097152):pe=we|1<<22,this._data[3*ye+0]=pe)},be.prototype.insertCells=function(ye,we,pe,de){if((ye%=this.length)&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs),we<this.length-ye){for(var ge=new Le.CellData,fe=this.length-ye-we-1;fe>=0;--fe)this.setCell(ye+we+fe,this.loadCell(ye+fe,ge));for(fe=0;fe<we;++fe)this.setCell(ye+fe,pe)}else for(fe=ye;fe<this.length;++fe)this.setCell(fe,pe);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs)},be.prototype.deleteCells=function(ye,we,pe,de){if(ye%=this.length,we<this.length-ye){for(var ge=new Le.CellData,fe=0;fe<this.length-ye-we;++fe)this.setCell(ye+fe,this.loadCell(ye+we+fe,ge));for(fe=this.length-we;fe<this.length;++fe)this.setCell(fe,pe)}else for(fe=ye;fe<this.length;++fe)this.setCell(fe,pe);ye&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs),this.getWidth(ye)!==0||this.hasContent(ye)||this.setCellFromCodePoint(ye,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs)},be.prototype.replaceCells=function(ye,we,pe,de){for(ye&&this.getWidth(ye-1)===2&&this.setCellFromCodePoint(ye-1,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs),we<this.length&&this.getWidth(we-1)===2&&this.setCellFromCodePoint(we,0,1,(de==null?void 0:de.fg)||0,(de==null?void 0:de.bg)||0,(de==null?void 0:de.extended)||new Ce.ExtendedAttrs);ye<we&&ye<this.length;)this.setCell(ye++,pe)},be.prototype.resize=function(ye,we){if(ye!==this.length){if(ye>this.length){var pe=new Uint32Array(3*ye);this.length&&(3*ye<this._data.length?pe.set(this._data.subarray(0,3*ye)):pe.set(this._data)),this._data=pe;for(var de=this.length;de<ye;++de)this.setCell(de,we)}else if(ye){(pe=new Uint32Array(3*ye)).set(this._data.subarray(0,3*ye)),this._data=pe;var ge=Object.keys(this._combined);for(de=0;de<ge.length;de++){var fe=parseInt(ge[de],10);fe>=ye&&delete this._combined[fe]}}else this._data=new Uint32Array(0),this._combined={};this.length=ye}},be.prototype.fill=function(ye){this._combined={},this._extendedAttrs={};for(var we=0;we<this.length;++we)this.setCell(we,ye)},be.prototype.copyFrom=function(ye){for(var we in this.length!==ye.length?this._data=new Uint32Array(ye._data):this._data.set(ye._data),this.length=ye.length,this._combined={},ye._combined)this._combined[we]=ye._combined[we];for(var we in this._extendedAttrs={},ye._extendedAttrs)this._extendedAttrs[we]=ye._extendedAttrs[we];this.isWrapped=ye.isWrapped},be.prototype.clone=function(){var ye=new be(0);for(var we in ye._data=new Uint32Array(this._data),ye.length=this.length,this._combined)ye._combined[we]=this._combined[we];for(var we in this._extendedAttrs)ye._extendedAttrs[we]=this._extendedAttrs[we];return ye.isWrapped=this.isWrapped,ye},be.prototype.getTrimmedLength=function(){for(var ye=this.length-1;ye>=0;--ye)if(4194303&this._data[3*ye+0])return ye+(this._data[3*ye+0]>>22);return 0},be.prototype.copyCellsFrom=function(ye,we,pe,de,ge){var fe=ye._data;if(ge)for(var ue=de-1;ue>=0;ue--)for(var ee=0;ee<3;ee++)this._data[3*(pe+ue)+ee]=fe[3*(we+ue)+ee];else for(ue=0;ue<de;ue++)for(ee=0;ee<3;ee++)this._data[3*(pe+ue)+ee]=fe[3*(we+ue)+ee];var z=Object.keys(ye._combined);for(ee=0;ee<z.length;ee++){var oe=parseInt(z[ee],10);oe>=we&&(this._combined[oe-we+pe]=ye._combined[oe])}},be.prototype.translateToString=function(ye,we,pe){ye===void 0&&(ye=!1),we===void 0&&(we=0),pe===void 0&&(pe=this.length),ye&&(pe=Math.min(pe,this.getTrimmedLength()));for(var de="";we<pe;){var ge=this._data[3*we+0],fe=2097151≥de+=2097152&ge?this._combined[we]:fe?Se.stringFromCodePoint(fe):Be.WHITESPACE_CELL_CHAR,we+=ge>>22||1}return de},be}();Re.BufferLine=xe},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.removeElementFromParent=void 0,Re.removeElementFromParent=function(){for(var Se,Be=[],Le=0;Le<arguments.length;Le++)Be[Le]=arguments[Le];for(var Ce=0,xe=Be;Ce<xe.length;Ce++){var be=xe[Ce];(Se=be==null?void 0:be.parentElement)===null||Se===void 0||Se.removeChild(be)}}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.tooMuchOutput=Re.promptLabel=void 0,Re.promptLabel="Terminal input",Re.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(ve,Pe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ae,Oe){Ae.__proto__=Oe}||function(Ae,Oe){for(var Ie in Oe)Oe.hasOwnProperty(Ie)&&(Ae[Ie]=Oe[Ie])})(ve,Pe)},function(ve,Pe){function Ae(){this.constructor=ve}Se(ve,Pe),ve.prototype=Pe===null?Object.create(Pe):(Ae.prototype=Pe.prototype,new Ae)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.InputHandler=Re.WindowsOptionsReportType=void 0;var Le,Ce=ke(12),xe=ke(20),be=ke(39),ye=ke(2),we=ke(15),pe=ke(8),de=ke(16),ge=ke(0),fe=ke(3),ue=ke(4),ee=ke(6),z=ke(22),oe=ke(24),re={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function ae(ve,Pe){if(ve>24)return Pe.setWinLines||!1;switch(ve){case 1:return!!Pe.restoreWin;case 2:return!!Pe.minimizeWin;case 3:return!!Pe.setWinPosition;case 4:return!!Pe.setWinSizePixels;case 5:return!!Pe.raiseWin;case 6:return!!Pe.lowerWin;case 7:return!!Pe.refreshWin;case 8:return!!Pe.setWinSizeChars;case 9:return!!Pe.maximizeWin;case 10:return!!Pe.fullscreenWin;case 11:return!!Pe.getWinState;case 13:return!!Pe.getWinPosition;case 14:return!!Pe.getWinSizePixels;case 15:return!!Pe.getScreenSizePixels;case 16:return!!Pe.getCellSizePixels;case 18:return!!Pe.getWinSizeChars;case 19:return!!Pe.getScreenSizeChars;case 20:return!!Pe.getIconTitle;case 21:return!!Pe.getWinTitle;case 22:return!!Pe.pushTitle;case 23:return!!Pe.popTitle;case 24:return!!Pe.setWinLines}return!1}(function(ve){ve[ve.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ve[ve.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(Le=Re.WindowsOptionsReportType||(Re.WindowsOptionsReportType={}));var le=function(){function ve(Pe,Ae,Oe,Ie){this._bufferService=Pe,this._coreService=Ae,this._logService=Oe,this._optionsService=Ie,this._data=new Uint32Array(0)}return ve.prototype.hook=function(Pe){this._data=new Uint32Array(0)},ve.prototype.put=function(Pe,Ae,Oe){this._data=we.concat(this._data,Pe.subarray(Ae,Oe))},ve.prototype.unhook=function(Pe){if(Pe){var Ae=pe.utf32ToString(this._data);switch(this._data=new Uint32Array(0),Ae){case'"q':return this._coreService.triggerDataEvent(Ce.C0.ESC+'P1$r0"q'+Ce.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(Ce.C0.ESC+'P1$r61;1"p'+Ce.C0.ESC+"\\");case"r":var Oe=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+Oe+Ce.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r0m"+Ce.C0.ESC+"\\");case" q":var Ie={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return Ie-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+Ie+" q"+Ce.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",Ae),this._coreService.triggerDataEvent(Ce.C0.ESC+"P0$r"+Ce.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},ve}(),me=function(ve){function Pe(Ae,Oe,Ie,Ze,qe,Je,mt,gt,Mt){Mt===void 0&&(Mt=new be.EscapeSequenceParser);var at=ve.call(this)||this;at._bufferService=Ae,at._charsetService=Oe,at._coreService=Ie,at._dirtyRowService=Ze,at._logService=qe,at._optionsService=Je,at._coreMouseService=mt,at._unicodeService=gt,at._parser=Mt,at._parseBuffer=new Uint32Array(4096),at._stringDecoder=new pe.StringToUtf32,at._utf8Decoder=new pe.Utf8ToUtf32,at._workCell=new ue.CellData,at._windowTitle="",at._iconName="",at._windowTitleStack=[],at._iconNameStack=[],at._curAttrData=de.DEFAULT_ATTR_DATA.clone(),at._eraseAttrDataInternal=de.DEFAULT_ATTR_DATA.clone(),at._onRequestBell=new ge.EventEmitter,at._onRequestRefreshRows=new ge.EventEmitter,at._onRequestReset=new ge.EventEmitter,at._onRequestScroll=new ge.EventEmitter,at._onRequestSyncScrollBar=new ge.EventEmitter,at._onRequestWindowsOptionsReport=new ge.EventEmitter,at._onA11yChar=new ge.EventEmitter,at._onA11yTab=new ge.EventEmitter,at._onCursorMove=new ge.EventEmitter,at._onLineFeed=new ge.EventEmitter,at._onScroll=new ge.EventEmitter,at._onTitleChange=new ge.EventEmitter,at.register(at._parser),at._parser.setCsiHandlerFallback(function(ut,ot){at._logService.debug("Unknown CSI code: ",{identifier:at._parser.identToString(ut),params:ot.toArray()})}),at._parser.setEscHandlerFallback(function(ut){at._logService.debug("Unknown ESC code: ",{identifier:at._parser.identToString(ut)})}),at._parser.setExecuteHandlerFallback(function(ut){at._logService.debug("Unknown EXECUTE code: ",{code:ut})}),at._parser.setOscHandlerFallback(function(ut,ot,ct){at._logService.debug("Unknown OSC code: ",{identifier:ut,action:ot,data:ct})}),at._parser.setDcsHandlerFallback(function(ut,ot,ct){ot==="HOOK"&&(ct=ct.toArray()),at._logService.debug("Unknown DCS code: ",{identifier:at._parser.identToString(ut),action:ot,payload:ct})}),at._parser.setPrintHandler(function(ut,ot,ct){return at.print(ut,ot,ct)}),at._parser.setCsiHandler({final:"@"},function(ut){return at.insertChars(ut)}),at._parser.setCsiHandler({intermediates:" ",final:"@"},function(ut){return at.scrollLeft(ut)}),at._parser.setCsiHandler({final:"A"},function(ut){return at.cursorUp(ut)}),at._parser.setCsiHandler({intermediates:" ",final:"A"},function(ut){return at.scrollRight(ut)}),at._parser.setCsiHandler({final:"B"},function(ut){return at.cursorDown(ut)}),at._parser.setCsiHandler({final:"C"},function(ut){return at.cursorForward(ut)}),at._parser.setCsiHandler({final:"D"},function(ut){return at.cursorBackward(ut)}),at._parser.setCsiHandler({final:"E"},function(ut){return at.cursorNextLine(ut)}),at._parser.setCsiHandler({final:"F"},function(ut){return at.cursorPrecedingLine(ut)}),at._parser.setCsiHandler({final:"G"},function(ut){return at.cursorCharAbsolute(ut)}),at._parser.setCsiHandler({final:"H"},function(ut){return at.cursorPosition(ut)}),at._parser.setCsiHandler({final:"I"},function(ut){return at.cursorForwardTab(ut)}),at._parser.setCsiHandler({final:"J"},function(ut){return at.eraseInDisplay(ut)}),at._parser.setCsiHandler({prefix:"?",final:"J"},function(ut){return at.eraseInDisplay(ut)}),at._parser.setCsiHandler({final:"K"},function(ut){return at.eraseInLine(ut)}),at._parser.setCsiHandler({prefix:"?",final:"K"},function(ut){return at.eraseInLine(ut)}),at._parser.setCsiHandler({final:"L"},function(ut){return at.insertLines(ut)}),at._parser.setCsiHandler({final:"M"},function(ut){return at.deleteLines(ut)}),at._parser.setCsiHandler({final:"P"},function(ut){return at.deleteChars(ut)}),at._parser.setCsiHandler({final:"S"},function(ut){return at.scrollUp(ut)}),at._parser.setCsiHandler({final:"T"},function(ut){return at.scrollDown(ut)}),at._parser.setCsiHandler({final:"X"},function(ut){return at.eraseChars(ut)}),at._parser.setCsiHandler({final:"Z"},function(ut){return at.cursorBackwardTab(ut)}),at._parser.setCsiHandler({final:"`"},function(ut){return at.charPosAbsolute(ut)}),at._parser.setCsiHandler({final:"a"},function(ut){return at.hPositionRelative(ut)}),at._parser.setCsiHandler({final:"b"},function(ut){return at.repeatPrecedingCharacter(ut)}),at._parser.setCsiHandler({final:"c"},function(ut){return at.sendDeviceAttributesPrimary(ut)}),at._parser.setCsiHandler({prefix:">",final:"c"},function(ut){return at.sendDeviceAttributesSecondary(ut)}),at._parser.setCsiHandler({final:"d"},function(ut){return at.linePosAbsolute(ut)}),at._parser.setCsiHandler({final:"e"},function(ut){return at.vPositionRelative(ut)}),at._parser.setCsiHandler({final:"f"},function(ut){return at.hVPosition(ut)}),at._parser.setCsiHandler({final:"g"},function(ut){return at.tabClear(ut)}),at._parser.setCsiHandler({final:"h"},function(ut){return at.setMode(ut)}),at._parser.setCsiHandler({prefix:"?",final:"h"},function(ut){return at.setModePrivate(ut)}),at._parser.setCsiHandler({final:"l"},function(ut){return at.resetMode(ut)}),at._parser.setCsiHandler({prefix:"?",final:"l"},function(ut){return at.resetModePrivate(ut)}),at._parser.setCsiHandler({final:"m"},function(ut){return at.charAttributes(ut)}),at._parser.setCsiHandler({final:"n"},function(ut){return at.deviceStatus(ut)}),at._parser.setCsiHandler({prefix:"?",final:"n"},function(ut){return at.deviceStatusPrivate(ut)}),at._parser.setCsiHandler({intermediates:"!",final:"p"},function(ut){return at.softReset(ut)}),at._parser.setCsiHandler({intermediates:" ",final:"q"},function(ut){return at.setCursorStyle(ut)}),at._parser.setCsiHandler({final:"r"},function(ut){return at.setScrollRegion(ut)}),at._parser.setCsiHandler({final:"s"},function(ut){return at.saveCursor(ut)}),at._parser.setCsiHandler({final:"t"},function(ut){return at.windowOptions(ut)}),at._parser.setCsiHandler({final:"u"},function(ut){return at.restoreCursor(ut)}),at._parser.setCsiHandler({intermediates:"'",final:"}"},function(ut){return at.insertColumns(ut)}),at._parser.setCsiHandler({intermediates:"'",final:"~"},function(ut){return at.deleteColumns(ut)}),at._parser.setExecuteHandler(Ce.C0.BEL,function(){return at.bell()}),at._parser.setExecuteHandler(Ce.C0.LF,function(){return at.lineFeed()}),at._parser.setExecuteHandler(Ce.C0.VT,function(){return at.lineFeed()}),at._parser.setExecuteHandler(Ce.C0.FF,function(){return at.lineFeed()}),at._parser.setExecuteHandler(Ce.C0.CR,function(){return at.carriageReturn()}),at._parser.setExecuteHandler(Ce.C0.BS,function(){return at.backspace()}),at._parser.setExecuteHandler(Ce.C0.HT,function(){return at.tab()}),at._parser.setExecuteHandler(Ce.C0.SO,function(){return at.shiftOut()}),at._parser.setExecuteHandler(Ce.C0.SI,function(){return at.shiftIn()}),at._parser.setExecuteHandler(Ce.C1.IND,function(){return at.index()}),at._parser.setExecuteHandler(Ce.C1.NEL,function(){return at.nextLine()}),at._parser.setExecuteHandler(Ce.C1.HTS,function(){return at.tabSet()}),at._parser.setOscHandler(0,new z.OscHandler(function(ut){at.setTitle(ut),at.setIconName(ut)})),at._parser.setOscHandler(1,new z.OscHandler(function(ut){return at.setIconName(ut)})),at._parser.setOscHandler(2,new z.OscHandler(function(ut){return at.setTitle(ut)})),at._parser.setEscHandler({final:"7"},function(){return at.saveCursor()}),at._parser.setEscHandler({final:"8"},function(){return at.restoreCursor()}),at._parser.setEscHandler({final:"D"},function(){return at.index()}),at._parser.setEscHandler({final:"E"},function(){return at.nextLine()}),at._parser.setEscHandler({final:"H"},function(){return at.tabSet()}),at._parser.setEscHandler({final:"M"},function(){return at.reverseIndex()}),at._parser.setEscHandler({final:"="},function(){return at.keypadApplicationMode()}),at._parser.setEscHandler({final:">"},function(){return at.keypadNumericMode()}),at._parser.setEscHandler({final:"c"},function(){return at.fullReset()}),at._parser.setEscHandler({final:"n"},function(){return at.setgLevel(2)}),at._parser.setEscHandler({final:"o"},function(){return at.setgLevel(3)}),at._parser.setEscHandler({final:"|"},function(){return at.setgLevel(3)}),at._parser.setEscHandler({final:"}"},function(){return at.setgLevel(2)}),at._parser.setEscHandler({final:"~"},function(){return at.setgLevel(1)}),at._parser.setEscHandler({intermediates:"%",final:"@"},function(){return at.selectDefaultCharset()}),at._parser.setEscHandler({intermediates:"%",final:"G"},function(){return at.selectDefaultCharset()});var _t=function(ut){ht._parser.setEscHandler({intermediates:"(",final:ut},function(){return at.selectCharset("("+ut)}),ht._parser.setEscHandler({intermediates:")",final:ut},function(){return at.selectCharset(")"+ut)}),ht._parser.setEscHandler({intermediates:"*",final:ut},function(){return at.selectCharset("*"+ut)}),ht._parser.setEscHandler({intermediates:"+",final:ut},function(){return at.selectCharset("+"+ut)}),ht._parser.setEscHandler({intermediates:"-",final:ut},function(){return at.selectCharset("-"+ut)}),ht._parser.setEscHandler({intermediates:".",final:ut},function(){return at.selectCharset("."+ut)}),ht._parser.setEscHandler({intermediates:"/",final:ut},function(){return at.selectCharset("/"+ut)})},ht=this;for(var Dt in xe.CHARSETS)_t(Dt);return at._parser.setEscHandler({intermediates:"#",final:"8"},function(){return at.screenAlignmentPattern()}),at._parser.setErrorHandler(function(ut){return at._logService.error("Parsing error: ",ut),ut}),at._parser.setDcsHandler({intermediates:"$",final:"q"},new le(at._bufferService,at._coreService,at._logService,at._optionsService)),at}return Be(Pe,ve),Object.defineProperty(Pe.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Pe.prototype.dispose=function(){ve.prototype.dispose.call(this)},Pe.prototype.parse=function(Ae){var Oe=this._bufferService.buffer,Ie=Oe.x,Ze=Oe.y;if(this._logService.debug("parsing data",Ae),this._parseBuffer.length<Ae.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(Ae.length,131072))),this._dirtyRowService.clearRange(),Ae.length>131072)for(var qe=0;qe<Ae.length;qe+=131072){var Je=qe+131072<Ae.length?qe+131072:Ae.length,mt=typeof Ae=="string"?this._stringDecoder.decode(Ae.substring(qe,Je),this._parseBuffer):this._utf8Decoder.decode(Ae.subarray(qe,Je),this._parseBuffer);this._parser.parse(this._parseBuffer,mt)}else mt=typeof Ae=="string"?this._stringDecoder.decode(Ae,this._parseBuffer):this._utf8Decoder.decode(Ae,this._parseBuffer),this._parser.parse(this._parseBuffer,mt);(Oe=this._bufferService.buffer).x===Ie&&Oe.y===Ze||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},Pe.prototype.print=function(Ae,Oe,Ie){var Ze,qe,Je=this._bufferService.buffer,mt=this._charsetService.charset,gt=this._optionsService.options.screenReaderMode,Mt=this._bufferService.cols,at=this._coreService.decPrivateModes.wraparound,_t=this._coreService.modes.insertMode,ht=this._curAttrData,Dt=Je.lines.get(Je.ybase+Je.y);this._dirtyRowService.markDirty(Je.y),Je.x&&Ie-Oe>0&&Dt.getWidth(Je.x-1)===2&&Dt.setCellFromCodePoint(Je.x-1,0,1,ht.fg,ht.bg,ht.extended);for(var ut=Oe;ut<Ie;++ut){if(Ze=Ae[ut],qe=this._unicodeService.wcwidth(Ze),Ze<127&&mt){var ot=mt[String.fromCharCode(Ze)];ot&&(Ze=ot.charCodeAt(0))}if(gt&&this._onA11yChar.fire(pe.stringFromCodePoint(Ze)),qe||!Je.x){if(Je.x+qe-1>=Mt){if(at){for(;Je.x<Mt;)Dt.setCellFromCodePoint(Je.x++,0,1,ht.fg,ht.bg,ht.extended);Je.x=0,Je.y++,Je.y===Je.scrollBottom+1?(Je.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Je.y>=this._bufferService.rows&&(Je.y=this._bufferService.rows-1),Je.lines.get(Je.ybase+Je.y).isWrapped=!0),Dt=Je.lines.get(Je.ybase+Je.y)}else if(Je.x=Mt-1,qe===2)continue}if(_t&&(Dt.insertCells(Je.x,qe,Je.getNullCell(ht),ht),Dt.getWidth(Mt-1)===2&&Dt.setCellFromCodePoint(Mt-1,fe.NULL_CELL_CODE,fe.NULL_CELL_WIDTH,ht.fg,ht.bg,ht.extended)),Dt.setCellFromCodePoint(Je.x++,Ze,qe,ht.fg,ht.bg,ht.extended),qe>0)for(;--qe;)Dt.setCellFromCodePoint(Je.x++,0,0,ht.fg,ht.bg,ht.extended)}else Dt.getWidth(Je.x-1)?Dt.addCodepointToCell(Je.x-1,Ze):Dt.addCodepointToCell(Je.x-2,Ze)}Ie-Oe>0&&(Dt.loadCell(Je.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),Je.x<Mt&&Ie-Oe>0&&Dt.getWidth(Je.x)===0&&!Dt.hasContent(Je.x)&&Dt.setCellFromCodePoint(Je.x,0,1,ht.fg,ht.bg,ht.extended),this._dirtyRowService.markDirty(Je.y)},Pe.prototype.addCsiHandler=function(Ae,Oe){var Ie=this;return Ae.final!=="t"||Ae.prefix||Ae.intermediates?this._parser.addCsiHandler(Ae,Oe):this._parser.addCsiHandler(Ae,function(Ze){return!ae(Ze.params[0],Ie._optionsService.options.windowOptions)||Oe(Ze)})},Pe.prototype.addDcsHandler=function(Ae,Oe){return this._parser.addDcsHandler(Ae,new oe.DcsHandler(Oe))},Pe.prototype.addEscHandler=function(Ae,Oe){return this._parser.addEscHandler(Ae,Oe)},Pe.prototype.addOscHandler=function(Ae,Oe){return this._parser.addOscHandler(Ae,new z.OscHandler(Oe))},Pe.prototype.bell=function(){this._onRequestBell.fire()},Pe.prototype.lineFeed=function(){var Ae=this._bufferService.buffer;this._dirtyRowService.markDirty(Ae.y),this._optionsService.options.convertEol&&(Ae.x=0),Ae.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),Ae.x>=this._bufferService.cols&&Ae.x--,this._dirtyRowService.markDirty(Ae.y),this._onLineFeed.fire()},Pe.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},Pe.prototype.backspace=function(){var Ae,Oe=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(Oe.x>0&&Oe.x--);if(this._restrictCursor(this._bufferService.cols),Oe.x>0)Oe.x--;else if(Oe.x===0&&Oe.y>Oe.scrollTop&&Oe.y<=Oe.scrollBottom&&(!((Ae=Oe.lines.get(Oe.ybase+Oe.y))===null||Ae===void 0)&&Ae.isWrapped)){Oe.lines.get(Oe.ybase+Oe.y).isWrapped=!1,Oe.y--,Oe.x=this._bufferService.cols-1;var Ie=Oe.lines.get(Oe.ybase+Oe.y);Ie.hasWidth(Oe.x)&&!Ie.hasContent(Oe.x)&&Oe.x--}this._restrictCursor()},Pe.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var Ae=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-Ae)}},Pe.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},Pe.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},Pe.prototype._restrictCursor=function(Ae){Ae===void 0&&(Ae=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(Ae,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype._setCursor=function(Ae,Oe){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+Oe):(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=Oe),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype._moveCursor=function(Ae,Oe){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Ae,this._bufferService.buffer.y+Oe)},Pe.prototype.cursorUp=function(Ae){var Oe=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;Oe>=0?this._moveCursor(0,-Math.min(Oe,Ae.params[0]||1)):this._moveCursor(0,-(Ae.params[0]||1))},Pe.prototype.cursorDown=function(Ae){var Oe=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;Oe>=0?this._moveCursor(0,Math.min(Oe,Ae.params[0]||1)):this._moveCursor(0,Ae.params[0]||1)},Pe.prototype.cursorForward=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Pe.prototype.cursorBackward=function(Ae){this._moveCursor(-(Ae.params[0]||1),0)},Pe.prototype.cursorNextLine=function(Ae){this.cursorDown(Ae),this._bufferService.buffer.x=0},Pe.prototype.cursorPrecedingLine=function(Ae){this.cursorUp(Ae),this._bufferService.buffer.x=0},Pe.prototype.cursorCharAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Pe.prototype.cursorPosition=function(Ae){this._setCursor(Ae.length>=2?(Ae.params[1]||1)-1:0,(Ae.params[0]||1)-1)},Pe.prototype.charPosAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},Pe.prototype.hPositionRelative=function(Ae){this._moveCursor(Ae.params[0]||1,0)},Pe.prototype.linePosAbsolute=function(Ae){this._setCursor(this._bufferService.buffer.x,(Ae.params[0]||1)-1)},Pe.prototype.vPositionRelative=function(Ae){this._moveCursor(0,Ae.params[0]||1)},Pe.prototype.hVPosition=function(Ae){this.cursorPosition(Ae)},Pe.prototype.tabClear=function(Ae){var Oe=Ae.params[0];Oe===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:Oe===3&&(this._bufferService.buffer.tabs={})},Pe.prototype.cursorForwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Oe=Ae.params[0]||1;Oe--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},Pe.prototype.cursorBackwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Oe=Ae.params[0]||1,Ie=this._bufferService.buffer;Oe--;)Ie.x=Ie.prevStop()},Pe.prototype._eraseInBufferLine=function(Ae,Oe,Ie,Ze){Ze===void 0&&(Ze=!1);var qe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);qe.replaceCells(Oe,Ie,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ze&&(qe.isWrapped=!1)},Pe.prototype._resetBufferLine=function(Ae){var Oe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);Oe.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),Oe.isWrapped=!1},Pe.prototype.eraseInDisplay=function(Ae){var Oe;switch(this._restrictCursor(),Ae.params[0]){case 0:for(Oe=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Oe),this._eraseInBufferLine(Oe++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);Oe<this._bufferService.rows;Oe++)this._resetBufferLine(Oe);this._dirtyRowService.markDirty(Oe);break;case 1:for(Oe=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Oe),this._eraseInBufferLine(Oe,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(Oe+1).isWrapped=!1);Oe--;)this._resetBufferLine(Oe);this._dirtyRowService.markDirty(0);break;case 2:for(Oe=this._bufferService.rows,this._dirtyRowService.markDirty(Oe-1);Oe--;)this._resetBufferLine(Oe);this._dirtyRowService.markDirty(0);break;case 3:var Ie=this._bufferService.buffer.lines.length-this._bufferService.rows;Ie>0&&(this._bufferService.buffer.lines.trimStart(Ie),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-Ie,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-Ie,0),this._onScroll.fire(0))}},Pe.prototype.eraseInLine=function(Ae){switch(this._restrictCursor(),Ae.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype.insertLines=function(Ae){this._restrictCursor();var Oe=Ae.params[0]||1,Ie=this._bufferService.buffer;if(!(Ie.y>Ie.scrollBottom||Ie.y<Ie.scrollTop)){for(var Ze=Ie.ybase+Ie.y,qe=this._bufferService.rows-1-Ie.scrollBottom,Je=this._bufferService.rows-1+Ie.ybase-qe+1;Oe--;)Ie.lines.splice(Je-1,1),Ie.lines.splice(Ze,0,Ie.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Ie.y,Ie.scrollBottom),Ie.x=0}},Pe.prototype.deleteLines=function(Ae){this._restrictCursor();var Oe=Ae.params[0]||1,Ie=this._bufferService.buffer;if(!(Ie.y>Ie.scrollBottom||Ie.y<Ie.scrollTop)){var Ze,qe=Ie.ybase+Ie.y;for(Ze=this._bufferService.rows-1-Ie.scrollBottom,Ze=this._bufferService.rows-1+Ie.ybase-Ze;Oe--;)Ie.lines.splice(qe,1),Ie.lines.splice(Ze,0,Ie.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Ie.y,Ie.scrollBottom),Ie.x=0}},Pe.prototype.insertChars=function(Ae){this._restrictCursor();var Oe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Oe&&(Oe.insertCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.deleteChars=function(Ae){this._restrictCursor();var Oe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Oe&&(Oe.deleteCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.scrollUp=function(Ae){for(var Oe=Ae.params[0]||1,Ie=this._bufferService.buffer;Oe--;)Ie.lines.splice(Ie.ybase+Ie.scrollTop,1),Ie.lines.splice(Ie.ybase+Ie.scrollBottom,0,Ie.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Ie.scrollTop,Ie.scrollBottom)},Pe.prototype.scrollDown=function(Ae){for(var Oe=Ae.params[0]||1,Ie=this._bufferService.buffer;Oe--;)Ie.lines.splice(Ie.ybase+Ie.scrollBottom,1),Ie.lines.splice(Ie.ybase+Ie.scrollTop,0,Ie.getBlankLine(de.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(Ie.scrollTop,Ie.scrollBottom)},Pe.prototype.scrollLeft=function(Ae){var Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Ie=Ae.params[0]||1,Ze=Oe.scrollTop;Ze<=Oe.scrollBottom;++Ze){var qe=Oe.lines.get(Oe.ybase+Ze);qe.deleteCells(0,Ie,Oe.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)}},Pe.prototype.scrollRight=function(Ae){var Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Ie=Ae.params[0]||1,Ze=Oe.scrollTop;Ze<=Oe.scrollBottom;++Ze){var qe=Oe.lines.get(Oe.ybase+Ze);qe.insertCells(0,Ie,Oe.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)}},Pe.prototype.insertColumns=function(Ae){var Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Ie=Ae.params[0]||1,Ze=Oe.scrollTop;Ze<=Oe.scrollBottom;++Ze){var qe=this._bufferService.buffer.lines.get(Oe.ybase+Ze);qe.insertCells(Oe.x,Ie,Oe.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)}},Pe.prototype.deleteColumns=function(Ae){var Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Ie=Ae.params[0]||1,Ze=Oe.scrollTop;Ze<=Oe.scrollBottom;++Ze){var qe=Oe.lines.get(Oe.ybase+Ze);qe.deleteCells(Oe.x,Ie,Oe.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)}},Pe.prototype.eraseChars=function(Ae){this._restrictCursor();var Oe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Oe&&(Oe.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(Ae.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},Pe.prototype.repeatPrecedingCharacter=function(Ae){if(this._parser.precedingCodepoint){for(var Oe=Ae.params[0]||1,Ie=new Uint32Array(Oe),Ze=0;Ze<Oe;++Ze)Ie[Ze]=this._parser.precedingCodepoint;this.print(Ie,0,Ie.length)}},Pe.prototype.sendDeviceAttributesPrimary=function(Ae){Ae.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[?6c"))},Pe.prototype.sendDeviceAttributesSecondary=function(Ae){Ae.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Ce.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(Ae.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[>83;40003;0c"))},Pe.prototype._is=function(Ae){return(this._optionsService.options.termName+"").indexOf(Ae)===0},Pe.prototype.setMode=function(Ae){for(var Oe=0;Oe<Ae.length;Oe++)switch(Ae.params[Oe]){case 4:this._coreService.modes.insertMode=!0}},Pe.prototype.setModePrivate=function(Ae){for(var Oe=0;Oe<Ae.length;Oe++)switch(Ae.params[Oe]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,xe.DEFAULT_CHARSET),this._charsetService.setgCharset(1,xe.DEFAULT_CHARSET),this._charsetService.setgCharset(2,xe.DEFAULT_CHARSET),this._charsetService.setgCharset(3,xe.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},Pe.prototype.resetMode=function(Ae){for(var Oe=0;Oe<Ae.length;Oe++)switch(Ae.params[Oe]){case 4:this._coreService.modes.insertMode=!1}},Pe.prototype.resetModePrivate=function(Ae){for(var Oe=0;Oe<Ae.length;Oe++)switch(Ae.params[Oe]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),Ae.params[Oe]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},Pe.prototype._updateAttrColor=function(Ae,Oe,Ie,Ze,qe){return Oe===2?(Ae|=50331648,Ae&=-16777216,Ae|=ee.AttributeData.fromColorRGB([Ie,Ze,qe])):Oe===5&&(Ae&=-50331904,Ae|=33554432|255&Ie),Ae},Pe.prototype._extractColor=function(Ae,Oe,Ie){var Ze=[0,0,-1,0,0,0],qe=0,Je=0;do{if(Ze[Je+qe]=Ae.params[Oe+Je],Ae.hasSubParams(Oe+Je)){var mt=Ae.getSubParams(Oe+Je),gt=0;do Ze[1]===5&&(qe=1),Ze[Je+gt+1+qe]=mt[gt];while(++gt<mt.length&>+Je+1+qe<Ze.length);break}if(Ze[1]===5&&Je+qe>=2||Ze[1]===2&&Je+qe>=5)break;Ze[1]&&(qe=1)}while(++Je+Oe<Ae.length&&Je+qe<Ze.length);for(gt=2;gt<Ze.length;++gt)Ze[gt]===-1&&(Ze[gt]=0);switch(Ze[0]){case 38:Ie.fg=this._updateAttrColor(Ie.fg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 48:Ie.bg=this._updateAttrColor(Ie.bg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 58:Ie.extended=Ie.extended.clone(),Ie.extended.underlineColor=this._updateAttrColor(Ie.extended.underlineColor,Ze[1],Ze[3],Ze[4],Ze[5])}return Je},Pe.prototype._processUnderline=function(Ae,Oe){Oe.extended=Oe.extended.clone(),(!~Ae||Ae>5)&&(Ae=1),Oe.extended.underlineStyle=Ae,Oe.fg|=268435456,Ae===0&&(Oe.fg&=-268435457),Oe.updateExtended()},Pe.prototype.charAttributes=function(Ae){if(Ae.length===1&&Ae.params[0]===0)return this._curAttrData.fg=de.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=de.DEFAULT_ATTR_DATA.bg);for(var Oe,Ie=Ae.length,Ze=this._curAttrData,qe=0;qe<Ie;qe++)(Oe=Ae.params[qe])>=30&&Oe<=37?(Ze.fg&=-50331904,Ze.fg|=16777216|Oe-30):Oe>=40&&Oe<=47?(Ze.bg&=-50331904,Ze.bg|=16777216|Oe-40):Oe>=90&&Oe<=97?(Ze.fg&=-50331904,Ze.fg|=16777224|Oe-90):Oe>=100&&Oe<=107?(Ze.bg&=-50331904,Ze.bg|=16777224|Oe-100):Oe===0?(Ze.fg=de.DEFAULT_ATTR_DATA.fg,Ze.bg=de.DEFAULT_ATTR_DATA.bg):Oe===1?Ze.fg|=134217728:Oe===3?Ze.bg|=67108864:Oe===4?(Ze.fg|=268435456,this._processUnderline(Ae.hasSubParams(qe)?Ae.getSubParams(qe)[0]:1,Ze)):Oe===5?Ze.fg|=536870912:Oe===7?Ze.fg|=67108864:Oe===8?Ze.fg|=1073741824:Oe===2?Ze.bg|=134217728:Oe===21?this._processUnderline(2,Ze):Oe===22?(Ze.fg&=-134217729,Ze.bg&=-134217729):Oe===23?Ze.bg&=-67108865:Oe===24?Ze.fg&=-268435457:Oe===25?Ze.fg&=-536870913:Oe===27?Ze.fg&=-67108865:Oe===28?Ze.fg&=-1073741825:Oe===39?(Ze.fg&=-67108864,Ze.fg|=16777215&de.DEFAULT_ATTR_DATA.fg):Oe===49?(Ze.bg&=-67108864,Ze.bg|=16777215&de.DEFAULT_ATTR_DATA.bg):Oe===38||Oe===48||Oe===58?qe+=this._extractColor(Ae,qe,Ze):Oe===59?(Ze.extended=Ze.extended.clone(),Ze.extended.underlineColor=-1,Ze.updateExtended()):Oe===100?(Ze.fg&=-67108864,Ze.fg|=16777215&de.DEFAULT_ATTR_DATA.fg,Ze.bg&=-67108864,Ze.bg|=16777215&de.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",Oe)},Pe.prototype.deviceStatus=function(Ae){switch(Ae.params[0]){case 5:this._coreService.triggerDataEvent(Ce.C0.ESC+"[0n");break;case 6:var Oe=this._bufferService.buffer.y+1,Ie=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"["+Oe+";"+Ie+"R")}},Pe.prototype.deviceStatusPrivate=function(Ae){switch(Ae.params[0]){case 6:var Oe=this._bufferService.buffer.y+1,Ie=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"[?"+Oe+";"+Ie+"R")}},Pe.prototype.softReset=function(Ae){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=de.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},Pe.prototype.setCursorStyle=function(Ae){var Oe=Ae.params[0]||1;switch(Oe){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var Ie=Oe%2==1;this._optionsService.options.cursorBlink=Ie},Pe.prototype.setScrollRegion=function(Ae){var Oe,Ie=Ae.params[0]||1;(Ae.length<2||(Oe=Ae.params[1])>this._bufferService.rows||Oe===0)&&(Oe=this._bufferService.rows),Oe>Ie&&(this._bufferService.buffer.scrollTop=Ie-1,this._bufferService.buffer.scrollBottom=Oe-1,this._setCursor(0,0))},Pe.prototype.windowOptions=function(Ae){if(ae(Ae.params[0],this._optionsService.options.windowOptions)){var Oe=Ae.length>1?Ae.params[1]:0;switch(Ae.params[0]){case 14:Oe!==2&&this._onRequestWindowsOptionsReport.fire(Le.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(Le.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(Ce.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:Oe!==0&&Oe!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),Oe!==0&&Oe!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:Oe!==0&&Oe!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),Oe!==0&&Oe!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},Pe.prototype.saveCursor=function(Ae){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},Pe.prototype.restoreCursor=function(Ae){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},Pe.prototype.setTitle=function(Ae){this._windowTitle=Ae,this._onTitleChange.fire(Ae)},Pe.prototype.setIconName=function(Ae){this._iconName=Ae},Pe.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},Pe.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},Pe.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},Pe.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,xe.DEFAULT_CHARSET)},Pe.prototype.selectCharset=function(Ae){Ae.length===2?Ae[0]!=="/"&&this._charsetService.setgCharset(re[Ae[0]],xe.CHARSETS[Ae[1]]||xe.DEFAULT_CHARSET):this.selectDefaultCharset()},Pe.prototype.index=function(){this._restrictCursor();var Ae=this._bufferService.buffer;this._bufferService.buffer.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),this._restrictCursor()},Pe.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},Pe.prototype.reverseIndex=function(){this._restrictCursor();var Ae=this._bufferService.buffer;if(Ae.y===Ae.scrollTop){var Oe=Ae.scrollBottom-Ae.scrollTop;Ae.lines.shiftElements(Ae.ybase+Ae.y,Oe,1),Ae.lines.set(Ae.ybase+Ae.y,Ae.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}else Ae.y--,this._restrictCursor()},Pe.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},Pe.prototype.reset=function(){this._curAttrData=de.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=de.DEFAULT_ATTR_DATA.clone()},Pe.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},Pe.prototype.setgLevel=function(Ae){this._charsetService.setgLevel(Ae)},Pe.prototype.screenAlignmentPattern=function(){var Ae=new ue.CellData;Ae.content=1<<22|69,Ae.fg=this._curAttrData.fg,Ae.bg=this._curAttrData.bg;var Oe=this._bufferService.buffer;this._setCursor(0,0);for(var Ie=0;Ie<this._bufferService.rows;++Ie){var Ze=Oe.ybase+Oe.y+Ie,qe=Oe.lines.get(Ze);qe&&(qe.fill(Ae),qe.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},Pe}(ye.Disposable);Re.InputHandler=me},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.DEFAULT_CHARSET=Re.CHARSETS=void 0,Re.CHARSETS={},Re.DEFAULT_CHARSET=Re.CHARSETS.B,Re.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},Re.CHARSETS.A={"#":"\xA3"},Re.CHARSETS.B=void 0,Re.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},Re.CHARSETS.C=Re.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Re.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},Re.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},Re.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},Re.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},Re.CHARSETS.E=Re.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},Re.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},Re.CHARSETS.H=Re.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Re.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.Params=void 0;var Se=function(){function Be(Le,Ce){if(Le===void 0&&(Le=32),Ce===void 0&&(Ce=32),this.maxLength=Le,this.maxSubParamsLength=Ce,Ce>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(Le),this.length=0,this._subParams=new Int32Array(Ce),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(Le),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Be.fromArray=function(Le){var Ce=new Be;if(!Le.length)return Ce;for(var xe=Le[0]instanceof Array?1:0;xe<Le.length;++xe){var be=Le[xe];if(be instanceof Array)for(var ye=0;ye<be.length;++ye)Ce.addSubParam(be[ye]);else Ce.addParam(be)}return Ce},Be.prototype.clone=function(){var Le=new Be(this.maxLength,this.maxSubParamsLength);return Le.params.set(this.params),Le.length=this.length,Le._subParams.set(this._subParams),Le._subParamsLength=this._subParamsLength,Le._subParamsIdx.set(this._subParamsIdx),Le._rejectDigits=this._rejectDigits,Le._rejectSubDigits=this._rejectSubDigits,Le._digitIsSub=this._digitIsSub,Le},Be.prototype.toArray=function(){for(var Le=[],Ce=0;Ce<this.length;++Ce){Le.push(this.params[Ce]);var xe=this._subParamsIdx[Ce]>>8,be=255&this._subParamsIdx[Ce];be-xe>0&&Le.push(Array.prototype.slice.call(this._subParams,xe,be))}return Le},Be.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Be.prototype.addParam=function(Le){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(Le<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=Le>2147483647?2147483647:Le}},Be.prototype.addSubParam=function(Le){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(Le<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=Le>2147483647?2147483647:Le,this._subParamsIdx[this.length-1]++}},Be.prototype.hasSubParams=function(Le){return(255&this._subParamsIdx[Le])-(this._subParamsIdx[Le]>>8)>0},Be.prototype.getSubParams=function(Le){var Ce=this._subParamsIdx[Le]>>8,xe=255&this._subParamsIdx[Le];return xe-Ce>0?this._subParams.subarray(Ce,xe):null},Be.prototype.getSubParamsAll=function(){for(var Le={},Ce=0;Ce<this.length;++Ce){var xe=this._subParamsIdx[Ce]>>8,be=255&this._subParamsIdx[Ce];be-xe>0&&(Le[Ce]=this._subParams.slice(xe,be))}return Le},Be.prototype.addDigit=function(Le){var Ce;if(!(this._rejectDigits||!(Ce=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var xe=this._digitIsSub?this._subParams:this.params,be=xe[Ce-1];xe[Ce-1]=~be?Math.min(10*be+Le,2147483647):Le}},Be}();Re.Params=Se},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.OscHandler=Re.OscParser=void 0;var Se=ke(23),Be=ke(8),Le=function(){function xe(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return xe.prototype.addHandler=function(be,ye){this._handlers[be]===void 0&&(this._handlers[be]=[]);var we=this._handlers[be];return we.push(ye),{dispose:function(){var pe=we.indexOf(ye);pe!==-1&&we.splice(pe,1)}}},xe.prototype.setHandler=function(be,ye){this._handlers[be]=[ye]},xe.prototype.clearHandler=function(be){this._handlers[be]&&delete this._handlers[be]},xe.prototype.setHandlerFallback=function(be){this._handlerFb=be},xe.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},xe.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},xe.prototype._start=function(){var be=this._handlers[this._id];if(be)for(var ye=be.length-1;ye>=0;ye--)be[ye].start();else this._handlerFb(this._id,"START")},xe.prototype._put=function(be,ye,we){var pe=this._handlers[this._id];if(pe)for(var de=pe.length-1;de>=0;de--)pe[de].put(be,ye,we);else this._handlerFb(this._id,"PUT",Be.utf32ToString(be,ye,we))},xe.prototype._end=function(be){var ye=this._handlers[this._id];if(ye){for(var we=ye.length-1;we>=0&&ye[we].end(be)===!1;we--);for(we--;we>=0;we--)ye[we].end(!1)}else this._handlerFb(this._id,"END",be)},xe.prototype.start=function(){this.reset(),this._id=-1,this._state=1},xe.prototype.put=function(be,ye,we){if(this._state!==3){if(this._state===1)for(;ye<we;){var pe=be[ye++];if(pe===59){this._state=2,this._start();break}if(pe<48||57<pe)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+pe-48}this._state===2&&we-ye>0&&this._put(be,ye,we)}},xe.prototype.end=function(be){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(be)),this._id=-1,this._state=0)},xe}();Re.OscParser=Le;var Ce=function(){function xe(be){this._handler=be,this._data="",this._hitLimit=!1}return xe.prototype.start=function(){this._data="",this._hitLimit=!1},xe.prototype.put=function(be,ye,we){this._hitLimit||(this._data+=Be.utf32ToString(be,ye,we),this._data.length>Se.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},xe.prototype.end=function(be){var ye;return this._hitLimit?ye=!1:be&&(ye=this._handler(this._data)),this._data="",this._hitLimit=!1,ye},xe}();Re.OscHandler=Ce},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.PAYLOAD_LIMIT=void 0,Re.PAYLOAD_LIMIT=1e7},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.DcsHandler=Re.DcsParser=void 0;var Se=ke(8),Be=ke(21),Le=ke(23),Ce=[],xe=function(){function ye(){this._handlers=Object.create(null),this._active=Ce,this._ident=0,this._handlerFb=function(){}}return ye.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},ye.prototype.addHandler=function(we,pe){this._handlers[we]===void 0&&(this._handlers[we]=[]);var de=this._handlers[we];return de.push(pe),{dispose:function(){var ge=de.indexOf(pe);ge!==-1&&de.splice(ge,1)}}},ye.prototype.setHandler=function(we,pe){this._handlers[we]=[pe]},ye.prototype.clearHandler=function(we){this._handlers[we]&&delete this._handlers[we]},ye.prototype.setHandlerFallback=function(we){this._handlerFb=we},ye.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=Ce,this._ident=0},ye.prototype.hook=function(we,pe){if(this.reset(),this._ident=we,this._active=this._handlers[we]||Ce,this._active.length)for(var de=this._active.length-1;de>=0;de--)this._active[de].hook(pe);else this._handlerFb(this._ident,"HOOK",pe)},ye.prototype.put=function(we,pe,de){if(this._active.length)for(var ge=this._active.length-1;ge>=0;ge--)this._active[ge].put(we,pe,de);else this._handlerFb(this._ident,"PUT",Se.utf32ToString(we,pe,de))},ye.prototype.unhook=function(we){if(this._active.length){for(var pe=this._active.length-1;pe>=0&&this._active[pe].unhook(we)===!1;pe--);for(pe--;pe>=0;pe--)this._active[pe].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",we);this._active=Ce,this._ident=0},ye}();Re.DcsParser=xe;var be=function(){function ye(we){this._handler=we,this._data="",this._hitLimit=!1}return ye.prototype.hook=function(we){this._params=we.clone(),this._data="",this._hitLimit=!1},ye.prototype.put=function(we,pe,de){this._hitLimit||(this._data+=Se.utf32ToString(we,pe,de),this._data.length>Le.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},ye.prototype.unhook=function(we){var pe;return this._hitLimit?pe=!1:we&&(pe=this._handler(this._data,this._params||new Be.Params)),this._params=void 0,this._data="",this._hitLimit=!1,pe},ye}();Re.DcsHandler=be},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.removeTerminalFromCache=Re.acquireCharAtlas=void 0;var Se=ke(26),Be=ke(43),Le=[];Re.acquireCharAtlas=function(Ce,xe,be,ye,we){for(var pe=Se.generateConfig(ye,we,Ce,be),de=0;de<Le.length;de++){var ge=(fe=Le[de]).ownedBy.indexOf(xe);if(ge>=0){if(Se.configEquals(fe.config,pe))return fe.atlas;fe.ownedBy.length===1?(fe.atlas.dispose(),Le.splice(de,1)):fe.ownedBy.splice(ge,1);break}}for(de=0;de<Le.length;de++){var fe=Le[de];if(Se.configEquals(fe.config,pe))return fe.ownedBy.push(xe),fe.atlas}var ue={atlas:new Be.DynamicCharAtlas(document,pe),config:pe,ownedBy:[xe]};return Le.push(ue),ue.atlas},Re.removeTerminalFromCache=function(Ce){for(var xe=0;xe<Le.length;xe++){var be=Le[xe].ownedBy.indexOf(Ce);if(be!==-1){Le[xe].ownedBy.length===1?(Le[xe].atlas.dispose(),Le.splice(xe,1)):Le[xe].ownedBy.splice(be,1);break}}}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.is256Color=Re.configEquals=Re.generateConfig=void 0;var Se=ke(3);Re.generateConfig=function(Be,Le,Ce,xe){var be={foreground:xe.foreground,background:xe.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:xe.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Be,scaledCharHeight:Le,fontFamily:Ce.fontFamily,fontSize:Ce.fontSize,fontWeight:Ce.fontWeight,fontWeightBold:Ce.fontWeightBold,allowTransparency:Ce.allowTransparency,colors:be}},Re.configEquals=function(Be,Le){for(var Ce=0;Ce<Be.colors.ansi.length;Ce++)if(Be.colors.ansi[Ce].rgba!==Le.colors.ansi[Ce].rgba)return!1;return Be.devicePixelRatio===Le.devicePixelRatio&&Be.fontFamily===Le.fontFamily&&Be.fontSize===Le.fontSize&&Be.fontWeight===Le.fontWeight&&Be.fontWeightBold===Le.fontWeightBold&&Be.allowTransparency===Le.allowTransparency&&Be.scaledCharWidth===Le.scaledCharWidth&&Be.scaledCharHeight===Le.scaledCharHeight&&Be.colors.foreground===Le.colors.foreground&&Be.colors.background===Le.colors.background},Re.is256Color=function(Be){return Be<Se.DEFAULT_COLOR}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.ColorManager=Re.DEFAULT_ANSI_COLORS=void 0;var Se=ke(10),Be=ke(45),Le=Se.css.toColor("#ffffff"),Ce=Se.css.toColor("#000000"),xe=Se.css.toColor("#ffffff"),be=Se.css.toColor("#000000"),ye={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};Re.DEFAULT_ANSI_COLORS=function(){for(var pe=[Se.css.toColor("#2e3436"),Se.css.toColor("#cc0000"),Se.css.toColor("#4e9a06"),Se.css.toColor("#c4a000"),Se.css.toColor("#3465a4"),Se.css.toColor("#75507b"),Se.css.toColor("#06989a"),Se.css.toColor("#d3d7cf"),Se.css.toColor("#555753"),Se.css.toColor("#ef2929"),Se.css.toColor("#8ae234"),Se.css.toColor("#fce94f"),Se.css.toColor("#729fcf"),Se.css.toColor("#ad7fa8"),Se.css.toColor("#34e2e2"),Se.css.toColor("#eeeeec")],de=[0,95,135,175,215,255],ge=0;ge<216;ge++){var fe=de[ge/36%6|0],ue=de[ge/6%6|0],ee=de[ge%6];pe.push({css:Se.channels.toCss(fe,ue,ee),rgba:Se.channels.toRgba(fe,ue,ee)})}for(ge=0;ge<24;ge++){var z=8+10*ge;pe.push({css:Se.channels.toCss(z,z,z),rgba:Se.channels.toRgba(z,z,z)})}return pe}();var we=function(){function pe(de,ge){this.allowTransparency=ge;var fe=de.createElement("canvas");fe.width=1,fe.height=1;var ue=fe.getContext("2d");if(!ue)throw new Error("Could not get rendering context");this._ctx=ue,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Be.ColorContrastCache,this.colors={foreground:Le,background:Ce,cursor:xe,cursorAccent:be,selectionTransparent:ye,selectionOpaque:Se.color.blend(Ce,ye),ansi:Re.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return pe.prototype.onOptionsChange=function(de){de==="minimumContrastRatio"&&this._contrastCache.clear()},pe.prototype.setTheme=function(de){de===void 0&&(de={}),this.colors.foreground=this._parseColor(de.foreground,Le),this.colors.background=this._parseColor(de.background,Ce),this.colors.cursor=this._parseColor(de.cursor,xe,!0),this.colors.cursorAccent=this._parseColor(de.cursorAccent,be,!0),this.colors.selectionTransparent=this._parseColor(de.selection,ye,!0),this.colors.selectionOpaque=Se.color.blend(this.colors.background,this.colors.selectionTransparent),Se.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=Se.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(de.black,Re.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(de.red,Re.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(de.green,Re.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(de.yellow,Re.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(de.blue,Re.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(de.magenta,Re.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(de.cyan,Re.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(de.white,Re.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(de.brightBlack,Re.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(de.brightRed,Re.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(de.brightGreen,Re.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(de.brightYellow,Re.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(de.brightBlue,Re.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(de.brightMagenta,Re.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(de.brightCyan,Re.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(de.brightWhite,Re.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},pe.prototype._parseColor=function(de,ge,fe){if(fe===void 0&&(fe=this.allowTransparency),de===void 0)return ge;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=de,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+de+" is invalid using fallback "+ge.css),ge;this._ctx.fillRect(0,0,1,1);var ue=this._ctx.getImageData(0,0,1,1).data;if(ue[3]!==255){if(!fe)return console.warn("Color: "+de+" is using transparency, but allowTransparency is false. Using fallback "+ge.css+"."),ge;var ee=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(me){return Number(me)}),z=ee[0],oe=ee[1],re=ee[2],ae=ee[3],le=Math.round(255*ae);return{rgba:Se.channels.toRgba(z,oe,re,le),css:de}}return{css:this._ctx.fillStyle,rgba:Se.channels.toRgba(ue[0],ue[1],ue[2],ue[3])}},pe}();Re.ColorManager=we},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.throwIfFalsy=void 0,Re.throwIfFalsy=function(Se){if(!Se)throw new Error("value must not be falsy");return Se}},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(we,pe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(de,ge){de.__proto__=ge}||function(de,ge){for(var fe in ge)ge.hasOwnProperty(fe)&&(de[fe]=ge[fe])})(we,pe)},function(we,pe){function de(){this.constructor=we}Se(we,pe),we.prototype=pe===null?Object.create(pe):(de.prototype=pe.prototype,new de)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.CharacterJoinerRegistry=Re.JoinedCellData=void 0;var Le=ke(6),Ce=ke(3),xe=ke(4),be=function(we){function pe(de,ge,fe){var ue=we.call(this)||this;return ue.content=0,ue.combinedData="",ue.fg=de.fg,ue.bg=de.bg,ue.combinedData=ge,ue._width=fe,ue}return Be(pe,we),pe.prototype.isCombined=function(){return 2097152},pe.prototype.getWidth=function(){return this._width},pe.prototype.getChars=function(){return this.combinedData},pe.prototype.getCode=function(){return 2097151},pe.prototype.setFromCharData=function(de){throw new Error("not implemented")},pe.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},pe}(Le.AttributeData);Re.JoinedCellData=be;var ye=function(){function we(pe){this._bufferService=pe,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new xe.CellData}return we.prototype.registerCharacterJoiner=function(pe){var de={id:this._nextCharacterJoinerId++,handler:pe};return this._characterJoiners.push(de),de.id},we.prototype.deregisterCharacterJoiner=function(pe){for(var de=0;de<this._characterJoiners.length;de++)if(this._characterJoiners[de].id===pe)return this._characterJoiners.splice(de,1),!0;return!1},we.prototype.getJoinedCharacters=function(pe){if(this._characterJoiners.length===0)return[];var de=this._bufferService.buffer.lines.get(pe);if(!de||de.length===0)return[];for(var ge=[],fe=de.translateToString(!0),ue=0,ee=0,z=0,oe=de.getFg(0),re=de.getBg(0),ae=0;ae<de.getTrimmedLength();ae++)if(de.loadCell(ae,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==oe||this._workCell.bg!==re){if(ae-ue>1)for(var le=this._getJoinedRanges(fe,z,ee,de,ue),me=0;me<le.length;me++)ge.push(le[me]);ue=ae,z=ee,oe=this._workCell.fg,re=this._workCell.bg}ee+=this._workCell.getChars().length||Ce.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ue>1)for(le=this._getJoinedRanges(fe,z,ee,de,ue),me=0;me<le.length;me++)ge.push(le[me]);return ge},we.prototype._getJoinedRanges=function(pe,de,ge,fe,ue){for(var ee=pe.substring(de,ge),z=this._characterJoiners[0].handler(ee),oe=1;oe<this._characterJoiners.length;oe++)for(var re=this._characterJoiners[oe].handler(ee),ae=0;ae<re.length;ae++)we._mergeRanges(z,re[ae]);return this._stringRangesToCellRanges(z,fe,ue),z},we.prototype._stringRangesToCellRanges=function(pe,de,ge){var fe=0,ue=!1,ee=0,z=pe[fe];if(z){for(var oe=ge;oe<this._bufferService.cols;oe++){var re=de.getWidth(oe),ae=de.getString(oe).length||Ce.WHITESPACE_CELL_CHAR.length;if(re!==0){if(!ue&&z[0]<=ee&&(z[0]=oe,ue=!0),z[1]<=ee){if(z[1]=oe,!(z=pe[++fe]))break;z[0]<=ee?(z[0]=oe,ue=!0):ue=!1}ee+=ae}}z&&(z[1]=this._bufferService.cols)}},we._mergeRanges=function(pe,de){for(var ge=!1,fe=0;fe<pe.length;fe++){var ue=pe[fe];if(ge){if(de[1]<=ue[0])return pe[fe-1][1]=de[1],pe;if(de[1]<=ue[1])return pe[fe-1][1]=Math.max(de[1],ue[1]),pe.splice(fe,1),pe;pe.splice(fe,1),fe--}else{if(de[1]<=ue[0])return pe.splice(fe,0,de),pe;if(de[1]<=ue[1])return ue[0]=Math.min(de[0],ue[0]),pe;de[0]<ue[1]&&(ue[0]=Math.min(de[0],ue[0]),ge=!0)}}return ge?pe[pe.length-1][1]=de[1]:pe.push(de),pe},we}();Re.CharacterJoinerRegistry=ye},function(un,Re,ke){"use strict";function Se(Be,Le){var Ce=Le.getBoundingClientRect();return[Be.clientX-Ce.left,Be.clientY-Ce.top]}Object.defineProperty(Re,"__esModule",{value:!0}),Re.getRawByteCoords=Re.getCoords=Re.getCoordsRelativeToElement=void 0,Re.getCoordsRelativeToElement=Se,Re.getCoords=function(Be,Le,Ce,xe,be,ye,we,pe){if(be){var de=Se(Be,Le);if(de)return de[0]=Math.ceil((de[0]+(pe?ye/2:0))/ye),de[1]=Math.ceil(de[1]/we),de[0]=Math.min(Math.max(de[0],1),Ce+(pe?1:0)),de[1]=Math.min(Math.max(de[1],1),xe),de}},Re.getRawByteCoords=function(Be){if(Be)return{x:Be[0]+32,y:Be[1]+32}}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.RenderDebouncer=void 0;var Se=function(){function Be(Le){this._renderCallback=Le}return Be.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Be.prototype.refresh=function(Le,Ce,xe){var be=this;this._rowCount=xe,Le=Le!==void 0?Le:0,Ce=Ce!==void 0?Ce:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,Le):Le,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,Ce):Ce,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return be._innerRefresh()}))},Be.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var Le=Math.max(this._rowStart,0),Ce=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(Le,Ce)}},Be}();Re.RenderDebouncer=Se},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(Ce,xe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(be,ye){be.__proto__=ye}||function(be,ye){for(var we in ye)ye.hasOwnProperty(we)&&(be[we]=ye[we])})(Ce,xe)},function(Ce,xe){function be(){this.constructor=Ce}Se(Ce,xe),Ce.prototype=xe===null?Object.create(xe):(be.prototype=xe.prototype,new be)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.ScreenDprMonitor=void 0;var Le=function(Ce){function xe(){var be=Ce!==null&&Ce.apply(this,arguments)||this;return be._currentDevicePixelRatio=window.devicePixelRatio,be}return Be(xe,Ce),xe.prototype.setListener=function(be){var ye=this;this._listener&&this.clearListener(),this._listener=be,this._outerListener=function(){ye._listener&&(ye._listener(window.devicePixelRatio,ye._currentDevicePixelRatio),ye._updateDpr())},this._updateDpr()},xe.prototype.dispose=function(){Ce.prototype.dispose.call(this),this.clearListener()},xe.prototype._updateDpr=function(){var be;this._outerListener&&((be=this._resolutionMediaMatchList)===null||be===void 0||be.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},xe.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},xe}(ke(2).Disposable);Re.ScreenDprMonitor=Le},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.clone=void 0,Re.clone=function Se(Be,Le){if(Le===void 0&&(Le=5),typeof Be!="object")return Be;var Ce=Array.isArray(Be)?[]:{};for(var xe in Be)Ce[xe]=Le<=1?Be[xe]:Be[xe]?Se(Be[xe],Le-1):Be[xe];return Ce}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.Terminal=void 0;var Se=ke(4),Be=ke(35),Le=ke(18),Ce=ke(0),xe=ke(83),be=function(){function fe(ue){this._core=new Be.Terminal(ue),this._addonManager=new xe.AddonManager}return fe.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(fe.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new de(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"unicode",{get:function(){return this._checkProposedApi(),new ge(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"buffer",{get:function(){return this._checkProposedApi(),new we(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),fe.prototype.blur=function(){this._core.blur()},fe.prototype.focus=function(){this._core.focus()},fe.prototype.resize=function(ue,ee){this._verifyIntegers(ue,ee),this._core.resize(ue,ee)},fe.prototype.open=function(ue){this._core.open(ue)},fe.prototype.attachCustomKeyEventHandler=function(ue){this._core.attachCustomKeyEventHandler(ue)},fe.prototype.registerLinkMatcher=function(ue,ee,z){return this._checkProposedApi(),this._core.registerLinkMatcher(ue,ee,z)},fe.prototype.deregisterLinkMatcher=function(ue){this._checkProposedApi(),this._core.deregisterLinkMatcher(ue)},fe.prototype.registerLinkProvider=function(ue){return this._checkProposedApi(),this._core.registerLinkProvider(ue)},fe.prototype.registerCharacterJoiner=function(ue){return this._checkProposedApi(),this._core.registerCharacterJoiner(ue)},fe.prototype.deregisterCharacterJoiner=function(ue){this._checkProposedApi(),this._core.deregisterCharacterJoiner(ue)},fe.prototype.registerMarker=function(ue){return this._checkProposedApi(),this._verifyIntegers(ue),this._core.addMarker(ue)},fe.prototype.addMarker=function(ue){return this.registerMarker(ue)},fe.prototype.hasSelection=function(){return this._core.hasSelection()},fe.prototype.select=function(ue,ee,z){this._verifyIntegers(ue,ee,z),this._core.select(ue,ee,z)},fe.prototype.getSelection=function(){return this._core.getSelection()},fe.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},fe.prototype.clearSelection=function(){this._core.clearSelection()},fe.prototype.selectAll=function(){this._core.selectAll()},fe.prototype.selectLines=function(ue,ee){this._verifyIntegers(ue,ee),this._core.selectLines(ue,ee)},fe.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},fe.prototype.scrollLines=function(ue){this._verifyIntegers(ue),this._core.scrollLines(ue)},fe.prototype.scrollPages=function(ue){this._verifyIntegers(ue),this._core.scrollPages(ue)},fe.prototype.scrollToTop=function(){this._core.scrollToTop()},fe.prototype.scrollToBottom=function(){this._core.scrollToBottom()},fe.prototype.scrollToLine=function(ue){this._verifyIntegers(ue),this._core.scrollToLine(ue)},fe.prototype.clear=function(){this._core.clear()},fe.prototype.write=function(ue,ee){this._core.write(ue,ee)},fe.prototype.writeUtf8=function(ue,ee){this._core.write(ue,ee)},fe.prototype.writeln=function(ue,ee){this._core.write(ue),this._core.write(`\r
|
|
|
`,ee)},fe.prototype.paste=function(ue){this._core.paste(ue)},fe.prototype.getOption=function(ue){return this._core.optionsService.getOption(ue)},fe.prototype.setOption=function(ue,ee){this._core.optionsService.setOption(ue,ee)},fe.prototype.refresh=function(ue,ee){this._verifyIntegers(ue,ee),this._core.refresh(ue,ee)},fe.prototype.reset=function(){this._core.reset()},fe.prototype.loadAddon=function(ue){return this._addonManager.loadAddon(this,ue)},Object.defineProperty(fe,"strings",{get:function(){return Le},enumerable:!1,configurable:!0}),fe.prototype._verifyIntegers=function(){for(var ue=[],ee=0;ee<arguments.length;ee++)ue[ee]=arguments[ee];for(var z=0,oe=ue;z<oe.length;z++){var re=oe[z];if(re===1/0||isNaN(re)||re%1!=0)throw new Error("This API only accepts integers")}},fe}();Re.Terminal=be;var ye=function(){function fe(ue,ee){this._buffer=ue,this.type=ee}return fe.prototype.init=function(ue){return this._buffer=ue,this},Object.defineProperty(fe.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),fe.prototype.getLine=function(ue){var ee=this._buffer.lines.get(ue);if(ee)return new pe(ee)},fe.prototype.getNullCell=function(){return new Se.CellData},fe}(),we=function(){function fe(ue){var ee=this;this._buffers=ue,this._onBufferChange=new Ce.EventEmitter,this._normal=new ye(this._buffers.normal,"normal"),this._alternate=new ye(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return ee._onBufferChange.fire(ee.active)})}return Object.defineProperty(fe.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),fe}(),pe=function(){function fe(ue){this._line=ue}return Object.defineProperty(fe.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),fe.prototype.getCell=function(ue,ee){if(!(ue<0||ue>=this._line.length))return ee?(this._line.loadCell(ue,ee),ee):this._line.loadCell(ue,new Se.CellData)},fe.prototype.translateToString=function(ue,ee,z){return this._line.translateToString(ue,ee,z)},fe}(),de=function(){function fe(ue){this._core=ue}return fe.prototype.registerCsiHandler=function(ue,ee){return this._core.addCsiHandler(ue,function(z){return ee(z.toArray())})},fe.prototype.addCsiHandler=function(ue,ee){return this.registerCsiHandler(ue,ee)},fe.prototype.registerDcsHandler=function(ue,ee){return this._core.addDcsHandler(ue,function(z,oe){return ee(z,oe.toArray())})},fe.prototype.addDcsHandler=function(ue,ee){return this.registerDcsHandler(ue,ee)},fe.prototype.registerEscHandler=function(ue,ee){return this._core.addEscHandler(ue,ee)},fe.prototype.addEscHandler=function(ue,ee){return this.registerEscHandler(ue,ee)},fe.prototype.registerOscHandler=function(ue,ee){return this._core.addOscHandler(ue,ee)},fe.prototype.addOscHandler=function(ue,ee){return this.registerOscHandler(ue,ee)},fe}(),ge=function(){function fe(ue){this._core=ue}return fe.prototype.register=function(ue){this._core.unicodeService.register(ue)},Object.defineProperty(fe.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(fe.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(ue){this._core.unicodeService.activeVersion=ue},enumerable:!1,configurable:!0}),fe}()},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(Mt,at){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_t,ht){_t.__proto__=ht}||function(_t,ht){for(var Dt in ht)ht.hasOwnProperty(Dt)&&(_t[Dt]=ht[Dt])})(Mt,at)},function(Mt,at){function _t(){this.constructor=Mt}Se(Mt,at),Mt.prototype=at===null?Object.create(at):(_t.prototype=at.prototype,new _t)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.Terminal=void 0;var Le=ke(36),Ce=ke(37),xe=ke(38),be=ke(12),ye=ke(19),we=ke(40),pe=ke(50),de=ke(51),ge=ke(11),fe=ke(7),ue=ke(18),ee=ke(54),z=ke(55),oe=ke(56),re=ke(57),ae=ke(59),le=ke(0),me=ke(16),ve=ke(27),Pe=ke(60),Ae=ke(5),Oe=ke(61),Ie=ke(62),Ze=ke(63),qe=ke(64),Je=ke(65),mt=typeof window!="undefined"?window.document:null,gt=function(Mt){function at(_t){_t===void 0&&(_t={});var ht=Mt.call(this,_t)||this;return ht.browser=ge,ht._keyDownHandled=!1,ht._onCursorMove=new le.EventEmitter,ht._onKey=new le.EventEmitter,ht._onRender=new le.EventEmitter,ht._onSelectionChange=new le.EventEmitter,ht._onTitleChange=new le.EventEmitter,ht._onFocus=new le.EventEmitter,ht._onBlur=new le.EventEmitter,ht._onA11yCharEmitter=new le.EventEmitter,ht._onA11yTabEmitter=new le.EventEmitter,ht._setup(),ht.linkifier=ht._instantiationService.createInstance(pe.Linkifier),ht.linkifier2=ht.register(ht._instantiationService.createInstance(Ze.Linkifier2)),ht.register(ht._inputHandler.onRequestBell(function(){return ht.bell()})),ht.register(ht._inputHandler.onRequestRefreshRows(function(Dt,ut){return ht.refresh(Dt,ut)})),ht.register(ht._inputHandler.onRequestReset(function(){return ht.reset()})),ht.register(ht._inputHandler.onRequestScroll(function(Dt,ut){return ht.scroll(Dt,ut||void 0)})),ht.register(ht._inputHandler.onRequestWindowsOptionsReport(function(Dt){return ht._reportWindowsOptions(Dt)})),ht.register(le.forwardEvent(ht._inputHandler.onCursorMove,ht._onCursorMove)),ht.register(le.forwardEvent(ht._inputHandler.onTitleChange,ht._onTitleChange)),ht.register(le.forwardEvent(ht._inputHandler.onA11yChar,ht._onA11yCharEmitter)),ht.register(le.forwardEvent(ht._inputHandler.onA11yTab,ht._onA11yTabEmitter)),ht.register(ht._bufferService.onResize(function(Dt){return ht._afterResize(Dt.cols,Dt.rows)})),ht}return Be(at,Mt),Object.defineProperty(at.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(at.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),at.prototype.dispose=function(){var _t,ht,Dt;this._isDisposed||(Mt.prototype.dispose.call(this),(_t=this._renderService)===null||_t===void 0||_t.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Dt=(ht=this.element)===null||ht===void 0?void 0:ht.parentNode)===null||Dt===void 0||Dt.removeChild(this.element))},at.prototype._setup=function(){Mt.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(at.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),at.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},at.prototype._updateOptions=function(_t){var ht,Dt,ut,ot;switch(Mt.prototype._updateOptions.call(this,_t),_t){case"fontFamily":case"fontSize":(ht=this._renderService)===null||ht===void 0||ht.clear(),(Dt=this._charSizeService)===null||Dt===void 0||Dt.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(ut=this.viewport)===null||ut===void 0||ut.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)):((ot=this._accessibilityManager)===null||ot===void 0||ot.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},at.prototype._onTextAreaFocus=function(_t){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(be.C0.ESC+"[I"),this.updateCursorStyle(_t),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},at.prototype.blur=function(){var _t;return(_t=this.textarea)===null||_t===void 0?void 0:_t.blur()},at.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(be.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},at.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var _t=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),ht=this._bufferService.buffer.y*_t,Dt=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=Dt+"px",this.textarea.style.top=ht+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=_t+"px",this.textarea.style.lineHeight=_t+"px",this.textarea.style.zIndex="-5"}},at.prototype._initGlobal=function(){var _t=this;this._bindKeys(),this.register(fe.addDisposableDomListener(this.element,"copy",function(Dt){_t.hasSelection()&&xe.copyHandler(Dt,_t._selectionService)}));var ht=function(Dt){return xe.handlePasteEvent(Dt,_t.textarea,_t._coreService)};this.register(fe.addDisposableDomListener(this.textarea,"paste",ht)),this.register(fe.addDisposableDomListener(this.element,"paste",ht)),ge.isFirefox?this.register(fe.addDisposableDomListener(this.element,"mousedown",function(Dt){Dt.button===2&&xe.rightClickHandler(Dt,_t.textarea,_t.screenElement,_t._selectionService,_t.options.rightClickSelectsWord)})):this.register(fe.addDisposableDomListener(this.element,"contextmenu",function(Dt){xe.rightClickHandler(Dt,_t.textarea,_t.screenElement,_t._selectionService,_t.options.rightClickSelectsWord)})),ge.isLinux&&this.register(fe.addDisposableDomListener(this.element,"auxclick",function(Dt){Dt.button===1&&xe.moveTextAreaUnderMouseCursor(Dt,_t.textarea,_t.screenElement)}))},at.prototype._bindKeys=function(){var _t=this;this.register(fe.addDisposableDomListener(this.textarea,"keyup",function(ht){return _t._keyUp(ht)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"keydown",function(ht){return _t._keyDown(ht)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"keypress",function(ht){return _t._keyPress(ht)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"compositionstart",function(){return _t._compositionHelper.compositionstart()})),this.register(fe.addDisposableDomListener(this.textarea,"compositionupdate",function(ht){return _t._compositionHelper.compositionupdate(ht)})),this.register(fe.addDisposableDomListener(this.textarea,"compositionend",function(){return _t._compositionHelper.compositionend()})),this.register(this.onRender(function(){return _t._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(ht){return _t._queueLinkification(ht.start,ht.end)}))},at.prototype.open=function(_t){var ht=this;if(!_t)throw new Error("Terminal requires a parent element.");mt.body.contains(_t)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=_t.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),_t.appendChild(this.element);var Dt=mt.createDocumentFragment();this._viewportElement=mt.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Dt.appendChild(this._viewportElement),this._viewportScrollArea=mt.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=mt.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=mt.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Dt.appendChild(this.screenElement),this.textarea=mt.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ue.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(fe.addDisposableDomListener(this.textarea,"focus",function(ct){return ht._onTextAreaFocus(ct)})),this.register(fe.addDisposableDomListener(this.textarea,"blur",function(){return ht._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var ut=this._instantiationService.createInstance(qe.CoreBrowserService,this.textarea);this._instantiationService.setService(Ae.ICoreBrowserService,ut),this._charSizeService=this._instantiationService.createInstance(Oe.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(Ae.ICharSizeService,this._charSizeService),this._compositionView=mt.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Le.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(Dt),this._theme=this.options.theme||this._theme,this._colorManager=new ve.ColorManager(mt,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(ct){return ht._colorManager.onOptionsChange(ct)})),this._colorManager.setTheme(this._theme);var ot=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(Pe.RenderService,ot,this.rows,this.screenElement)),this._instantiationService.setService(Ae.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(ct){return ht._onRender.fire(ct)})),this.onResize(function(ct){return ht._renderService.resize(ct.cols,ct.rows)}),this._soundService=this._instantiationService.createInstance(ee.SoundService),this._instantiationService.setService(Ae.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(Ie.MouseService),this._instantiationService.setService(Ae.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(Ce.Viewport,function(ct,yt){return ht.scrollLines(ct,yt)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return ht.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){ht._renderService.onCursorMove(),ht._syncTextArea()})),this.register(this.onResize(function(){return ht._renderService.onResize(ht.cols,ht.rows)})),this.register(this.onBlur(function(){return ht._renderService.onBlur()})),this.register(this.onFocus(function(){return ht._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return ht.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(de.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(Ae.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(ct){return ht.scrollLines(ct.amount,ct.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return ht._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(ct){return ht._renderService.onSelectionChanged(ct.start,ct.end,ct.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(ct){ht.textarea.value=ct,ht.textarea.focus(),ht.textarea.select()})),this.register(this.onScroll(function(){ht.viewport.syncScrollArea(),ht._selectionService.refresh()})),this.register(fe.addDisposableDomListener(this._viewportElement,"scroll",function(){return ht._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(z.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return ht._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(fe.addDisposableDomListener(this.element,"mousedown",function(ct){return ht._selectionService.onMouseDown(ct)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new oe.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},at.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(we.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(re.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},at.prototype._setTheme=function(_t){var ht,Dt,ut;this._theme=_t,(ht=this._colorManager)===null||ht===void 0||ht.setTheme(_t),(Dt=this._renderService)===null||Dt===void 0||Dt.setColors(this._colorManager.colors),(ut=this.viewport)===null||ut===void 0||ut.onThemeChange(this._colorManager.colors)},at.prototype.bindMouse=function(){var _t=this,ht=this,Dt=this.element;function ut(zt){var Ut,cn,jt=ht._mouseService.getRawByteCoords(zt,ht.screenElement,ht.cols,ht.rows);if(!jt)return!1;switch(zt.overrideType||zt.type){case"mousemove":cn=32,zt.buttons===void 0?(Ut=3,zt.button!==void 0&&(Ut=zt.button<3?zt.button:3)):Ut=1&zt.buttons?0:4&zt.buttons?1:2&zt.buttons?2:3;break;case"mouseup":cn=0,Ut=zt.button<3?zt.button:3;break;case"mousedown":cn=1,Ut=zt.button<3?zt.button:3;break;case"wheel":zt.deltaY!==0&&(cn=zt.deltaY<0?0:1),Ut=4;break;default:return!1}return!(cn===void 0||Ut===void 0||Ut>4)&&ht._coreMouseService.triggerMouseEvent({col:jt.x-33,row:jt.y-33,button:Ut,action:cn,ctrl:zt.ctrlKey,alt:zt.altKey,shift:zt.shiftKey})}var ot={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ct=function(zt){return ut(zt),zt.buttons||(_t._document.removeEventListener("mouseup",ot.mouseup),ot.mousedrag&&_t._document.removeEventListener("mousemove",ot.mousedrag)),_t.cancel(zt)},yt=function(zt){return ut(zt),zt.preventDefault(),_t.cancel(zt)},wt=function(zt){zt.buttons&&ut(zt)},xt=function(zt){zt.buttons||ut(zt)};this.register(this._coreMouseService.onProtocolChange(function(zt){zt?(_t.optionsService.options.logLevel==="debug"&&_t._logService.debug("Binding to mouse events:",_t._coreMouseService.explainEvents(zt)),_t.element.classList.add("enable-mouse-events"),_t._selectionService.disable()):(_t._logService.debug("Unbinding from mouse events."),_t.element.classList.remove("enable-mouse-events"),_t._selectionService.enable()),8&zt?ot.mousemove||(Dt.addEventListener("mousemove",xt),ot.mousemove=xt):(Dt.removeEventListener("mousemove",ot.mousemove),ot.mousemove=null),16&zt?ot.wheel||(Dt.addEventListener("wheel",yt,{passive:!1}),ot.wheel=yt):(Dt.removeEventListener("wheel",ot.wheel),ot.wheel=null),2&zt?ot.mouseup||(ot.mouseup=ct):(_t._document.removeEventListener("mouseup",ot.mouseup),ot.mouseup=null),4&zt?ot.mousedrag||(ot.mousedrag=wt):(_t._document.removeEventListener("mousemove",ot.mousedrag),ot.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(fe.addDisposableDomListener(Dt,"mousedown",function(zt){if(zt.preventDefault(),_t.focus(),_t._coreMouseService.areMouseEventsActive&&!_t._selectionService.shouldForceSelection(zt))return ut(zt),ot.mouseup&&_t._document.addEventListener("mouseup",ot.mouseup),ot.mousedrag&&_t._document.addEventListener("mousemove",ot.mousedrag),_t.cancel(zt)})),this.register(fe.addDisposableDomListener(Dt,"wheel",function(zt){if(!ot.wheel){if(!_t.buffer.hasScrollback){var Ut=_t.viewport.getLinesScrolled(zt);if(Ut===0)return;for(var cn=be.C0.ESC+(_t._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(zt.deltaY<0?"A":"B"),jt="",mn=0;mn<Math.abs(Ut);mn++)jt+=cn;_t._coreService.triggerDataEvent(jt,!0)}}},{passive:!0})),this.register(fe.addDisposableDomListener(Dt,"wheel",function(zt){if(!ot.wheel)return _t.viewport.onWheel(zt)?void 0:_t.cancel(zt)},{passive:!1})),this.register(fe.addDisposableDomListener(Dt,"touchstart",function(zt){if(!_t._coreMouseService.areMouseEventsActive)return _t.viewport.onTouchStart(zt),_t.cancel(zt)},{passive:!0})),this.register(fe.addDisposableDomListener(Dt,"touchmove",function(zt){if(!_t._coreMouseService.areMouseEventsActive)return _t.viewport.onTouchMove(zt)?void 0:_t.cancel(zt)},{passive:!1}))},at.prototype.refresh=function(_t,ht){var Dt;(Dt=this._renderService)===null||Dt===void 0||Dt.refreshRows(_t,ht)},at.prototype._queueLinkification=function(_t,ht){var Dt;(Dt=this.linkifier)===null||Dt===void 0||Dt.linkifyRows(_t,ht)},at.prototype.updateCursorStyle=function(_t){this._selectionService&&this._selectionService.shouldColumnSelect(_t)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},at.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},at.prototype.scrollLines=function(_t,ht){Mt.prototype.scrollLines.call(this,_t,ht),this.refresh(0,this.rows-1)},at.prototype.paste=function(_t){xe.paste(_t,this.textarea,this._coreService)},at.prototype.attachCustomKeyEventHandler=function(_t){this._customKeyEventHandler=_t},at.prototype.registerLinkMatcher=function(_t,ht,Dt){var ut=this.linkifier.registerLinkMatcher(_t,ht,Dt);return this.refresh(0,this.rows-1),ut},at.prototype.deregisterLinkMatcher=function(_t){this.linkifier.deregisterLinkMatcher(_t)&&this.refresh(0,this.rows-1)},at.prototype.registerLinkProvider=function(_t){return this.linkifier2.registerLinkProvider(_t)},at.prototype.registerCharacterJoiner=function(_t){var ht=this._renderService.registerCharacterJoiner(_t);return this.refresh(0,this.rows-1),ht},at.prototype.deregisterCharacterJoiner=function(_t){this._renderService.deregisterCharacterJoiner(_t)&&this.refresh(0,this.rows-1)},Object.defineProperty(at.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),at.prototype.addMarker=function(_t){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+_t)},at.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},at.prototype.select=function(_t,ht,Dt){this._selectionService.setSelection(_t,ht,Dt)},at.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},at.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},at.prototype.clearSelection=function(){var _t;(_t=this._selectionService)===null||_t===void 0||_t.clearSelection()},at.prototype.selectAll=function(){var _t;(_t=this._selectionService)===null||_t===void 0||_t.selectAll()},at.prototype.selectLines=function(_t,ht){var Dt;(Dt=this._selectionService)===null||Dt===void 0||Dt.selectLines(_t,ht)},at.prototype._keyDown=function(_t){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(_t)===!1)return!1;if(!this._compositionHelper.keydown(_t))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var ht=ae.evaluateKeyboardEvent(_t,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(_t),ht.type===3||ht.type===2){var Dt=this.rows-1;return this.scrollLines(ht.type===2?-Dt:Dt),this.cancel(_t,!0)}return ht.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,_t)||(ht.cancel&&this.cancel(_t,!0),!ht.key||(ht.key!==be.C0.ETX&&ht.key!==be.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ht.key,domEvent:_t}),this._showCursor(),this._coreService.triggerDataEvent(ht.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(_t,!0)))},at.prototype._isThirdLevelShift=function(_t,ht){var Dt=_t.isMac&&!this.options.macOptionIsMeta&&ht.altKey&&!ht.ctrlKey&&!ht.metaKey||_t.isWindows&&ht.altKey&&ht.ctrlKey&&!ht.metaKey;return ht.type==="keypress"?Dt:Dt&&(!ht.keyCode||ht.keyCode>47)},at.prototype._keyUp=function(_t){this._customKeyEventHandler&&this._customKeyEventHandler(_t)===!1||(function(ht){return ht.keyCode===16||ht.keyCode===17||ht.keyCode===18}(_t)||this.focus(),this.updateCursorStyle(_t))},at.prototype._keyPress=function(_t){var ht;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(_t)===!1)return!1;if(this.cancel(_t),_t.charCode)ht=_t.charCode;else if(_t.which===null||_t.which===void 0)ht=_t.keyCode;else{if(_t.which===0||_t.charCode===0)return!1;ht=_t.which}return!(!ht||(_t.altKey||_t.ctrlKey||_t.metaKey)&&!this._isThirdLevelShift(this.browser,_t))&&(ht=String.fromCharCode(ht),this._onKey.fire({key:ht,domEvent:_t}),this._showCursor(),this._coreService.triggerDataEvent(ht,!0),!0)},at.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},at.prototype.resize=function(_t,ht){_t!==this.cols||ht!==this.rows?Mt.prototype.resize.call(this,_t,ht):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},at.prototype._afterResize=function(_t,ht){var Dt,ut;(Dt=this._charSizeService)===null||Dt===void 0||Dt.measure(),(ut=this.viewport)===null||ut===void 0||ut.syncScrollArea(!0)},at.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var _t=1;_t<this.rows;_t++)this.buffer.lines.push(this.buffer.getBlankLine(me.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},at.prototype.reset=function(){var _t,ht;this.options.rows=this.rows,this.options.cols=this.cols;var Dt=this._customKeyEventHandler;this._setup(),Mt.prototype.reset.call(this),(_t=this._selectionService)===null||_t===void 0||_t.reset(),this._customKeyEventHandler=Dt,this.refresh(0,this.rows-1),(ht=this.viewport)===null||ht===void 0||ht.syncScrollArea()},at.prototype._reportWindowsOptions=function(_t){if(this._renderService)switch(_t){case ye.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var ht=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Dt=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(be.C0.ESC+"[4;"+Dt+";"+ht+"t");break;case ye.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var ut=this._renderService.dimensions.scaledCellWidth.toFixed(0),ot=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(be.C0.ESC+"[6;"+ot+";"+ut+"t")}},at.prototype.cancel=function(_t,ht){if(this.options.cancelEvents||ht)return _t.preventDefault(),_t.stopPropagation(),!1},at.prototype._visualBell=function(){return!1},at.prototype._soundBell=function(){return this.options.bellStyle==="sound"},at}(Je.CoreTerminal);Re.Terminal=gt},function(un,Re,ke){"use strict";var Se=this&&this.__decorate||function(be,ye,we,pe){var de,ge=arguments.length,fe=ge<3?ye:pe===null?pe=Object.getOwnPropertyDescriptor(ye,we):pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(be,ye,we,pe);else for(var ue=be.length-1;ue>=0;ue--)(de=be[ue])&&(fe=(ge<3?de(fe):ge>3?de(ye,we,fe):de(ye,we))||fe);return ge>3&&fe&&Object.defineProperty(ye,we,fe),fe},Be=this&&this.__param||function(be,ye){return function(we,pe){ye(we,pe,be)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.CompositionHelper=void 0;var Le=ke(5),Ce=ke(1),xe=function(){function be(ye,we,pe,de,ge,fe){this._textarea=ye,this._compositionView=we,this._bufferService=pe,this._optionsService=de,this._charSizeService=ge,this._coreService=fe,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(be.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),be.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},be.prototype.compositionupdate=function(ye){var we=this;this._compositionView.textContent=ye.data,this.updateCompositionElements(),setTimeout(function(){we._compositionPosition.end=we._textarea.value.length},0)},be.prototype.compositionend=function(){this._finalizeComposition(!0)},be.prototype.keydown=function(ye){if(this._isComposing||this._isSendingComposition){if(ye.keyCode===229||ye.keyCode===16||ye.keyCode===17||ye.keyCode===18)return!1;this._finalizeComposition(!1)}return ye.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},be.prototype._finalizeComposition=function(ye){var we=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,ye){var pe={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(we._isSendingComposition){we._isSendingComposition=!1;var ge=void 0;ge=we._isComposing?we._textarea.value.substring(pe.start,pe.end):we._textarea.value.substring(pe.start),we._coreService.triggerDataEvent(ge,!0)}},0)}else{this._isSendingComposition=!1;var de=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(de,!0)}},be.prototype._handleAnyTextareaChanges=function(){var ye=this,we=this._textarea.value;setTimeout(function(){if(!ye._isComposing){var pe=ye._textarea.value.replace(we,"");pe.length>0&&ye._coreService.triggerDataEvent(pe,!0)}},0)},be.prototype.updateCompositionElements=function(ye){var we=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var pe=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),de=this._bufferService.buffer.y*pe,ge=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=ge+"px",this._compositionView.style.top=de+"px",this._compositionView.style.height=pe+"px",this._compositionView.style.lineHeight=pe+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var fe=this._compositionView.getBoundingClientRect();this._textarea.style.left=ge+"px",this._textarea.style.top=de+"px",this._textarea.style.width=fe.width+"px",this._textarea.style.height=fe.height+"px",this._textarea.style.lineHeight=fe.height+"px"}ye||setTimeout(function(){return we.updateCompositionElements(!0)},0)}},be=Se([Be(2,Ce.IBufferService),Be(3,Ce.IOptionsService),Be(4,Le.ICharSizeService),Be(5,Ce.ICoreService)],be)}();Re.CompositionHelper=xe},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)}),Le=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},Ce=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.Viewport=void 0;var xe=ke(2),be=ke(7),ye=ke(5),we=ke(1),pe=function(de){function ge(fe,ue,ee,z,oe,re,ae){var le=de.call(this)||this;return le._scrollLines=fe,le._viewportElement=ue,le._scrollArea=ee,le._bufferService=z,le._optionsService=oe,le._charSizeService=re,le._renderService=ae,le.scrollBarWidth=0,le._currentRowHeight=0,le._lastRecordedBufferLength=0,le._lastRecordedViewportHeight=0,le._lastRecordedBufferHeight=0,le._lastTouchY=0,le._lastScrollTop=0,le._wheelPartialScroll=0,le._refreshAnimationFrame=null,le._ignoreNextScrollEvent=!1,le.scrollBarWidth=le._viewportElement.offsetWidth-le._scrollArea.offsetWidth||15,le.register(be.addDisposableDomListener(le._viewportElement,"scroll",le._onScroll.bind(le))),setTimeout(function(){return le.syncScrollArea()},0),le}return Be(ge,de),ge.prototype.onThemeChange=function(fe){this._viewportElement.style.backgroundColor=fe.background.css},ge.prototype._refresh=function(fe){var ue=this;if(fe)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return ue._innerRefresh()}))},ge.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var fe=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==fe&&(this._lastRecordedBufferHeight=fe,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var ue=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==ue&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=ue),this._refreshAnimationFrame=null},ge.prototype.syncScrollArea=function(fe){if(fe===void 0&&(fe=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(fe);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var ue=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===ue&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(fe)}else this._refresh(fe)},ge.prototype._onScroll=function(fe){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var ue=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(ue,!0)}},ge.prototype._bubbleScroll=function(fe,ue){var ee=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(ue<0&&this._viewportElement.scrollTop!==0||ue>0&&ee<this._lastRecordedBufferHeight)||(fe.cancelable&&fe.preventDefault(),!1)},ge.prototype.onWheel=function(fe){var ue=this._getPixelsScrolled(fe);return ue!==0&&(this._viewportElement.scrollTop+=ue,this._bubbleScroll(fe,ue))},ge.prototype._getPixelsScrolled=function(fe){if(fe.deltaY===0)return 0;var ue=this._applyScrollModifier(fe.deltaY,fe);return fe.deltaMode===WheelEvent.DOM_DELTA_LINE?ue*=this._currentRowHeight:fe.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ue*=this._currentRowHeight*this._bufferService.rows),ue},ge.prototype.getLinesScrolled=function(fe){if(fe.deltaY===0)return 0;var ue=this._applyScrollModifier(fe.deltaY,fe);return fe.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(ue/=this._currentRowHeight+0,this._wheelPartialScroll+=ue,ue=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):fe.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ue*=this._bufferService.rows),ue},ge.prototype._applyScrollModifier=function(fe,ue){var ee=this._optionsService.options.fastScrollModifier;return ee==="alt"&&ue.altKey||ee==="ctrl"&&ue.ctrlKey||ee==="shift"&&ue.shiftKey?fe*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:fe*this._optionsService.options.scrollSensitivity},ge.prototype.onTouchStart=function(fe){this._lastTouchY=fe.touches[0].pageY},ge.prototype.onTouchMove=function(fe){var ue=this._lastTouchY-fe.touches[0].pageY;return this._lastTouchY=fe.touches[0].pageY,ue!==0&&(this._viewportElement.scrollTop+=ue,this._bubbleScroll(fe,ue))},ge=Le([Ce(3,we.IBufferService),Ce(4,we.IOptionsService),Ce(5,ye.ICharSizeService),Ce(6,ye.IRenderService)],ge)}(xe.Disposable);Re.Viewport=pe},function(un,Re,ke){"use strict";function Se(xe){return xe.replace(/\r?\n/g,"\r")}function Be(xe,be){return be?"\x1B[200~"+xe+"\x1B[201~":xe}function Le(xe,be,ye){xe=Be(xe=Se(xe),ye.decPrivateModes.bracketedPasteMode),ye.triggerDataEvent(xe,!0),be.value=""}function Ce(xe,be,ye){var we=ye.getBoundingClientRect(),pe=xe.clientX-we.left-10,de=xe.clientY-we.top-10;be.style.width="20px",be.style.height="20px",be.style.left=pe+"px",be.style.top=de+"px",be.style.zIndex="1000",be.focus()}Object.defineProperty(Re,"__esModule",{value:!0}),Re.rightClickHandler=Re.moveTextAreaUnderMouseCursor=Re.paste=Re.handlePasteEvent=Re.copyHandler=Re.bracketTextForPaste=Re.prepareTextForTerminal=void 0,Re.prepareTextForTerminal=Se,Re.bracketTextForPaste=Be,Re.copyHandler=function(xe,be){xe.clipboardData&&xe.clipboardData.setData("text/plain",be.selectionText),xe.preventDefault()},Re.handlePasteEvent=function(xe,be,ye){xe.stopPropagation(),xe.clipboardData&&Le(xe.clipboardData.getData("text/plain"),be,ye)},Re.paste=Le,Re.moveTextAreaUnderMouseCursor=Ce,Re.rightClickHandler=function(xe,be,ye,we,pe){Ce(xe,be,ye),pe&&!we.isClickInSelection(xe)&&we.selectWordAtCursor(xe),be.value=we.selectionText,be.select()}},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.EscapeSequenceParser=Re.VT500_TRANSITION_TABLE=Re.TransitionTable=void 0;var Le=ke(2),Ce=ke(15),xe=ke(21),be=ke(22),ye=ke(24),we=function(){function de(ge){this.table=new Uint8Array(ge)}return de.prototype.setDefault=function(ge,fe){Ce.fill(this.table,ge<<4|fe)},de.prototype.add=function(ge,fe,ue,ee){this.table[fe<<8|ge]=ue<<4|ee},de.prototype.addMany=function(ge,fe,ue,ee){for(var z=0;z<ge.length;z++)this.table[fe<<8|ge[z]]=ue<<4|ee},de}();Re.TransitionTable=we,Re.VT500_TRANSITION_TABLE=function(){var de=new we(4095),ge=Array.apply(null,Array(256)).map(function(re,ae){return ae}),fe=function(re,ae){return ge.slice(re,ae)},ue=fe(32,127),ee=fe(0,24);ee.push(25),ee.push.apply(ee,fe(28,32));var z,oe=fe(0,14);for(z in de.setDefault(1,0),de.addMany(ue,0,2,0),oe)de.addMany([24,26,153,154],z,3,0),de.addMany(fe(128,144),z,3,0),de.addMany(fe(144,152),z,3,0),de.add(156,z,0,0),de.add(27,z,11,1),de.add(157,z,4,8),de.addMany([152,158,159],z,0,7),de.add(155,z,11,3),de.add(144,z,11,9);return de.addMany(ee,0,3,0),de.addMany(ee,1,3,1),de.add(127,1,0,1),de.addMany(ee,8,0,8),de.addMany(ee,3,3,3),de.add(127,3,0,3),de.addMany(ee,4,3,4),de.add(127,4,0,4),de.addMany(ee,6,3,6),de.addMany(ee,5,3,5),de.add(127,5,0,5),de.addMany(ee,2,3,2),de.add(127,2,0,2),de.add(93,1,4,8),de.addMany(ue,8,5,8),de.add(127,8,5,8),de.addMany([156,27,24,26,7],8,6,0),de.addMany(fe(28,32),8,0,8),de.addMany([88,94,95],1,0,7),de.addMany(ue,7,0,7),de.addMany(ee,7,0,7),de.add(156,7,0,0),de.add(127,7,0,7),de.add(91,1,11,3),de.addMany(fe(64,127),3,7,0),de.addMany(fe(48,60),3,8,4),de.addMany([60,61,62,63],3,9,4),de.addMany(fe(48,60),4,8,4),de.addMany(fe(64,127),4,7,0),de.addMany([60,61,62,63],4,0,6),de.addMany(fe(32,64),6,0,6),de.add(127,6,0,6),de.addMany(fe(64,127),6,0,0),de.addMany(fe(32,48),3,9,5),de.addMany(fe(32,48),5,9,5),de.addMany(fe(48,64),5,0,6),de.addMany(fe(64,127),5,7,0),de.addMany(fe(32,48),4,9,5),de.addMany(fe(32,48),1,9,2),de.addMany(fe(32,48),2,9,2),de.addMany(fe(48,127),2,10,0),de.addMany(fe(48,80),1,10,0),de.addMany(fe(81,88),1,10,0),de.addMany([89,90,92],1,10,0),de.addMany(fe(96,127),1,10,0),de.add(80,1,11,9),de.addMany(ee,9,0,9),de.add(127,9,0,9),de.addMany(fe(28,32),9,0,9),de.addMany(fe(32,48),9,9,12),de.addMany(fe(48,60),9,8,10),de.addMany([60,61,62,63],9,9,10),de.addMany(ee,11,0,11),de.addMany(fe(32,128),11,0,11),de.addMany(fe(28,32),11,0,11),de.addMany(ee,10,0,10),de.add(127,10,0,10),de.addMany(fe(28,32),10,0,10),de.addMany(fe(48,60),10,8,10),de.addMany([60,61,62,63],10,0,11),de.addMany(fe(32,48),10,9,12),de.addMany(ee,12,0,12),de.add(127,12,0,12),de.addMany(fe(28,32),12,0,12),de.addMany(fe(32,48),12,9,12),de.addMany(fe(48,64),12,0,11),de.addMany(fe(64,127),12,12,13),de.addMany(fe(64,127),10,12,13),de.addMany(fe(64,127),9,12,13),de.addMany(ee,13,13,13),de.addMany(ue,13,13,13),de.add(127,13,0,13),de.addMany([27,156,24,26],13,14,0),de.add(160,0,2,0),de.add(160,8,5,8),de.add(160,6,0,6),de.add(160,11,0,11),de.add(160,13,13,13),de}();var pe=function(de){function ge(fe){fe===void 0&&(fe=Re.VT500_TRANSITION_TABLE);var ue=de.call(this)||this;return ue._transitions=fe,ue.initialState=0,ue.currentState=ue.initialState,ue._params=new xe.Params,ue._params.addParam(0),ue._collect=0,ue.precedingCodepoint=0,ue._printHandlerFb=function(ee,z,oe){},ue._executeHandlerFb=function(ee){},ue._csiHandlerFb=function(ee,z){},ue._escHandlerFb=function(ee){},ue._errorHandlerFb=function(ee){return ee},ue._printHandler=ue._printHandlerFb,ue._executeHandlers=Object.create(null),ue._csiHandlers=Object.create(null),ue._escHandlers=Object.create(null),ue._oscParser=new be.OscParser,ue._dcsParser=new ye.DcsParser,ue._errorHandler=ue._errorHandlerFb,ue.setEscHandler({final:"\\"},function(){}),ue}return Be(ge,de),ge.prototype._identifier=function(fe,ue){ue===void 0&&(ue=[64,126]);var ee=0;if(fe.prefix){if(fe.prefix.length>1)throw new Error("only one byte as prefix supported");if((ee=fe.prefix.charCodeAt(0))&&60>ee||ee>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(fe.intermediates){if(fe.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var z=0;z<fe.intermediates.length;++z){var oe=fe.intermediates.charCodeAt(z);if(32>oe||oe>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");ee<<=8,ee|=oe}}if(fe.final.length!==1)throw new Error("final must be a single byte");var re=fe.final.charCodeAt(0);if(ue[0]>re||re>ue[1])throw new Error("final must be in range "+ue[0]+" .. "+ue[1]);return ee<<=8,ee|=re},ge.prototype.identToString=function(fe){for(var ue=[];fe;)ue.push(String.fromCharCode(255&fe)),fe>>=8;return ue.reverse().join("")},ge.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},ge.prototype.setPrintHandler=function(fe){this._printHandler=fe},ge.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},ge.prototype.addEscHandler=function(fe,ue){var ee=this._identifier(fe,[48,126]);this._escHandlers[ee]===void 0&&(this._escHandlers[ee]=[]);var z=this._escHandlers[ee];return z.push(ue),{dispose:function(){var oe=z.indexOf(ue);oe!==-1&&z.splice(oe,1)}}},ge.prototype.setEscHandler=function(fe,ue){this._escHandlers[this._identifier(fe,[48,126])]=[ue]},ge.prototype.clearEscHandler=function(fe){this._escHandlers[this._identifier(fe,[48,126])]&&delete this._escHandlers[this._identifier(fe,[48,126])]},ge.prototype.setEscHandlerFallback=function(fe){this._escHandlerFb=fe},ge.prototype.setExecuteHandler=function(fe,ue){this._executeHandlers[fe.charCodeAt(0)]=ue},ge.prototype.clearExecuteHandler=function(fe){this._executeHandlers[fe.charCodeAt(0)]&&delete this._executeHandlers[fe.charCodeAt(0)]},ge.prototype.setExecuteHandlerFallback=function(fe){this._executeHandlerFb=fe},ge.prototype.addCsiHandler=function(fe,ue){var ee=this._identifier(fe);this._csiHandlers[ee]===void 0&&(this._csiHandlers[ee]=[]);var z=this._csiHandlers[ee];return z.push(ue),{dispose:function(){var oe=z.indexOf(ue);oe!==-1&&z.splice(oe,1)}}},ge.prototype.setCsiHandler=function(fe,ue){this._csiHandlers[this._identifier(fe)]=[ue]},ge.prototype.clearCsiHandler=function(fe){this._csiHandlers[this._identifier(fe)]&&delete this._csiHandlers[this._identifier(fe)]},ge.prototype.setCsiHandlerFallback=function(fe){this._csiHandlerFb=fe},ge.prototype.addDcsHandler=function(fe,ue){return this._dcsParser.addHandler(this._identifier(fe),ue)},ge.prototype.setDcsHandler=function(fe,ue){this._dcsParser.setHandler(this._identifier(fe),ue)},ge.prototype.clearDcsHandler=function(fe){this._dcsParser.clearHandler(this._identifier(fe))},ge.prototype.setDcsHandlerFallback=function(fe){this._dcsParser.setHandlerFallback(fe)},ge.prototype.addOscHandler=function(fe,ue){return this._oscParser.addHandler(fe,ue)},ge.prototype.setOscHandler=function(fe,ue){this._oscParser.setHandler(fe,ue)},ge.prototype.clearOscHandler=function(fe){this._oscParser.clearHandler(fe)},ge.prototype.setOscHandlerFallback=function(fe){this._oscParser.setHandlerFallback(fe)},ge.prototype.setErrorHandler=function(fe){this._errorHandler=fe},ge.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},ge.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},ge.prototype.parse=function(fe,ue){for(var ee=0,z=0,oe=this.currentState,re=this._oscParser,ae=this._dcsParser,le=this._collect,me=this._params,ve=this._transitions.table,Pe=0;Pe<ue;++Pe){switch((z=ve[oe<<8|((ee=fe[Pe])<160?ee:160)])>>4){case 2:for(var Ae=Pe+1;;++Ae){if(Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Pe,Ae),Pe=Ae-1;break}if(++Ae>=ue||(ee=fe[Ae])<32||ee>126&&ee<160){this._printHandler(fe,Pe,Ae),Pe=Ae-1;break}}break;case 3:this._executeHandlers[ee]?this._executeHandlers[ee]():this._executeHandlerFb(ee),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:Pe,code:ee,currentState:oe,collect:le,params:me,abort:!1}).abort)return;break;case 7:for(var Oe=this._csiHandlers[le<<8|ee],Ie=Oe?Oe.length-1:-1;Ie>=0&&Oe[Ie](me)===!1;Ie--);Ie<0&&this._csiHandlerFb(le<<8|ee,me),this.precedingCodepoint=0;break;case 8:do switch(ee){case 59:me.addParam(0);break;case 58:me.addSubParam(-1);break;default:me.addDigit(ee-48)}while(++Pe<ue&&(ee=fe[Pe])>47&&ee<60);Pe--;break;case 9:le<<=8,le|=ee;break;case 10:for(var Ze=this._escHandlers[le<<8|ee],qe=Ze?Ze.length-1:-1;qe>=0&&Ze[qe]()===!1;qe--);qe<0&&this._escHandlerFb(le<<8|ee),this.precedingCodepoint=0;break;case 11:me.reset(),me.addParam(0),le=0;break;case 12:ae.hook(le<<8|ee,me);break;case 13:for(var Je=Pe+1;;++Je)if(Je>=ue||(ee=fe[Je])===24||ee===26||ee===27||ee>127&&ee<160){ae.put(fe,Pe,Je),Pe=Je-1;break}break;case 14:ae.unhook(ee!==24&&ee!==26),ee===27&&(z|=1),me.reset(),me.addParam(0),le=0,this.precedingCodepoint=0;break;case 4:re.start();break;case 5:for(var mt=Pe+1;;mt++)if(mt>=ue||(ee=fe[mt])<32||ee>127&&ee<=159){re.put(fe,Pe,mt),Pe=mt-1;break}break;case 6:re.end(ee!==24&&ee!==26),ee===27&&(z|=1),me.reset(),me.addParam(0),le=0,this.precedingCodepoint=0}oe=15&z}this._collect=le,this.currentState=oe},ge}(Le.Disposable);Re.EscapeSequenceParser=pe},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(re,ae){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,me){le.__proto__=me}||function(le,me){for(var ve in me)me.hasOwnProperty(ve)&&(le[ve]=me[ve])})(re,ae)},function(re,ae){function le(){this.constructor=re}Se(re,ae),re.prototype=ae===null?Object.create(ae):(le.prototype=ae.prototype,new le)}),Le=this&&this.__decorate||function(re,ae,le,me){var ve,Pe=arguments.length,Ae=Pe<3?ae:me===null?me=Object.getOwnPropertyDescriptor(ae,le):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(re,ae,le,me);else for(var Oe=re.length-1;Oe>=0;Oe--)(ve=re[Oe])&&(Ae=(Pe<3?ve(Ae):Pe>3?ve(ae,le,Ae):ve(ae,le))||Ae);return Pe>3&&Ae&&Object.defineProperty(ae,le,Ae),Ae},Ce=this&&this.__param||function(re,ae){return function(le,me){ae(le,me,re)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.Renderer=void 0;var xe=ke(41),be=ke(47),ye=ke(48),we=ke(49),pe=ke(29),de=ke(2),ge=ke(5),fe=ke(1),ue=ke(25),ee=ke(0),z=1,oe=function(re){function ae(le,me,ve,Pe,Ae,Oe,Ie,Ze,qe){var Je=re.call(this)||this;Je._colors=le,Je._screenElement=me,Je._bufferService=Ae,Je._charSizeService=Oe,Je._optionsService=Ie,Je._id=z++,Je._onRequestRedraw=new ee.EventEmitter;var mt=Je._optionsService.options.allowTransparency;return Je._characterJoinerRegistry=new pe.CharacterJoinerRegistry(Je._bufferService),Je._renderLayers=[new xe.TextRenderLayer(Je._screenElement,0,Je._colors,Je._characterJoinerRegistry,mt,Je._id,Je._bufferService,Ie),new be.SelectionRenderLayer(Je._screenElement,1,Je._colors,Je._id,Je._bufferService,Ie),new we.LinkRenderLayer(Je._screenElement,2,Je._colors,Je._id,ve,Pe,Je._bufferService,Ie),new ye.CursorRenderLayer(Je._screenElement,3,Je._colors,Je._id,Je._onRequestRedraw,Je._bufferService,Ie,Ze,qe)],Je.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Je._devicePixelRatio=window.devicePixelRatio,Je._updateDimensions(),Je.onOptionsChanged(),Je}return Be(ae,re),Object.defineProperty(ae.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),ae.prototype.dispose=function(){for(var le=0,me=this._renderLayers;le<me.length;le++)me[le].dispose();re.prototype.dispose.call(this),ue.removeTerminalFromCache(this._id)},ae.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},ae.prototype.setColors=function(le){this._colors=le;for(var me=0,ve=this._renderLayers;me<ve.length;me++){var Pe=ve[me];Pe.setColors(this._colors),Pe.reset()}},ae.prototype.onResize=function(le,me){this._updateDimensions();for(var ve=0,Pe=this._renderLayers;ve<Pe.length;ve++)Pe[ve].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},ae.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},ae.prototype.onBlur=function(){this._runOperation(function(le){return le.onBlur()})},ae.prototype.onFocus=function(){this._runOperation(function(le){return le.onFocus()})},ae.prototype.onSelectionChanged=function(le,me,ve){ve===void 0&&(ve=!1),this._runOperation(function(Pe){return Pe.onSelectionChanged(le,me,ve)})},ae.prototype.onCursorMove=function(){this._runOperation(function(le){return le.onCursorMove()})},ae.prototype.onOptionsChanged=function(){this._runOperation(function(le){return le.onOptionsChanged()})},ae.prototype.clear=function(){this._runOperation(function(le){return le.reset()})},ae.prototype._runOperation=function(le){for(var me=0,ve=this._renderLayers;me<ve.length;me++)le(ve[me])},ae.prototype.renderRows=function(le,me){for(var ve=0,Pe=this._renderLayers;ve<Pe.length;ve++)Pe[ve].onGridChanged(le,me)},ae.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},ae.prototype.registerCharacterJoiner=function(le){return this._characterJoinerRegistry.registerCharacterJoiner(le)},ae.prototype.deregisterCharacterJoiner=function(le){return this._characterJoinerRegistry.deregisterCharacterJoiner(le)},ae=Le([Ce(4,fe.IBufferService),Ce(5,ge.ICharSizeService),Ce(6,fe.IOptionsService),Ce(7,fe.ICoreService),Ce(8,ge.ICoreBrowserService)],ae)}(de.Disposable);Re.Renderer=oe},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.TextRenderLayer=void 0;var Le=ke(42),Ce=ke(13),xe=ke(6),be=ke(3),ye=ke(29),we=ke(4),pe=function(de){function ge(fe,ue,ee,z,oe,re,ae,le){var me=de.call(this,fe,"text",ue,oe,ee,re,ae,le)||this;return me._characterWidth=0,me._characterFont="",me._characterOverlapCache={},me._workCell=new we.CellData,me._state=new Le.GridCache,me._characterJoinerRegistry=z,me}return Be(ge,de),ge.prototype.resize=function(fe){de.prototype.resize.call(this,fe);var ue=this._getFont(!1,!1);this._characterWidth===fe.scaledCharWidth&&this._characterFont===ue||(this._characterWidth=fe.scaledCharWidth,this._characterFont=ue,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},ge.prototype.reset=function(){this._state.clear(),this._clearAll()},ge.prototype._forEachCell=function(fe,ue,ee,z){for(var oe=fe;oe<=ue;oe++)for(var re=oe+this._bufferService.buffer.ydisp,ae=this._bufferService.buffer.lines.get(re),le=ee?ee.getJoinedCharacters(re):[],me=0;me<this._bufferService.cols;me++){ae.loadCell(me,this._workCell);var ve=this._workCell,Pe=!1,Ae=me;if(ve.getWidth()!==0){if(le.length>0&&me===le[0][0]){Pe=!0;var Oe=le.shift();ve=new ye.JoinedCellData(this._workCell,ae.translateToString(!0,Oe[0],Oe[1]),Oe[1]-Oe[0]),Ae=Oe[1]-1}!Pe&&this._isOverlapping(ve)&&Ae<ae.length-1&&ae.getCodePoint(Ae+1)===be.NULL_CELL_CODE&&(ve.content&=-12582913,ve.content|=2<<22),z(ve,me,oe),me=Ae}}},ge.prototype._drawBackground=function(fe,ue){var ee=this,z=this._ctx,oe=this._bufferService.cols,re=0,ae=0,le=null;z.save(),this._forEachCell(fe,ue,null,function(me,ve,Pe){var Ae=null;me.isInverse()?Ae=me.isFgDefault()?ee._colors.foreground.css:me.isFgRGB()?"rgb("+xe.AttributeData.toColorRGB(me.getFgColor()).join(",")+")":ee._colors.ansi[me.getFgColor()].css:me.isBgRGB()?Ae="rgb("+xe.AttributeData.toColorRGB(me.getBgColor()).join(",")+")":me.isBgPalette()&&(Ae=ee._colors.ansi[me.getBgColor()].css),le===null&&(re=ve,ae=Pe),Pe!==ae?(z.fillStyle=le||"",ee._fillCells(re,ae,oe-re,1),re=ve,ae=Pe):le!==Ae&&(z.fillStyle=le||"",ee._fillCells(re,ae,ve-re,1),re=ve,ae=Pe),le=Ae}),le!==null&&(z.fillStyle=le,this._fillCells(re,ae,oe-re,1)),z.restore()},ge.prototype._drawForeground=function(fe,ue){var ee=this;this._forEachCell(fe,ue,this._characterJoinerRegistry,function(z,oe,re){if(!z.isInvisible()&&(ee._drawChars(z,oe,re),z.isUnderline())){if(ee._ctx.save(),z.isInverse())if(z.isBgDefault())ee._ctx.fillStyle=ee._colors.background.css;else if(z.isBgRGB())ee._ctx.fillStyle="rgb("+xe.AttributeData.toColorRGB(z.getBgColor()).join(",")+")";else{var ae=z.getBgColor();ee._optionsService.options.drawBoldTextInBrightColors&&z.isBold()&&ae<8&&(ae+=8),ee._ctx.fillStyle=ee._colors.ansi[ae].css}else if(z.isFgDefault())ee._ctx.fillStyle=ee._colors.foreground.css;else if(z.isFgRGB())ee._ctx.fillStyle="rgb("+xe.AttributeData.toColorRGB(z.getFgColor()).join(",")+")";else{var le=z.getFgColor();ee._optionsService.options.drawBoldTextInBrightColors&&z.isBold()&&le<8&&(le+=8),ee._ctx.fillStyle=ee._colors.ansi[le].css}ee._fillBottomLineAtCells(oe,re,z.getWidth()),ee._ctx.restore()}})},ge.prototype.onGridChanged=function(fe,ue){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,fe,this._bufferService.cols,ue-fe+1),this._drawBackground(fe,ue),this._drawForeground(fe,ue))},ge.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},ge.prototype._isOverlapping=function(fe){if(fe.getWidth()!==1||fe.getCode()<256)return!1;var ue=fe.getChars();if(this._characterOverlapCache.hasOwnProperty(ue))return this._characterOverlapCache[ue];this._ctx.save(),this._ctx.font=this._characterFont;var ee=Math.floor(this._ctx.measureText(ue).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[ue]=ee,ee},ge}(Ce.BaseRenderLayer);Re.TextRenderLayer=pe},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.GridCache=void 0;var Se=function(){function Be(){this.cache=[]}return Be.prototype.resize=function(Le,Ce){for(var xe=0;xe<Le;xe++){this.cache.length<=xe&&this.cache.push([]);for(var be=this.cache[xe].length;be<Ce;be++)this.cache[xe].push(void 0);this.cache[xe].length=Ce}this.cache.length=Le},Be.prototype.clear=function(){for(var Le=0;Le<this.cache.length;Le++)for(var Ce=0;Ce<this.cache[Le].length;Ce++)this.cache[Le][Ce]=void 0},Be}();Re.GridCache=Se},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(ee,z){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,re){oe.__proto__=re}||function(oe,re){for(var ae in re)re.hasOwnProperty(ae)&&(oe[ae]=re[ae])})(ee,z)},function(ee,z){function oe(){this.constructor=ee}Se(ee,z),ee.prototype=z===null?Object.create(z):(oe.prototype=z.prototype,new oe)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.NoneCharAtlas=Re.DynamicCharAtlas=Re.getGlyphCacheKey=void 0;var Le=ke(9),Ce=ke(44),xe=ke(27),be=ke(46),ye=ke(11),we=ke(28),pe=ke(10),de={css:"rgba(0, 0, 0, 0)",rgba:0};function ge(ee){return ee.code<<21|ee.bg<<12|ee.fg<<3|(ee.bold?0:4)+(ee.dim?0:2)+(ee.italic?0:1)}Re.getGlyphCacheKey=ge;var fe=function(ee){function z(oe,re){var ae=ee.call(this)||this;ae._config=re,ae._drawToCacheCount=0,ae._glyphsWaitingOnBitmap=[],ae._bitmapCommitTimeout=null,ae._bitmap=null,ae._cacheCanvas=oe.createElement("canvas"),ae._cacheCanvas.width=1024,ae._cacheCanvas.height=1024,ae._cacheCtx=we.throwIfFalsy(ae._cacheCanvas.getContext("2d",{alpha:!0}));var le=oe.createElement("canvas");le.width=ae._config.scaledCharWidth,le.height=ae._config.scaledCharHeight,ae._tmpCtx=we.throwIfFalsy(le.getContext("2d",{alpha:ae._config.allowTransparency})),ae._width=Math.floor(1024/ae._config.scaledCharWidth),ae._height=Math.floor(1024/ae._config.scaledCharHeight);var me=ae._width*ae._height;return ae._cacheMap=new be.LRUMap(me),ae._cacheMap.prealloc(me),ae}return Be(z,ee),z.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},z.prototype.beginFrame=function(){this._drawToCacheCount=0},z.prototype.draw=function(oe,re,ae,le){if(re.code===32)return!0;if(!this._canCache(re))return!1;var me=ge(re),ve=this._cacheMap.get(me);if(ve!=null)return this._drawFromCache(oe,ve,ae,le),!0;if(this._drawToCacheCount<100){var Pe=void 0;Pe=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var Ae=this._drawToCache(re,Pe);return this._cacheMap.set(me,Ae),this._drawFromCache(oe,Ae,ae,le),!0}return!1},z.prototype._canCache=function(oe){return oe.code<256},z.prototype._toCoordinateX=function(oe){return oe%this._width*this._config.scaledCharWidth},z.prototype._toCoordinateY=function(oe){return Math.floor(oe/this._width)*this._config.scaledCharHeight},z.prototype._drawFromCache=function(oe,re,ae,le){if(!re.isEmpty){var me=this._toCoordinateX(re.index),ve=this._toCoordinateY(re.index);oe.drawImage(re.inBitmap?this._bitmap:this._cacheCanvas,me,ve,this._config.scaledCharWidth,this._config.scaledCharHeight,ae,le,this._config.scaledCharWidth,this._config.scaledCharHeight)}},z.prototype._getColorFromAnsiIndex=function(oe){return oe<this._config.colors.ansi.length?this._config.colors.ansi[oe]:xe.DEFAULT_ANSI_COLORS[oe]},z.prototype._getBackgroundColor=function(oe){return this._config.allowTransparency?de:oe.bg===Le.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:oe.bg<256?this._getColorFromAnsiIndex(oe.bg):this._config.colors.background},z.prototype._getForegroundColor=function(oe){return oe.fg===Le.INVERTED_DEFAULT_COLOR?pe.color.opaque(this._config.colors.background):oe.fg<256?this._getColorFromAnsiIndex(oe.fg):this._config.colors.foreground},z.prototype._drawToCache=function(oe,re){this._drawToCacheCount++,this._tmpCtx.save();var ae=this._getBackgroundColor(oe);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=ae.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var le=oe.bold?this._config.fontWeightBold:this._config.fontWeight,me=oe.italic?"italic":"";this._tmpCtx.font=me+" "+le+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(oe).css,oe.dim&&(this._tmpCtx.globalAlpha=Le.DIM_OPACITY),this._tmpCtx.fillText(oe.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var ve=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),Pe=!1;this._config.allowTransparency||(Pe=function(Ze,qe){for(var Je=!0,mt=qe.rgba>>>24,gt=qe.rgba>>>16&255,Mt=qe.rgba>>>8&255,at=0;at<Ze.data.length;at+=4)Ze.data[at]===mt&&Ze.data[at+1]===gt&&Ze.data[at+2]===Mt?Ze.data[at+3]=0:Je=!1;return Je}(ve,ae));var Ae=this._toCoordinateX(re),Oe=this._toCoordinateY(re);this._cacheCtx.putImageData(ve,Ae,Oe);var Ie={index:re,isEmpty:Pe,inBitmap:!1};return this._addGlyphToBitmap(Ie),Ie},z.prototype._addGlyphToBitmap=function(oe){var re=this;!("createImageBitmap"in window)||ye.isFirefox||ye.isSafari||(this._glyphsWaitingOnBitmap.push(oe),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return re._generateBitmap()},100)))},z.prototype._generateBitmap=function(){var oe=this,re=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(ae){oe._bitmap=ae;for(var le=0;le<re.length;le++)re[le].inBitmap=!0}),this._bitmapCommitTimeout=null},z}(Ce.BaseCharAtlas);Re.DynamicCharAtlas=fe;var ue=function(ee){function z(oe,re){return ee.call(this)||this}return Be(z,ee),z.prototype.draw=function(oe,re,ae,le){return!1},z}(Ce.BaseCharAtlas);Re.NoneCharAtlas=ue},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.BaseCharAtlas=void 0;var Se=function(){function Be(){this._didWarmUp=!1}return Be.prototype.dispose=function(){},Be.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Be.prototype._doWarmUp=function(){},Be.prototype.beginFrame=function(){},Be}();Re.BaseCharAtlas=Se},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.ColorContrastCache=void 0;var Se=function(){function Be(){this._color={},this._rgba={}}return Be.prototype.clear=function(){this._color={},this._rgba={}},Be.prototype.setCss=function(Le,Ce,xe){this._rgba[Le]||(this._rgba[Le]={}),this._rgba[Le][Ce]=xe},Be.prototype.getCss=function(Le,Ce){return this._rgba[Le]?this._rgba[Le][Ce]:void 0},Be.prototype.setColor=function(Le,Ce,xe){this._color[Le]||(this._color[Le]={}),this._color[Le][Ce]=xe},Be.prototype.getColor=function(Le,Ce){return this._color[Le]?this._color[Le][Ce]:void 0},Be}();Re.ColorContrastCache=Se},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.LRUMap=void 0;var Se=function(){function Be(Le){this.capacity=Le,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Be.prototype._unlinkNode=function(Le){var Ce=Le.prev,xe=Le.next;Le===this._head&&(this._head=xe),Le===this._tail&&(this._tail=Ce),Ce!==null&&(Ce.next=xe),xe!==null&&(xe.prev=Ce)},Be.prototype._appendNode=function(Le){var Ce=this._tail;Ce!==null&&(Ce.next=Le),Le.prev=Ce,Le.next=null,this._tail=Le,this._head===null&&(this._head=Le)},Be.prototype.prealloc=function(Le){for(var Ce=this._nodePool,xe=0;xe<Le;xe++)Ce.push({prev:null,next:null,key:null,value:null})},Be.prototype.get=function(Le){var Ce=this._map[Le];return Ce!==void 0?(this._unlinkNode(Ce),this._appendNode(Ce),Ce.value):null},Be.prototype.peekValue=function(Le){var Ce=this._map[Le];return Ce!==void 0?Ce.value:null},Be.prototype.peek=function(){var Le=this._head;return Le===null?null:Le.value},Be.prototype.set=function(Le,Ce){var xe=this._map[Le];if(xe!==void 0)xe=this._map[Le],this._unlinkNode(xe),xe.value=Ce;else if(this.size>=this.capacity)xe=this._head,this._unlinkNode(xe),delete this._map[xe.key],xe.key=Le,xe.value=Ce,this._map[Le]=xe;else{var be=this._nodePool;be.length>0?((xe=be.pop()).key=Le,xe.value=Ce):xe={prev:null,next:null,key:Le,value:Ce},this._map[Le]=xe,this.size++}this._appendNode(xe)},Be}();Re.LRUMap=Se},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(Ce,xe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(be,ye){be.__proto__=ye}||function(be,ye){for(var we in ye)ye.hasOwnProperty(we)&&(be[we]=ye[we])})(Ce,xe)},function(Ce,xe){function be(){this.constructor=Ce}Se(Ce,xe),Ce.prototype=xe===null?Object.create(xe):(be.prototype=xe.prototype,new be)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.SelectionRenderLayer=void 0;var Le=function(Ce){function xe(be,ye,we,pe,de,ge){var fe=Ce.call(this,be,"selection",ye,!0,we,pe,de,ge)||this;return fe._clearState(),fe}return Be(xe,Ce),xe.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},xe.prototype.resize=function(be){Ce.prototype.resize.call(this,be),this._clearState()},xe.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},xe.prototype.onSelectionChanged=function(be,ye,we){if(this._didStateChange(be,ye,we,this._bufferService.buffer.ydisp))if(this._clearAll(),be&&ye){var pe=be[1]-this._bufferService.buffer.ydisp,de=ye[1]-this._bufferService.buffer.ydisp,ge=Math.max(pe,0),fe=Math.min(de,this._bufferService.rows-1);if(!(ge>=this._bufferService.rows||fe<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,we){var ue=be[0],ee=ye[0]-ue,z=fe-ge+1;this._fillCells(ue,ge,ee,z)}else{ue=pe===ge?be[0]:0;var oe=ge===fe?ye[0]:this._bufferService.cols;this._fillCells(ue,ge,oe-ue,1);var re=Math.max(fe-ge-1,0);if(this._fillCells(0,ge+1,this._bufferService.cols,re),ge!==fe){var ae=de===fe?ye[0]:this._bufferService.cols;this._fillCells(0,fe,ae,1)}}this._state.start=[be[0],be[1]],this._state.end=[ye[0],ye[1]],this._state.columnSelectMode=we,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},xe.prototype._didStateChange=function(be,ye,we,pe){return!this._areCoordinatesEqual(be,this._state.start)||!this._areCoordinatesEqual(ye,this._state.end)||we!==this._state.columnSelectMode||pe!==this._state.ydisp},xe.prototype._areCoordinatesEqual=function(be,ye){return!(!be||!ye)&&be[0]===ye[0]&&be[1]===ye[1]},xe}(ke(13).BaseRenderLayer);Re.SelectionRenderLayer=Le},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(ye,we){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,de){pe.__proto__=de}||function(pe,de){for(var ge in de)de.hasOwnProperty(ge)&&(pe[ge]=de[ge])})(ye,we)},function(ye,we){function pe(){this.constructor=ye}Se(ye,we),ye.prototype=we===null?Object.create(we):(pe.prototype=we.prototype,new pe)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.CursorRenderLayer=void 0;var Le=ke(13),Ce=ke(4),xe=function(ye){function we(pe,de,ge,fe,ue,ee,z,oe,re){var ae=ye.call(this,pe,"cursor",de,!0,ge,fe,ee,z)||this;return ae._onRequestRedraw=ue,ae._coreService=oe,ae._coreBrowserService=re,ae._cell=new Ce.CellData,ae._state={x:0,y:0,isFocused:!1,style:"",width:0},ae._cursorRenderers={bar:ae._renderBarCursor.bind(ae),block:ae._renderBlockCursor.bind(ae),underline:ae._renderUnderlineCursor.bind(ae)},ae}return Be(we,ye),we.prototype.resize=function(pe){ye.prototype.resize.call(this,pe),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},we.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},we.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},we.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},we.prototype.onOptionsChanged=function(){var pe,de=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new be(this._coreBrowserService.isFocused,function(){de._render(!0)})):((pe=this._cursorBlinkStateManager)===null||pe===void 0||pe.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},we.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},we.prototype.onGridChanged=function(pe,de){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},we.prototype._render=function(pe){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var de=this._bufferService.buffer.ybase+this._bufferService.buffer.y,ge=de-this._bufferService.buffer.ydisp;if(ge<0||ge>=this._bufferService.rows)this._clearCursor();else{var fe=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(de).loadCell(fe,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var ue=this._optionsService.options.cursorStyle;return ue&&ue!=="block"?this._cursorRenderers[ue](fe,ge,this._cell):this._renderBlurCursor(fe,ge,this._cell),this._ctx.restore(),this._state.x=fe,this._state.y=ge,this._state.isFocused=!1,this._state.style=ue,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===fe&&this._state.y===ge&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](fe,ge,this._cell),this._ctx.restore(),this._state.x=fe,this._state.y=ge,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},we.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},we.prototype._renderBarCursor=function(pe,de,ge){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(pe,de,this._optionsService.options.cursorWidth),this._ctx.restore()},we.prototype._renderBlockCursor=function(pe,de,ge){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(pe,de,ge.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(ge,pe,de),this._ctx.restore()},we.prototype._renderUnderlineCursor=function(pe,de,ge){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(pe,de),this._ctx.restore()},we.prototype._renderBlurCursor=function(pe,de,ge){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(pe,de,ge.getWidth(),1),this._ctx.restore()},we}(Le.BaseRenderLayer);Re.CursorRenderLayer=xe;var be=function(){function ye(we,pe){this._renderCallback=pe,this.isCursorVisible=!0,we&&this._restartInterval()}return Object.defineProperty(ye.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),ye.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ye.prototype.restartBlinkAnimation=function(){var we=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){we._renderCallback(),we._animationFrame=void 0})))},ye.prototype._restartInterval=function(we){var pe=this;we===void 0&&(we=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(pe._animationTimeRestarted){var de=600-(Date.now()-pe._animationTimeRestarted);if(pe._animationTimeRestarted=void 0,de>0)return void pe._restartInterval(de)}pe.isCursorVisible=!1,pe._animationFrame=window.requestAnimationFrame(function(){pe._renderCallback(),pe._animationFrame=void 0}),pe._blinkInterval=window.setInterval(function(){if(pe._animationTimeRestarted){var ge=600-(Date.now()-pe._animationTimeRestarted);return pe._animationTimeRestarted=void 0,void pe._restartInterval(ge)}pe.isCursorVisible=!pe.isCursorVisible,pe._animationFrame=window.requestAnimationFrame(function(){pe._renderCallback(),pe._animationFrame=void 0})},600)},we)},ye.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ye.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},ye}()},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(ye,we){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,de){pe.__proto__=de}||function(pe,de){for(var ge in de)de.hasOwnProperty(ge)&&(pe[ge]=de[ge])})(ye,we)},function(ye,we){function pe(){this.constructor=ye}Se(ye,we),ye.prototype=we===null?Object.create(we):(pe.prototype=we.prototype,new pe)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.LinkRenderLayer=void 0;var Le=ke(13),Ce=ke(9),xe=ke(26),be=function(ye){function we(pe,de,ge,fe,ue,ee,z,oe){var re=ye.call(this,pe,"link",de,!0,ge,fe,z,oe)||this;return ue.onShowLinkUnderline(function(ae){return re._onShowLinkUnderline(ae)}),ue.onHideLinkUnderline(function(ae){return re._onHideLinkUnderline(ae)}),ee.onShowLinkUnderline(function(ae){return re._onShowLinkUnderline(ae)}),ee.onHideLinkUnderline(function(ae){return re._onHideLinkUnderline(ae)}),re}return Be(we,ye),we.prototype.resize=function(pe){ye.prototype.resize.call(this,pe),this._state=void 0},we.prototype.reset=function(){this._clearCurrentLink()},we.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var pe=this._state.y2-this._state.y1-1;pe>0&&this._clearCells(0,this._state.y1+1,this._state.cols,pe),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},we.prototype._onShowLinkUnderline=function(pe){if(pe.fg===Ce.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:pe.fg&&xe.is256Color(pe.fg)?this._ctx.fillStyle=this._colors.ansi[pe.fg].css:this._ctx.fillStyle=this._colors.foreground.css,pe.y1===pe.y2)this._fillBottomLineAtCells(pe.x1,pe.y1,pe.x2-pe.x1);else{this._fillBottomLineAtCells(pe.x1,pe.y1,pe.cols-pe.x1);for(var de=pe.y1+1;de<pe.y2;de++)this._fillBottomLineAtCells(0,de,pe.cols);this._fillBottomLineAtCells(0,pe.y2,pe.x2)}this._state=pe},we.prototype._onHideLinkUnderline=function(pe){this._clearCurrentLink()},we}(Le.BaseRenderLayer);Re.LinkRenderLayer=be},function(un,Re,ke){"use strict";var Se=this&&this.__decorate||function(ye,we,pe,de){var ge,fe=arguments.length,ue=fe<3?we:de===null?de=Object.getOwnPropertyDescriptor(we,pe):de;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(ye,we,pe,de);else for(var ee=ye.length-1;ee>=0;ee--)(ge=ye[ee])&&(ue=(fe<3?ge(ue):fe>3?ge(we,pe,ue):ge(we,pe))||ue);return fe>3&&ue&&Object.defineProperty(we,pe,ue),ue},Be=this&&this.__param||function(ye,we){return function(pe,de){we(pe,de,ye)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.MouseZone=Re.Linkifier=void 0;var Le=ke(0),Ce=ke(1),xe=function(){function ye(we,pe,de){this._bufferService=we,this._logService=pe,this._unicodeService=de,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new Le.EventEmitter,this._onHideLinkUnderline=new Le.EventEmitter,this._onLinkTooltip=new Le.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(ye.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),ye.prototype.attachToDom=function(we,pe){this._element=we,this._mouseZoneManager=pe},ye.prototype.linkifyRows=function(we,pe){var de=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=we,this._rowsToLinkify.end=pe):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,we),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,pe)),this._mouseZoneManager.clearAll(we,pe),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return de._linkifyRows()},ye._timeBeforeLatency))},ye.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var we=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var pe=we.ydisp+this._rowsToLinkify.start;if(!(pe>=we.lines.length)){for(var de=we.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,ge=Math.ceil(2e3/this._bufferService.cols),fe=this._bufferService.buffer.iterator(!1,pe,de,ge,ge);fe.hasNext();)for(var ue=fe.next(),ee=0;ee<this._linkMatchers.length;ee++)this._doLinkifyRow(ue.range.first,ue.content,this._linkMatchers[ee]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},ye.prototype.registerLinkMatcher=function(we,pe,de){if(de===void 0&&(de={}),!pe)throw new Error("handler must be defined");var ge={id:this._nextLinkMatcherId++,regex:we,handler:pe,matchIndex:de.matchIndex,validationCallback:de.validationCallback,hoverTooltipCallback:de.tooltipCallback,hoverLeaveCallback:de.leaveCallback,willLinkActivate:de.willLinkActivate,priority:de.priority||0};return this._addLinkMatcherToList(ge),ge.id},ye.prototype._addLinkMatcherToList=function(we){if(this._linkMatchers.length!==0){for(var pe=this._linkMatchers.length-1;pe>=0;pe--)if(we.priority<=this._linkMatchers[pe].priority)return void this._linkMatchers.splice(pe+1,0,we);this._linkMatchers.splice(0,0,we)}else this._linkMatchers.push(we)},ye.prototype.deregisterLinkMatcher=function(we){for(var pe=0;pe<this._linkMatchers.length;pe++)if(this._linkMatchers[pe].id===we)return this._linkMatchers.splice(pe,1),!0;return!1},ye.prototype._doLinkifyRow=function(we,pe,de){for(var ge,fe=this,ue=new RegExp(de.regex.source,(de.regex.flags||"")+"g"),ee=-1,z=function(){var re=ge[typeof de.matchIndex!="number"?0:de.matchIndex];if(!re)return oe._logService.debug("match found without corresponding matchIndex",ge,de),"break";if(ee=pe.indexOf(re,ee+1),ue.lastIndex=ee+re.length,ee<0)return"break";var ae=oe._bufferService.buffer.stringIndexToBufferIndex(we,ee);if(ae[0]<0)return"break";var le=oe._bufferService.buffer.lines.get(ae[0]);if(!le)return"break";var me=le.getFg(ae[1]),ve=me?me>>9&511:void 0;de.validationCallback?de.validationCallback(re,function(Pe){fe._rowsTimeoutId||Pe&&fe._addLink(ae[1],ae[0]-fe._bufferService.buffer.ydisp,re,de,ve)}):oe._addLink(ae[1],ae[0]-oe._bufferService.buffer.ydisp,re,de,ve)},oe=this;(ge=ue.exec(pe))!==null&&z()!=="break";);},ye.prototype._addLink=function(we,pe,de,ge,fe){var ue=this;if(this._mouseZoneManager&&this._element){var ee=this._unicodeService.getStringCellWidth(de),z=we%this._bufferService.cols,oe=pe+Math.floor(we/this._bufferService.cols),re=(z+ee)%this._bufferService.cols,ae=oe+Math.floor((z+ee)/this._bufferService.cols);re===0&&(re=this._bufferService.cols,ae--),this._mouseZoneManager.add(new be(z+1,oe+1,re+1,ae+1,function(le){if(ge.handler)return ge.handler(le,de);var me=window.open();me?(me.opener=null,me.location.href=de):console.warn("Opening link blocked as opener could not be cleared")},function(){ue._onShowLinkUnderline.fire(ue._createLinkHoverEvent(z,oe,re,ae,fe)),ue._element.classList.add("xterm-cursor-pointer")},function(le){ue._onLinkTooltip.fire(ue._createLinkHoverEvent(z,oe,re,ae,fe)),ge.hoverTooltipCallback&&ge.hoverTooltipCallback(le,de,{start:{x:z,y:oe},end:{x:re,y:ae}})},function(){ue._onHideLinkUnderline.fire(ue._createLinkHoverEvent(z,oe,re,ae,fe)),ue._element.classList.remove("xterm-cursor-pointer"),ge.hoverLeaveCallback&&ge.hoverLeaveCallback()},function(le){return!ge.willLinkActivate||ge.willLinkActivate(le,de)}))}},ye.prototype._createLinkHoverEvent=function(we,pe,de,ge,fe){return{x1:we,y1:pe,x2:de,y2:ge,cols:this._bufferService.cols,fg:fe}},ye._timeBeforeLatency=200,ye=Se([Be(0,Ce.IBufferService),Be(1,Ce.ILogService),Be(2,Ce.IUnicodeService)],ye)}();Re.Linkifier=xe;var be=function(ye,we,pe,de,ge,fe,ue,ee,z){this.x1=ye,this.y1=we,this.x2=pe,this.y2=de,this.clickCallback=ge,this.hoverCallback=fe,this.tooltipCallback=ue,this.leaveCallback=ee,this.willLinkActivate=z};Re.MouseZone=be},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(re,ae){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,me){le.__proto__=me}||function(le,me){for(var ve in me)me.hasOwnProperty(ve)&&(le[ve]=me[ve])})(re,ae)},function(re,ae){function le(){this.constructor=re}Se(re,ae),re.prototype=ae===null?Object.create(ae):(le.prototype=ae.prototype,new le)}),Le=this&&this.__decorate||function(re,ae,le,me){var ve,Pe=arguments.length,Ae=Pe<3?ae:me===null?me=Object.getOwnPropertyDescriptor(ae,le):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(re,ae,le,me);else for(var Oe=re.length-1;Oe>=0;Oe--)(ve=re[Oe])&&(Ae=(Pe<3?ve(Ae):Pe>3?ve(ae,le,Ae):ve(ae,le))||Ae);return Pe>3&&Ae&&Object.defineProperty(ae,le,Ae),Ae},Ce=this&&this.__param||function(re,ae){return function(le,me){ae(le,me,re)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.SelectionService=void 0;var xe=ke(11),be=ke(52),ye=ke(4),we=ke(0),pe=ke(5),de=ke(1),ge=ke(30),fe=ke(53),ue=ke(2),ee="\xA0",z=new RegExp(ee,"g"),oe=function(re){function ae(le,me,ve,Pe,Ae,Oe,Ie){var Ze=re.call(this)||this;return Ze._element=le,Ze._screenElement=me,Ze._bufferService=ve,Ze._coreService=Pe,Ze._mouseService=Ae,Ze._optionsService=Oe,Ze._renderService=Ie,Ze._dragScrollAmount=0,Ze._enabled=!0,Ze._workCell=new ye.CellData,Ze._mouseDownTimeStamp=0,Ze._onLinuxMouseSelection=Ze.register(new we.EventEmitter),Ze._onRedrawRequest=Ze.register(new we.EventEmitter),Ze._onSelectionChange=Ze.register(new we.EventEmitter),Ze._onRequestScrollLines=Ze.register(new we.EventEmitter),Ze._mouseMoveListener=function(qe){return Ze._onMouseMove(qe)},Ze._mouseUpListener=function(qe){return Ze._onMouseUp(qe)},Ze._coreService.onUserInput(function(){Ze.hasSelection&&Ze.clearSelection()}),Ze._trimListener=Ze._bufferService.buffer.lines.onTrim(function(qe){return Ze._onTrim(qe)}),Ze.register(Ze._bufferService.buffers.onBufferActivate(function(qe){return Ze._onBufferActivate(qe)})),Ze.enable(),Ze._model=new be.SelectionModel(Ze._bufferService),Ze._activeSelectionMode=0,Ze}return Be(ae,re),Object.defineProperty(ae.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),ae.prototype.dispose=function(){this._removeMouseDownListeners()},ae.prototype.reset=function(){this.clearSelection()},ae.prototype.disable=function(){this.clearSelection(),this._enabled=!1},ae.prototype.enable=function(){this._enabled=!0},Object.defineProperty(ae.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"hasSelection",{get:function(){var le=this._model.finalSelectionStart,me=this._model.finalSelectionEnd;return!(!le||!me)&&(le[0]!==me[0]||le[1]!==me[1])},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"selectionText",{get:function(){var le=this._model.finalSelectionStart,me=this._model.finalSelectionEnd;if(!le||!me)return"";var ve=this._bufferService.buffer,Pe=[];if(this._activeSelectionMode===3){if(le[0]===me[0])return"";for(var Ae=le[1];Ae<=me[1];Ae++){var Oe=ve.translateBufferLineToString(Ae,!0,le[0],me[0]);Pe.push(Oe)}}else{var Ie=le[1]===me[1]?me[0]:void 0;for(Pe.push(ve.translateBufferLineToString(le[1],!0,le[0],Ie)),Ae=le[1]+1;Ae<=me[1]-1;Ae++){var Ze=ve.lines.get(Ae);Oe=ve.translateBufferLineToString(Ae,!0),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=Oe:Pe.push(Oe)}le[1]!==me[1]&&(Ze=ve.lines.get(me[1]),Oe=ve.translateBufferLineToString(me[1],!0,0,me[0]),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=Oe:Pe.push(Oe))}return Pe.map(function(qe){return qe.replace(z," ")}).join(xe.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),ae.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},ae.prototype.refresh=function(le){var me=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return me._refresh()})),xe.isLinux&&le&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},ae.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},ae.prototype.isClickInSelection=function(le){var me=this._getMouseBufferCoords(le),ve=this._model.finalSelectionStart,Pe=this._model.finalSelectionEnd;return!!(ve&&Pe&&me)&&this._areCoordsInSelection(me,ve,Pe)},ae.prototype._areCoordsInSelection=function(le,me,ve){return le[1]>me[1]&&le[1]<ve[1]||me[1]===ve[1]&&le[1]===me[1]&&le[0]>=me[0]&&le[0]<ve[0]||me[1]<ve[1]&&le[1]===ve[1]&&le[0]<ve[0]||me[1]<ve[1]&&le[1]===me[1]&&le[0]>=me[0]},ae.prototype.selectWordAtCursor=function(le){var me=this._getMouseBufferCoords(le);me&&(this._selectWordAt(me,!1),this._model.selectionEnd=void 0,this.refresh(!0))},ae.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},ae.prototype.selectLines=function(le,me){this._model.clearSelection(),le=Math.max(le,0),me=Math.min(me,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,le],this._model.selectionEnd=[this._bufferService.cols,me],this.refresh(),this._onSelectionChange.fire()},ae.prototype._onTrim=function(le){this._model.onTrim(le)&&this.refresh()},ae.prototype._getMouseBufferCoords=function(le){var me=this._mouseService.getCoords(le,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(me)return me[0]--,me[1]--,me[1]+=this._bufferService.buffer.ydisp,me},ae.prototype._getMouseEventScrollAmount=function(le){var me=ge.getCoordsRelativeToElement(le,this._screenElement)[1],ve=this._renderService.dimensions.canvasHeight;return me>=0&&me<=ve?0:(me>ve&&(me-=ve),me=Math.min(Math.max(me,-50),50),(me/=50)/Math.abs(me)+Math.round(14*me))},ae.prototype.shouldForceSelection=function(le){return xe.isMac?le.altKey&&this._optionsService.options.macOptionClickForcesSelection:le.shiftKey},ae.prototype.onMouseDown=function(le){if(this._mouseDownTimeStamp=le.timeStamp,(le.button!==2||!this.hasSelection)&&le.button===0){if(!this._enabled){if(!this.shouldForceSelection(le))return;le.stopPropagation()}le.preventDefault(),this._dragScrollAmount=0,this._enabled&&le.shiftKey?this._onIncrementalClick(le):le.detail===1?this._onSingleClick(le):le.detail===2?this._onDoubleClick(le):le.detail===3&&this._onTripleClick(le),this._addMouseDownListeners(),this.refresh(!0)}},ae.prototype._addMouseDownListeners=function(){var le=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return le._dragScroll()},50)},ae.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},ae.prototype._onIncrementalClick=function(le){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(le))},ae.prototype._onSingleClick=function(le){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(le)?3:0,this._model.selectionStart=this._getMouseBufferCoords(le),this._model.selectionStart){this._model.selectionEnd=void 0;var me=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);me&&me.length!==this._model.selectionStart[0]&&me.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},ae.prototype._onDoubleClick=function(le){var me=this._getMouseBufferCoords(le);me&&(this._activeSelectionMode=1,this._selectWordAt(me,!0))},ae.prototype._onTripleClick=function(le){var me=this._getMouseBufferCoords(le);me&&(this._activeSelectionMode=2,this._selectLineAt(me[1]))},ae.prototype.shouldColumnSelect=function(le){return le.altKey&&!(xe.isMac&&this._optionsService.options.macOptionClickForcesSelection)},ae.prototype._onMouseMove=function(le){if(le.stopImmediatePropagation(),this._model.selectionStart){var me=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(le),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(le),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var ve=this._bufferService.buffer;if(this._model.selectionEnd[1]<ve.lines.length){var Pe=ve.lines.get(this._model.selectionEnd[1]);Pe&&Pe.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}me&&me[0]===this._model.selectionEnd[0]&&me[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},ae.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var le=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(le.ydisp+this._bufferService.rows,le.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=le.ydisp),this.refresh()}},ae.prototype._onMouseUp=function(le){var me=le.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&me<500&&le.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var ve=this._mouseService.getCoords(le,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(ve&&ve[0]!==void 0&&ve[1]!==void 0){var Pe=fe.moveToCellSequence(ve[0]-1,ve[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(Pe,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},ae.prototype._onBufferActivate=function(le){var me=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=le.activeBuffer.lines.onTrim(function(ve){return me._onTrim(ve)})},ae.prototype._convertViewportColToCharacterIndex=function(le,me){for(var ve=me[0],Pe=0;me[0]>=Pe;Pe++){var Ae=le.loadCell(Pe,this._workCell).getChars().length;this._workCell.getWidth()===0?ve--:Ae>1&&me[0]!==Pe&&(ve+=Ae-1)}return ve},ae.prototype.setSelection=function(le,me,ve){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[le,me],this._model.selectionStartLength=ve,this.refresh()},ae.prototype._getWordAt=function(le,me,ve,Pe){if(ve===void 0&&(ve=!0),Pe===void 0&&(Pe=!0),!(le[0]>=this._bufferService.cols)){var Ae=this._bufferService.buffer,Oe=Ae.lines.get(le[1]);if(Oe){var Ie=Ae.translateBufferLineToString(le[1],!1),Ze=this._convertViewportColToCharacterIndex(Oe,le),qe=Ze,Je=le[0]-Ze,mt=0,gt=0,Mt=0,at=0;if(Ie.charAt(Ze)===" "){for(;Ze>0&&Ie.charAt(Ze-1)===" ";)Ze--;for(;qe<Ie.length&&Ie.charAt(qe+1)===" ";)qe++}else{var _t=le[0],ht=le[0];Oe.getWidth(_t)===0&&(mt++,_t--),Oe.getWidth(ht)===2&&(gt++,ht++);var Dt=Oe.getString(ht).length;for(Dt>1&&(at+=Dt-1,qe+=Dt-1);_t>0&&Ze>0&&!this._isCharWordSeparator(Oe.loadCell(_t-1,this._workCell));){Oe.loadCell(_t-1,this._workCell);var ut=this._workCell.getChars().length;this._workCell.getWidth()===0?(mt++,_t--):ut>1&&(Mt+=ut-1,Ze-=ut-1),Ze--,_t--}for(;ht<Oe.length&&qe+1<Ie.length&&!this._isCharWordSeparator(Oe.loadCell(ht+1,this._workCell));){Oe.loadCell(ht+1,this._workCell);var ot=this._workCell.getChars().length;this._workCell.getWidth()===2?(gt++,ht++):ot>1&&(at+=ot-1,qe+=ot-1),qe++,ht++}}qe++;var ct=Ze+Je-mt+Mt,yt=Math.min(this._bufferService.cols,qe-Ze+mt+gt-Mt-at);if(me||Ie.slice(Ze,qe).trim()!==""){if(ve&&ct===0&&Oe.getCodePoint(0)!==32){var wt=Ae.lines.get(le[1]-1);if(wt&&Oe.isWrapped&&wt.getCodePoint(this._bufferService.cols-1)!==32){var xt=this._getWordAt([this._bufferService.cols-1,le[1]-1],!1,!0,!1);if(xt){var zt=this._bufferService.cols-xt.start;ct-=zt,yt+=zt}}}if(Pe&&ct+yt===this._bufferService.cols&&Oe.getCodePoint(this._bufferService.cols-1)!==32){var Ut=Ae.lines.get(le[1]+1);if(Ut&&Ut.isWrapped&&Ut.getCodePoint(0)!==32){var cn=this._getWordAt([0,le[1]+1],!1,!1,!0);cn&&(yt+=cn.length)}}return{start:ct,length:yt}}}}},ae.prototype._selectWordAt=function(le,me){var ve=this._getWordAt(le,me);if(ve){for(;ve.start<0;)ve.start+=this._bufferService.cols,le[1]--;this._model.selectionStart=[ve.start,le[1]],this._model.selectionStartLength=ve.length}},ae.prototype._selectToWordAt=function(le){var me=this._getWordAt(le,!0);if(me){for(var ve=le[1];me.start<0;)me.start+=this._bufferService.cols,ve--;if(!this._model.areSelectionValuesReversed())for(;me.start+me.length>this._bufferService.cols;)me.length-=this._bufferService.cols,ve++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?me.start:me.start+me.length,ve]}},ae.prototype._isCharWordSeparator=function(le){return le.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(le.getChars())>=0},ae.prototype._selectLineAt=function(le){var me=this._bufferService.buffer.getWrappedRangeForLine(le);this._model.selectionStart=[0,me.first],this._model.selectionEnd=[this._bufferService.cols,me.last],this._model.selectionStartLength=0},ae=Le([Ce(2,de.IBufferService),Ce(3,de.ICoreService),Ce(4,pe.IMouseService),Ce(5,de.IOptionsService),Ce(6,pe.IRenderService)],ae)}(ue.Disposable);Re.SelectionService=oe},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.SelectionModel=void 0;var Se=function(){function Be(Le){this._bufferService=Le,this.isSelectAllActive=!1,this.selectionStartLength=0}return Be.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Be.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(Be.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var Le=this.selectionStart[0]+this.selectionStartLength;return Le>this._bufferService.cols?[Le%this._bufferService.cols,this.selectionStart[1]+Math.floor(Le/this._bufferService.cols)]:[Le,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),Be.prototype.areSelectionValuesReversed=function(){var Le=this.selectionStart,Ce=this.selectionEnd;return!(!Le||!Ce)&&(Le[1]>Ce[1]||Le[1]===Ce[1]&&Le[0]>Ce[0])},Be.prototype.onTrim=function(Le){return this.selectionStart&&(this.selectionStart[1]-=Le),this.selectionEnd&&(this.selectionEnd[1]-=Le),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Be}();Re.SelectionModel=Se},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.moveToCellSequence=void 0;var Se=ke(12);function Be(we,pe,de,ge){var fe=we-Le(de,we),ue=pe-Le(de,pe);return ye(Math.abs(fe-ue)-function(ee,z,oe){for(var re=0,ae=ee-Le(oe,ee),le=z-Le(oe,z),me=0;me<Math.abs(ae-le);me++){var ve=Ce(ee,z)==="A"?-1:1,Pe=oe.buffer.lines.get(ae+ve*me);Pe&&Pe.isWrapped&&re++}return re}(we,pe,de),be(Ce(we,pe),ge))}function Le(we,pe){for(var de=0,ge=we.buffer.lines.get(pe),fe=ge&&ge.isWrapped;fe&&pe>=0&&pe<we.rows;)de++,fe=(ge=we.buffer.lines.get(--pe))&&ge.isWrapped;return de}function Ce(we,pe){return we>pe?"A":"B"}function xe(we,pe,de,ge,fe,ue){for(var ee=we,z=pe,oe="";ee!==de||z!==ge;)ee+=fe?1:-1,fe&&ee>ue.cols-1?(oe+=ue.buffer.translateBufferLineToString(z,!1,we,ee),ee=0,we=0,z++):!fe&&ee<0&&(oe+=ue.buffer.translateBufferLineToString(z,!1,0,we+1),we=ee=ue.cols-1,z--);return oe+ue.buffer.translateBufferLineToString(z,!1,we,ee)}function be(we,pe){var de=pe?"O":"[";return Se.C0.ESC+de+we}function ye(we,pe){we=Math.floor(we);for(var de="",ge=0;ge<we;ge++)de+=pe;return de}Re.moveToCellSequence=function(we,pe,de,ge){var fe,ue=de.buffer.x,ee=de.buffer.y;if(!de.buffer.hasScrollback)return function(oe,re,ae,le,me,ve){return Be(re,le,me,ve).length===0?"":ye(xe(oe,re,oe,re-Le(me,re),!1,me).length,be("D",ve))}(ue,ee,0,pe,de,ge)+Be(ee,pe,de,ge)+function(oe,re,ae,le,me,ve){var Pe;Pe=Be(re,le,me,ve).length>0?le-Le(me,le):re;var Ae=le,Oe=function(Ie,Ze,qe,Je,mt,gt){var Mt;return Mt=Be(qe,Je,mt,gt).length>0?Je-Le(mt,Je):Ze,Ie<qe&&Mt<=Je||Ie>=qe&&Mt<Je?"C":"D"}(oe,re,ae,le,me,ve);return ye(xe(oe,Pe,ae,Ae,Oe==="C",me).length,be(Oe,ve))}(ue,ee,we,pe,de,ge);if(ee===pe)return fe=ue>we?"D":"C",ye(Math.abs(ue-we),be(fe,ge));fe=ee>pe?"D":"C";var z=Math.abs(ee-pe);return ye(function(oe,re){return re.cols-oe}(ee>pe?we:ue,de)+(z-1)*de.cols+1+((ee>pe?ue:we)-1),be(fe,ge))}},function(un,Re,ke){"use strict";var Se=this&&this.__decorate||function(xe,be,ye,we){var pe,de=arguments.length,ge=de<3?be:we===null?we=Object.getOwnPropertyDescriptor(be,ye):we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(xe,be,ye,we);else for(var fe=xe.length-1;fe>=0;fe--)(pe=xe[fe])&&(ge=(de<3?pe(ge):de>3?pe(be,ye,ge):pe(be,ye))||ge);return de>3&&ge&&Object.defineProperty(be,ye,ge),ge},Be=this&&this.__param||function(xe,be){return function(ye,we){be(ye,we,xe)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.SoundService=void 0;var Le=ke(1),Ce=function(){function xe(be){this._optionsService=be}return Object.defineProperty(xe,"audioContext",{get:function(){if(!xe._audioContext){var be=window.AudioContext||window.webkitAudioContext;if(!be)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;xe._audioContext=new be}return xe._audioContext},enumerable:!1,configurable:!0}),xe.prototype.playBellSound=function(){var be=xe.audioContext;if(be){var ye=be.createBufferSource();be.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(we){ye.buffer=we,ye.connect(be.destination),ye.start(0)})}},xe.prototype._base64ToArrayBuffer=function(be){for(var ye=window.atob(be),we=ye.length,pe=new Uint8Array(we),de=0;de<we;de++)pe[de]=ye.charCodeAt(de);return pe.buffer},xe.prototype._removeMimeType=function(be){return be.split(",")[1]},xe=Se([Be(0,Le.IOptionsService)],xe)}();Re.SoundService=Ce},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)}),Le=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},Ce=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.MouseZoneManager=void 0;var xe=ke(2),be=ke(7),ye=ke(5),we=ke(1),pe=function(de){function ge(fe,ue,ee,z,oe,re){var ae=de.call(this)||this;return ae._element=fe,ae._screenElement=ue,ae._bufferService=ee,ae._mouseService=z,ae._selectionService=oe,ae._optionsService=re,ae._zones=[],ae._areZonesActive=!1,ae._lastHoverCoords=[void 0,void 0],ae._initialSelectionLength=0,ae.register(be.addDisposableDomListener(ae._element,"mousedown",function(le){return ae._onMouseDown(le)})),ae._mouseMoveListener=function(le){return ae._onMouseMove(le)},ae._mouseLeaveListener=function(le){return ae._onMouseLeave(le)},ae._clickListener=function(le){return ae._onClick(le)},ae}return Be(ge,de),ge.prototype.dispose=function(){de.prototype.dispose.call(this),this._deactivate()},ge.prototype.add=function(fe){this._zones.push(fe),this._zones.length===1&&this._activate()},ge.prototype.clearAll=function(fe,ue){if(this._zones.length!==0){fe&&ue||(fe=0,ue=this._bufferService.rows-1);for(var ee=0;ee<this._zones.length;ee++){var z=this._zones[ee];(z.y1>fe&&z.y1<=ue+1||z.y2>fe&&z.y2<=ue+1||z.y1<fe&&z.y2>ue+1)&&(this._currentZone&&this._currentZone===z&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(ee--,1))}this._zones.length===0&&this._deactivate()}},ge.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},ge.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},ge.prototype._onMouseMove=function(fe){this._lastHoverCoords[0]===fe.pageX&&this._lastHoverCoords[1]===fe.pageY||(this._onHover(fe),this._lastHoverCoords=[fe.pageX,fe.pageY])},ge.prototype._onHover=function(fe){var ue=this,ee=this._findZoneEventAt(fe);ee!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),ee&&(this._currentZone=ee,ee.hoverCallback&&ee.hoverCallback(fe),this._tooltipTimeout=window.setTimeout(function(){return ue._onTooltip(fe)},this._optionsService.options.linkTooltipHoverDuration)))},ge.prototype._onTooltip=function(fe){this._tooltipTimeout=void 0;var ue=this._findZoneEventAt(fe);ue&&ue.tooltipCallback&&ue.tooltipCallback(fe)},ge.prototype._onMouseDown=function(fe){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var ue=this._findZoneEventAt(fe);ue!=null&&ue.willLinkActivate(fe)&&(fe.preventDefault(),fe.stopImmediatePropagation())}},ge.prototype._onMouseLeave=function(fe){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},ge.prototype._onClick=function(fe){var ue=this._findZoneEventAt(fe),ee=this._getSelectionLength();ue&&ee===this._initialSelectionLength&&(ue.clickCallback(fe),fe.preventDefault(),fe.stopImmediatePropagation())},ge.prototype._getSelectionLength=function(){var fe=this._selectionService.selectionText;return fe?fe.length:0},ge.prototype._findZoneEventAt=function(fe){var ue=this._mouseService.getCoords(fe,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(ue)for(var ee=ue[0],z=ue[1],oe=0;oe<this._zones.length;oe++){var re=this._zones[oe];if(re.y1===re.y2){if(z===re.y1&&ee>=re.x1&&ee<re.x2)return re}else if(z===re.y1&&ee>=re.x1||z===re.y2&&ee<re.x2||z>re.y1&&z<re.y2)return re}},ge=Le([Ce(2,we.IBufferService),Ce(3,ye.IMouseService),Ce(4,ye.ISelectionService),Ce(5,we.IOptionsService)],ge)}(xe.Disposable);Re.MouseZoneManager=pe},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(ge,fe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,ee){ue.__proto__=ee}||function(ue,ee){for(var z in ee)ee.hasOwnProperty(z)&&(ue[z]=ee[z])})(ge,fe)},function(ge,fe){function ue(){this.constructor=ge}Se(ge,fe),ge.prototype=fe===null?Object.create(fe):(ue.prototype=fe.prototype,new ue)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.AccessibilityManager=void 0;var Le=ke(18),Ce=ke(11),xe=ke(31),be=ke(7),ye=ke(2),we=ke(32),pe=ke(17),de=function(ge){function fe(ue,ee){var z=ge.call(this)||this;z._terminal=ue,z._renderService=ee,z._liveRegionLineCount=0,z._charsToConsume=[],z._charsToAnnounce="",z._accessibilityTreeRoot=document.createElement("div"),z._accessibilityTreeRoot.classList.add("xterm-accessibility"),z._rowContainer=document.createElement("div"),z._rowContainer.classList.add("xterm-accessibility-tree"),z._rowContainer.setAttribute("role","list"),z._rowElements=[];for(var oe=0;oe<z._terminal.rows;oe++)z._rowElements[oe]=z._createAccessibilityTreeNode(),z._rowContainer.appendChild(z._rowElements[oe]);if(z._topBoundaryFocusListener=function(re){return z._onBoundaryFocus(re,0)},z._bottomBoundaryFocusListener=function(re){return z._onBoundaryFocus(re,1)},z._rowElements[0].addEventListener("focus",z._topBoundaryFocusListener),z._rowElements[z._rowElements.length-1].addEventListener("focus",z._bottomBoundaryFocusListener),z._refreshRowsDimensions(),z._accessibilityTreeRoot.appendChild(z._rowContainer),z._renderRowsDebouncer=new xe.RenderDebouncer(z._renderRows.bind(z)),z._refreshRows(),z._liveRegion=document.createElement("div"),z._liveRegion.classList.add("live-region"),z._liveRegion.setAttribute("aria-live","assertive"),z._accessibilityTreeRoot.appendChild(z._liveRegion),!z._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return z._terminal.element.insertAdjacentElement("afterbegin",z._accessibilityTreeRoot),z.register(z._renderRowsDebouncer),z.register(z._terminal.onResize(function(re){return z._onResize(re.rows)})),z.register(z._terminal.onRender(function(re){return z._refreshRows(re.start,re.end)})),z.register(z._terminal.onScroll(function(){return z._refreshRows()})),z.register(z._terminal.onA11yChar(function(re){return z._onChar(re)})),z.register(z._terminal.onLineFeed(function(){return z._onChar(`
|
|
|
`)})),z.register(z._terminal.onA11yTab(function(re){return z._onTab(re)})),z.register(z._terminal.onKey(function(re){return z._onKey(re.key)})),z.register(z._terminal.onBlur(function(){return z._clearLiveRegion()})),z.register(z._renderService.onDimensionsChange(function(){return z._refreshRowsDimensions()})),z._screenDprMonitor=new we.ScreenDprMonitor,z.register(z._screenDprMonitor),z._screenDprMonitor.setListener(function(){return z._refreshRowsDimensions()}),z.register(be.addDisposableDomListener(window,"resize",function(){return z._refreshRowsDimensions()})),z}return Be(fe,ge),fe.prototype.dispose=function(){ge.prototype.dispose.call(this),pe.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},fe.prototype._onBoundaryFocus=function(ue,ee){var z=ue.target,oe=this._rowElements[ee===0?1:this._rowElements.length-2];if(z.getAttribute("aria-posinset")!==(ee===0?"1":""+this._terminal.buffer.lines.length)&&ue.relatedTarget===oe){var re,ae;if(ee===0?(re=z,ae=this._rowElements.pop(),this._rowContainer.removeChild(ae)):(re=this._rowElements.shift(),ae=z,this._rowContainer.removeChild(re)),re.removeEventListener("focus",this._topBoundaryFocusListener),ae.removeEventListener("focus",this._bottomBoundaryFocusListener),ee===0){var le=this._createAccessibilityTreeNode();this._rowElements.unshift(le),this._rowContainer.insertAdjacentElement("afterbegin",le)}else le=this._createAccessibilityTreeNode(),this._rowElements.push(le),this._rowContainer.appendChild(le);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(ee===0?-1:1),this._rowElements[ee===0?1:this._rowElements.length-2].focus(),ue.preventDefault(),ue.stopImmediatePropagation()}},fe.prototype._onResize=function(ue){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var ee=this._rowContainer.children.length;ee<this._terminal.rows;ee++)this._rowElements[ee]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[ee]);for(;this._rowElements.length>ue;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},fe.prototype._createAccessibilityTreeNode=function(){var ue=document.createElement("div");return ue.setAttribute("role","listitem"),ue.tabIndex=-1,this._refreshRowDimensions(ue),ue},fe.prototype._onTab=function(ue){for(var ee=0;ee<ue;ee++)this._onChar(" ")},fe.prototype._onChar=function(ue){var ee=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==ue&&(this._charsToAnnounce+=ue):this._charsToAnnounce+=ue,ue===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=Le.tooMuchOutput)),Ce.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){ee._accessibilityTreeRoot.appendChild(ee._liveRegion)},0))},fe.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,Ce.isMac&&pe.removeElementFromParent(this._liveRegion)},fe.prototype._onKey=function(ue){this._clearLiveRegion(),this._charsToConsume.push(ue)},fe.prototype._refreshRows=function(ue,ee){this._renderRowsDebouncer.refresh(ue,ee,this._terminal.rows)},fe.prototype._renderRows=function(ue,ee){for(var z=this._terminal.buffer,oe=z.lines.length.toString(),re=ue;re<=ee;re++){var ae=z.translateBufferLineToString(z.ydisp+re,!0),le=(z.ydisp+re+1).toString(),me=this._rowElements[re];me&&(ae.length===0?me.innerHTML=" ":me.textContent=ae,me.setAttribute("aria-posinset",le),me.setAttribute("aria-setsize",oe))}this._announceCharacters()},fe.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var ue=0;ue<this._terminal.rows;ue++)this._refreshRowDimensions(this._rowElements[ue])}},fe.prototype._refreshRowDimensions=function(ue){ue.style.height=this._renderService.dimensions.actualCellHeight+"px"},fe.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},fe}(ye.Disposable);Re.AccessibilityManager=de},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(z,oe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(re,ae){re.__proto__=ae}||function(re,ae){for(var le in ae)ae.hasOwnProperty(le)&&(re[le]=ae[le])})(z,oe)},function(z,oe){function re(){this.constructor=z}Se(z,oe),z.prototype=oe===null?Object.create(oe):(re.prototype=oe.prototype,new re)}),Le=this&&this.__decorate||function(z,oe,re,ae){var le,me=arguments.length,ve=me<3?oe:ae===null?ae=Object.getOwnPropertyDescriptor(oe,re):ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(z,oe,re,ae);else for(var Pe=z.length-1;Pe>=0;Pe--)(le=z[Pe])&&(ve=(me<3?le(ve):me>3?le(oe,re,ve):le(oe,re))||ve);return me>3&&ve&&Object.defineProperty(oe,re,ve),ve},Ce=this&&this.__param||function(z,oe){return function(re,ae){oe(re,ae,z)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.DomRenderer=void 0;var xe=ke(58),be=ke(9),ye=ke(2),we=ke(5),pe=ke(1),de=ke(0),ge=ke(10),fe=ke(17),ue=1,ee=function(z){function oe(re,ae,le,me,ve,Pe,Ae,Oe,Ie){var Ze=z.call(this)||this;return Ze._colors=re,Ze._element=ae,Ze._screenElement=le,Ze._viewportElement=me,Ze._linkifier=ve,Ze._linkifier2=Pe,Ze._charSizeService=Ae,Ze._optionsService=Oe,Ze._bufferService=Ie,Ze._terminalClass=ue++,Ze._rowElements=[],Ze._rowContainer=document.createElement("div"),Ze._rowContainer.classList.add("xterm-rows"),Ze._rowContainer.style.lineHeight="normal",Ze._rowContainer.setAttribute("aria-hidden","true"),Ze._refreshRowElements(Ze._bufferService.cols,Ze._bufferService.rows),Ze._selectionContainer=document.createElement("div"),Ze._selectionContainer.classList.add("xterm-selection"),Ze._selectionContainer.setAttribute("aria-hidden","true"),Ze.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Ze._updateDimensions(),Ze._injectCss(),Ze._rowFactory=new xe.DomRendererRowFactory(document,Ze._optionsService,Ze._colors),Ze._element.classList.add("xterm-dom-renderer-owner-"+Ze._terminalClass),Ze._screenElement.appendChild(Ze._rowContainer),Ze._screenElement.appendChild(Ze._selectionContainer),Ze._linkifier.onShowLinkUnderline(function(qe){return Ze._onLinkHover(qe)}),Ze._linkifier.onHideLinkUnderline(function(qe){return Ze._onLinkLeave(qe)}),Ze._linkifier2.onShowLinkUnderline(function(qe){return Ze._onLinkHover(qe)}),Ze._linkifier2.onHideLinkUnderline(function(qe){return Ze._onLinkLeave(qe)}),Ze}return Be(oe,z),Object.defineProperty(oe.prototype,"onRequestRedraw",{get:function(){return new de.EventEmitter().event},enumerable:!1,configurable:!0}),oe.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),fe.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),z.prototype.dispose.call(this)},oe.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var re=0,ae=this._rowElements;re<ae.length;re++){var le=ae[re];le.style.width=this.dimensions.canvasWidth+"px",le.style.height=this.dimensions.actualCellHeight+"px",le.style.lineHeight=this.dimensions.actualCellHeight+"px",le.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var me=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=me,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},oe.prototype.setColors=function(re){this._colors=re,this._injectCss()},oe.prototype._injectCss=function(){var re=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var ae=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";ae+=this._terminalSelector+" span:not(."+xe.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+xe.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+xe.ITALIC_CLASS+" { font-style: italic;}",ae+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",ae+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",ae+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+xe.CURSOR_CLASS+"."+xe.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+xe.CURSOR_CLASS+"."+xe.CURSOR_BLINK_CLASS+":not(."+xe.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+xe.CURSOR_CLASS+"."+xe.CURSOR_BLINK_CLASS+"."+xe.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+xe.CURSOR_CLASS+"."+xe.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+xe.CURSOR_CLASS+"."+xe.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+xe.CURSOR_CLASS+"."+xe.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",ae+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(le,me){ae+=re._terminalSelector+" .xterm-fg-"+me+" { color: "+le.css+"; }"+re._terminalSelector+" .xterm-bg-"+me+" { background-color: "+le.css+"; }"}),ae+=this._terminalSelector+" .xterm-fg-"+be.INVERTED_DEFAULT_COLOR+" { color: "+ge.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+be.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=ae},oe.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},oe.prototype._refreshRowElements=function(re,ae){for(var le=this._rowElements.length;le<=ae;le++){var me=document.createElement("div");this._rowContainer.appendChild(me),this._rowElements.push(me)}for(;this._rowElements.length>ae;)this._rowContainer.removeChild(this._rowElements.pop())},oe.prototype.onResize=function(re,ae){this._refreshRowElements(re,ae),this._updateDimensions()},oe.prototype.onCharSizeChanged=function(){this._updateDimensions()},oe.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},oe.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},oe.prototype.onSelectionChanged=function(re,ae,le){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(re&&ae){var me=re[1]-this._bufferService.buffer.ydisp,ve=ae[1]-this._bufferService.buffer.ydisp,Pe=Math.max(me,0),Ae=Math.min(ve,this._bufferService.rows-1);if(!(Pe>=this._bufferService.rows||Ae<0)){var Oe=document.createDocumentFragment();if(le)Oe.appendChild(this._createSelectionElement(Pe,re[0],ae[0],Ae-Pe+1));else{var Ie=me===Pe?re[0]:0,Ze=Pe===Ae?ae[0]:this._bufferService.cols;Oe.appendChild(this._createSelectionElement(Pe,Ie,Ze));var qe=Ae-Pe-1;if(Oe.appendChild(this._createSelectionElement(Pe+1,0,this._bufferService.cols,qe)),Pe!==Ae){var Je=ve===Ae?ae[0]:this._bufferService.cols;Oe.appendChild(this._createSelectionElement(Ae,0,Je))}}this._selectionContainer.appendChild(Oe)}}},oe.prototype._createSelectionElement=function(re,ae,le,me){me===void 0&&(me=1);var ve=document.createElement("div");return ve.style.height=me*this.dimensions.actualCellHeight+"px",ve.style.top=re*this.dimensions.actualCellHeight+"px",ve.style.left=ae*this.dimensions.actualCellWidth+"px",ve.style.width=this.dimensions.actualCellWidth*(le-ae)+"px",ve},oe.prototype.onCursorMove=function(){},oe.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},oe.prototype.clear=function(){for(var re=0,ae=this._rowElements;re<ae.length;re++)ae[re].innerHTML=""},oe.prototype.renderRows=function(re,ae){for(var le=this._bufferService.buffer.ybase+this._bufferService.buffer.y,me=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),ve=this._optionsService.options.cursorBlink,Pe=re;Pe<=ae;Pe++){var Ae=this._rowElements[Pe];Ae.innerHTML="";var Oe=Pe+this._bufferService.buffer.ydisp,Ie=this._bufferService.buffer.lines.get(Oe),Ze=this._optionsService.options.cursorStyle;Ae.appendChild(this._rowFactory.createRow(Ie,Oe===le,Ze,me,ve,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(oe.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),oe.prototype.registerCharacterJoiner=function(re){return-1},oe.prototype.deregisterCharacterJoiner=function(re){return!1},oe.prototype._onLinkHover=function(re){this._setCellUnderline(re.x1,re.x2,re.y1,re.y2,re.cols,!0)},oe.prototype._onLinkLeave=function(re){this._setCellUnderline(re.x1,re.x2,re.y1,re.y2,re.cols,!1)},oe.prototype._setCellUnderline=function(re,ae,le,me,ve,Pe){for(;re!==ae||le!==me;){var Ae=this._rowElements[le];if(!Ae)return;var Oe=Ae.children[re];Oe&&(Oe.style.textDecoration=Pe?"underline":"none"),++re>=ve&&(re=0,le++)}},oe=Le([Ce(6,we.ICharSizeService),Ce(7,pe.IOptionsService),Ce(8,pe.IBufferService)],oe)}(ye.Disposable);Re.DomRenderer=ee},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.DomRendererRowFactory=Re.CURSOR_STYLE_UNDERLINE_CLASS=Re.CURSOR_STYLE_BAR_CLASS=Re.CURSOR_STYLE_BLOCK_CLASS=Re.CURSOR_BLINK_CLASS=Re.CURSOR_CLASS=Re.UNDERLINE_CLASS=Re.ITALIC_CLASS=Re.DIM_CLASS=Re.BOLD_CLASS=void 0;var Se=ke(9),Be=ke(3),Le=ke(4),Ce=ke(10);Re.BOLD_CLASS="xterm-bold",Re.DIM_CLASS="xterm-dim",Re.ITALIC_CLASS="xterm-italic",Re.UNDERLINE_CLASS="xterm-underline",Re.CURSOR_CLASS="xterm-cursor",Re.CURSOR_BLINK_CLASS="xterm-cursor-blink",Re.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",Re.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",Re.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var xe=function(){function ye(we,pe,de){this._document=we,this._optionsService=pe,this._colors=de,this._workCell=new Le.CellData}return ye.prototype.setColors=function(we){this._colors=we},ye.prototype.createRow=function(we,pe,de,ge,fe,ue,ee){for(var z=this._document.createDocumentFragment(),oe=0,re=Math.min(we.length,ee)-1;re>=0;re--)if(we.loadCell(re,this._workCell).getCode()!==Be.NULL_CELL_CODE||pe&&re===ge){oe=re+1;break}for(re=0;re<oe;re++){we.loadCell(re,this._workCell);var ae=this._workCell.getWidth();if(ae!==0){var le=this._document.createElement("span");if(ae>1&&(le.style.width=ue*ae+"px"),pe&&re===ge)switch(le.classList.add(Re.CURSOR_CLASS),fe&&le.classList.add(Re.CURSOR_BLINK_CLASS),de){case"bar":le.classList.add(Re.CURSOR_STYLE_BAR_CLASS);break;case"underline":le.classList.add(Re.CURSOR_STYLE_UNDERLINE_CLASS);break;default:le.classList.add(Re.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&le.classList.add(Re.BOLD_CLASS),this._workCell.isItalic()&&le.classList.add(Re.ITALIC_CLASS),this._workCell.isDim()&&le.classList.add(Re.DIM_CLASS),this._workCell.isUnderline()&&le.classList.add(Re.UNDERLINE_CLASS),this._workCell.isInvisible()?le.textContent=Be.WHITESPACE_CELL_CHAR:le.textContent=this._workCell.getChars()||Be.WHITESPACE_CELL_CHAR;var me=this._workCell.getFgColor(),ve=this._workCell.getFgColorMode(),Pe=this._workCell.getBgColor(),Ae=this._workCell.getBgColorMode(),Oe=!!this._workCell.isInverse();if(Oe){var Ie=me;me=Pe,Pe=Ie;var Ze=ve;ve=Ae,Ae=Ze}switch(ve){case 16777216:case 33554432:this._workCell.isBold()&&me<8&&this._optionsService.options.drawBoldTextInBrightColors&&(me+=8),this._applyMinimumContrast(le,this._colors.background,this._colors.ansi[me])||le.classList.add("xterm-fg-"+me);break;case 50331648:var qe=Ce.rgba.toColor(me>>16&255,me>>8&255,255&me);this._applyMinimumContrast(le,this._colors.background,qe)||this._addStyle(le,"color:#"+be(me.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(le,this._colors.background,this._colors.foreground)||Oe&&le.classList.add("xterm-fg-"+Se.INVERTED_DEFAULT_COLOR)}switch(Ae){case 16777216:case 33554432:le.classList.add("xterm-bg-"+Pe);break;case 50331648:this._addStyle(le,"background-color:#"+be(Pe.toString(16),"0",6));break;case 0:default:Oe&&le.classList.add("xterm-bg-"+Se.INVERTED_DEFAULT_COLOR)}z.appendChild(le)}}return z},ye.prototype._applyMinimumContrast=function(we,pe,de){if(this._optionsService.options.minimumContrastRatio===1)return!1;var ge=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return ge===void 0&&(ge=Ce.color.ensureContrastRatio(pe,de,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,ge!=null?ge:null)),!!ge&&(this._addStyle(we,"color:"+ge.css),!0)},ye.prototype._addStyle=function(we,pe){we.setAttribute("style",""+(we.getAttribute("style")||"")+pe+";")},ye}();function be(ye,we,pe){for(;ye.length<pe;)ye=we+ye;return ye}Re.DomRendererRowFactory=xe},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.evaluateKeyboardEvent=void 0;var Se=ke(12),Be={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};Re.evaluateKeyboardEvent=function(Le,Ce,xe,be){var ye={type:0,cancel:!1,key:void 0},we=(Le.shiftKey?1:0)|(Le.altKey?2:0)|(Le.ctrlKey?4:0)|(Le.metaKey?8:0);switch(Le.keyCode){case 0:Le.key==="UIKeyInputUpArrow"?ye.key=Ce?Se.C0.ESC+"OA":Se.C0.ESC+"[A":Le.key==="UIKeyInputLeftArrow"?ye.key=Ce?Se.C0.ESC+"OD":Se.C0.ESC+"[D":Le.key==="UIKeyInputRightArrow"?ye.key=Ce?Se.C0.ESC+"OC":Se.C0.ESC+"[C":Le.key==="UIKeyInputDownArrow"&&(ye.key=Ce?Se.C0.ESC+"OB":Se.C0.ESC+"[B");break;case 8:if(Le.shiftKey){ye.key=Se.C0.BS;break}if(Le.altKey){ye.key=Se.C0.ESC+Se.C0.DEL;break}ye.key=Se.C0.DEL;break;case 9:if(Le.shiftKey){ye.key=Se.C0.ESC+"[Z";break}ye.key=Se.C0.HT,ye.cancel=!0;break;case 13:ye.key=Le.altKey?Se.C0.ESC+Se.C0.CR:Se.C0.CR,ye.cancel=!0;break;case 27:ye.key=Se.C0.ESC,Le.altKey&&(ye.key=Se.C0.ESC+Se.C0.ESC),ye.cancel=!0;break;case 37:if(Le.metaKey)break;we?(ye.key=Se.C0.ESC+"[1;"+(we+1)+"D",ye.key===Se.C0.ESC+"[1;3D"&&(ye.key=Se.C0.ESC+(xe?"b":"[1;5D"))):ye.key=Ce?Se.C0.ESC+"OD":Se.C0.ESC+"[D";break;case 39:if(Le.metaKey)break;we?(ye.key=Se.C0.ESC+"[1;"+(we+1)+"C",ye.key===Se.C0.ESC+"[1;3C"&&(ye.key=Se.C0.ESC+(xe?"f":"[1;5C"))):ye.key=Ce?Se.C0.ESC+"OC":Se.C0.ESC+"[C";break;case 38:if(Le.metaKey)break;we?(ye.key=Se.C0.ESC+"[1;"+(we+1)+"A",xe||ye.key!==Se.C0.ESC+"[1;3A"||(ye.key=Se.C0.ESC+"[1;5A")):ye.key=Ce?Se.C0.ESC+"OA":Se.C0.ESC+"[A";break;case 40:if(Le.metaKey)break;we?(ye.key=Se.C0.ESC+"[1;"+(we+1)+"B",xe||ye.key!==Se.C0.ESC+"[1;3B"||(ye.key=Se.C0.ESC+"[1;5B")):ye.key=Ce?Se.C0.ESC+"OB":Se.C0.ESC+"[B";break;case 45:Le.shiftKey||Le.ctrlKey||(ye.key=Se.C0.ESC+"[2~");break;case 46:ye.key=we?Se.C0.ESC+"[3;"+(we+1)+"~":Se.C0.ESC+"[3~";break;case 36:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"H":Ce?Se.C0.ESC+"OH":Se.C0.ESC+"[H";break;case 35:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"F":Ce?Se.C0.ESC+"OF":Se.C0.ESC+"[F";break;case 33:Le.shiftKey?ye.type=2:ye.key=Se.C0.ESC+"[5~";break;case 34:Le.shiftKey?ye.type=3:ye.key=Se.C0.ESC+"[6~";break;case 112:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"P":Se.C0.ESC+"OP";break;case 113:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"Q":Se.C0.ESC+"OQ";break;case 114:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"R":Se.C0.ESC+"OR";break;case 115:ye.key=we?Se.C0.ESC+"[1;"+(we+1)+"S":Se.C0.ESC+"OS";break;case 116:ye.key=we?Se.C0.ESC+"[15;"+(we+1)+"~":Se.C0.ESC+"[15~";break;case 117:ye.key=we?Se.C0.ESC+"[17;"+(we+1)+"~":Se.C0.ESC+"[17~";break;case 118:ye.key=we?Se.C0.ESC+"[18;"+(we+1)+"~":Se.C0.ESC+"[18~";break;case 119:ye.key=we?Se.C0.ESC+"[19;"+(we+1)+"~":Se.C0.ESC+"[19~";break;case 120:ye.key=we?Se.C0.ESC+"[20;"+(we+1)+"~":Se.C0.ESC+"[20~";break;case 121:ye.key=we?Se.C0.ESC+"[21;"+(we+1)+"~":Se.C0.ESC+"[21~";break;case 122:ye.key=we?Se.C0.ESC+"[23;"+(we+1)+"~":Se.C0.ESC+"[23~";break;case 123:ye.key=we?Se.C0.ESC+"[24;"+(we+1)+"~":Se.C0.ESC+"[24~";break;default:if(!Le.ctrlKey||Le.shiftKey||Le.altKey||Le.metaKey)if(xe&&!be||!Le.altKey||Le.metaKey)xe&&!Le.altKey&&!Le.ctrlKey&&Le.metaKey?Le.keyCode===65&&(ye.type=1):Le.key&&!Le.ctrlKey&&!Le.altKey&&!Le.metaKey&&Le.keyCode>=48&&Le.key.length===1?ye.key=Le.key:Le.key&&Le.ctrlKey&&Le.key==="_"&&(ye.key=Se.C0.US);else{var pe=Be[Le.keyCode],de=pe&&pe[Le.shiftKey?1:0];if(de)ye.key=Se.C0.ESC+de;else if(Le.keyCode>=65&&Le.keyCode<=90){var ge=Le.ctrlKey?Le.keyCode-64:Le.keyCode+32;ye.key=Se.C0.ESC+String.fromCharCode(ge)}}else Le.keyCode>=65&&Le.keyCode<=90?ye.key=String.fromCharCode(Le.keyCode-64):Le.keyCode===32?ye.key=Se.C0.NUL:Le.keyCode>=51&&Le.keyCode<=55?ye.key=String.fromCharCode(Le.keyCode-51+27):Le.keyCode===56?ye.key=Se.C0.DEL:Le.keyCode===219?ye.key=Se.C0.ESC:Le.keyCode===220?ye.key=Se.C0.FS:Le.keyCode===221&&(ye.key=Se.C0.GS)}return ye}},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(ue,ee){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,oe){z.__proto__=oe}||function(z,oe){for(var re in oe)oe.hasOwnProperty(re)&&(z[re]=oe[re])})(ue,ee)},function(ue,ee){function z(){this.constructor=ue}Se(ue,ee),ue.prototype=ee===null?Object.create(ee):(z.prototype=ee.prototype,new z)}),Le=this&&this.__decorate||function(ue,ee,z,oe){var re,ae=arguments.length,le=ae<3?ee:oe===null?oe=Object.getOwnPropertyDescriptor(ee,z):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(ue,ee,z,oe);else for(var me=ue.length-1;me>=0;me--)(re=ue[me])&&(le=(ae<3?re(le):ae>3?re(ee,z,le):re(ee,z))||le);return ae>3&&le&&Object.defineProperty(ee,z,le),le},Ce=this&&this.__param||function(ue,ee){return function(z,oe){ee(z,oe,ue)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.RenderService=void 0;var xe=ke(31),be=ke(0),ye=ke(2),we=ke(32),pe=ke(7),de=ke(1),ge=ke(5),fe=function(ue){function ee(z,oe,re,ae,le,me){var ve=ue.call(this)||this;if(ve._renderer=z,ve._rowCount=oe,ve._isPaused=!1,ve._needsFullRefresh=!1,ve._isNextRenderRedrawOnly=!0,ve._needsSelectionRefresh=!1,ve._canvasWidth=0,ve._canvasHeight=0,ve._selectionState={start:void 0,end:void 0,columnSelectMode:!1},ve._onDimensionsChange=new be.EventEmitter,ve._onRender=new be.EventEmitter,ve._onRefreshRequest=new be.EventEmitter,ve.register({dispose:function(){return ve._renderer.dispose()}}),ve._renderDebouncer=new xe.RenderDebouncer(function(Ae,Oe){return ve._renderRows(Ae,Oe)}),ve.register(ve._renderDebouncer),ve._screenDprMonitor=new we.ScreenDprMonitor,ve._screenDprMonitor.setListener(function(){return ve.onDevicePixelRatioChange()}),ve.register(ve._screenDprMonitor),ve.register(me.onResize(function(Ae){return ve._fullRefresh()})),ve.register(ae.onOptionChange(function(){return ve._renderer.onOptionsChanged()})),ve.register(le.onCharSizeChange(function(){return ve.onCharSizeChanged()})),ve._renderer.onRequestRedraw(function(Ae){return ve.refreshRows(Ae.start,Ae.end,!0)}),ve.register(pe.addDisposableDomListener(window,"resize",function(){return ve.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var Pe=new IntersectionObserver(function(Ae){return ve._onIntersectionChange(Ae[Ae.length-1])},{threshold:0});Pe.observe(re),ve.register({dispose:function(){return Pe.disconnect()}})}return ve}return Be(ee,ue),Object.defineProperty(ee.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),ee.prototype._onIntersectionChange=function(z){this._isPaused=z.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},ee.prototype.refreshRows=function(z,oe,re){re===void 0&&(re=!1),this._isPaused?this._needsFullRefresh=!0:(re||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(z,oe,this._rowCount))},ee.prototype._renderRows=function(z,oe){this._renderer.renderRows(z,oe),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:z,end:oe}),this._isNextRenderRedrawOnly=!0},ee.prototype.resize=function(z,oe){this._rowCount=oe,this._fireOnCanvasResize()},ee.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},ee.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},ee.prototype.dispose=function(){ue.prototype.dispose.call(this)},ee.prototype.setRenderer=function(z){var oe=this;this._renderer.dispose(),this._renderer=z,this._renderer.onRequestRedraw(function(re){return oe.refreshRows(re.start,re.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},ee.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},ee.prototype.setColors=function(z){this._renderer.setColors(z),this._fullRefresh()},ee.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},ee.prototype.onResize=function(z,oe){this._renderer.onResize(z,oe),this._fullRefresh()},ee.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},ee.prototype.onBlur=function(){this._renderer.onBlur()},ee.prototype.onFocus=function(){this._renderer.onFocus()},ee.prototype.onSelectionChanged=function(z,oe,re){this._selectionState.start=z,this._selectionState.end=oe,this._selectionState.columnSelectMode=re,this._renderer.onSelectionChanged(z,oe,re)},ee.prototype.onCursorMove=function(){this._renderer.onCursorMove()},ee.prototype.clear=function(){this._renderer.clear()},ee.prototype.registerCharacterJoiner=function(z){return this._renderer.registerCharacterJoiner(z)},ee.prototype.deregisterCharacterJoiner=function(z){return this._renderer.deregisterCharacterJoiner(z)},ee=Le([Ce(3,de.IOptionsService),Ce(4,ge.ICharSizeService),Ce(5,de.IBufferService)],ee)}(ye.Disposable);Re.RenderService=fe},function(un,Re,ke){"use strict";var Se=this&&this.__decorate||function(ye,we,pe,de){var ge,fe=arguments.length,ue=fe<3?we:de===null?de=Object.getOwnPropertyDescriptor(we,pe):de;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(ye,we,pe,de);else for(var ee=ye.length-1;ee>=0;ee--)(ge=ye[ee])&&(ue=(fe<3?ge(ue):fe>3?ge(we,pe,ue):ge(we,pe))||ue);return fe>3&&ue&&Object.defineProperty(we,pe,ue),ue},Be=this&&this.__param||function(ye,we){return function(pe,de){we(pe,de,ye)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.CharSizeService=void 0;var Le=ke(1),Ce=ke(0),xe=function(){function ye(we,pe,de){this._optionsService=de,this.width=0,this.height=0,this._onCharSizeChange=new Ce.EventEmitter,this._measureStrategy=new be(we,pe,this._optionsService)}return Object.defineProperty(ye.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),ye.prototype.measure=function(){var we=this._measureStrategy.measure();we.width===this.width&&we.height===this.height||(this.width=we.width,this.height=we.height,this._onCharSizeChange.fire())},ye=Se([Be(2,Le.IOptionsService)],ye)}();Re.CharSizeService=xe;var be=function(){function ye(we,pe,de){this._document=we,this._parentElement=pe,this._optionsService=de,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return ye.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var we=this._measureElement.getBoundingClientRect();return we.width!==0&&we.height!==0&&(this._result.width=we.width,this._result.height=Math.ceil(we.height)),this._result},ye}()},function(un,Re,ke){"use strict";var Se=this&&this.__decorate||function(be,ye,we,pe){var de,ge=arguments.length,fe=ge<3?ye:pe===null?pe=Object.getOwnPropertyDescriptor(ye,we):pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(be,ye,we,pe);else for(var ue=be.length-1;ue>=0;ue--)(de=be[ue])&&(fe=(ge<3?de(fe):ge>3?de(ye,we,fe):de(ye,we))||fe);return ge>3&&fe&&Object.defineProperty(ye,we,fe),fe},Be=this&&this.__param||function(be,ye){return function(we,pe){ye(we,pe,be)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.MouseService=void 0;var Le=ke(5),Ce=ke(30),xe=function(){function be(ye,we){this._renderService=ye,this._charSizeService=we}return be.prototype.getCoords=function(ye,we,pe,de,ge){return Ce.getCoords(ye,we,pe,de,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,ge)},be.prototype.getRawByteCoords=function(ye,we,pe,de){var ge=this.getCoords(ye,we,pe,de);return Ce.getRawByteCoords(ge)},be=Se([Be(0,Le.IRenderService),Be(1,Le.ICharSizeService)],be)}();Re.MouseService=xe},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)}),Le=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},Ce=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.Linkifier2=void 0;var xe=ke(1),be=ke(0),ye=ke(2),we=ke(7),pe=function(de){function ge(fe){var ue=de.call(this)||this;return ue._bufferService=fe,ue._linkProviders=[],ue._linkCacheDisposables=[],ue._isMouseOut=!0,ue._activeLine=-1,ue._onShowLinkUnderline=ue.register(new be.EventEmitter),ue._onHideLinkUnderline=ue.register(new be.EventEmitter),ue.register(ye.getDisposeArrayDisposable(ue._linkCacheDisposables)),ue}return Be(ge,de),Object.defineProperty(ge.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),ge.prototype.registerLinkProvider=function(fe){var ue=this;return this._linkProviders.push(fe),{dispose:function(){var ee=ue._linkProviders.indexOf(fe);ee!==-1&&ue._linkProviders.splice(ee,1)}}},ge.prototype.attachToDom=function(fe,ue,ee){var z=this;this._element=fe,this._mouseService=ue,this._renderService=ee,this.register(we.addDisposableDomListener(this._element,"mouseleave",function(){z._isMouseOut=!0,z._clearCurrentLink()})),this.register(we.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(we.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},ge.prototype._onMouseMove=function(fe){if(this._lastMouseEvent=fe,this._element&&this._mouseService){var ue=this._positionFromMouseEvent(fe,this._element,this._mouseService);if(ue){this._isMouseOut=!1;for(var ee=fe.composedPath(),z=0;z<ee.length;z++){var oe=ee[z];if(oe.classList.contains("xterm"))break;if(oe.classList.contains("xterm-hover"))return}this._lastBufferCell&&ue.x===this._lastBufferCell.x&&ue.y===this._lastBufferCell.y||(this._onHover(ue),this._lastBufferCell=ue)}}},ge.prototype._onHover=function(fe){if(this._activeLine!==fe.y)return this._clearCurrentLink(),void this._askForLink(fe,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,fe)||(this._clearCurrentLink(),this._askForLink(fe,!0))},ge.prototype._askForLink=function(fe,ue){var ee=this;this._activeProviderReplies&&ue||(this._activeProviderReplies=new Map,this._activeLine=fe.y);var z=!1;this._linkProviders.forEach(function(oe,re){var ae;ue?!((ae=ee._activeProviderReplies)===null||ae===void 0)&&ae.get(re)&&(z=ee._checkLinkProviderResult(re,fe,z)):oe.provideLinks(fe.y,function(le){var me,ve;if(!ee._isMouseOut){var Pe=le==null?void 0:le.map(function(Ae){return{link:Ae}});(me=ee._activeProviderReplies)===null||me===void 0||me.set(re,Pe),z=ee._checkLinkProviderResult(re,fe,z),((ve=ee._activeProviderReplies)===null||ve===void 0?void 0:ve.size)===ee._linkProviders.length&&ee._removeIntersectingLinks(fe.y,ee._activeProviderReplies)}})})},ge.prototype._removeIntersectingLinks=function(fe,ue){for(var ee=new Set,z=0;z<ue.size;z++){var oe=ue.get(z);if(oe)for(var re=0;re<oe.length;re++)for(var ae=oe[re],le=ae.link.range.start.y<fe?0:ae.link.range.start.x,me=ae.link.range.end.y>fe?this._bufferService.cols:ae.link.range.end.x,ve=le;ve<=me;ve++){if(ee.has(ve)){oe.splice(re--,1);break}ee.add(ve)}}},ge.prototype._checkLinkProviderResult=function(fe,ue,ee){var z,oe=this;if(!this._activeProviderReplies)return ee;for(var re=this._activeProviderReplies.get(fe),ae=!1,le=0;le<fe;le++)this._activeProviderReplies.has(le)&&!this._activeProviderReplies.get(le)||(ae=!0);if(!ae&&re){var me=re.find(function(Pe){return oe._linkAtPosition(Pe.link,ue)});me&&(ee=!0,this._handleNewLink(me))}if(this._activeProviderReplies.size===this._linkProviders.length&&!ee)for(le=0;le<this._activeProviderReplies.size;le++){var ve=(z=this._activeProviderReplies.get(le))===null||z===void 0?void 0:z.find(function(Pe){return oe._linkAtPosition(Pe.link,ue)});if(ve){ee=!0,this._handleNewLink(ve);break}}return ee},ge.prototype._onClick=function(fe){if(this._element&&this._mouseService&&this._currentLink){var ue=this._positionFromMouseEvent(fe,this._element,this._mouseService);ue&&this._linkAtPosition(this._currentLink.link,ue)&&this._currentLink.link.activate(fe,this._currentLink.link.text)}},ge.prototype._clearCurrentLink=function(fe,ue){this._element&&this._currentLink&&this._lastMouseEvent&&(!fe||!ue||this._currentLink.link.range.start.y>=fe&&this._currentLink.link.range.end.y<=ue)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ye.disposeArray(this._linkCacheDisposables))},ge.prototype._handleNewLink=function(fe){var ue=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var ee=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);ee&&this._linkAtPosition(fe.link,ee)&&(this._currentLink=fe,this._currentLink.state={decorations:{underline:fe.link.decorations===void 0||fe.link.decorations.underline,pointerCursor:fe.link.decorations===void 0||fe.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,fe.link,this._lastMouseEvent),fe.link.decorations={},Object.defineProperties(fe.link.decorations,{pointerCursor:{get:function(){var z,oe;return(oe=(z=ue._currentLink)===null||z===void 0?void 0:z.state)===null||oe===void 0?void 0:oe.decorations.pointerCursor},set:function(z){var oe,re;!((oe=ue._currentLink)===null||oe===void 0)&&oe.state&&ue._currentLink.state.decorations.pointerCursor!==z&&(ue._currentLink.state.decorations.pointerCursor=z,ue._currentLink.state.isHovered&&((re=ue._element)===null||re===void 0||re.classList.toggle("xterm-cursor-pointer",z)))}},underline:{get:function(){var z,oe;return(oe=(z=ue._currentLink)===null||z===void 0?void 0:z.state)===null||oe===void 0?void 0:oe.decorations.underline},set:function(z){var oe,re,ae;!((oe=ue._currentLink)===null||oe===void 0)&&oe.state&&((ae=(re=ue._currentLink)===null||re===void 0?void 0:re.state)===null||ae===void 0?void 0:ae.decorations.underline)!==z&&(ue._currentLink.state.decorations.underline=z,ue._currentLink.state.isHovered&&ue._fireUnderlineEvent(fe.link,z))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(z){var oe=z.start===0?0:z.start+1+ue._bufferService.buffer.ydisp;ue._clearCurrentLink(oe,z.end+1+ue._bufferService.buffer.ydisp)})))}},ge.prototype._linkHover=function(fe,ue,ee){var z;!((z=this._currentLink)===null||z===void 0)&&z.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ue,!0),this._currentLink.state.decorations.pointerCursor&&fe.classList.add("xterm-cursor-pointer")),ue.hover&&ue.hover(ee,ue.text)},ge.prototype._fireUnderlineEvent=function(fe,ue){var ee=fe.range,z=this._bufferService.buffer.ydisp,oe=this._createLinkUnderlineEvent(ee.start.x-1,ee.start.y-z-1,ee.end.x,ee.end.y-z-1,void 0);(ue?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(oe)},ge.prototype._linkLeave=function(fe,ue,ee){var z;!((z=this._currentLink)===null||z===void 0)&&z.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ue,!1),this._currentLink.state.decorations.pointerCursor&&fe.classList.remove("xterm-cursor-pointer")),ue.leave&&ue.leave(ee,ue.text)},ge.prototype._linkAtPosition=function(fe,ue){var ee=fe.range.start.y===fe.range.end.y,z=fe.range.start.y<ue.y,oe=fe.range.end.y>ue.y;return(ee&&fe.range.start.x<=ue.x&&fe.range.end.x>=ue.x||z&&fe.range.end.x>=ue.x||oe&&fe.range.start.x<=ue.x||z&&oe)&&fe.range.start.y<=ue.y&&fe.range.end.y>=ue.y},ge.prototype._positionFromMouseEvent=function(fe,ue,ee){var z=ee.getCoords(fe,ue,this._bufferService.cols,this._bufferService.rows);if(z)return{x:z[0],y:z[1]+this._bufferService.buffer.ydisp}},ge.prototype._createLinkUnderlineEvent=function(fe,ue,ee,z,oe){return{x1:fe,y1:ue,x2:ee,y2:z,cols:this._bufferService.cols,fg:oe}},ge=Le([Ce(0,xe.IBufferService)],ge)}(ye.Disposable);Re.Linkifier2=pe},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.CoreBrowserService=void 0;var Se=function(){function Be(Le){this._textarea=Le}return Object.defineProperty(Be.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Be}();Re.CoreBrowserService=Se},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(le,me){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,Pe){ve.__proto__=Pe}||function(ve,Pe){for(var Ae in Pe)Pe.hasOwnProperty(Ae)&&(ve[Ae]=Pe[Ae])})(le,me)},function(le,me){function ve(){this.constructor=le}Se(le,me),le.prototype=me===null?Object.create(me):(ve.prototype=me.prototype,new ve)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.CoreTerminal=void 0;var Le=ke(2),Ce=ke(1),xe=ke(66),be=ke(67),ye=ke(68),we=ke(74),pe=ke(75),de=ke(0),ge=ke(76),fe=ke(77),ue=ke(78),ee=ke(80),z=ke(81),oe=ke(19),re=ke(82),ae=function(le){function me(ve){var Pe=le.call(this)||this;return Pe._onBinary=new de.EventEmitter,Pe._onData=new de.EventEmitter,Pe._onLineFeed=new de.EventEmitter,Pe._onResize=new de.EventEmitter,Pe._onScroll=new de.EventEmitter,Pe._instantiationService=new xe.InstantiationService,Pe.optionsService=new we.OptionsService(ve),Pe._instantiationService.setService(Ce.IOptionsService,Pe.optionsService),Pe._bufferService=Pe.register(Pe._instantiationService.createInstance(ye.BufferService)),Pe._instantiationService.setService(Ce.IBufferService,Pe._bufferService),Pe._logService=Pe._instantiationService.createInstance(be.LogService),Pe._instantiationService.setService(Ce.ILogService,Pe._logService),Pe._coreService=Pe.register(Pe._instantiationService.createInstance(pe.CoreService,function(){return Pe.scrollToBottom()})),Pe._instantiationService.setService(Ce.ICoreService,Pe._coreService),Pe._coreMouseService=Pe._instantiationService.createInstance(ge.CoreMouseService),Pe._instantiationService.setService(Ce.ICoreMouseService,Pe._coreMouseService),Pe._dirtyRowService=Pe._instantiationService.createInstance(fe.DirtyRowService),Pe._instantiationService.setService(Ce.IDirtyRowService,Pe._dirtyRowService),Pe.unicodeService=Pe._instantiationService.createInstance(ue.UnicodeService),Pe._instantiationService.setService(Ce.IUnicodeService,Pe.unicodeService),Pe._charsetService=Pe._instantiationService.createInstance(ee.CharsetService),Pe._instantiationService.setService(Ce.ICharsetService,Pe._charsetService),Pe._inputHandler=new oe.InputHandler(Pe._bufferService,Pe._charsetService,Pe._coreService,Pe._dirtyRowService,Pe._logService,Pe.optionsService,Pe._coreMouseService,Pe.unicodeService),Pe.register(de.forwardEvent(Pe._inputHandler.onLineFeed,Pe._onLineFeed)),Pe.register(Pe._inputHandler),Pe.register(de.forwardEvent(Pe._bufferService.onResize,Pe._onResize)),Pe.register(de.forwardEvent(Pe._coreService.onData,Pe._onData)),Pe.register(de.forwardEvent(Pe._coreService.onBinary,Pe._onBinary)),Pe.register(Pe.optionsService.onOptionChange(function(Ae){return Pe._updateOptions(Ae)})),Pe._writeBuffer=new re.WriteBuffer(function(Ae){return Pe._inputHandler.parse(Ae)}),Pe}return Be(me,le),Object.defineProperty(me.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),me.prototype.dispose=function(){var ve;this._isDisposed||(le.prototype.dispose.call(this),(ve=this._windowsMode)===null||ve===void 0||ve.dispose(),this._windowsMode=void 0)},me.prototype.write=function(ve,Pe){this._writeBuffer.write(ve,Pe)},me.prototype.writeSync=function(ve){this._writeBuffer.writeSync(ve)},me.prototype.resize=function(ve,Pe){isNaN(ve)||isNaN(Pe)||(ve=Math.max(ve,ye.MINIMUM_COLS),Pe=Math.max(Pe,ye.MINIMUM_ROWS),this._bufferService.resize(ve,Pe))},me.prototype.scroll=function(ve,Pe){Pe===void 0&&(Pe=!1);var Ae,Oe=this._bufferService.buffer;(Ae=this._cachedBlankLine)&&Ae.length===this.cols&&Ae.getFg(0)===ve.fg&&Ae.getBg(0)===ve.bg||(Ae=Oe.getBlankLine(ve,Pe),this._cachedBlankLine=Ae),Ae.isWrapped=Pe;var Ie=Oe.ybase+Oe.scrollTop,Ze=Oe.ybase+Oe.scrollBottom;if(Oe.scrollTop===0){var qe=Oe.lines.isFull;Ze===Oe.lines.length-1?qe?Oe.lines.recycle().copyFrom(Ae):Oe.lines.push(Ae.clone()):Oe.lines.splice(Ze+1,0,Ae.clone()),qe?this._bufferService.isUserScrolling&&(Oe.ydisp=Math.max(Oe.ydisp-1,0)):(Oe.ybase++,this._bufferService.isUserScrolling||Oe.ydisp++)}else{var Je=Ze-Ie+1;Oe.lines.shiftElements(Ie+1,Je-1,-1),Oe.lines.set(Ze,Ae.clone())}this._bufferService.isUserScrolling||(Oe.ydisp=Oe.ybase),this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom),this._onScroll.fire(Oe.ydisp)},me.prototype.scrollLines=function(ve,Pe){var Ae=this._bufferService.buffer;if(ve<0){if(Ae.ydisp===0)return;this._bufferService.isUserScrolling=!0}else ve+Ae.ydisp>=Ae.ybase&&(this._bufferService.isUserScrolling=!1);var Oe=Ae.ydisp;Ae.ydisp=Math.max(Math.min(Ae.ydisp+ve,Ae.ybase),0),Oe!==Ae.ydisp&&(Pe||this._onScroll.fire(Ae.ydisp))},me.prototype.scrollPages=function(ve){this.scrollLines(ve*(this.rows-1))},me.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},me.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},me.prototype.scrollToLine=function(ve){var Pe=ve-this._bufferService.buffer.ydisp;Pe!==0&&this.scrollLines(Pe)},me.prototype.addEscHandler=function(ve,Pe){return this._inputHandler.addEscHandler(ve,Pe)},me.prototype.addDcsHandler=function(ve,Pe){return this._inputHandler.addDcsHandler(ve,Pe)},me.prototype.addCsiHandler=function(ve,Pe){return this._inputHandler.addCsiHandler(ve,Pe)},me.prototype.addOscHandler=function(ve,Pe){return this._inputHandler.addOscHandler(ve,Pe)},me.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},me.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},me.prototype._updateOptions=function(ve){var Pe;switch(ve){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((Pe=this._windowsMode)===null||Pe===void 0||Pe.dispose(),this._windowsMode=void 0)}},me.prototype._enableWindowsMode=function(){var ve=this;if(!this._windowsMode){var Pe=[];Pe.push(this.onLineFeed(z.updateWindowsModeWrappedState.bind(null,this._bufferService))),Pe.push(this.addCsiHandler({final:"H"},function(){return z.updateWindowsModeWrappedState(ve._bufferService),!1})),this._windowsMode={dispose:function(){for(var Ae=0,Oe=Pe;Ae<Oe.length;Ae++)Oe[Ae].dispose()}}}},me}(Le.Disposable);Re.CoreTerminal=ae},function(un,Re,ke){"use strict";var Se=this&&this.__spreadArrays||function(){for(var be=0,ye=0,we=arguments.length;ye<we;ye++)be+=arguments[ye].length;var pe=Array(be),de=0;for(ye=0;ye<we;ye++)for(var ge=arguments[ye],fe=0,ue=ge.length;fe<ue;fe++,de++)pe[de]=ge[fe];return pe};Object.defineProperty(Re,"__esModule",{value:!0}),Re.InstantiationService=Re.ServiceCollection=void 0;var Be=ke(1),Le=ke(14),Ce=function(){function be(){for(var ye=[],we=0;we<arguments.length;we++)ye[we]=arguments[we];this._entries=new Map;for(var pe=0,de=ye;pe<de.length;pe++){var ge=de[pe],fe=ge[0],ue=ge[1];this.set(fe,ue)}}return be.prototype.set=function(ye,we){var pe=this._entries.get(ye);return this._entries.set(ye,we),pe},be.prototype.forEach=function(ye){this._entries.forEach(function(we,pe){return ye(pe,we)})},be.prototype.has=function(ye){return this._entries.has(ye)},be.prototype.get=function(ye){return this._entries.get(ye)},be}();Re.ServiceCollection=Ce;var xe=function(){function be(){this._services=new Ce,this._services.set(Be.IInstantiationService,this)}return be.prototype.setService=function(ye,we){this._services.set(ye,we)},be.prototype.getService=function(ye){return this._services.get(ye)},be.prototype.createInstance=function(ye){for(var we=[],pe=1;pe<arguments.length;pe++)we[pe-1]=arguments[pe];for(var de=Le.getServiceDependencies(ye).sort(function(re,ae){return re.index-ae.index}),ge=[],fe=0,ue=de;fe<ue.length;fe++){var ee=ue[fe],z=this._services.get(ee.id);if(!z)throw new Error("[createInstance] "+ye.name+" depends on UNKNOWN service "+ee.id+".");ge.push(z)}var oe=de.length>0?de[0].index:we.length;if(we.length!==oe)throw new Error("[createInstance] First service dependency of "+ye.name+" at position "+(oe+1)+" conflicts with "+we.length+" static arguments");return new(ye.bind.apply(ye,Se([void 0],Se(we,ge))))},be}();Re.InstantiationService=xe},function(un,Re,ke){"use strict";var Se=this&&this.__decorate||function(we,pe,de,ge){var fe,ue=arguments.length,ee=ue<3?pe:ge===null?ge=Object.getOwnPropertyDescriptor(pe,de):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(we,pe,de,ge);else for(var z=we.length-1;z>=0;z--)(fe=we[z])&&(ee=(ue<3?fe(ee):ue>3?fe(pe,de,ee):fe(pe,de))||ee);return ue>3&&ee&&Object.defineProperty(pe,de,ee),ee},Be=this&&this.__param||function(we,pe){return function(de,ge){pe(de,ge,we)}},Le=this&&this.__spreadArrays||function(){for(var we=0,pe=0,de=arguments.length;pe<de;pe++)we+=arguments[pe].length;var ge=Array(we),fe=0;for(pe=0;pe<de;pe++)for(var ue=arguments[pe],ee=0,z=ue.length;ee<z;ee++,fe++)ge[fe]=ue[ee];return ge};Object.defineProperty(Re,"__esModule",{value:!0}),Re.LogService=Re.LogLevel=void 0;var Ce,xe=ke(1);(function(we){we[we.DEBUG=0]="DEBUG",we[we.INFO=1]="INFO",we[we.WARN=2]="WARN",we[we.ERROR=3]="ERROR",we[we.OFF=4]="OFF"})(Ce=Re.LogLevel||(Re.LogLevel={}));var be={debug:Ce.DEBUG,info:Ce.INFO,warn:Ce.WARN,error:Ce.ERROR,off:Ce.OFF},ye=function(){function we(pe){var de=this;this._optionsService=pe,this._updateLogLevel(),this._optionsService.onOptionChange(function(ge){ge==="logLevel"&&de._updateLogLevel()})}return we.prototype._updateLogLevel=function(){this._logLevel=be[this._optionsService.options.logLevel]},we.prototype._evalLazyOptionalParams=function(pe){for(var de=0;de<pe.length;de++)typeof pe[de]=="function"&&(pe[de]=pe[de]())},we.prototype._log=function(pe,de,ge){this._evalLazyOptionalParams(ge),pe.call.apply(pe,Le([console,"xterm.js: "+de],ge))},we.prototype.debug=function(pe){for(var de=[],ge=1;ge<arguments.length;ge++)de[ge-1]=arguments[ge];this._logLevel<=Ce.DEBUG&&this._log(console.log,pe,de)},we.prototype.info=function(pe){for(var de=[],ge=1;ge<arguments.length;ge++)de[ge-1]=arguments[ge];this._logLevel<=Ce.INFO&&this._log(console.info,pe,de)},we.prototype.warn=function(pe){for(var de=[],ge=1;ge<arguments.length;ge++)de[ge-1]=arguments[ge];this._logLevel<=Ce.WARN&&this._log(console.warn,pe,de)},we.prototype.error=function(pe){for(var de=[],ge=1;ge<arguments.length;ge++)de[ge-1]=arguments[ge];this._logLevel<=Ce.ERROR&&this._log(console.error,pe,de)},we=Se([Be(0,xe.IOptionsService)],we)}();Re.LogService=ye},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(de,ge){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(fe,ue){fe.__proto__=ue}||function(fe,ue){for(var ee in ue)ue.hasOwnProperty(ee)&&(fe[ee]=ue[ee])})(de,ge)},function(de,ge){function fe(){this.constructor=de}Se(de,ge),de.prototype=ge===null?Object.create(ge):(fe.prototype=ge.prototype,new fe)}),Le=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},Ce=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.BufferService=Re.MINIMUM_ROWS=Re.MINIMUM_COLS=void 0;var xe=ke(1),be=ke(69),ye=ke(0),we=ke(2);Re.MINIMUM_COLS=2,Re.MINIMUM_ROWS=1;var pe=function(de){function ge(fe){var ue=de.call(this)||this;return ue._optionsService=fe,ue.isUserScrolling=!1,ue._onResize=new ye.EventEmitter,ue.cols=Math.max(fe.options.cols,Re.MINIMUM_COLS),ue.rows=Math.max(fe.options.rows,Re.MINIMUM_ROWS),ue.buffers=new be.BufferSet(fe,ue),ue}return Be(ge,de),Object.defineProperty(ge.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),ge.prototype.dispose=function(){de.prototype.dispose.call(this),this.buffers.dispose()},ge.prototype.resize=function(fe,ue){this.cols=fe,this.rows=ue,this.buffers.resize(fe,ue),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:fe,rows:ue})},ge.prototype.reset=function(){this.buffers.dispose(),this.buffers=new be.BufferSet(this._optionsService,this),this.isUserScrolling=!1},ge=Le([Ce(0,xe.IOptionsService)],ge)}(we.Disposable);Re.BufferService=pe},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(be,ye){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(we,pe){we.__proto__=pe}||function(we,pe){for(var de in pe)pe.hasOwnProperty(de)&&(we[de]=pe[de])})(be,ye)},function(be,ye){function we(){this.constructor=be}Se(be,ye),be.prototype=ye===null?Object.create(ye):(we.prototype=ye.prototype,new we)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.BufferSet=void 0;var Le=ke(70),Ce=ke(0),xe=function(be){function ye(we,pe){var de=be.call(this)||this;return de._onBufferActivate=de.register(new Ce.EventEmitter),de._normal=new Le.Buffer(!0,we,pe),de._normal.fillViewportRows(),de._alt=new Le.Buffer(!1,we,pe),de._activeBuffer=de._normal,de.setupTabStops(),de}return Be(ye,be),Object.defineProperty(ye.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),ye.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},ye.prototype.activateAltBuffer=function(we){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(we),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},ye.prototype.resize=function(we,pe){this._normal.resize(we,pe),this._alt.resize(we,pe)},ye.prototype.setupTabStops=function(we){this._normal.setupTabStops(we),this._alt.setupTabStops(we)},ye}(ke(2).Disposable);Re.BufferSet=xe},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.BufferStringIterator=Re.Buffer=Re.MAX_BUFFER_SIZE=void 0;var Se=ke(71),Be=ke(16),Le=ke(4),Ce=ke(3),xe=ke(72),be=ke(73),ye=ke(20),we=ke(6);Re.MAX_BUFFER_SIZE=4294967295;var pe=function(){function ge(fe,ue,ee){this._hasScrollback=fe,this._optionsService=ue,this._bufferService=ee,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Be.DEFAULT_ATTR_DATA.clone(),this.savedCharset=ye.DEFAULT_CHARSET,this.markers=[],this._nullCell=Le.CellData.fromCharData([0,Ce.NULL_CELL_CHAR,Ce.NULL_CELL_WIDTH,Ce.NULL_CELL_CODE]),this._whitespaceCell=Le.CellData.fromCharData([0,Ce.WHITESPACE_CELL_CHAR,Ce.WHITESPACE_CELL_WIDTH,Ce.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Se.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return ge.prototype.getNullCell=function(fe){return fe?(this._nullCell.fg=fe.fg,this._nullCell.bg=fe.bg,this._nullCell.extended=fe.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new we.ExtendedAttrs),this._nullCell},ge.prototype.getWhitespaceCell=function(fe){return fe?(this._whitespaceCell.fg=fe.fg,this._whitespaceCell.bg=fe.bg,this._whitespaceCell.extended=fe.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new we.ExtendedAttrs),this._whitespaceCell},ge.prototype.getBlankLine=function(fe,ue){return new Be.BufferLine(this._bufferService.cols,this.getNullCell(fe),ue)},Object.defineProperty(ge.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(ge.prototype,"isCursorInViewport",{get:function(){var fe=this.ybase+this.y-this.ydisp;return fe>=0&&fe<this._rows},enumerable:!1,configurable:!0}),ge.prototype._getCorrectBufferLength=function(fe){if(!this._hasScrollback)return fe;var ue=fe+this._optionsService.options.scrollback;return ue>Re.MAX_BUFFER_SIZE?Re.MAX_BUFFER_SIZE:ue},ge.prototype.fillViewportRows=function(fe){if(this.lines.length===0){fe===void 0&&(fe=Be.DEFAULT_ATTR_DATA);for(var ue=this._rows;ue--;)this.lines.push(this.getBlankLine(fe))}},ge.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Se.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},ge.prototype.resize=function(fe,ue){var ee=this.getNullCell(Be.DEFAULT_ATTR_DATA),z=this._getCorrectBufferLength(ue);if(z>this.lines.maxLength&&(this.lines.maxLength=z),this.lines.length>0){if(this._cols<fe)for(var oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(fe,ee);var re=0;if(this._rows<ue)for(var ae=this._rows;ae<ue;ae++)this.lines.length<ue+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Be.BufferLine(fe,ee)):this.ybase>0&&this.lines.length<=this.ybase+this.y+re+1?(this.ybase--,re++,this.ydisp>0&&this.ydisp--):this.lines.push(new Be.BufferLine(fe,ee)));else for(ae=this._rows;ae>ue;ae--)this.lines.length>ue+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(z<this.lines.maxLength){var le=this.lines.length-z;le>0&&(this.lines.trimStart(le),this.ybase=Math.max(this.ybase-le,0),this.ydisp=Math.max(this.ydisp-le,0),this.savedY=Math.max(this.savedY-le,0)),this.lines.maxLength=z}this.x=Math.min(this.x,fe-1),this.y=Math.min(this.y,ue-1),re&&(this.y+=re),this.savedX=Math.min(this.savedX,fe-1),this.scrollTop=0}if(this.scrollBottom=ue-1,this._isReflowEnabled&&(this._reflow(fe,ue),this._cols>fe))for(oe=0;oe<this.lines.length;oe++)this.lines.get(oe).resize(fe,ee);this._cols=fe,this._rows=ue},Object.defineProperty(ge.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),ge.prototype._reflow=function(fe,ue){this._cols!==fe&&(fe>this._cols?this._reflowLarger(fe,ue):this._reflowSmaller(fe,ue))},ge.prototype._reflowLarger=function(fe,ue){var ee=xe.reflowLargerGetLinesToRemove(this.lines,this._cols,fe,this.ybase+this.y,this.getNullCell(Be.DEFAULT_ATTR_DATA));if(ee.length>0){var z=xe.reflowLargerCreateNewLayout(this.lines,ee);xe.reflowLargerApplyNewLayout(this.lines,z.layout),this._reflowLargerAdjustViewport(fe,ue,z.countRemoved)}},ge.prototype._reflowLargerAdjustViewport=function(fe,ue,ee){for(var z=this.getNullCell(Be.DEFAULT_ATTR_DATA),oe=ee;oe-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ue&&this.lines.push(new Be.BufferLine(fe,z))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-ee,0)},ge.prototype._reflowSmaller=function(fe,ue){for(var ee=this.getNullCell(Be.DEFAULT_ATTR_DATA),z=[],oe=0,re=this.lines.length-1;re>=0;re--){var ae=this.lines.get(re);if(!(!ae||!ae.isWrapped&&ae.getTrimmedLength()<=fe)){for(var le=[ae];ae.isWrapped&&re>0;)ae=this.lines.get(--re),le.unshift(ae);var me=this.ybase+this.y;if(!(me>=re&&me<re+le.length)){var ve=le[le.length-1].getTrimmedLength(),Pe=xe.reflowSmallerGetNewLineLengths(le,this._cols,fe),Ae=Pe.length-le.length,Oe=void 0;Oe=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+Ae):Math.max(0,this.lines.length-this.lines.maxLength+Ae);for(var Ie=[],Ze=0;Ze<Ae;Ze++){var qe=this.getBlankLine(Be.DEFAULT_ATTR_DATA,!0);Ie.push(qe)}Ie.length>0&&(z.push({start:re+le.length+oe,newLines:Ie}),oe+=Ie.length),le.push.apply(le,Ie);var Je=Pe.length-1,mt=Pe[Je];mt===0&&(mt=Pe[--Je]);for(var gt=le.length-Ae-1,Mt=ve;gt>=0;){var at=Math.min(Mt,mt);if(le[Je].copyCellsFrom(le[gt],Mt-at,mt-at,at,!0),(mt-=at)===0&&(mt=Pe[--Je]),(Mt-=at)===0){gt--;var _t=Math.max(gt,0);Mt=xe.getWrappedLineTrimmedLength(le,_t,this._cols)}}for(Ze=0;Ze<le.length;Ze++)Pe[Ze]<fe&&le[Ze].setCell(Pe[Ze],ee);for(var ht=Ae-Oe;ht-- >0;)this.ybase===0?this.y<ue-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+oe)-ue&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+Ae,this.ybase+ue-1)}}}if(z.length>0){var Dt=[],ut=[];for(Ze=0;Ze<this.lines.length;Ze++)ut.push(this.lines.get(Ze));var ot=this.lines.length,ct=ot-1,yt=0,wt=z[yt];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+oe);var xt=0;for(Ze=Math.min(this.lines.maxLength-1,ot+oe-1);Ze>=0;Ze--)if(wt&&wt.start>ct+xt){for(var zt=wt.newLines.length-1;zt>=0;zt--)this.lines.set(Ze--,wt.newLines[zt]);Ze++,Dt.push({index:ct+1,amount:wt.newLines.length}),xt+=wt.newLines.length,wt=z[++yt]}else this.lines.set(Ze,ut[ct--]);var Ut=0;for(Ze=Dt.length-1;Ze>=0;Ze--)Dt[Ze].index+=Ut,this.lines.onInsertEmitter.fire(Dt[Ze]),Ut+=Dt[Ze].amount;var cn=Math.max(0,ot+oe-this.lines.maxLength);cn>0&&this.lines.onTrimEmitter.fire(cn)}},ge.prototype.stringIndexToBufferIndex=function(fe,ue,ee){for(ee===void 0&&(ee=!1);ue;){var z=this.lines.get(fe);if(!z)return[-1,-1];for(var oe=ee?z.getTrimmedLength():z.length,re=0;re<oe;++re)if(z.get(re)[Ce.CHAR_DATA_WIDTH_INDEX]&&(ue-=z.get(re)[Ce.CHAR_DATA_CHAR_INDEX].length||1),ue<0)return[fe,re];fe++}return[fe,0]},ge.prototype.translateBufferLineToString=function(fe,ue,ee,z){ee===void 0&&(ee=0);var oe=this.lines.get(fe);return oe?oe.translateToString(ue,ee,z):""},ge.prototype.getWrappedRangeForLine=function(fe){for(var ue=fe,ee=fe;ue>0&&this.lines.get(ue).isWrapped;)ue--;for(;ee+1<this.lines.length&&this.lines.get(ee+1).isWrapped;)ee++;return{first:ue,last:ee}},ge.prototype.setupTabStops=function(fe){for(fe!=null?this.tabs[fe]||(fe=this.prevStop(fe)):(this.tabs={},fe=0);fe<this._cols;fe+=this._optionsService.options.tabStopWidth)this.tabs[fe]=!0},ge.prototype.prevStop=function(fe){for(fe==null&&(fe=this.x);!this.tabs[--fe]&&fe>0;);return fe>=this._cols?this._cols-1:fe<0?0:fe},ge.prototype.nextStop=function(fe){for(fe==null&&(fe=this.x);!this.tabs[++fe]&&fe<this._cols;);return fe>=this._cols?this._cols-1:fe<0?0:fe},ge.prototype.addMarker=function(fe){var ue=this,ee=new be.Marker(fe);return this.markers.push(ee),ee.register(this.lines.onTrim(function(z){ee.line-=z,ee.line<0&&ee.dispose()})),ee.register(this.lines.onInsert(function(z){ee.line>=z.index&&(ee.line+=z.amount)})),ee.register(this.lines.onDelete(function(z){ee.line>=z.index&&ee.line<z.index+z.amount&&ee.dispose(),ee.line>z.index&&(ee.line-=z.amount)})),ee.register(ee.onDispose(function(){return ue._removeMarker(ee)})),ee},ge.prototype._removeMarker=function(fe){this.markers.splice(this.markers.indexOf(fe),1)},ge.prototype.iterator=function(fe,ue,ee,z,oe){return new de(this,fe,ue,ee,z,oe)},ge}();Re.Buffer=pe;var de=function(){function ge(fe,ue,ee,z,oe,re){ee===void 0&&(ee=0),z===void 0&&(z=fe.lines.length),oe===void 0&&(oe=0),re===void 0&&(re=0),this._buffer=fe,this._trimRight=ue,this._startIndex=ee,this._endIndex=z,this._startOverscan=oe,this._endOverscan=re,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return ge.prototype.hasNext=function(){return this._current<this._endIndex},ge.prototype.next=function(){var fe=this._buffer.getWrappedRangeForLine(this._current);fe.first<this._startIndex-this._startOverscan&&(fe.first=this._startIndex-this._startOverscan),fe.last>this._endIndex+this._endOverscan&&(fe.last=this._endIndex+this._endOverscan),fe.first=Math.max(fe.first,0),fe.last=Math.min(fe.last,this._buffer.lines.length);for(var ue="",ee=fe.first;ee<=fe.last;++ee)ue+=this._buffer.translateBufferLineToString(ee,this._trimRight);return this._current=fe.last+1,{range:fe,content:ue}},ge}();Re.BufferStringIterator=de},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.CircularList=void 0;var Se=ke(0),Be=function(){function Le(Ce){this._maxLength=Ce,this.onDeleteEmitter=new Se.EventEmitter,this.onInsertEmitter=new Se.EventEmitter,this.onTrimEmitter=new Se.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(Le.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Le.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Le.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(Le.prototype,"maxLength",{get:function(){return this._maxLength},set:function(Ce){if(this._maxLength!==Ce){for(var xe=new Array(Ce),be=0;be<Math.min(Ce,this.length);be++)xe[be]=this._array[this._getCyclicIndex(be)];this._array=xe,this._maxLength=Ce,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(Le.prototype,"length",{get:function(){return this._length},set:function(Ce){if(Ce>this._length)for(var xe=this._length;xe<Ce;xe++)this._array[xe]=void 0;this._length=Ce},enumerable:!1,configurable:!0}),Le.prototype.get=function(Ce){return this._array[this._getCyclicIndex(Ce)]},Le.prototype.set=function(Ce,xe){this._array[this._getCyclicIndex(Ce)]=xe},Le.prototype.push=function(Ce){this._array[this._getCyclicIndex(this._length)]=Ce,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},Le.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(Le.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),Le.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},Le.prototype.splice=function(Ce,xe){for(var be=[],ye=2;ye<arguments.length;ye++)be[ye-2]=arguments[ye];if(xe){for(var we=Ce;we<this._length-xe;we++)this._array[this._getCyclicIndex(we)]=this._array[this._getCyclicIndex(we+xe)];this._length-=xe}for(we=this._length-1;we>=Ce;we--)this._array[this._getCyclicIndex(we+be.length)]=this._array[this._getCyclicIndex(we)];for(we=0;we<be.length;we++)this._array[this._getCyclicIndex(Ce+we)]=be[we];if(this._length+be.length>this._maxLength){var pe=this._length+be.length-this._maxLength;this._startIndex+=pe,this._length=this._maxLength,this.onTrimEmitter.fire(pe)}else this._length+=be.length},Le.prototype.trimStart=function(Ce){Ce>this._length&&(Ce=this._length),this._startIndex+=Ce,this._length-=Ce,this.onTrimEmitter.fire(Ce)},Le.prototype.shiftElements=function(Ce,xe,be){if(!(xe<=0)){if(Ce<0||Ce>=this._length)throw new Error("start argument out of range");if(Ce+be<0)throw new Error("Cannot shift elements in list beyond index 0");if(be>0){for(var ye=xe-1;ye>=0;ye--)this.set(Ce+ye+be,this.get(Ce+ye));var we=Ce+xe+be-this._length;if(we>0)for(this._length+=we;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(ye=0;ye<xe;ye++)this.set(Ce+ye+be,this.get(Ce+ye))}},Le.prototype._getCyclicIndex=function(Ce){return(this._startIndex+Ce)%this._maxLength},Le}();Re.CircularList=Be},function(un,Re,ke){"use strict";function Se(Be,Le,Ce){if(Le===Be.length-1)return Be[Le].getTrimmedLength();var xe=!Be[Le].hasContent(Ce-1)&&Be[Le].getWidth(Ce-1)===1,be=Be[Le+1].getWidth(0)===2;return xe&&be?Ce-1:Ce}Object.defineProperty(Re,"__esModule",{value:!0}),Re.getWrappedLineTrimmedLength=Re.reflowSmallerGetNewLineLengths=Re.reflowLargerApplyNewLayout=Re.reflowLargerCreateNewLayout=Re.reflowLargerGetLinesToRemove=void 0,Re.reflowLargerGetLinesToRemove=function(Be,Le,Ce,xe,be){for(var ye=[],we=0;we<Be.length-1;we++){var pe=we,de=Be.get(++pe);if(de.isWrapped){for(var ge=[Be.get(we)];pe<Be.length&&de.isWrapped;)ge.push(de),de=Be.get(++pe);if(xe>=we&&xe<pe)we+=ge.length-1;else{for(var fe=0,ue=Se(ge,fe,Le),ee=1,z=0;ee<ge.length;){var oe=Se(ge,ee,Le),re=oe-z,ae=Ce-ue,le=Math.min(re,ae);ge[fe].copyCellsFrom(ge[ee],z,ue,le,!1),(ue+=le)===Ce&&(fe++,ue=0),(z+=le)===oe&&(ee++,z=0),ue===0&&fe!==0&&ge[fe-1].getWidth(Ce-1)===2&&(ge[fe].copyCellsFrom(ge[fe-1],Ce-1,ue++,1,!1),ge[fe-1].setCell(Ce-1,be))}ge[fe].replaceCells(ue,Ce,be);for(var me=0,ve=ge.length-1;ve>0&&(ve>fe||ge[ve].getTrimmedLength()===0);ve--)me++;me>0&&(ye.push(we+ge.length-me),ye.push(me)),we+=ge.length-1}}}return ye},Re.reflowLargerCreateNewLayout=function(Be,Le){for(var Ce=[],xe=0,be=Le[xe],ye=0,we=0;we<Be.length;we++)if(be===we){var pe=Le[++xe];Be.onDeleteEmitter.fire({index:we-ye,amount:pe}),we+=pe-1,ye+=pe,be=Le[++xe]}else Ce.push(we);return{layout:Ce,countRemoved:ye}},Re.reflowLargerApplyNewLayout=function(Be,Le){for(var Ce=[],xe=0;xe<Le.length;xe++)Ce.push(Be.get(Le[xe]));for(xe=0;xe<Ce.length;xe++)Be.set(xe,Ce[xe]);Be.length=Le.length},Re.reflowSmallerGetNewLineLengths=function(Be,Le,Ce){for(var xe=[],be=Be.map(function(ue,ee){return Se(Be,ee,Le)}).reduce(function(ue,ee){return ue+ee}),ye=0,we=0,pe=0;pe<be;){if(be-pe<Ce){xe.push(be-pe);break}ye+=Ce;var de=Se(Be,we,Le);ye>de&&(ye-=de,we++);var ge=Be[we].getWidth(ye-1)===2;ge&&ye--;var fe=ge?Ce-1:Ce;xe.push(fe),pe+=fe}return xe},Re.getWrappedLineTrimmedLength=Se},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(xe,be){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,we){ye.__proto__=we}||function(ye,we){for(var pe in we)we.hasOwnProperty(pe)&&(ye[pe]=we[pe])})(xe,be)},function(xe,be){function ye(){this.constructor=xe}Se(xe,be),xe.prototype=be===null?Object.create(be):(ye.prototype=be.prototype,new ye)});Object.defineProperty(Re,"__esModule",{value:!0}),Re.Marker=void 0;var Le=ke(0),Ce=function(xe){function be(ye){var we=xe.call(this)||this;return we.line=ye,we._id=be._nextId++,we.isDisposed=!1,we._onDispose=new Le.EventEmitter,we}return Be(be,xe),Object.defineProperty(be.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),be.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},be._nextId=1,be}(ke(2).Disposable);Re.Marker=Ce},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.OptionsService=Re.DEFAULT_OPTIONS=Re.DEFAULT_BELL_SOUND=void 0;var Se=ke(0),Be=ke(11),Le=ke(33);Re.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",Re.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:Re.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:Be.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var Ce=["cols","rows"],xe=function(){function be(ye){this._onOptionChange=new Se.EventEmitter,this.options=Le.clone(Re.DEFAULT_OPTIONS);for(var we=0,pe=Object.keys(ye);we<pe.length;we++){var de=pe[we];if(de in this.options){var ge=ye[de];this.options[de]=ge}}}return Object.defineProperty(be.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),be.prototype.setOption=function(ye,we){if(!(ye in Re.DEFAULT_OPTIONS))throw new Error('No option with key "'+ye+'"');if(Ce.indexOf(ye)!==-1)throw new Error('Option "'+ye+'" can only be set in the constructor');this.options[ye]!==we&&(we=this._sanitizeAndValidateOption(ye,we),this.options[ye]!==we&&(this.options[ye]=we,this._onOptionChange.fire(ye)))},be.prototype._sanitizeAndValidateOption=function(ye,we){switch(ye){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":we||(we=Re.DEFAULT_OPTIONS[ye]);break;case"cursorWidth":we=Math.floor(we);case"lineHeight":case"tabStopWidth":if(we<1)throw new Error(ye+" cannot be less than 1, value: "+we);break;case"minimumContrastRatio":we=Math.max(1,Math.min(21,Math.round(10*we)/10));break;case"scrollback":if((we=Math.min(we,4294967295))<0)throw new Error(ye+" cannot be less than 0, value: "+we);break;case"fastScrollSensitivity":case"scrollSensitivity":if(we<=0)throw new Error(ye+" cannot be less than or equal to 0, value: "+we)}return we},be.prototype.getOption=function(ye){if(!(ye in Re.DEFAULT_OPTIONS))throw new Error('No option with key "'+ye+'"');return this.options[ye]},be}();Re.OptionsService=xe},function(un,Re,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(fe,ue){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,z){ee.__proto__=z}||function(ee,z){for(var oe in z)z.hasOwnProperty(oe)&&(ee[oe]=z[oe])})(fe,ue)},function(fe,ue){function ee(){this.constructor=fe}Se(fe,ue),fe.prototype=ue===null?Object.create(ue):(ee.prototype=ue.prototype,new ee)}),Le=this&&this.__decorate||function(fe,ue,ee,z){var oe,re=arguments.length,ae=re<3?ue:z===null?z=Object.getOwnPropertyDescriptor(ue,ee):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(fe,ue,ee,z);else for(var le=fe.length-1;le>=0;le--)(oe=fe[le])&&(ae=(re<3?oe(ae):re>3?oe(ue,ee,ae):oe(ue,ee))||ae);return re>3&&ae&&Object.defineProperty(ue,ee,ae),ae},Ce=this&&this.__param||function(fe,ue){return function(ee,z){ue(ee,z,fe)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.CoreService=void 0;var xe=ke(1),be=ke(0),ye=ke(33),we=ke(2),pe=Object.freeze({insertMode:!1}),de=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),ge=function(fe){function ue(ee,z,oe,re){var ae=fe.call(this)||this;return ae._bufferService=z,ae._logService=oe,ae._optionsService=re,ae.isCursorInitialized=!1,ae.isCursorHidden=!1,ae._onData=ae.register(new be.EventEmitter),ae._onUserInput=ae.register(new be.EventEmitter),ae._onBinary=ae.register(new be.EventEmitter),ae._scrollToBottom=ee,ae.register({dispose:function(){return ae._scrollToBottom=void 0}}),ae.modes=ye.clone(pe),ae.decPrivateModes=ye.clone(de),ae}return Be(ue,fe),Object.defineProperty(ue.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),ue.prototype.reset=function(){this.modes=ye.clone(pe),this.decPrivateModes=ye.clone(de)},ue.prototype.triggerDataEvent=function(ee,z){if(z===void 0&&(z=!1),!this._optionsService.options.disableStdin){var oe=this._bufferService.buffer;oe.ybase!==oe.ydisp&&this._scrollToBottom(),z&&this._onUserInput.fire(),this._logService.debug('sending data "'+ee+'"',function(){return ee.split("").map(function(re){return re.charCodeAt(0)})}),this._onData.fire(ee)}},ue.prototype.triggerBinaryEvent=function(ee){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+ee+'"',function(){return ee.split("").map(function(z){return z.charCodeAt(0)})}),this._onBinary.fire(ee))},ue=Le([Ce(1,xe.IBufferService),Ce(2,xe.ILogService),Ce(3,xe.IOptionsService)],ue)}(we.Disposable);Re.CoreService=ge},function(un,Re,ke){"use strict";var Se=this&&this.__decorate||function(de,ge,fe,ue){var ee,z=arguments.length,oe=z<3?ge:ue===null?ue=Object.getOwnPropertyDescriptor(ge,fe):ue;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(de,ge,fe,ue);else for(var re=de.length-1;re>=0;re--)(ee=de[re])&&(oe=(z<3?ee(oe):z>3?ee(ge,fe,oe):ee(ge,fe))||oe);return z>3&&oe&&Object.defineProperty(ge,fe,oe),oe},Be=this&&this.__param||function(de,ge){return function(fe,ue){ge(fe,ue,de)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.CoreMouseService=void 0;var Le=ke(1),Ce=ke(0),xe={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(de){return de.button!==4&&de.action===1&&(de.ctrl=!1,de.alt=!1,de.shift=!1,!0)}},VT200:{events:19,restrict:function(de){return de.action!==32}},DRAG:{events:23,restrict:function(de){return de.action!==32||de.button!==3}},ANY:{events:31,restrict:function(de){return!0}}};function be(de,ge){var fe=(de.ctrl?16:0)|(de.shift?4:0)|(de.alt?8:0);return de.button===4?(fe|=64,fe|=de.action):(fe|=3&de.button,4&de.button&&(fe|=64),8&de.button&&(fe|=128),de.action===32?fe|=32:de.action!==0||ge||(fe|=3)),fe}var ye=String.fromCharCode,we={DEFAULT:function(de){var ge=[be(de,!1)+32,de.col+32,de.row+32];return ge[0]>255||ge[1]>255||ge[2]>255?"":"\x1B[M"+ye(ge[0])+ye(ge[1])+ye(ge[2])},SGR:function(de){var ge=de.action===0&&de.button!==4?"m":"M";return"\x1B[<"+be(de,!0)+";"+de.col+";"+de.row+ge}},pe=function(){function de(ge,fe){this._bufferService=ge,this._coreService=fe,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new Ce.EventEmitter,this._lastEvent=null;for(var ue=0,ee=Object.keys(xe);ue<ee.length;ue++){var z=ee[ue];this.addProtocol(z,xe[z])}for(var oe=0,re=Object.keys(we);oe<re.length;oe++){var ae=re[oe];this.addEncoding(ae,we[ae])}this.reset()}return de.prototype.addProtocol=function(ge,fe){this._protocols[ge]=fe},de.prototype.addEncoding=function(ge,fe){this._encodings[ge]=fe},Object.defineProperty(de.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(ge){if(!this._protocols[ge])throw new Error('unknown protocol "'+ge+'"');this._activeProtocol=ge,this._onProtocolChange.fire(this._protocols[ge].events)},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(de.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(ge){if(!this._encodings[ge])throw new Error('unknown encoding "'+ge+'"');this._activeEncoding=ge},enumerable:!1,configurable:!0}),de.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(de.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),de.prototype.triggerMouseEvent=function(ge){if(ge.col<0||ge.col>=this._bufferService.cols||ge.row<0||ge.row>=this._bufferService.rows||ge.button===4&&ge.action===32||ge.button===3&&ge.action!==32||ge.button!==4&&(ge.action===2||ge.action===3)||(ge.col++,ge.row++,ge.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,ge))||!this._protocols[this._activeProtocol].restrict(ge))return!1;var fe=this._encodings[this._activeEncoding](ge);return fe&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(fe):this._coreService.triggerDataEvent(fe,!0)),this._lastEvent=ge,!0},de.prototype.explainEvents=function(ge){return{down:!!(1&ge),up:!!(2&ge),drag:!!(4&ge),move:!!(8&ge),wheel:!!(16&ge)}},de.prototype._compareEvents=function(ge,fe){return ge.col===fe.col&&ge.row===fe.row&&ge.button===fe.button&&ge.action===fe.action&&ge.ctrl===fe.ctrl&&ge.alt===fe.alt&&ge.shift===fe.shift},de=Se([Be(0,Le.IBufferService),Be(1,Le.ICoreService)],de)}();Re.CoreMouseService=pe},function(un,Re,ke){"use strict";var Se=this&&this.__decorate||function(xe,be,ye,we){var pe,de=arguments.length,ge=de<3?be:we===null?we=Object.getOwnPropertyDescriptor(be,ye):we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(xe,be,ye,we);else for(var fe=xe.length-1;fe>=0;fe--)(pe=xe[fe])&&(ge=(de<3?pe(ge):de>3?pe(be,ye,ge):pe(be,ye))||ge);return de>3&&ge&&Object.defineProperty(be,ye,ge),ge},Be=this&&this.__param||function(xe,be){return function(ye,we){be(ye,we,xe)}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.DirtyRowService=void 0;var Le=ke(1),Ce=function(){function xe(be){this._bufferService=be,this.clearRange()}return Object.defineProperty(xe.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),xe.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},xe.prototype.markDirty=function(be){be<this._start?this._start=be:be>this._end&&(this._end=be)},xe.prototype.markRangeDirty=function(be,ye){if(be>ye){var we=be;be=ye,ye=we}be<this._start&&(this._start=be),ye>this._end&&(this._end=ye)},xe.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},xe=Se([Be(0,Le.IBufferService)],xe)}();Re.DirtyRowService=Ce},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.UnicodeService=void 0;var Se=ke(0),Be=ke(79),Le=function(){function Ce(){this._providers=Object.create(null),this._active="",this._onChange=new Se.EventEmitter;var xe=new Be.UnicodeV6;this.register(xe),this._active=xe.version,this._activeProvider=xe}return Object.defineProperty(Ce.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"activeVersion",{get:function(){return this._active},set:function(xe){if(!this._providers[xe])throw new Error('unknown Unicode version "'+xe+'"');this._active=xe,this._activeProvider=this._providers[xe],this._onChange.fire(xe)},enumerable:!1,configurable:!0}),Ce.prototype.register=function(xe){this._providers[xe.version]=xe},Ce.prototype.wcwidth=function(xe){return this._activeProvider.wcwidth(xe)},Ce.prototype.getStringCellWidth=function(xe){for(var be=0,ye=xe.length,we=0;we<ye;++we){var pe=xe.charCodeAt(we);if(55296<=pe&&pe<=56319){if(++we>=ye)return be+this.wcwidth(pe);var de=xe.charCodeAt(we);56320<=de&&de<=57343?pe=1024*(pe-55296)+de-56320+65536:be+=this.wcwidth(de)}be+=this.wcwidth(pe)}return be},Ce}();Re.UnicodeService=Le},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.UnicodeV6=void 0;var Se,Be=ke(15),Le=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],Ce=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],xe=function(){function be(){if(this.version="6",!Se){Se=new Uint8Array(65536),Be.fill(Se,1),Se[0]=0,Be.fill(Se,0,1,32),Be.fill(Se,0,127,160),Be.fill(Se,2,4352,4448),Se[9001]=2,Se[9002]=2,Be.fill(Se,2,11904,42192),Se[12351]=1,Be.fill(Se,2,44032,55204),Be.fill(Se,2,63744,64256),Be.fill(Se,2,65040,65050),Be.fill(Se,2,65072,65136),Be.fill(Se,2,65280,65377),Be.fill(Se,2,65504,65511);for(var ye=0;ye<Le.length;++ye)Be.fill(Se,0,Le[ye][0],Le[ye][1]+1)}}return be.prototype.wcwidth=function(ye){return ye<32?0:ye<127?1:ye<65536?Se[ye]:function(we,pe){var de,ge=0,fe=pe.length-1;if(we<pe[0][0]||we>pe[fe][1])return!1;for(;fe>=ge;)if(we>pe[de=ge+fe>>1][1])ge=de+1;else{if(!(we<pe[de][0]))return!0;fe=de-1}return!1}(ye,Ce)?0:ye>=131072&&ye<=196605||ye>=196608&&ye<=262141?2:1},be}();Re.UnicodeV6=xe},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.CharsetService=void 0;var Se=function(){function Be(){this.glevel=0,this._charsets=[]}return Be.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Be.prototype.setgLevel=function(Le){this.glevel=Le,this.charset=this._charsets[Le]},Be.prototype.setgCharset=function(Le,Ce){this._charsets[Le]=Ce,this.glevel===Le&&(this.charset=Ce)},Be}();Re.CharsetService=Se},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.updateWindowsModeWrappedState=void 0;var Se=ke(3);Re.updateWindowsModeWrappedState=function(Be){var Le=Be.buffer.lines.get(Be.buffer.ybase+Be.buffer.y-1),Ce=Le==null?void 0:Le.get(Be.cols-1),xe=Be.buffer.lines.get(Be.buffer.ybase+Be.buffer.y);xe&&Ce&&(xe.isWrapped=Ce[Se.CHAR_DATA_CODE_INDEX]!==Se.NULL_CELL_CODE&&Ce[Se.CHAR_DATA_CODE_INDEX]!==Se.WHITESPACE_CELL_CODE)}},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.WriteBuffer=void 0;var Se=function(){function Be(Le){this._action=Le,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Be.prototype.writeSync=function(Le){if(this._writeBuffer.length){for(var Ce=this._bufferOffset;Ce<this._writeBuffer.length;++Ce){var xe=this._writeBuffer[Ce],be=this._callbacks[Ce];this._action(xe),be&&be()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(Le)},Be.prototype.write=function(Le,Ce){var xe=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return xe._innerWrite()})),this._pendingData+=Le.length,this._writeBuffer.push(Le),this._callbacks.push(Ce)},Be.prototype._innerWrite=function(){for(var Le=this,Ce=Date.now();this._writeBuffer.length>this._bufferOffset;){var xe=this._writeBuffer[this._bufferOffset],be=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(xe),this._pendingData-=xe.length,be&&be(),Date.now()-Ce>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return Le._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Be}();Re.WriteBuffer=Se},function(un,Re,ke){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.AddonManager=void 0;var Se=function(){function Be(){this._addons=[]}return Be.prototype.dispose=function(){for(var Le=this._addons.length-1;Le>=0;Le--)this._addons[Le].instance.dispose()},Be.prototype.loadAddon=function(Le,Ce){var xe=this,be={instance:Ce,dispose:Ce.dispose,isDisposed:!1};this._addons.push(be),Ce.dispose=function(){return xe._wrappedAddonDispose(be)},Ce.activate(Le)},Be.prototype._wrappedAddonDispose=function(Le){if(!Le.isDisposed){for(var Ce=-1,xe=0;xe<this._addons.length;xe++)if(this._addons[xe]===Le){Ce=xe;break}if(Ce===-1)throw new Error("Could not dispose an addon that has not been loaded");Le.isDisposed=!0,Le.dispose.apply(Le.instance),this._addons.splice(Ce,1)}},Be}();Re.AddonManager=Se}])})},93314:function(xn){"use strict";xn.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=="},62522:function(xn){"use strict";xn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUYAAABYCAYAAACJfF6vAAAAAXNSR0IArs4c6QAAIABJREFUeF7sXQe4FcXZfmd2T7n90jtYsFGModkVUGNJ7BVTVIxdI5ii/iYmxkRjEhV7ohF7wQaxBqOIxgqCQSkWUKRIv72csjvzP9/M7p7ZPefce8EGhOOD95wt0+ed9yvzDcO2z7YW2NYCm00LNL19cQ/H4j/nEt+vKK38LhtyVWazKdz/UEHY/1Bdt1V1Wwts1i3QMGviGRLyJgAVVFCb4YiykZNe2KwLvZUWbhswbqUdu61aW1YL1L0z4TrG8Cuz1IyxOytH3njOllWTraO024Bx6+jHbbXYglugcfaEC4TErZEqNAN4q2rUpEO24KptsUXfBoxbbNdtK/jW0AINsyfsC2CGlIgzBgGJaRzi9jKeeo2NuDO7NdRxS6zDNmDcEnttW5k32xYYP3XZFADfA6QFsKWTj+2/e7HCyld+azeU1S8AsDOAjxnEGZWjbn7z26rc+H8u/yWEPMti9kV3HdN7+rdVjs0h323AuDn0wrYybDUtMH7a8lsh5QW6Qqxl8rH9yopVrmHWhLMl8HcAL1UK93i21y0N30ZD/Hj66rJYKjMZAid5+T82+dj+J38bZdlc8twGjJtLT2wrx1bRAmc+tWy8ZLhb4yJWTz6mf69CFSO2WF9av5QxLG1w2CH99rmx9dtogDP/uXygFHIqgCG6zOyhxkzf0x4/ibnfRnk2lzy3WGBsmDXhTSkxFAxSAksB9jFneIFZztMVw25Zt7k08Jcpx7p9d6lAPD5BMHkKY/K33V9e8MSXSe+berf+zYmdEZO3VpZUnf6/5od35tTloyTkO15bz5t8bP89CrV7/bsTvg+B+2yOoWUjJq36pvomms/4aStugxTne6A4td/RfU+4ijHxbZVnc8l3SwbGP0ng0gIN6TDgXhv896Wjbli+uTT0xpZj7ZihR0gmJwPoocmH/E33GQv+sLHpfBvP18+eOBFS3sAYplWOnHTst1GGbyvPs5/5oqvjOGphZmBP3X1sv+MLAuOsCVM4w2sVIyfd9m2V1c93/D+XHQWBS7Kl8e8/cGhPsob/z3+2WGCsnz3hcEg8X7QHpUwxxi6uHDXpzi2tl2tG7z4ky8UcAHG/7BJ4vueM+d/fEupSN2viSwzyIAbMqxw1qSBj2hLqsallPGPqshYGlDCGP959TP9fR9ORn1yUaKy1llQ4bCf2LYnQm1q3/5X3tlhgbPrg4h6ilR0NoBJgO0vIsQB2zBuEUl5WvedN121JHbruoKHXCSlNZ986Bjat+4wPztgS6tEwa8JqSUyXyb9VjbzpvC2hzF9lGcdPXbYSQG8p+ZH3HNf32WjaTbMvPsQFP7xq5I2XfJX5bkvrq2uBLRYYC4on7168JxPsCgkcGdxnEFzKMRWjbnrtq2u2rzeltWOHPCKBU1QuDNNjrOXkzi99Wv/15vrVpV4/awL539mc48qKEZOu/upS3jJSGj91+ceA3D4Vk90f/sGA2mip62dPuF5IPNBp1KT/bhk1+t8r5VYFjH73Ncye8CspEbBECTxVPWpSQV3P5tjla8cOeVMCezNgJUtnd+v2xkeNm2M5i5WpbtaEJgaUMc4urxxx45+2pLJ/FWU9Y+qyxUz5MPY7uFB6DbMn/LNy5CSSdrZ9NtMW2CqBUT52otWwXZ80AMtr9wVVoyZpd4TN/LNu/916iZhFRiMLjP22x8sf/H4zL3Je8RpmT3xfSjlUQl5fPeqmX2xp5f+y5R0/bdkqJnDF3cf1J+NZ6FP3/mWdrHT69xUjb7zoy+az7f2vrwW2SmCsfeOCATxmf0ZOWV7TPV01avNfoSXA144d8iSAY6jcUoq9er6y0Hf9+PpGwVeccv27E2+DkOcD7M2qUTfSlrf/mc/oV6S9Q92KVY1Z9H/8pH55vom170w8llbryj1vJN/BbZ/NtAW2SmBsmD3xH1LKM/02t5j8XvnIm/69mfaBKtYXhwwZYbns94A83Ctn4/L6RJcRc+Zscftl62dPHAUp/8gku/1/DQDGP7XiO5KJI+85tn9B16r6WRNulen0b6r3vyNP97g5j89vs2xrxgw5jjGc0W3G/KMYIL+Jsmx1wNjwzoS9JZNvBGyR4f6qkZNO+yYa88vksWbskPcBDDXSeKrHjPlbjF70y9R9a3p3/NSlxyezpdNvP6l7U6F61c+e+EjVyBvHbWqdT3/mi10t1zlTSowF5E4ASwJYx4A5kvEn7L59HrlzBNviFtNi7bF27ODnJZhPFu5Yt1pMGLJw4dcevHfrA8bZE5+QUvqAslzEsHun706q29SB+E29t3bMkMslwzWUH62KEjisx4z5L37d+cvHYKEbZYlyoMJuqXFjpby8NCvczjEeY04qYYML2+ash+uyOMAtBlYGLsshEQNYDC6LcUtWA7Ic4EwIxjizOJjkAsxidJGJCsncwVLCBhhnknFIFWiBQzAOFuiDAbrHyKddswPJpNADlUkwSbsyBJikLWt0X0gmXMaRhbBWMmmtEKBnJHkjuABzIaUEE6SpqBdSNoOLLIfMgCHrZuM1YI4DLh3Eso4U1hqb7nGRzXJHCJltTJSiEYl0Fk5jFp+iBWdDMIaCW+bOfnpl/zuP6rOsUL81vTtxqCvkiVWjJl25Kf3q7cMm9yde7H0GLHGZnHjvMQOe2ZQ8Nrd31o4dulJC9vbLxYAVYHig+8vz/+/rLOtWBYzyldOTDWXVtBE/Ro3GGT+hYuQNpLPb7D9LDt6hqlyUUrTmnTjDn7q9PP/6YoWWr8BGBVhtLUqTtSXlJYmycgi7Ck4sASa7u+lYGWDFmO30hcNLYKE7wBOMsTgYejLJ4hDclpIiRYsqSG4ziVJIZlFUGElgxRnBkCLeGp0UYOuP1MidGzxaujGvqVdzjxf5bqCftyKY+UTTMB7JS89/1pezKO/Q+8wvT2TI0yoU3DMKHVSU6iUlY3AkAS1nrWDCYWA1krEWMAWiDgTWSMgUlzIlpFwvuJuyZXwFIFKIpzOOK1en+x1xmpVe+4ps/M+MkuSGJnRCC4YXB9lo/585bfmVUsqrAKxnDA8I4AMmmC0hhzOGEwB00esH9Zz8e1m834RbjmBkhNxiP6vHDrmCAaZaYi1n1v7dXp738ddZqa0KGGvfmrAdt/CZbjBWXzlyRRfGHt88N8MT9wFY7Us7VKRSg7O9GlsqYGdLIXgP1121I+OpXnDRHdyuZpbsxJjVSQpWCclKmJQ9pFBglpRSJomAqWmv0MDXwtDcMJAp+BGFq2KQYsJQ9Huh3/41Dzl1HxSARq93FHCZMFbovWLXjCnhI6AHZBpqc5/QbR/sdENFytce7Ppp5upEeekSRurhP+Lb/ug3Y2jpNxKly94hMktAm5IMKTCWAU9+zJCth4y3CCHXcJlOwyIWm21yXb4STDaCZ1rSPLH2Bvu2C/YQ//7znuL6Fd0WoIVdpTKXJz42P15hV10Mhis1c1f1md0Fy8b9fPG+q+OVxNSBRhc8ZsHiApylwUorIRprIMuTiv8z4cKVaV0hYUGIVkiXQ4hmSLcesu/2EIsBpDdApnpDDv8CEoMhscBodl0mfwR8KZ0gzZF1Ywf/SoKRzSDOwY/rNuP9uUYXfy1ftypglO9eWtUgUrXekrmyetSkvl9FqylxE4ivWwfLcsFdC6LbWjUog832xOLqllaXV9t2SUZaXTi3ezAZJ5GzJ3N5FzDeFRI9mc07A6ySwA2CE0urUF5FUiQhpS0J49RQ9yjYV1GB/4U08hFws6p1troPRLIcidUfdbxcHqAGOA6pYqZIiQyYbAVjDYDbCMbXCVc0AW7dYj4ocV/ZFUeu4X1I90gagvoRLf+87uQNl7/tSrdFZLJpIeBK+geImJWQkkHINIRwmCsAkYgxtyVLugomShgTMt0kZQLSlRAiDVkhITYkId1WyGoBIco1aKYciIGdIeesgmzsBbluIeSJj+s58k0ZTTreuG0/uVUBI1W1ftYE2mM8jCRAy2Kjyobd+O6mNNZvfwv+i8HlXbK1sifSvNrm8c7cinWyLd6VMbu7xa1qzqxO4LyLBOvCGKohUQnBysBo7Y0OB4PB+ZjnPRPmOLq0Siw1eifKrfw6mbxHsxdTxM3VPPe+yZY01zF5nS61foamIf2NDpIoI/OoapBZsbL65TPYROid/HLk6rOxvDZXyxxiFqqr10u6zY26FypYobbVdfV5ajgvP21SmTbvtD9Klr0HKxUOuZjPbr20aLiwMP+lnggUr6Fcw6QszUtxZ8mlmBffW1eDMTky/Urr8al76rq4XzRKiRop3TrhoEYKd42Q7jrhOGuyWacWqUxNS1OmkWWd1kw6kxbSW/yTQCKblK02kwkJ0ZxlMiGYcAUTMgaZtJtcR0JUuhCuC+E4EM0JuCs6w1UAOQgSV+XkmU2Zk9/kO1sdMDbOnnCClOwByeRKKXF39ahJ10YbVOno0n0rG+viXUsEujPBezLGegsXfTh4HyZZDylkD0antUlUMrBySXrLnOwUiKlqSHrj0pdkc0o5z4ziI1wIMQpN9RBihpV6vknGm4hRNAugTOkE1axStooc8nldHczuQmKsLm8Ah+qL94JWOOZLoAaaUTVDeftlNhE+QCC/jB6squS9awFa5Z4JkMtEMm8FYVRnszlVmbz6UTtoSVbZYAKVQyQ7PwFdB7NP9QoVXAuht7d6+Te9l0nFp1rRu57pviPc8i4o+Wx2MBT9quaqXAB28/oqVy4Fxt7w0gpg0gl7+aqsGZ4qGY9/lVDsWV1osi/tkX0Luzrz0N39Akm0YKCz0APPQEpxwVhKSlnPGKsTUtRIR9RIIdesRo+113e6uef2rR988qMVv56damiuyWRaW9GUTrkMrisgkjakEGUiVmFlU2sbnLIyOCGAfBxkSAsj+TeJeB3Ma6sDxkL1llMGHipS1rGMyb6Q6A3BukOgE5R+jmkLnz+PNvsuM2tYiMN0sOc3y8c2k/q0KZZvXBndss5o3XEUkkvnwG74OsKEtl2e9+L74v7yCWji1Xk9/oOWB3F0y30dGgkEwv8uOQ5TSnVMkCGZ2eLCxiszNnMaIOUGIeU615Fr4IgFaz9fMzXT4NZx28rYaSuTSDRkurXAmROHO5w051sAc9zqgdF9aKffs1b+a9J3RyHFJx8B2QgTigAvFVkymEqUaxVK1385yLRAS0eIhrYCe/YTM02TpAQkMELeTHDPk30NohGQqUh5FJnymZXHMXxx3rc2q+YxlvsgiUi5i+UR1ClCBAtaS6IEt+CKF1ZehfI18CJEJs2yRtQVfhbm2hgdNAER9wh5MfsSpSHjpWjdaS+wdAtKF7+dI+9RYlxkrQus/GZbRHDQJ9rm+Izaghp4Nf5ZejreSB4GlykbjPpcWvcz7JhZGGh9cgO+sE7mxqrrsDA+PHj/qOZ7cWTLg6GeUTRD4LP1S9b9JF3XsiZt8VSpY7c2JxozdiMyS5fCGT0T7ubOGrdqYEw/OmC3WGNinnClct+Jgk1uAhSnCG2Sh0KT9Ute+6bza7e4aoR4ui0PGUMLRQhoDEjx5LyNrU8gxptIv7GJtFsp/4G2EjbvheRn7+VcSc2F0v8uyqqR2mE4eUKh5KM3wFPk7/31VCSaarFcNvAemJM8EKutvqiUdTiq6T7wwu6YRVtwXmJv3F15OVK8DF3dL3DN+h/n1Yu63kk7Tyx/f8WfrCRrjgurWTK7pU42prEOmcGD4JiGyw531zf44FYNjM7kHU9mGf6oJN9eY7T4SuygnX32Za7GhUZ7VEHvqxA9lhcARjsd6LOOfKJg6AWV+42hIywg4gfF7cDMIEW+0h+a7eB9z12LgEGR0RFisKbay9N1hfSSAV0LJ+abdvKXq+KNp97xgDpfS9WeiBvpUJ/+muYnkxrr9SCY9CH2JrUeN795cu3XOmh/iJIKJJbMhVW3us1nzaIEY2MTMFTXMLy05I+x3JXAf9Nf3DyJQOmnTcU5vWKMv5fLjsOUygsRlyncsvqIXN2M14SUi5fPXXluvJQ1Omm3IcOtxngy0WyvrEv3BTLYzHWNWzUwtt65ww/jLn9QEDCaKBiwEV1909Jn8KO8GRoeqznbrX6wLXTK3StkVzRFvVw6+fBTeK5EmYtZp0JMJ1zW8DQKrwy5t3NukhD+hhPaz+IHL9ItEF1L/PIWneO0QYU2uXhGg8A6X2BUBj0YEn/1GxE4D4msyhwkhVYle3qA0Dv+4qDsTLRhxtXpcRI5zYKYsGMODbNvc22Q7bUzrOZa8Ib1hlwabqFC7VK4x8Iek+EeD/VSpA/yx3d0/CkzDQG9t6rnl8m7YtiZaqweuLf6Uvyg8T7skpkXeC+YI4tJ+fnn81b83OWsgUlrQ0yI2qxrN6WbmlpTnZAefifoCJICy/03SAvbyGqrBUbyPUxt6D8+LmJ3amAsNk2LgYffatH32gLAQgAZGi5eosWms5mnDzXR8hXLn7zSPF922sCilD2FaG9RGMkfJpX9wfrtDayaC1m3RN23xlwDlHSFXP8R5Nt/Arjt7XjRrDywDkdTi2KMlQAffhHQZWeIF84DpAO+ywmQiQrPckxT2N/5VoCf1X8KufQlr55ha63GM822Wbch4PtcCvHGNZDrFxVHcMq1/wHgIy4E3CzEa78Daj/xDMvR/or2abElAUBJN10WNw1k/LCaxSCxEE60u7y0IaIXXZK83il2v1Ce7aUV6XAhVi6dv/pKxniNbcu1krs16Ra7wSpraUqvRurxx+FcRdrIzfSzVQLjF8/0LpULM/0qZfx7JeXJmzVe+G4o+X57bfdNeJDkGsznN20xCZ+NRlmFv6eOtgSHffWizLNt2DbSregH65C/ALESiDf/AvH5zHzGyyy1DdkHTJNr5IRDT0Sk3W+H3Qq+y5GQzevh3rs/2K7HwDpIez+JFy6E/PRfHt8mNkZfuQJKxcyyzWFcDpVGgg0aB2vMH3VaC5+EePkXsE57A6wy2BbbZreIT56DeOF8nZ/6FBjK8QpYp/8HLF6uvI3dx44BBM1F3WdR4ZvtdgKsg3V8Y+fRo4F1tJ2DGJX/fI6r+e/7eftSR2jZES6scc+BdR8M8fnrcKf9UJW3raU1l4MpqvsuWDSQuUd8zZEYxnuz4Uy5xmSLhcZVWxDsv5v/np9DWPKSQqxa/uHqaxnnG6SUqzmz1ieYqM3EE42OW9f64C3IbgPGb3BV+OLvKE0vLqt0m53ybj26HF7WKXGzIB//Dn/aY4TRhIo8b8UB2rJMcQzShlNvshP40B+CJavgzv0H0LwmkmAhRuc9YieA8t5qosMmj9sqsEQ5ECsFq9oOfMRZGmhWzgGaVwP0fKwcLFain7dLIT5+FuKNP3lMqwAL8EY+6z4U9slTlbjs/udPkB9OhfWj6WAl2u1DNq7SaRA75RYYidWKqVqQGz6B+9gP9G+FWTofk1cRteSH3gq+sz7fy33tj5CpGlU3PvgUINkJ4oOHgHSt1o1W7wA2+ESwRKVidO67t0O8c6PO23TXNFtTuOD7/Rp8+E91Hm/8GfLd2zSr9T4KchTZlWC7nwbrIL0t17n/IMiaxV7ZuUeFiwwiagdKhPpaJe5lIBzYp78K1nVniMX/gvvPM2kLe2EQz0s60jcl3WDtcwmQqoNMNwKpWv03XQ+01kDWL1eLInNaIZ1WQDiA6xi6QlKH5FQfG8n/iigsik0qBibE6s8/WnujZfO1rovVUsq1Nhc1djbe4LgNLdsNQGZzNsBsVYyRxOc1s5Bsaiov4yzbqUvP6sPKqkomuT4wBh6x5rocFbLDQyb8pM8Pciu0b7jweaOaaDQhTnocvO9IiA+fhvPCxZ4uDUD1AMTO1MfPZB86CnLVewGoqGAwBZTnvkKe9d0H9okPKZFZkmjmZIBsi/7nZsG676Ymslj9AeTaBWBOC2SmFcg0AdlGyEwKsuYTyDV01Ehupc/l6Rl8mAV73D/BegyBbK2Dc/d+sI67D7z3cD3xnbQCAaqnEt/pn3TAynuoeso18+E8eoTB5nLtFtL22iWwTnkesnk1xMuXQ9Z+ohYT6+C/gg08FHBaIeY/Cla9Hfh2YyEzjRCLnoCYdw/QsAygxUehdAH6511jJZ1hETjFyyBXzIb4/FXwXY/yyu2V381CiixYWXewLgP14vLpTA0+6z+EePcOSGJqGuVDIE8AZB9xK1i/vVR5Vds4aUgnpVgzXWexUsjapZBLXoTMpnR/ZBohs9Q3zQqAZZ23xT+AzVw+Kt8uuyB22nRISnvtIr0gJjuBlXWB3LAEYtFUWPv+XAGiyjvTAmQaIFMaRClPd/Ydqj455pj/zWSNftNG4c+fEwFLVg72YclJCrl2xeK1t0DytczCSjCsdaS7oYzH62W8saXvjUizbaJ0sZXlq70uT4S1ZgCSLXVl5Yg51V26Vx9eVpW8MQDG3Lje9IwLEUR/BBFK0mTlcdhH3wk+YB/F3sS7d4OVdVK6OVT0gjX0FK2PW/8J7ZEGEhUaTKaekQcmoYLacbBEJ0iaWG5Ki4WK7nCgtDPi57wDWDbcWXdCLHgCiJcCsSRYvBIgYGhaBbn8zQLOf0YuUsA64ApYo87VmNO4GuK/98PaXx9a6L76B4gPHlQTk0RPWAnIT54D67ITrCNuV6DhPD0ekkT56I6fvJkmgdJuQOt6NaH5/leC9dhdM8QuO4OVds4VjAw0NZ9Ctm7Q4LvybYi3/wzJSDTNbW1U4rHPIGlFIda472UqTfHW9bAO+A34sNM73P/is9fgPDEOMPz/Qi+rRXAK+Hb7dTjN6IPurL/BfY0izhmBQCJmJdZ7BGKnPglZsxTZe8eqvuc7HAL7uLvUGHMeP1UvTKQ+GHsVeN8Reux9+gpYCY29LhAeMLZb0I2nk3lJMinWLl+y/jYKSk9nF4HJNSIrakqteJ1b1tjctxLp/1nGKB8bPBCuHAQpi8aPa7eTog/45jO1rBuj1XVBLlmZjGOJtBt3Um4ZHGdEMmH9lHbG+5+8Po9cMBlgVKj10yjozWAnED/jZQVQSnSNWGwL1pNAzVvh5cq5cB4bFwBjSOw0zSjVA2Af9hc1AVi8RInRsElUToDFEjnQI0bnZgE3o1lMthViyb/hvnylLpsPHqbMQNvKuuyK2OkvBEYN2VqD7B3DwYefDZaogniboqE5YBX9YJ/5uqqW89y5kKvngX/nNCXquXNuU2JbSBzxK+Qp9iSBunpAX6DwhtYxD4JvN0axaLF0plI38O+OV/VQrE1kYe14OFj3QSAdo/PcOQCPhZSFwRY7SlYIFYZRZa1CM3LwwaeCb7e/Bm0Sa0lHyWkxs8Gq+oFV9dELQs2nqlxixbtwFePXuswQ41UXBPiw8WBdd1GirFJfWDEwuwSs1x5gSTIm6Y9ib9TGavGkfPW0cF67HuLtSYEDkKnH87+zHQ5C7IR7FMATawSxQiphSTXEp6/CeeInavFDNoXY+JfAuuwAZ/rlcOdOzhmolH7T15WEtQPqqsf88vWI+Xp5s28LmhKlrFu3vOH5eNKqY3G7JlZi11rxWGOs1G7hiVjGSjBhKck+7Nmw0XgQfYGpEBkL2GkffqmwZF+LKK222z465M9w5cVqj7HpEqbcIjyBxHfV8xCo0IAwLZ0+EwjSMxuFGBhZn10JmRWQGQGRykJkSM/yDXy4hfhPZ6pJIVtrwUq7gFX2gkw1wJ17H9Bap9lOayPsH9wAVlIF57Ub4M6ZrEUwEktVDNZ2PiVdYA0frydGlpgjibQEABQrinR8HmWykmBq4nMNnrEyuO/cCqSKn8Kq2p/biJ3zpmKxxApJj5W9bQ8l9lm7/wjW3hfCfeV3kGs/QOzsWWoyOdN/AT5gP7AdD4Xzr4shl7wQ7LQMgYmBKvaJT4GVddWTlvJ4+FDYR98Lvv1BEIunQ3zwAFDWA/b3rldA4D5/gWLJfNg54AP2V7pS59lzizNs4cA66DrwPqNUu0rhQrxzG8RHTytWb+09AeKDRz0Rlqk2tPf7Jaz9LlEDNHPLd4GWdZ6xyke2In2j+s3XK2rDGuszArEfPQEWU0Fu1Mf98F9wpp2r+4PAkwA5VqbGi0xt0NHjinz4bkcjdvStECvmwvn3FWCl3cAHHwtryLFwFz4N8eGziB11qxKjlZhN8X/XLAQavoBM1UEseRli0TPhyCTtjbUvcV86AulaB3aJDavMhl1qgyUssBhX/2B5BjvfDchD17Z8gUO+JV5TBTu2qAdyOEKBh++AvXBi3e17VGRY9iIwdgwDSE9Cr3wEiSeYFHd0n7mwYKT1rwcYH9h1nJT8YSMoV0GfsHC7FytKIe4U2UDviSAaGAVEVkJkXIi0A2Q1MJq6k0JOLB0dA4XSCd4lJiZcMDcDa9+JsMdeDtm4Bumbh+UsiVIgfv5b4J0GwPnPJDiveae8+vvvPKZVzFxEYiMxFPvAn2uWSOxDKdU99kkskUDTyWgdFgR4lx1VEdN3HQK5blFBCddnDFR+a+S5kM3rEDvmFpVG5ubdwfvvA/u4fyiwdT98Fu7L/4f4+f9VE9B58TLw7Q4E3/lwBfDOi5dCLHzUK1euxXILn0Rs/Fs5dtZSg+zfvwP76HvAdzhYMyLSmxK7SlJgcAoBS0HYaZktA7MTEB8RMBJjzG1xC/WrcBA75gHwHccG3ZN94VeQn0xH7IdTFaMia7vzxGkQa96nOOCwD7wc1t4XqD5M37wH0Oody+I78kf87fP0cb5es6IX4uOfA6vonjesss9eCnfu/XpBUM+TTloTJ27nC1YaDHSfxw67GrJuBdyPXlDMnPUdAWvHMXDnPgCxej5iR1wHsfQNuHMfBMq6qrbjuxwG3nMwnNdvgfPqtR4wdnzaB0+amxk6YIqRjkRrTVYBokX/SmzwhAUe46qeKq57QF4L2vQjiuNCMyJsc881NgVrZ2hdgL83zWbHA6xroflNIr4Q7gk9Zy56O3pfFW3D2xdV2sK2K/e+obbhrUs6WXGMEILIOErHAAAgAElEQVQNqBx1w10dBQzzOfnQoGkyI8Pn5vpwvykJtvdOIJ5JFTSOVisFjKkcMLaXxJe/T8Cko+4TxtnDfozYkddDppuRuW0fSIv0g+VAohLxo28G6zwAYvm7EJ+/qXVp8XKIms/hzrymbT0j8cLv/hix718H6WaQuedoyJYNSomvxGYCRkFHfngiavchSJw9XQPj5CMhV7Ud41NLt5rxxM94GtLJIPvYaYidcDdYvBRi1ftwnrkQrKInYqdM8RjjZRDzH4F99GTwgQcpcMw8cITyGwxEt0gDWwf+BqzrrkqsJQNP5o6hiNH7Ox4Cd+49cF75NVjlAMTPelOD8x17KAOCfdhNsIacAPHhM8g+d64WcYM5Y0weSQB/IVjvYbB2OlTlnn1mAsSCJ2GNOg/2mMu16JhqQPaJ8RCfv4HYIX+ANepM1YbpG4dqXa5qD49ntDVIfANQsjPi46eBd90RYsV/wXsP1Zb9T9+AtcO+yviSuf8UiOUUsFYdzKD/UsT0eDGNk1SMnA8+RvUBklVg8QogSeqUcjjvPUxCP+wxl8KZfQ/ceY9p4F/2NuzRl8P6zgnITr8S7ux/dNAi/uVng3AkUrUOrFILdmkMPGnBImCMW+A2qRMIGDsC0JsOHHXTObKk4Sz+yYCxST1e/uDSgsDYOHviLULKC82bDJhROWrSQZvSRPKBXQ6Dw6YJgUTeqlogQf+ZYnmZ99v8TqsvRdPMEjBqUZoYY6H0o8wv90yuI/LZYW4zYTRNThNw2KlK56P+VfcHq+6riTuJyaQLa2cciGWzkL77CCXqFdt0Rm1kDToa8RPuUCKi+8E0rTMk0VfpHMuV0UWJcMpFpwQsUaqB8f4TFBDnPiHhRF32daykx0uc85LKI33zSFijLwPvNRSZR05F4uyZYCWVQTKZB4+F/GK2Knfs2Mlw339YibrayTxaaa0/IVUQ2+4AxE56BLK1HpnbCRj/AT7we5Ak7jev1+JmdX8tCtct021JTChRAZes/c94wFhk4JCVn5X2QuICHZIzO+0CBagkVtt7XajAUTZ+gezTF0N89h/YR/wF9vAfK/AiYITTkktZScse8EaiuvnAycp7In7a4+DdBkLWLkfm4TOQuOAllUbmiYtgDT0G1i4HQbbUIn3PCZBfzM9593AGnsgBY0hOKusK3mUn5c4k0y1K9UBSAS2MSncqXMQOvRr23ucg+8pfwUo7wd7zTGSmTYC16+Gwdj0Umacugjv/iSKRIwsqsUKt2pakVGh+CUcgVedqxkjidIkHjDELzGOMxXCxmERXDEuimKAKzlm2cRZ/MvURO8WrCHVmA4USlJAlYJjEXPmX7jMXri40fJhii9xaAYo9aH6krK18vroru+qqDii+8pN279v1IubImzuiNivo8UpJRtlzm3KsjreXY4wColUDY9SFOn+y5gNEGDz8X4WQTReS7/p9JE65O3iNDAbMd3amePHL5yg9I4m/1sAD1XNi+Xtw3rxNsUrli9ZSqwHAlF9yKQbfeL+9YB90GcgVhXXdAcyy4Mx9HLJ+mU4r06z0m7HRExUIuO89BueNWyDrV+jJrvwNCwCW0Y0K3PuM0MYh8pGzbCXeypoliP/4SfBee0B89qpya3HnP6aNEF0GQjathnSaQ04nofbWMrtus377IDZuigLCzK0EjHeB73QoxLK34C6aBlbSBfYBv1LGF2fG75Uu1tr9VPA+w+Au+iecZ84L+eapRI3thWoZq+yLxLlvaWB86ly4BNhUAgLmIScp0VoxbikQG/corJ0OVm2Yvml3lZ+pw1KqIaVCNJmpNsCwXsOQOPUesMqeCujTdx2tdrskJ+q8Mw+fBffzt5G8aAZYeTcNjg+cAbGEDFgcFLmdE40INq7nwIrv9n3Ej7lZq06U6oDGOY1t7RLkLn9P6Y7t4eOQefYyWP33hLX7sUg/MA72AZfAGjASaWKp5IIUDK6oySTXL21PPH+QROdMGM6IC6TqXc0YCRiTNniSxGjNGEFHqpljMIquHWZD5qDV/aPdStkvNzwcmwUmf+JKcWfPLgvnsMfhytGj7XprQ//qlz8g61rRD2ucM+E44eIeOgNcG6XYUgb5Ghjuqhw56Y22Xm7vnnvPznfCwVlqS6y5KBWw7oUw0A/p5CtUI3UPdY25eitgJJc6ATframDMeCdJRhi5and1zQSIIp0dvBs5vCkoF9Mg1XMI0LIesrUB9l5nIbbv2Sr97L9+j+ysycp1Bs0bEDvkN4gdcJG65372JpxX/gJ36dtaFCbLYRBsthDhot0lxD457GE/RPwHeveI8/5UOHMeUVZQsorb+5yjxTgp4cx/VgMiufvEyuG88w+4S8idxq+AHz3Hm5jCQfz4v4F16g/33fthj/kleOf+yL78JwUa8cOv0oD79l1w/vNnZfW2Rp4Fe8xlkKveR2bKOL0FzmyfCA4r6bHfnoj/8CllrU3fMhixo++EtfNhcN+7D9kXL1dW4sS570BmWpB9bgJYshL23heDVfeDu3Aask+fF1Y7KCdrhY66X0lHWdEfifP0MM48+VOIj2m3Dj3iwP7BLeB9hmuDFG1R7KH9QGXTeqRu2UNbtf0Atyq8qpd+kI/eTxXb+1y9UMUSui73joNY+jZ47+8g+bOXVXbpyePgfvIy+Pb7ITH+UTA7rnSp2eeuRvY/f8uJ0iRSGztz/Ca0Bh4CRscjrPwv4if/A7xzP2Rn3gixar7yOLCGjYM95Eikp5yL2P4XgvcegtTNByB+8p3gPXZF6u+HQ6x8L5h50V0weSzNuJD/rIdaoWgo+pruZgaXGGODgE1MUTFGW4vSpGMkw4vaiu4fuFbA2u/TGdN7wpzDxrz3iZUqji7A/fysj0//Mnuxg+Eq5/2iDNmGDBtx51d2Jq2krXlryl8RjhyV7+cQgVUTGf1o0d4Yz9vLHwHZoGECxkjiNAGjA6QzoUVSRxQxNMn6FI0gzmA09mJQypBsEyGhweomgNIuiB/1V9hDj1RMIjP9j0qsip94q9qJ0HrtborRWbsdgfhRfwKr0lvgRN0KiKWzkH3tZsg1C4MA3N44038qeiNJohkBrEWGFy/Qge+a47nlKCfibAoyTY7dzcqxWzuC0/e00kHRJCkgSOvqxkpQ8qt5ynKenf5HWMNOVuIhiWlUvviJf4M96Ailn8s89CPIbDOs7fZD7NCrVFu7i19B5vGf0GF6hm+e15IGQPIdRiN+ysMK+NI3D0HsyNtg7XI43PfuR/ZflyoxOnHeO5DZFoiPXoQ15JigO5y5DyA7/Vdg3m4OXRfj+AhvceGdBiJxzqsaGJ8gYHzeD+etfDVjB+efZOrMfRDZ5y4J3Jo0kCr1sbJeB2OZRNjD/ojYfufoR9JNECs+gFyzCJJYe2ln2KN+qO5lX/orBInOrQ2wdjsUsf1+Grh0Zd9+COkpF4KXeuqWaLxK10H8Rw/CHnwEUveeivhxN4BX9oQz7ymIlfPgLnoB9sjTwAeMgjN3CuJHXwekm9B67RAkfz4LvKoXWm/YE3LDZ4EVMjqcQ9ZJv74eMQlNR/90yGKRpbz+VTpGAkYlSlvgSQMYycikHCh8v82INUcNdgMFQ9gQsckYZaWvnOM95tQdwC5YV9DaHEGdoj/b0Xp1NJniz7XevdMOiayc5Qp0UZn5QTr9KClm/UNHcuYmUl5gAq+hAv9h3/1HWfgIFCPAqBo6V8agHP71cFSynAnbfC8qeUSov5oEe56O2H7nKh0PsYv0Uz+H885kWLsdhuQZjypdUMs1g8G67QS56gOgvCeSP31KDVy1Y6XuC7TesJdiACFA9McCsZqBo/VuidYGSNoO5oGe2u2gdqF4/oEkT5COjqzWtnYLYdKBILHY1/3lKYf0BXvoMUiMu0ul1fLXkUj+5EHwnrsh+/odyDz3f0p8jR9yBZz50xTzSZz9HJzXb1NuKLF9ztELwtQL4c5/MvChCw00+pGoQOLM6WCdt1dVFcvegVizSIE3+Q6SzyUZqqzvjPO2txEI/UHrGxtWI/3YjyHXfeT5J1KCBYYyjyFxyiPg2+mzT2T9SmSe/xXkZ68q/RwZf2KjL/UAima6C3fFbLiz71QGGO1W5qVN45ZEaXKKpbHgT9ZkJ5T87FWgtBqp+36ExFHXgnffqc2J4342G86cx5E4/jrd55O+pxzplfHFrIb/3XGUCG71+y7SUy5A/Khr1KJFxh3JY8i+eA3cRc+p7ZKJs/6pnpOuA+fNu5B98x+KyZJhT0kk/sfre/UnSjSKld58zhw7/nej7ASM6UapdYtKlPZ1jCROkyit9alF9YzGfAt8iw0cDaauAZqWjVomxZ7s3E8/+bLI9bUDIxXQuX1H8iF6gjxBQt64QekLLQkGapkoEXonPLOVhEMOvWR8oX8kSqfDBDgiUbfbfnkrqxeJL9pwNMFLLvgXWFlnOB88B9Z1R/BOfZCZfg3E8jkouejfevfFuiXg3QciM/MWiDUfIXnyrQqAMtP/BPez1yE+fyeY5OGy5n5R2rH9zgNL0j5pMq5UALQThYwvcdobnQTI2Vs5EpO/nPZvdBZNR2rySdq/0fuE6kcjULhInvcvWNuNgvv5u2i9ZYya+Fb/YZBNG+DMI7CzdNrxUmVp5VU9VWqpxy6E1W+4EtPJpUc7ufvCldHUUiDxw4dg7UqGlkY1YWlrmwIv2srmLwwBpyWLU1w7S7uO3iMsXDhv3AbnndsVTciBmEpF/Zc49m8hlhnUuXGNcnshVqe2zSlLvrc9UKE0bRZIAyIDd8V7cOdP1fVQHg++OJ1rQWvH0aqdnQ+no+SC6eCd+mtH73gy5Mfov+F+9Bpabz0C9t5nQCz7L8SqBVpCiOsAEXkfK4bSKxaq3VNKd632p3O0/HkkxLpPtIph6NGIfe9y8OreSsep+j1RCrFyPlIPnQGxfknIt7TYwO/I/MifEzo18zrFJ0g1SdjEFAkck1bIXYcCJwWxNc2zfkIFi+KCeTN8jzZDAfKH9gWfPtLupO7AA98IMFI5sjdvfxOAnwUBPyMNaVazrXLnkZxIWymrNLnrBMBIq+TXUc3IEKKgCANGqd7m1X2R/NFdSg/XesuhyrhQdqk+CCnz4l8R/94vlOWz5c97IXHsn2EP+h5Ewxq0Xr+vUsq397H6D0fJRS+qx8joQqxDMUjSlZHxJdUImW5Q+6RlayMSx/wR9q4Hwf3kdbT+jazeOd+/PIpCi/n2+8EefjLcj2fCeW8KEifehtieWiQs9hH1q9Dy51F6H7Cn38ub5T4zJ3eFk25HbOQpSE25UDGf5Kn/AO+1a3tVz92ntr1xL22sCoy5xuiQLuLH/x32d46HWL1IuUbZI37UQReRXDbpx86ES47RKlQj7RPXfoehcajiOHr0R9FK2tViwR52EpKn3KwSa73xEIiWWu1mk01BrP7QA3CPkZKlPmYwX1+soeBrvQajdOJrehFReuKEyq/56sGKxpZe8h+wCu2qR+MoNXmcWoSTZzzkAWUD0lMugrPgaWXo+SY+tLakm0SOLXqMkZy7lbuOdxQ6laXQnI6SU7/MhXBCJcXY3dZFn+poIV/B5+tAjILFkn/vXSpSiXdcIYeoBwosTb6Pc4frFVm61Pj0GCMpf2UrsQsyAhRgLcbxoL7A5OupcirksPycC1yWn6L/LlmDS3/xhlrds7MeRfqRs1UorbLfLVKTsvX2YxA/+mpYfYYi+940pKddirLLZumdMPNfQCsNau98rvyjMnWFrZ6DUfpLvR0v9fBFELWfKdZAaShXHfJzI3ZF3xNlsHY6UCnr3c/nomXSgYox6pS0+5H5Ca4Qg1LRc7jaoZI4+Vbw/t/V7h4UtcXbbkgiqVy3BOl/XQuxZkFuEVLJ5tLWUWw8h1zyv+09FPEDL0DqYTJQ0WTlsLbfG9aAEWDlxB7bXAIhm2uQfeV6r4za4T8YV1638e33QfywK5C69xQV4Yj3GwVr6NHgXQbobZvEeok9q10oxIJt75/e1kdMtvX2AzWLVZsHSJQ29ZjeOPaNMV4ZVPbky7rXaUiedKOSCJqu3A2yaa0qIvO2uAftTu+ppjbkW6/tyOUoccx1iB9wLrJznoCz6EUkx92m+pDGS/aNu8F33A/x0efDefdxpJ/9DWQTHbolQe5DJec8Cd5zF6QeOAvu/GfUTp5ceF9/IvpNZ/aXP0V1LMyctGzuS89d1d9yM4SMoHSagzK+EFv0RWmbaUd2ZZXOjbzo3PfVZ8EjxlyPQofF2GKeYiPYZZ8W39bVYVDRD35jwEiZNV/Xb0Qixl93BWhTbwc/hci9iYi5+8qNQjFGjzUq44tpHY1mGV2XzJN7zYlpPtdGsel8j/OegT1wb8imGqQeOh9IlMDabk/ER+ugDK33nq4mSsn4+zWjvPFg8H7fRfKkG9Qq33Lb0RBLXvPdsyP2SQ/gO/VH+ZXzNA44eqeLzFIg1FbtlEx/lb9bg2KmVp/dwXsMhLtqEVr+NDLHGINN3/4uhNxADwtGXhBcK+HhlTezVVQdan9COo+FFhxR5gzwtoTSrKB3yBldJeHFqNT+MLl9owHAhhcpVRAF3JH+MIcGgR3lYerWaPX0YzIqZmvMArKSKpDSoio5XetAHb7xxRCjA5OngYYhC6NE/IDzkTj2GrWQNF0xEGjx521kTBOKBm46EcUbAeOJNyO+7+lovf+ncOY8BmvnMUiefBN41+08RKMtjwJoqVPO8MQslThN/ygqUHUvZP59PZx5Uw3G3PbCk4OHqDhb7Hd4LhG7TjVD6xb9fwmufBjVzhfl4to+/OgnpDpjO899jzY7WDybzboHlfxq+X86CCgdeqz9knUomY4/lP1Lvz9IsCuUz6H3WiHY8Z0WfEujryA2VxDTwqwajtgiGV8IGGm/NDl4k1U6cCQwGVKYlIcPlw+vf9EhlA8furS83zCUnj8VrLQarfefDWunAxDf+0ehxmm5/Vg4H81E2S9ehfvpW0i/+Fe1wpeMuw2Ztx+A++mb2o3BeMuEBHWnpBolZz4MpBqQnnEzxOfvqhBgjMKRKUtw7qPmfef+yulcttRBNHwRWODNsz18C6F5Ho5ieKZ1sJBjqcGW8vqz4Nwzw3x7NTPdYPIKX0TU8t1ofC8DD1uD1T6MxSrVQrAfPO9bYNUFj1P5MX2D8kWsqH5Zi4E3xckkR3irBLL2cyNqQ35sygAqC5WbMSROuR3pJ3+hw4mprVVxZd22B+4D1nV7ZcBj5bQNkBz8adtk+Py3ltuPg/vRyx778+Ubz5JfcKzlH6fgPxaMEc9dR6fmzxndzrRmppoZrCRXOkZb7XrxQDGWE6VDwytvjfOIQEAnfTlHP8j1PJkU++WyiR1HoI49+Y0Do7yhb4mTBVmptUj9ZT6RiWcaX1zSBRnAGMqmEAn9MuXI+QuBd+qL2N6nI/381bCHnYjS8fcoVkeg5Lz7BFLTLtfmTRLjyMjgR+GhkdSRiDx+OUmUVaPDi5i9UeUvhFi5vavmfA8tH1HSRg+aLgOh0WQ2cqTBDWlUgTO5SxlO04GwZu4aK4ZqJuKFQLUdRtTGbd/xOCiHiooSnEgTRtgQEhdoIL9Z1QFaHsFVeftRf1QjFuk9o5DF9EyKAXtxPGkskFqAouwkCJRpF1aVMmw5C6d7W0U3aqDohzdhvvjAaCu2yLUPY0IDo7JKk7/mpqKP1yycs8X1aB3W7dL1/pkRm1C5wq9satG+VAFar+m1vw02wxHKzVN93J12h6juDN7UCL58MVgTiQHGwAhNDDMsj/+YjsRMrDEkSmc0Y2yrooUE87YEhsKCvOeKpAaSACNLaawEvKKH2gusDCJkfS0AfoXwJupkWIi1RjtBY4tmeUEZjUEdGt8+WQsxKd1KodPjvIzz5kYAbsaREb5jut/aClC07kmLvl5PBCDoiUeBGO31kgeIXnVCTK/QPG1v3hbtrzZHsdniOaaYl5c/sEJKzvDxaiH+71Ok0O4ZjwkZB05pQ60uQ6QkoaHhA1cUZMwxFTX6mnOh0DgvNFfMNizWbH6VPOcGtDYzaGD0wJGs7krHaACjP9iCAhs5hQoeLoHFIQQThycvX6WtkF/x51sBRqpD5g+97hISP6XGFD37wdljn1zVhID14VzwZfoAJhPY2upInzH6ojQFkWAeMAYJFZtFHen5jjR+W7O0vRlcKP3QCPceaKsORXu0HQbV7vIRKZw3C0K7morm7TVu4HiaS0tH7MpRSK3jy2evHWn6dp8phDBFXsp/tI2p4gN+gZhZ/ltRcA4t+iZItlcJ1fdt9KU5NqLjpNgYb29cRt9r73lflG4hpsgDxmgpUZopcPSt0ib2hbiP0Q7RvlDqacYeif/6i1Pba65Nvf+tAWPT/3XvEUvyBeT4LZNlWq/TpTvcgYOB0jJVH+v9WeDL29zSGKp3IEordx2pwo75wNheX0bHUxSQ/d+FxlZHMLWtMekDf1vMpth4b69eZrmLMQF1XWVOu4C8H74hQiWQO6XP45TaUZ+e9Qvti9SBf5oBfjkiGGY79K6y49DqaJBKz0Ibqlu08MYKWbQN2hjd6p22Ot1IP1eTcII5K6wpFhqJdnR2bQwwFpjpHV0nOzpWollsypgnUbq1hcM2gJHHmLcl0NsrHR34HZTZbQv1TjoztPSPNcs3Ffjae6+jXddeOht9X/62c2Vaxpa4UnYNtUcsDnfEAZBduyuLoPXOTLD1RgAMf39mgV5W4yuwSoeBcaML2MEXOsLDOphU6LGNSndTR7yZowdyoTnq6/iKjRLf7cQDRUVkzH/tVdwHV2U00yCrPXeIURieP/5uqejq5E+s9vLpyP0oEBbpgDb7JdpOHVaiGYy5DY1jR6qxuTxDRvLWZgJG2vHClI7Rimu2GPgxmsBoLp7FFizveQtoyDp8YMW1q8kv6Wv5fGvA2Hx5tzMtjn/QRgJzfKufsRjcAw4FKqqAbAbWay+CNdbled3ltR+NLwpUSzvjlPHFAcsa26C8JizEvtpadTsy/wq93xG86ggT9J8pNHcVczN1qF6PtsmiCrIh32iam/pRybc9SZlA0WQXxepWcCSb9TAy6kgbRvG9LWbcXnp590N0yQsGFzzkHQLVluRfTPlnFFrt1S8wNovN+I1qVzMf73sU3Iv1ayGmGF2bouKvn5ZmjB4okvElrv/5sRiVp5XXNu0x3mh9KZSjI3BxxbXrtPf81/D5VoBR/hY8k+k6Kyvk8KKdX1UNMeZw7XOXSYPNmw2+fKnh8qDfDDWavyVQnRwpINNuDhgLjYaCANEBqtAubTDQvhgKb2xnbhSF3NjEizwfHfX+Y+YsNl7VkWg6kHexBztax0LPFSlTB0qT5w9UrBgdLV6QZ97sMhvUG70daS+zEsXqXiidQqhVbJX1N+60lU575TDua8ZIbjqenjHhidHEGGmn6JexStPeIs4Wzt+wfo8Rd+IrC3oTrV6Hxs5X+VDTJVUHWbb1b0e07WAutx8IOdIwyqRagYZ68E8+BL6gwKXhUmmdl9DbXsmXMeOCF2CMAaLSl+jgLbocR0ZkdJkrsOypSwa78Db06kyDm5El3SxPG2kGluNIx+R7dURi0kfr3N5yba4+HahzUJz2qFlBW2sbM69Q3gX6L+d76aVl0J5wfxRwQ2m3zJvmutKhuRONqGO+ZI4hf9AXpXPGOI2CXHRs5bVfcfaQ1zTGBb9dyYruOzUpxthMjJGAkURpDouMLqRnJMqnfPN1gYJ1MpK9/lm4UygGheOIoytvqKN9jl/551thjM0/r35RCBwSuG8YSBV1ixO7DQV2HxbykmdPPw7W0qwNAJHO1g7etCPEA0Y6+6SDzWb2S+F4dW0v1x1hFOFncr/ChKcjKRWrlF/y/DSieYedSvIdqcPt4TuO+PmGW9Usf87ZN1w/cy4Xw1gzVf128RiY/spYjCxG38yvj48MujTR9tA1Ldxjha621WvF26TYiMj1b+F0275aCAML1ye/1n7KbY1Vc0NE/kiQ5EuD1iYtSivWGCfG6OkXaTugxxgDA5Y3IMwRQ76tCmw95NX5eH6vKkAPe6Pkr7X7f5m4i34rN8ye+EdIwSua669iY+5NfePA2PCziv0si7/qio7vZpc9egGDhgCdOgPNTWDTnyuMCurYFR2sVjNGB5y2zKnWNro5mEkFhoC/9Sg4klA/83GP/fDgnrfA4TH0qV+E4Z9PxYilT8D2z1cJXCgKyJN5oqPvh+kvlx4tM5/zv7crn3qVMV1FzLoGLVWorv5N754aeQbMRN1C/PshhPENB5EjH6M+qN6AjkYsVkkVCHgaKoc3IbRrR1SpaoBX0fhZHVhoCrWzaorotCsA737bh9rdbG+vfyPNG4Y+T7wIrQyFdBNmFGcvwbzjM83dRZF0g6YIPM/DiuGgqAXu5y0URh1VW+XGghKlPWBUbNEAxoAxlpVD7rob0LMPUFau31+zGuxVHdw37xPpRosR/5GHV93UoA812sSPfOxEq2G7Pp8B6McYFnGJn200MNKu2LVjBl8Bxn4CyL7dZywoo814HSkTGR2bL6qY4YKNDnZMmMt9Macmv7M8uVStJN7ECzCPnhF0DKYEhTxS4JjRJ/aZm5t0dv6JKvqXz14KSR76nsSTw6/B2zuMC1WzqmUVjpp3NYau0FGh/dTCGw8NB2gDdHLP5FxhwvPGZzFmljmeZVsUXVoi49D5zbnJmnPtzokq+m5OwR+wIH81VuZgcxIauzz0i8Lz2CHlhzq+SfW5vq7/MrjSu0fXKLykMjoztadFvxN+V8UG8zaEUBGD5veu5drULLpn96ZgNPosOKXX1LvDJJ0RoL8zhbbaI1I9R9cBLumMWf+7vk42ALquvkum0qB3PViMUBlzDSkw6HNjKddXuUnmj6Yw7JutnQtgEu13nz371/2ezrmPm3n74zyXSi4YRM79KuBgxujNjZXoBlpznIWFXHPkewOGROkoY/R8GHsD+/wAABucSURBVFUUPPI6OHEcUKLPIwo+ixYA71LovSJqi9woUWW2OWaVrmrYh44t6AgGFXqmftYECh31YHCP4bmNBsa1Y4dMkcBJfiKJDOtc/foH7cfKAlB7QenRMfCpjg6YnQdI5n5LP/1CBTTX7CiwqR1SZJH29ktzP0hBCIAjPhFmAMzIObf+dP37mIfRlOiC9RXbwaXzgI3P7sufwwmzL0PSMYIGm2gbraxZljAa6g0i5pY5owH8r7YlUZIQZJlDayp0YLkKpapOryegAhw6WUEyRsZ/VzCWVYGzGMvScdCS0z04YCwrmHrWEf67HA4kpcOFpANS6Oh6AkDun3ziez4GJ0To4328+cppFkU6L1Qvg1/Qa9625LxQAR1acY2+iIroqkjGGhME3aLzuCRhKEG3Bk9IySm8AZNCOQ1JAZtLWLQzmUnYELC4pO+SwhPFoP/SM+o3h9SnmUgZk3SN4o8JWAS8+tBvLSVFu98HAX8BC4edCW1Nymd3+fipr5htHx2Lhd6JElx/Yvlp5es4cjhSYPs76RhbmizYcdIvMs8iTTtY9QmByir9vcOB3n1Cc0k+Ow1s/froxq/gGbN/6Ts1rhDih1V3ND+8KcAo559f3tgS/1ACfkEcbmH3jQLGNQcPPh6CPeG12Ycc7JLuMz54oSMFkhNR0pQqf8+VcpdgNSgACgUVgtFOLvSeVyi9dVRvC6SAtQoYTZSN0kNTtDAzD6homEc6PIHPuo3AGzudjoV9Dg50n10al+K0189Bz/qP2m8OXxqKgDUxKwZGgOaCSYpImiHwAkNGgGckZMayZLLKcreXHM11sP+bgUX7RDPCoueYSyDImHRIzUrbplQoNg6a6WFG5iMOU+cwqXv6EpEm9Vtdo3vK95o8U9TZPSpJdd3rBvVXNavnjmi+5z/nNwpBrHnNZIfRhgu3vE4/UMDkwW74bfKAiUYeFN47/nUCRg+RVU/4bpT0HD2j/qqDlbyFnMDUg5zgvtbSqKWDnvU4sGKcHqMlMLWYgC0JVIWkqItxLhBnAjEpBJ0NmGASCehTNeNcihiBrQQSBL5Mg2oArCFcizZStBGD8d3+sGz7iY1LyAdGHxR1dDfPj9H3U917HyCbBdatA0jlVVoKLPaCb5vspxDJMOa0zbC0Nd28e7fJ2Og90w2zJt4pIc8ykPeqqj0n/W6jgHH12CFEMY9gwPPdEqnj2AuL24rpFWrn+rNLf8OA39OsjwzhQPGthVb/E9m4X2ANKdRVKh4jBWAmcZrgROrjU/XHTD0navqiRTh3X+AsZoZhWNp1OJ4cdS3WVO2sUo87zThh1qXY4/NnNbL48CIgWZKtI320YCwNsLS00CoZUi7jadholUBGcmJujBidQ/GiiZ35sQY0sAn0yKaPtaQsXReLT81YVoMXkUmLutSSHqPzJqpQXE+zNw10mv7RZJacUWPpe/4z6j0tDWnA01oHDZ7+tZwUl2tQxbsM8KUSEcE0G9UvQ0hSz+lh1LMeYG8sUwyNqQhomkCn2sADPaYDIPpDgwRq4ssKgujQQ2/I+HIitVYAlKo1KLShHlZ+7RmtbNRaOuiPar3gPXVqLEG757/uxaZQ95nWClCHqzw8xqrst8RSIYidyhiXMsEEkkyKJHNRYgkkpZRJLmWJbJX9KdyiytyD5lwFw+ojv9JRBUtunvhVy7VsWJTOCdO5J3OGHOF6xhdijN4/Yosq5okPjF7SbUNuIRkgjCBaXyKvq7yr9bIIuLT5s37Wxb8G2NXGQ29Ujlx5IGOPuxsFjGvGDFnLGLrEhLNjp5kfLu1oIRrPiA9iFp+VldB7/Tbp0/6K5QORYoykY8ySHESEK9fdZtaFiCjdN3MK5eqHCvRC+pEaK4Mknh3xa8wdmgsvtseiKRjzn+tQ0lqraQjN/Z1j9yLGUwQy68p3Kuve/EmTJhpCcpoPNJ3ImOfp3bgHWEpbpvV4ssJJ71LlusfV27HJTZa1wtPzqbWAJAoveoTS21GaaocfAZQPah7AabDTQMaZSz7xckPlrmUPDf7bOQctvfHRoeueXk7vkXJbPavCxitKqQBSKXO4vu9SUCB/xvjPqUb0LBIUstG7bxn3Ff7471Ei3kd/s9RpBRszTOhAP/N5oldueNYH91XN1X1trfF/e3VkLleHNyjAI9BS36mzci2pAFA/o6LvUsQ3RpK2pQBTarDTayp1sgJDyodkdQW66h61jMUYl8wR4MpQS897ek71vgZogliS8VVa6rr3jA+uTLCY/DhzjmKlvjHIDzfJPUUqFc4LY0lo68Uh1opYb6dRVKKOEreO9kk2zZBJaaOLb3ghl2S180XHPw6oTi5NM/eOdr/uVovJtHDdfarvyc5tr4xS/taun1X/R8bwS0Pp8BG33f0rht2idtNsHDCOHUKHEn/aY8YHHQ4ZJk9EvKE8/qoA2ysnc0UUq1Hx1kSnQqgW7T2/JbwDi7QBRusa1bZC5oVlUs95Da7S0AnpPdakqyC2SX+9397ZUvq+vmakoL772+AW7XQEnj/oWqQT+iD6ZKoOw+Y/gt0Wv4AeNYsE286etLz7qOTbA04btrjb6BGjP7nxsX0+u2uRMhkxRpFGKWsFaASQJP4qwCMxWDJlT+qdbbnEYWzeukTiX8rsQUyPnieW6AGpAlHJSFkm6JvUpgR11f+uAM8DRmoZx7Jw28iXftMQ7zWcSTc7aMOLt5308c/+TXilwMsDKfW+B2gK2ChXPz6SoANJlQtFbkT7z3MPTP1QkfSO953AMhxBMjesbbI6ej/NwxjMgU/66uhE8J91BRi9T799TWxagJn3FVgLMFdIRmV3XeoC/WE+2HrMkNLzQdTi9A79ttSSRGBqS+8aMU+PUVIa5IFhWSo6GCdIVODnSjpFlERzbkmLCSa5YpuOBk0Swwm7lDFIU1Ddk3RPA6syJtEt6m7pIGEtzVzu6TZzZ197veF3ivJz9XXYEezRyK1BS8Xp9b4zLpVTNt1XbLZAfGCzD2ieNDfQ6sKU+ExitHbVocp6+kWz13wdfyEcCDqjDWOM9z4H/tvQlN6n3+PwTpMrDJH1syY8Rqaf4K7EJzHGDyoddUOw93qjgHH1mCGLOLC++yvz928Plf37tT+J/55x/IYOVwuAxHdmLbIomKuUD0SFvGECNud9UX+IzamtgdqfUekaSX5R2OOdc+Qw7c7jgV14t4ZWAPqBW4N+8VvK+xvs9PJ/A2go74nnxlyLxQNGh5pHhWZQTDCn9ko6jWsunrnPry3XcTgnzkZ6QEYSSMAg9TUlXYlymdmx0nEuWZOIn5/lzLE0eGrA84Dvk96Hdtll3YtrbQ+k6D49p80KZEohxSXtGtBgR3/p923DX/5VTbzvsVTomGj9+IhPr75kZN1Ta+i3gywVSHWJ7ernY2TXNT5kdTA3XobuW/khZ0LPuvnM0NcKk/Uia9i5VLoZIEumJe8T5KUKlitUNmU8Q+n4t/1n6Lx6Lx3KIks2de+TFWDqMTrNlMCR8rT0NdqUwATNco91kgnLLwsBsaWBVz8H5nDJYtqur8BTid2UJgGra3HvpIHgGgEkKVGUSOyCu0zqZyg9BgJPrhwS6LuUlgJaYXHhyJLYisxNkkptgqH/3R/kAUKaSmddgdA88Pex+xMwoBSeyT4ATg2WCjg1+IPYoioggSKBIQGjJ0YrWuwFGgmxUcM7KIotUTwohj1KGcHl9dX3ZH/RFj7J9y/r1JROnS8kjmMMq1wbP+r03Ul15jsbBYxrxg6+k2xJPWbM92Kqtw2PG35of8+22LOOgDrmJzSbom5vCjULMEn/utFBeRY3490cu/NZo+fTqEDSi1Sv5FWv7N4qpWUq739B6ED9UACSBggGZaBONtQgBJif9dkHb3znLHzaZz8IP+S/l50t0mu7NS15+ZCPr31mQO27tcRpCbwc4UrLUjpFQeOLmI4StMBElkH2TbdOdCwsqk2WPgtXAx39s+k+gJk7/GyHFC+3f7DkqkXSAk0ZGXc0YKnfHgBJi6nrpByOW5DXj/jPFQ3xnqdR8eKyZeapSy64eOem15tM5XHCZjLlX/AOpUiQzdr/JIFkDLI1BSTt8HV1LcbU8Tv0DDlntJAY29rquInCLhZEUIjAm6PLShPpKyN0Co1ZRq3gfYg+0VeiCyXeX5YFS9LZONGh6j9E17OS0X16znyQ2eG8MmlweiZtaxClpiCPMDVGfFW2C0bvBddtSQDHFAgToFkaGDUYx4xrksG/t7LHWNaaPDnbecM1TufGLwgYHQJJR/IYPaP1iJyAkyiYSyCZlqUla9NTpEQ8b1umyRBDQYINQIwCZh6g5vSH1MOv7nUJRvz3PpS2bvAS0fNHhQTzWKFmiNroooFT6x8UgG0M8kTBw3w3gpqW0pCIEzo96E5rG53avrsxxcOaMYP3BWOvS5sP7fni+/PbSrruVOzALfutrIvuPqaZUnHBkHLG7jU/bYU5eahaPGcFjL7oS6xRue94Ry6TPKpYYthXJADFAmwwaCDtHOf1fg5D1WDwixN5P2uXYE3nndGa7Cw+Hjj60qrWxYtHLpvyBTFAy4bIusTamAKtWIyipGUVoMU8NihdNe0lTaS+TnrKChsnu3bCIWAjgJMeCMks5F9Hz/nrOfOO+FWXzNqsjwxKXZ9lssR7rhlAaYxJ9TcO9feGnV6/qCXW5bK4aH7gwiWHX97FWRoo/GQcsjwJKTOQDSTzpyFLyY3H+2Rb4TZ31uA2cANcDIbEib5xO2/h6ajSaJPHc6FjyfEY+OLVsJMOeIyAxAfRJrBupWA1JWANLng1gLo6fb5fUIAqgHnMk5M7bOTTnAYrBzkmA82kyi4H+Q4wNBOE608L+QrEJeMecLY6GlRpgaAYJ6VxsJQjWToGVuKClSzvcyRrLbkWahWQNbKq4YzmLms/JLAlIM4yybNZcALYhB1j/neWFaWJdZkZkqzbxuQJ1Fc+MSkCgGqO+tvO6BkFoDkUNcH23UGn4vkD/4B95/4NY9/8c7ASBrxCsUmyQHvH5xAYWp5u0TtRN9qYphTtz/eQ378xx5Q6IDy8cj3DyLcKtdmss2/XKSBV1SZ9NgoYKYe1Y4e8CIaa7i/PP6VYjqtORLfSGJ/pSDYoqLDBqtR7oZbwfCV8tZ/RsXmWk+hqYbLMYJXzwJEU/8pQ4jl8EyB6orYyisg4Ym4vMJRA8Do49uqANKoiFANKowzR4Cn6t7E7QQE7c5vL+V4yzuticQgCKwK1uIAgpiLJM86CTNIZ7zaTIgNJrCpZwoRIM9lLNu1puTi4pqriavJHKEtByjiTFOO8ItEgp+xyz4CPq0bfd8Vr2x9YlYAkp9LqZI651dDvUv2b1vfOLZC0XIkWSNEMefegx3ocvvCkNT0qIft28t4j09poOGxMDgg3aYRtwS+RYWPxzxC3O+dA0a4CsxrCIMnLwKgd/aquawLr4f2gezWtYJ1LIOkvnX9Y1wryRVAjhZeCNabBqlClQDW2rO8vmMsvzzWbXO12qxmbqmioYXEwAtbyOJTvAgFrmktO7NgSoqykxn1Pu/gYjR5gm/7iy0DGj9DX4BkjDQLM1kQ1VncehLcHn44Ptz9UZdB9w4c47/HDQqKgr3P3nbiVvtJnkL6Bx2eMJiaYUldUujTHUPSd6Pjy9Y1MLnFSYv9uT2HVpgzBjQbGdWN230VAvMcYO637jA8eL5Rp3SnsSRfsuA5FWtmUUrfzjm+dVuzQY4+kdyRuoxmlbl07vSOYzC2wbuJzSN4cBkQTBA2wDAFn9LrPcv3JwZBNlcQGpWKx+pJSJmRKg1pZBRfEUirjdVIkIKtLIDes1y917ge5dh3glkLuWo8rHeCJmnIolu5UhrUS13xnye8E7GGXvTLgyHRnyMEAFiwEUp0gh/eCfHwhZLdBtN0IAlfpU1a+hmb/n0nSJyzeeVwMvwPDwgijHJT7PVOtMcCcVWAUTmpBLRgG6eZK1ITfsxvBSpcNIWdlpfNVHy4fkXssUL52vAWsphzM8sC1IQNWjWpkRLqsc0v6EylREurcEMAV6CKfTNAtg00GPz0gmnzow/i0dy6gS2mqBmc+cyK61S1WcykXvIQMODpwr69L9A06PmhGycTXNXAsJmd2elSO2ZT0NxoYKZO1Y4eeLiFvZVwc1v2lhfqAY+Oz4URcyRi7SslY5smQHruLxppV/WGIy37DmWKAfz94zPui/pisUeXpxcnzxWpKyDsFU62IVCa3AjzVP1RuaddDJlfoa9oRTRt7DVk5d2qeN4qiwOmnaFy3ORYtT8qR2RLIHmWQTi2kU5EDp/RqSAIxerXxY0iaRDMPzBVt3y/wQKw3cifeX+V7LepynvnUso/AsGDysf1zk2lTRsO2d76xFigo9nsjr/bgoYOzQr5vFMa17MyQLpmPCYUwZ2cNpslasERP/Z3GUB+wN7MSOpRfCB1zkysqhkafDc05rwD0zufdR+DOI55UV8pa1+P0F09Drw2eNi0kDXoqJ0/fqOaOZ2wJVGL+6Yv+tI+gUO5YHC8tE7wjPeTPf/XXn5IeaxSQ13d7DG0aYop1+CYBIyW2ZuyQ3wH4OYCf9Jgxf6qZQe0xqJZxzIRk3/GP9NA+w74C10DBApYU9VxQUx8BTZ7j93rOzh9OO6oj0SuaYoq+8THVByxLmiX6CCC5BojVEWLmUNoExADho02pfcT88EjaNU+XmQaCzdHsuji+8xD8+/GFYCcOgsRVADXe7/KHbx6Tk+ehk+vg9/ZduKhQJ/7kqRU720x8BMamTj6m33Hf2MzeltHX2gJrxw5ZLoG+QSZMXt3j5QVXmplGwXXdcdg/buFZR6IiEJl9pAvp78OGFOM83WDs5nlqQOLB0XcikW3CoXOvQ0XLGm/06kmiR32uRFqjpOenvu7r6M0a5EzRsrknZKoLwLNg8QawkvXKouWtFQHSezOr6L5ZJaVrr5IPbVvuX/kIPBls47prk4FRgeOYIbcBOE8yXNNDzP8dm5nTR607ChU8jjMZMCKI4rBxZdvkp42AyH6P+b3n15e5dbseL6VNqmCHlS3/J4vXu8qpWrvA5FTw+iySnGomNwpC5TOh3hsT5DG0hkvc3eVJLNjUyjhn4xjCWPsuhBYfP70zpi07g0lMBvDS5GP7H7Kp+Wx7b/NqgTVjhrwFhr38UjHgje4z5u/XXinXHYVdEMNPLaB3ofhV5txgMUXlgp040WGvniXPeXJkJP9JY0ulvzVSbRNVPmOhkpGXrN4PRN60yoEu9/GO7VYX1C4kmoQ1u54opXEYNs/CLl85h8WaOrDH1khcO5z8lzv4x/+3d7WxTZVR+Dn9WBk4BjLWDdmmyBC2zg9C4g+/YIUpxAxKVIjGIKUgiBKJP4zEECDRxBh/kCEJbN0w/jAGYkdggsC6KUJUVJB1w8wfaiewdW5B0cDW9R7z9mN00G39uGs3ec/P3vOec97nNufe956vybUYkIIzHHY3uexY2G/l7VxQvFkheh+MCwro1dyGpi8Tkzjyqz0Lix5lRXMy4ON4V46zOeLb2MhbMryGXht2XmNsz7RDxFBuIWutexcYGwH8WG3JH7Qj+vCaJMdoQsBjNp1lxoNhNnUbnS4Ru/nfUffCGZm9yngHAY+H5eKLfV7TMy+6s6H5VLI3ndAbY8hYj7n4KWaqgnhKEY4R086pzqajo/Ej/y+LZxom9o5rBAefxoQyY73reLKBj1afdy0+01di0COytdZ9HAzRzaKz2pLnT42SNLYR4Geh9XSZPARkMOMKCK1E+Cq73rVlbO9saOuDgd1dIPF/7qeuNEU3b3LjuahLkNXASBXHKAzxzC+6gzUa0ZVikz/7HvwbgQ5B4c97DPgu74vmiG88Yi0XFaW1G1GY29AS95EzGjDaF5aUaBSuYKA/tKFVaE5WY9PP0axPNg/bMKeP8LK+Eq8PpntNrdvFjGJxbJmQNn5SxZIpIuVQkkRgTCIgSiH/LDV9qADrb2yATxqdzeJtMmmkmmMMWdxuLplB4PVgrAaQFfqdwJdEWhgBfzHoKqCkgWkSCCLl6z4Rp0g36HMyjpwdkZGIHWbTWQw8mgjT/s02XJ8SS5egpN0ZkcxrwzZinNHZMUjLcsBa2+YGc57/AUPaR2qW3XU6mTZKXRIBtREQzrGz1HSCgfBUm+U3B3nV1hsuT3XHGBL+6/y7x2VQxpNM/JgCiNrqB4JVVAP3w+gE+DS0dMrX11szrbE1rijScCB1mIv3gGld2FNIYdZsyGlo2jvc2lRcF8cpbyZa9T24nz4WtRSRyepwi5TIQOcK0KZqS15FKuyVOiUCaiLQZS4u6lPIFQrcMqEup971tJo6hpI1Yo4xktKuxTMn9vWMm8qKL12rV7qv6HxdhTH0dEwEFM8Ck5UJ9qAD+VYL2pLlPO9MROZIru2x4RkwrAY7lgylx+po2wZQAUi5zhpNXU359MMjaZeULREIIbC61r0CjPVareatqvLp38SDzKX5s7J02rSlYCXdpyiHc8PaGd4UgOoyOl39J9B4dMWyJqmOMRbD1ObtNM+exay1KMyNOQ0twaESamtRRx6/BoP3Gs4zY7vBjrhatqtjiZQiERgcAavDLYZQlfm/4hB9YF+WJ/obRk2dpXPm+qA5RoFKSXHiqTc6m/oDL+1m0xlizAtc47+NzubMqIUnyHjbOMYEcUrq8l4b9hBhpY6QS3v9zWgkSQRGHQJWh1t89vI7NQKO2y35wklGTZ5SU2N4IJSAq41TXJOf2w9fMFAqar8DrTQZJ4wNrqTl6UrHGPVtTA6jdy22M2MrAe/oq/B2crRKLRKB2BGwOtzioS16WAi6XG3JnxaLlI5Sk+iJ4m9PxODNOsKp9sv8U3YWilmnEbOlZgTliT7nZVn1TSdikZ8Ir3SMiaCn4lp+ERO8BohKolUEdOv6cC/tiz9zX0XTpCiJQEQErI62VoALQxcV+B7aZ7nnXLRweUpNFxiY7XeMGlomBjURaVcCLKaQ3hh/ybzV2NAcPpslWhVx80nHGDd06izkddB7FYiB1TsAFPilEjamVWK3OhqkFInAyCCw5qB7NyvYECbdXm3Jt0WrLdiMpmYI/otEeCO73vVptDLV4pOOUS0kY5TjXYs3WfGXfC0CBb7TBOmTtCo8H6M4yS4RSDoCLx1qK9T4+Dw40Pzc39Bcy3M/Ki+IulCjw1zygsh7DpY/iubevzPoay376to7cMTU0hI+CSNpe5SOMWlQD1TktaGOcUsqzg/6HjwxVN5iisyVaiUCERFYc/CPVayw3T9AQxDzgerlBTcGTY1R3KRjTNGN67NhnQLsCakn4KguHSuoArKkL0X3RKqNDwGrw11GoPcU4gM1S/Pe7R+dG5+4UbFKOsYU3QZ+BTneXlxk4DIBO/RVqByNTTdSBI9UKxFIKQLSMaYQ/t7VeFj/D76n/ZGn5aXQNKlaInBbI/Af7NFDa4Ye3CIAAAAASUVORK5CYII="},16722:function(xn,un,Re){"use strict";Re.d(un,{Z:function(){return ye}});const ke=we=>typeof we=="object"&&we!=null&&we.nodeType===1,Se=(we,pe)=>(!pe||we!=="hidden")&&we!=="visible"&&we!=="clip",Be=(we,pe)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const de=getComputedStyle(we,null);return Se(de.overflowY,pe)||Se(de.overflowX,pe)||(ge=>{const fe=(ue=>{if(!ue.ownerDocument||!ue.ownerDocument.defaultView)return null;try{return ue.ownerDocument.defaultView.frameElement}catch(ee){return null}})(ge);return!!fe&&(fe.clientHeight<ge.scrollHeight||fe.clientWidth<ge.scrollWidth)})(we)}return!1},Le=(we,pe,de,ge,fe,ue,ee,z)=>ue<we&&ee>pe||ue>we&&ee<pe?0:ue<=we&&z<=de||ee>=pe&&z>=de?ue-we-ge:ee>pe&&z<de||ue<we&&z>de?ee-pe+fe:0,Ce=we=>{const pe=we.parentElement;return pe==null?we.getRootNode().host||null:pe},xe=(we,pe)=>{var de,ge,fe,ue;if(typeof document=="undefined")return[];const{scrollMode:ee,block:z,inline:oe,boundary:re,skipOverflowHiddenElements:ae}=pe,le=typeof re=="function"?re:wt=>wt!==re;if(!ke(we))throw new TypeError("Invalid target");const me=document.scrollingElement||document.documentElement,ve=[];let Pe=we;for(;ke(Pe)&&le(Pe);){if(Pe=Ce(Pe),Pe===me){ve.push(Pe);break}Pe!=null&&Pe===document.body&&Be(Pe)&&!Be(document.documentElement)||Pe!=null&&Be(Pe,ae)&&ve.push(Pe)}const Ae=(ge=(de=window.visualViewport)==null?void 0:de.width)!=null?ge:innerWidth,Oe=(ue=(fe=window.visualViewport)==null?void 0:fe.height)!=null?ue:innerHeight,{scrollX:Ie,scrollY:Ze}=window,{height:qe,width:Je,top:mt,right:gt,bottom:Mt,left:at}=we.getBoundingClientRect(),{top:_t,right:ht,bottom:Dt,left:ut}=(wt=>{const xt=window.getComputedStyle(wt);return{top:parseFloat(xt.scrollMarginTop)||0,right:parseFloat(xt.scrollMarginRight)||0,bottom:parseFloat(xt.scrollMarginBottom)||0,left:parseFloat(xt.scrollMarginLeft)||0}})(we);let ot=z==="start"||z==="nearest"?mt-_t:z==="end"?Mt+Dt:mt+qe/2-_t+Dt,ct=oe==="center"?at+Je/2-ut+ht:oe==="end"?gt+ht:at-ut;const yt=[];for(let wt=0;wt<ve.length;wt++){const xt=ve[wt],{height:zt,width:Ut,top:cn,right:jt,bottom:mn,left:Ft}=xt.getBoundingClientRect();if(ee==="if-needed"&&mt>=0&&at>=0&&Mt<=Oe&><=Ae&&(xt===me&&!Be(xt)||mt>=cn&&Mt<=mn&&at>=Ft&><=jt))return yt;const Yt=getComputedStyle(xt),tn=parseInt(Yt.borderLeftWidth,10),lt=parseInt(Yt.borderTopWidth,10),Ue=parseInt(Yt.borderRightWidth,10),je=parseInt(Yt.borderBottomWidth,10);let rt=0,dt=0;const tt="offsetWidth"in xt?xt.offsetWidth-xt.clientWidth-tn-Ue:0,Ke="offsetHeight"in xt?xt.offsetHeight-xt.clientHeight-lt-je:0,De="offsetWidth"in xt?xt.offsetWidth===0?0:Ut/xt.offsetWidth:0,ze="offsetHeight"in xt?xt.offsetHeight===0?0:zt/xt.offsetHeight:0;if(me===xt)rt=z==="start"?ot:z==="end"?ot-Oe:z==="nearest"?Le(Ze,Ze+Oe,Oe,lt,je,Ze+ot,Ze+ot+qe,qe):ot-Oe/2,dt=oe==="start"?ct:oe==="center"?ct-Ae/2:oe==="end"?ct-Ae:Le(Ie,Ie+Ae,Ae,tn,Ue,Ie+ct,Ie+ct+Je,Je),rt=Math.max(0,rt+Ze),dt=Math.max(0,dt+Ie);else{rt=z==="start"?ot-cn-lt:z==="end"?ot-mn+je+Ke:z==="nearest"?Le(cn,mn,zt,lt,je+Ke,ot,ot+qe,qe):ot-(cn+zt/2)+Ke/2,dt=oe==="start"?ct-Ft-tn:oe==="center"?ct-(Ft+Ut/2)+tt/2:oe==="end"?ct-jt+Ue+tt:Le(Ft,jt,Ut,tn,Ue+tt,ct,ct+Je,Je);const{scrollLeft:$e,scrollTop:We}=xt;rt=ze===0?0:Math.max(0,Math.min(We+rt/ze,xt.scrollHeight-zt/ze+Ke)),dt=De===0?0:Math.max(0,Math.min($e+dt/De,xt.scrollWidth-Ut/De+tt)),ot+=We-rt,ct+=$e-dt}yt.push({el:xt,top:rt,left:dt})}return yt},be=we=>we===!1?{block:"end",inline:"nearest"}:(pe=>pe===Object(pe)&&Object.keys(pe).length!==0)(we)?we:{block:"start",inline:"nearest"};function ye(we,pe){if(!we.isConnected||!(fe=>{let ue=fe;for(;ue&&ue.parentNode;){if(ue.parentNode===document)return!0;ue=ue.parentNode instanceof ShadowRoot?ue.parentNode.host:ue.parentNode}return!1})(we))return;const de=(fe=>{const ue=window.getComputedStyle(fe);return{top:parseFloat(ue.scrollMarginTop)||0,right:parseFloat(ue.scrollMarginRight)||0,bottom:parseFloat(ue.scrollMarginBottom)||0,left:parseFloat(ue.scrollMarginLeft)||0}})(we);if((fe=>typeof fe=="object"&&typeof fe.behavior=="function")(pe))return pe.behavior(xe(we,pe));const ge=typeof pe=="boolean"||pe==null?void 0:pe.behavior;for(const{el:fe,top:ue,left:ee}of xe(we,be(pe))){const z=ue-de.top+de.bottom,oe=ee-de.left+de.right;fe.scroll({top:z,left:oe,behavior:ge})}}}}]);
|