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

1226 lines
2.9 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(self.webpackChunk=self.webpackChunk||[]).push([[7460],{10906:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return ye}});var ke=Ie(71409),Se=Ie(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=Ie(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(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return ye}});var ke=Ie(71409),Se=Ie(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=Ie(7657),xe=function(pe,de){return Se.createElement(Ce.Z,(0,ke.Z)({},pe,{ref:de,icon:Le}))},be=Se.forwardRef(xe),ye=be},8336:function(){"use strict"},12469:function(){"use strict"},99587:function(Sn,ln){"use strict";ln.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},42909:function(Sn,ln){"use strict";ln.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"}},39744:function(){"use strict"},3932:function(Sn,ln,Ie){"use strict";var ke=Ie(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"})));ln.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},64126:function(Sn,ln,Ie){"use strict";var ke=Ie(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"})));ln.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},63720:function(){"use strict";function Sn(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(Sn.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(Sn.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(Sn.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(Sn.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 Sn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+z);if(z.defaultValue<z.minimum||z.defaultValue>z.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+z.defaultValue);var oe=go.Shape._FigureParameters[ue];oe||(oe=[],go.Shape._FigureParameters[ue]=oe),oe[ee]=z};var ln=[];function Ie(ue,ee){var z=ln.pop();return z===void 0?new go.Point(ue,ee):(z.x=ue,z.y=ee,z)}function ke(){var ue=ln.pop();return ue===void 0?new go.Point:ue}function Se(ue){ln.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,De=NaN,Oe=NaN;if(Pe===0)if(Ae===0)ue===z&&(De=ue,Oe=ee);else{var Ze=(ae-me)/Ae,qe=ae-Ze*re;De=ue,Oe=Ze*De+qe}else if(Ae===0){var Xe=(ee-oe)/Pe,vt=ee-Xe*ue;De=re,Oe=Xe*De+vt}else{var Xe=(ee-oe)/Pe,Ze=(ae-me)/Ae,vt=ee-Xe*ue,qe=ae-Ze*re;De=(qe-vt)/(Xe-Ze),Oe=Xe*De+vt}return ve.x=De,ve.y=Oe,ve}function Le(ue,ee,z,oe,re,ae,le,me,ve,Pe,Ae,De,Oe,Ze){var qe=1-ve,Xe=ve,vt=ue*qe+z*Xe,gt=ee*qe+oe*Xe,kt=z*qe+re*Xe,at=oe*qe+ae*Xe,bt=re*qe+le*Xe,ct=ae*qe+me*Xe,Rt=vt*qe+kt*Xe,ut=gt*qe+at*Xe,ot=kt*qe+bt*Xe,ht=at*qe+ct*Xe,yt=Rt*qe+ot*Xe,_t=ut*qe+ht*Xe;Pe.x=vt,Pe.y=gt,Ae.x=Rt,Ae.y=ut,De.x=yt,De.y=_t,Oe.x=ot,Oe.y=ht,Ze.x=bt,Ze.y=ct}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 Sn("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 Sn("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 Sn("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 Sn("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 Sn("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 Sn("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 Sn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Sn("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 Sn("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 Sn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Sn("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 Sn("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 Sn("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 Sn("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 Sn("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 Sn("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 Sn("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(),De=ke(),Oe=ke();Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.42,Pe,Ae,De,Oe,Oe);var Ze=ke(),qe=ke(),Xe=ke();Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.58,Oe,Oe,Xe,Ze,qe);var vt=ke(),gt=ke(),kt=ke();Le(le,me+ae,le-re,me+ae,le-ae,me+re,le-ae,me,.42,vt,gt,kt,Oe,Oe);var at=ke(),bt=ke(),ct=ke();return Le(le,me+ae,le-re,me+ae,le-ae,me+re,le-ae,me,.58,Oe,Oe,ct,at,bt),ve.add(new go.PathSegment(go.PathSegment.Move,ct.x*ee,ct.y*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,at.x*ee,at.y*z,bt.x*ee,bt.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,De.x*ee,De.y*z,Pe.x*ee,Pe.y*z,Ae.x*ee,Ae.y*z)),ve.add(new go.PathSegment(go.PathSegment.Line,ct.x*ee,ct.y*z).close()),ve.add(new go.PathSegment(go.PathSegment.Move,kt.x*ee,kt.y*z)),ve.add(new go.PathSegment(go.PathSegment.Line,Xe.x*ee,Xe.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,kt.x*ee,kt.y*z,vt.x*ee,vt.y*z,gt.x*ee,gt.y*z).close()),Se(Pe),Se(Ae),Se(De),Se(Oe),Se(Ze),Se(qe),Se(Xe),Se(vt),Se(gt),Se(kt),Se(at),Se(bt),Se(ct),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 Sn("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(),De=ke(),Oe=new go.PathFigure((le-ae)*ee,me*z,!1);oe.add(Oe),Oe.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,De,Pe,ve,ve),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*ee,Pe.y*z,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z));var Ze=Ie(Pe.x,Pe.y);Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.56,ve,ve,Pe,Ae,De);var qe=Ie(Pe.x,Pe.y);Oe.add(new go.PathSegment(go.PathSegment.Line,(Ze.x*.1+.95*.9)*ee,Ze.y*.1*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*ee,Ze.y*.1*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*ee,0)),Oe.add(new go.PathSegment(go.PathSegment.Line,ee,0)),Oe.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,(qe.x*.1+.9)*ee,.15*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,(qe.x*.1+.9)*ee,(qe.y*.1+.05*.9)*z)),Oe.add(new go.PathSegment(go.PathSegment.Line,qe.x*ee,qe.y*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z,(le+re)*ee,(me+ae)*z)),Oe.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 Xe=new go.PathFigure(le*ee,(me-ae)*z,!1);oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(le-ae)*ee,me*z,(le-re)*ee,(me-ae)*z,(le-ae)*ee,(me-re)*z)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,(me+ae)*z,(le-ae)*ee,(me+re)*z,(le-re)*ee,(me+ae)*z)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(le+ae)*ee,me*z,(le+re)*ee,(me+ae)*z,(le+ae)*ee,(me+re)*z)),Xe.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 vt=new go.PathFigure((le-ae)*ee,me*z,!1);return oe.add(vt),Se(ve),Se(Pe),Se(Ae),Se(De),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 Sn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Sn("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 Sn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Sn("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 Sn("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 Sn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Sn("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 De=Be(0,.5,.3,me/z,0,ae/z,1,ae/z,ke());return Pe.spot1=new go.Spot(De.x,De.y),De=Be(.7,ve/z,1,.5,0,le/z,1,le/z,De),Pe.spot2=new go.Spot(De.x,De.y),Se(De),Pe}),go.Shape.setFigureParameter("IBeamArrow",0,new Sn("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 Sn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Sn("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 De=Be(.7,ve/z,1,.5,0,le/z,1,le/z,ke());return Pe.spot2=new go.Spot(De.x,De.y),Se(De),Pe}),go.Shape.setFigureParameter("Pointer",0,new Sn("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 Sn("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 Sn("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 Sn("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 Sn("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 De=.05,Oe=be*De;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+De)*ee,Pe*z,(ve+Oe)*ee,(Pe-De)*z,(ve+De)*ee,(Pe-Oe)*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)),De=.025,Oe=be*De,ve=.825,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-De)*z,(ve+De)*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-De)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-De)*ee,Pe*z,(ve-Oe)*ee,(Pe-De)*z,(ve-De)*ee,(Pe-Oe)*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)),De=.05,Oe=be*De,ve=.5,Pe=.7,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-De)*z,(ve+De)*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-De)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-De)*ee,Pe*z,(ve-Oe)*ee,(Pe-De)*z,(ve-De)*ee,(Pe-Oe)*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)),De=.025,Oe=be*De,ve=.175,Pe=.35,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-De)*z,(ve+De)*ee,(Pe-Oe)*z,(ve+Oe)*ee,(Pe-De)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-De)*ee,Pe*z,(ve-Oe)*ee,(Pe-De)*z,(ve-De)*ee,(Pe-Oe)*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)),De=.05,Oe=be*De,ve=.05,Pe=.25,Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-De)*z,(ve-De)*ee,(Pe-Oe)*z,(ve-Oe)*ee,(Pe-De)*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 Sn("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 De=new go.PathFigure((ve+me)*ee,Pe*z,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+me)*z,(ve+me)*ee,(Pe+le)*z,(ve+le)*ee,(Pe+me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee,Pe*z,(ve-le)*ee,(Pe+me)*z,(ve-me)*ee,(Pe+le)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-me)*z,(ve-me)*ee,(Pe-le)*z,(ve-le)*ee,(Pe-me)*z)),De.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,De=(ae-z)/2,Oe=new go.PathFigure(ve*ee+Ae,(Pe+me)*z+De,!0);oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee+Ae,Pe*z+De,(ve-le)*ee+Ae,(Pe+me)*z+De,(ve-me)*ee+Ae,(Pe+le)*z+De)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve-me)*ee+Ae,(Pe-le)*z+De,(ve-le)*ee+Ae,(Pe-me)*z+De)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me+le*.5)*ee+Ae,Pe*z+De,ve*ee+Ae,(Pe-me)*z+De,(ve-me+le*.5)*ee+Ae,(Pe-le)*z+De)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve-me+le*.5)*ee+Ae,(Pe+le)*z+De,ve*ee+Ae,(Pe+me)*z+De).close()),le=be*.4,me=.4,ve=.2,Pe=.5;var Ze=new go.PathFigure(ve*ee+Ae,(Pe+me)*z+De,!0);oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee+Ae,Pe*z+De,(ve-le)*ee+Ae,(Pe+me)*z+De,(ve-me)*ee+Ae,(Pe+le)*z+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve-me)*ee+Ae,(Pe-le)*z+De,(ve-le)*ee+Ae,(Pe-me)*z+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me+le*.5)*ee+Ae,Pe*z+De,ve*ee+Ae,(Pe-me)*z+De,(ve-me+le*.5)*ee+Ae,(Pe-le)*z+De)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve-me+le*.5)*ee+Ae,(Pe+le)*z+De,ve*ee+Ae,(Pe+me)*z+De).close()),le=be*.2,me=.2,ve=.5,Pe=.5;var qe=new go.PathFigure((ve-me)*ee+Ae,Pe*z+De,!0);oe.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve-me)*ee+Ae,(Pe-le)*z+De,(ve-le)*ee+Ae,(Pe-me)*z+De)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee+Ae,Pe*z+De,(ve+le)*ee+Ae,(Pe-me)*z+De,(ve+me)*ee+Ae,(Pe-le)*z+De)),qe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve+me)*ee+Ae,(Pe+le)*z+De,(ve+le)*ee+Ae,(Pe+me)*z+De)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-me)*ee+Ae,Pe*z+De,(ve-le)*ee+Ae,(Pe+me)*z+De,(ve-me)*ee+Ae,(Pe+le)*z+De)),le=be*.4,me=.4,ve=.8,Pe=.5;var Xe=new go.PathFigure(ve*ee+Ae,(Pe-me)*z+De,!0);oe.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee+Ae,Pe*z+De,(ve+le)*ee+Ae,(Pe-me)*z+De,(ve+me)*ee+Ae,(Pe-le)*z+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve+me)*ee+Ae,(Pe+le)*z+De,(ve+le)*ee+Ae,(Pe+me)*z+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me-le*.5)*ee+Ae,Pe*z+De,ve*ee+Ae,(Pe+me)*z+De,(ve+me-le*.5)*ee+Ae,(Pe+le)*z+De)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve+me-le*.5)*ee+Ae,(Pe-le)*z+De,ve*ee+Ae,(Pe-me)*z+De).close()),le=be*.8,me=.8,ve=1,Pe=.5;var vt=new go.PathFigure(ve*ee+Ae,(Pe-me)*z+De,!0);return oe.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me)*ee+Ae,Pe*z+De,(ve+le)*ee+Ae,(Pe-me)*z+De,(ve+me)*ee+Ae,(Pe-le)*z+De)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe+me)*z+De,(ve+me)*ee+Ae,(Pe+le)*z+De,(ve+le)*ee+Ae,(Pe+me)*z+De)),vt.add(new go.PathSegment(go.PathSegment.Bezier,(ve+me-le*.5)*ee+Ae,Pe*z+De,ve*ee+Ae,(Pe+me)*z+De,(ve+me-le*.5)*ee+Ae,(Pe+le)*z+De)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee+Ae,(Pe-me)*z+De,(ve+me-le*.5)*ee+Ae,(Pe-le)*z+De,ve*ee+Ae,(Pe-me)*z+De).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(),De=ke();Le(le,me-ae,le+re,me-ae,le+ae,me-re,le+ae,me,.5,ve,ve,Pe,Ae,De);var Oe=Ie(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,De.x*ee,De.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,De,Pe,ve,ve),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*ee,Pe.y*z,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z)),re=be*.3,ae=.3,Le(le-ae,me,le-ae,me-re,le-re,me-ae,le,me-ae,.5,Ae,De,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,De.x*ee,De.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,De),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Pe.x*ee,Pe.y*z,De.x*ee,De.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(De),Se(Oe),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,De=.5,Oe=.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,De*z,Ae*ee,.7*z,Ae*ee,De*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+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)),De=Ae*.5,Oe=le,Ze=le,qe=Ae*Oe,Xe=Ae*Ze;ae.add(new go.PathSegment(go.PathSegment.Bezier,(me-Oe)*ee,ve*z,(me-(qe+Oe)/2)*ee,(ve+(Ze+Xe)/2)*z,(me-Oe)*ee,(ve+Xe)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,(ve-Ze)*z,(me-Oe)*ee,(ve-Xe)*z,(me-qe)*ee,(ve-Ze)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(me+Oe)*ee,ve*z,(me+qe)*ee,(ve-Ze)*z,(me+Oe)*ee,(ve-Xe)*z)),ae.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ee,(1-.595)*z,(me+Oe)*ee,(ve+Xe)*z,(me+(qe+Oe)/2)*ee,(ve+(Ze+Xe)/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 vt=new go.PathFigure(.2*ee,z,!1);oe.add(vt),vt.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 De=new go.PathFigure((ve-le)*ee,Pe*z,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe-le)*z,(ve-le)*ee,(Pe-me)*z,(ve-me)*ee,(Pe-le)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ve+le)*ee,Pe*z,(ve+me)*ee,(Pe-le)*z,(ve+le)*ee,(Pe-me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,ve*ee,(Pe+le)*z,(ve+le)*ee,(Pe+me)*z,(ve+me)*ee,(Pe+le)*z)),De.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,De=.9,Oe=new go.PathFigure((Ae-ve)*ee,De*z,!0);oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De-ve)*z,(Ae-ve)*ee,(De-Pe)*z,(Ae-Pe)*ee,(De-ve)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+ve)*ee,De*z,(Ae+Pe)*ee,(De-ve)*z,(Ae+ve)*ee,(De-Pe)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De+ve)*z,(Ae+ve)*ee,(De+Pe)*z,(Ae+Pe)*ee,(De+ve)*z)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-ve)*ee,De*z,(Ae-Pe)*ee,(De+ve)*z,(Ae-ve)*ee,(De+Pe)*z)),ve=.1,Pe=be*.1,Ae=.4,De=.9;var Ze=new go.PathFigure((Ae-ve)*ee,De*z,!0);return oe.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De-ve)*z,(Ae-ve)*ee,(De-Pe)*z,(Ae-Pe)*ee,(De-ve)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+ve)*ee,De*z,(Ae+Pe)*ee,(De-ve)*z,(Ae+ve)*ee,(De-Pe)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De+ve)*z,(Ae+ve)*ee,(De+Pe)*z,(Ae+Pe)*ee,(De+ve)*z)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-ve)*ee,De*z,(Ae-Pe)*ee,(De+ve)*z,(Ae-ve)*ee,(De+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,De=be*.05,Oe=.175,Ze=.95,me=new go.PathFigure((Oe-Ae)*ee,Ze*z,!0);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze-Ae)*z,(Oe-Ae)*ee,(Ze-De)*z,(Oe-De)*ee,(Ze-Ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+Ae)*ee,Ze*z,(Oe+De)*ee,(Ze-Ae)*z,(Oe+Ae)*ee,(Ze-De)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze+Ae)*z,(Oe+Ae)*ee,(Ze+De)*z,(Oe+De)*ee,(Ze+Ae)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Oe-Ae)*ee,Ze*z,(Oe-De)*ee,(Ze+Ae)*z,(Oe-Ae)*ee,(Ze+De)*z));var Ae=.05,De=be*.05,Oe=.375,Ze=.95,ve=new go.PathFigure((Oe-Ae)*ee,Ze*z,!0);oe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze-Ae)*z,(Oe-Ae)*ee,(Ze-De)*z,(Oe-De)*ee,(Ze-Ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+Ae)*ee,Ze*z,(Oe+De)*ee,(Ze-Ae)*z,(Oe+Ae)*ee,(Ze-De)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze+Ae)*z,(Oe+Ae)*ee,(Ze+De)*z,(Oe+De)*ee,(Ze+Ae)*z)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Oe-Ae)*ee,Ze*z,(Oe-De)*ee,(Ze+Ae)*z,(Oe-Ae)*ee,(Ze+De)*z));var Ae=.05,De=be*.05,Oe=.625,Ze=.95,Pe=new go.PathFigure((Oe-Ae)*ee,Ze*z,!0);oe.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze-Ae)*z,(Oe-Ae)*ee,(Ze-De)*z,(Oe-De)*ee,(Ze-Ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+Ae)*ee,Ze*z,(Oe+De)*ee,(Ze-Ae)*z,(Oe+Ae)*ee,(Ze-De)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze+Ae)*z,(Oe+Ae)*ee,(Ze+De)*z,(Oe+De)*ee,(Ze+Ae)*z)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe-Ae)*ee,Ze*z,(Oe-De)*ee,(Ze+Ae)*z,(Oe-Ae)*ee,(Ze+De)*z));var Ae=.05,De=be*.05,Oe=.825,Ze=.95,qe=new go.PathFigure((Oe-Ae)*ee,Ze*z,!0);oe.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze-Ae)*z,(Oe-Ae)*ee,(Ze-De)*z,(Oe-De)*ee,(Ze-Ae)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+Ae)*ee,Ze*z,(Oe+De)*ee,(Ze-Ae)*z,(Oe+Ae)*ee,(Ze-De)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ee,(Ze+Ae)*z,(Oe+Ae)*ee,(Ze+De)*z,(Oe+De)*ee,(Ze+Ae)*z)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Oe-Ae)*ee,Ze*z,(Oe-De)*ee,(Ze+Ae)*z,(Oe-Ae)*ee,(Ze+De)*z).close());var Xe=new go.PathFigure(0,z,!1);return oe.add(Xe),Xe.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,De=new go.PathFigure((Pe-me)*ee,Ae*z,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ee,(Ae-me)*z,(Pe-me)*ee,(Ae-ve)*z,(Pe-ve)*ee,(Ae-me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+me)*ee,Ae*z,(Pe+ve)*ee,(Ae-me)*z,(Pe+me)*ee,(Ae-ve)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ee,(Ae+me)*z,(Pe+me)*ee,(Ae+ve)*z,(Pe+ve)*ee,(Ae+me)*z)),De.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")},43001:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Sn={},ln="5.0",Ie={},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":ln=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?ln=we:Le=we;break;case"object":typeof we.is3D!="undefined"?ke=we:Ie=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},Ie.material_id!==void 0&&!Be&&(Se=!0)),Le!==null&&Ie.id===void 0&&(Ie.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;Ie.height!==void 0&&(Ie.height=Math.round(Ie.height)),Ie.width!==void 0&&(Ie.width=Math.round(Ie.width));var ve=function(xt){return parseFloat(xt)>4?parseFloat(xt):5};Sn.setHTML5Codebase=function(xt,Ut){be=xt,ht(xt,Ut)},Sn.setJavaCodebase=Sn.setJavaCodebaseVersion=Sn.isCompiledInstalled=Sn.setPreCompiledScriptPath=Sn.setPreCompiledResourcePath=function(){},Sn.setHTML5CodebaseVersion=function(xt,Ut){var Ht=parseFloat(xt);if(Ht!==NaN&&Ht<5){console.log("The GeoGebra HTML5 codebase version "+Ht+" is deprecated. Using version latest instead.");return}xe=xt,ot(xt,Ut)},Sn.getHTML5CodebaseVersion=function(){return ue},Sn.getParameters=function(){return Ie},Sn.setFontsCSSURL=function(xt){le=xt},Sn.setGiacJSURL=function(xt){},Sn.setJNLPFile=function(xt){pe=xt},Sn.setJNLPBaseDir=function(xt){},Sn.inject=function(){function xt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ut="auto",Ht=Ie.id,dn,Ft=!1,fn=0;fn<arguments.length;fn++){var It=arguments[fn];typeof It=="string"?(It=It.toLowerCase(),It.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Ut=It:Ht=arguments[fn]):typeof It=="boolean"?Ft=It:It instanceof HTMLElement&&(dn=It)}Xt();function Xt(){if(!Ce){setTimeout(Xt,200);return}Ut=Rt(Ut);var tn=dn||document.getElementById(Ht);if(!tn){console.log("possibly bug on ajax loading? ");return}if(Sn.removeExistingApplet(tn,!1),Ie.width===void 0&&tn.clientWidth&&(Ie.width=tn.clientWidth),Ie.height===void 0&&tn.clientHeight&&(Ie.height=tn.clientHeight),!(Ie.width&&Ie.height)&&Ut==="html5"&&(delete Ie.width,delete Ie.height),fe=Ut,Ut==="screenshot")gt(tn,Ie);else{var lt=!1;Ie.hasOwnProperty("playButton")&&Ie.playButton||Ie.hasOwnProperty("clickToLoad")&&Ie.clickToLoad?lt=!0:Ie.hasOwnProperty("playButtonAutoDecide")&&Ie.playButtonAutoDecide&&(lt=(!Pe()||xt())&&Ae()),lt?(fe="screenshot",at(tn,Ie,Ft,Ut)):vt(tn,Ie,Ft)}}};function Pe(){try{return window.self!==window.top}catch(xt){return!0}}function Ae(){return Ie.hasOwnProperty("screenshotGenerator")&&Ie.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Sn.getViews=function(){return ke},Sn.isJavaInstalled=function(){return!1};var De=function(xt){var Ut=function(fn){var It=JSON.parse(fn),Xt=function(He){return He.type=="G"||He.type=="E"},tn=It.elements?It.elements.filter(Xt)[0]:It;if(!tn||!tn.url){Ht();return}Ie.fileName=tn.url,Oe(tn.settings||{}),ke.is3D=!0;var lt="https://www.geogebra.org/images/";Sn.setPreviewImage(oe||tn.previewUrl,lt+"GeoGebra_loading.png",lt+"applet_play.png"),xt()},Ht=function(){Ie.onError&&Ie.onError(),yt("Error: Fetching material (id "+Ie.material_id+") failed.",Ie)},dn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Ft="/materials/"+Ie.material_id+"?scope=basic";Ze("https://"+dn+"/api/proxy.php?path="+encodeURIComponent(Ft),Ut,Ht)};function Oe(xt){var Ut=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Ht){xt[Ht]=!!xt[Ht]}),Ut.forEach(function(Ht){Ie[Ht]===void 0&&xt[Ht]!==void 0&&(Ie[Ht]=xt[Ht])}),Ie.showToolBarHelp===void 0&&(Ie.showToolBarHelp=Ie.showToolBar)}function Ze(xt,Ut,Ht){var dn=new XMLHttpRequest;dn.open("GET",xt),dn.onload=function(){Ut(dn.responseText)},dn.onerror=Ht,dn.send()}Sn.isHTML5Installed=function(){return!0},Sn.getLoadedAppletType=function(){return fe},Sn.setPreviewImage=function(xt,Ut,Ht){oe=xt,re=Ut,ae=Ht},Sn.removeExistingApplet=function(xt,Ut){var Ht;typeof xt=="string"&&(xt=document.getElementById(xt)),fe=null;var dn=null;for(Ht=0;Ht<xt.childNodes.length;Ht++){var Ft=xt.childNodes[Ht],fn=Ft.className;fn==="applet_screenshot"?Ut?(Ft.style.display="block",fe="screenshot"):Ft.style.display="none":fn!=="applet_scaler prerender"&&(xt.removeChild(Ft),dn=fn&&fn.indexOf("appletParameters")!=-1?Ft.id:null,Ht--)}var It=Ie.id!==void 0?Ie.id:dn,Xt=window[It];Xt&&typeof Xt.getBase64=="function"&&(Xt.remove(),window[It]=null)},Sn.refreshHitPoints=function(){if(ve(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var xt=Sn.getAppletObject();return xt&&typeof xt.recalculateEnvironments=="function"?(xt.recalculateEnvironments(),!0):!1},Sn.startAnimation=function(){var xt=Sn.getAppletObject();return xt&&typeof xt.startAnimation=="function"?(xt.startAnimation(),!0):!1},Sn.stopAnimation=function(){var xt=Sn.getAppletObject();return xt&&typeof xt.stopAnimation=="function"?(xt.stopAnimation(),!0):!1},Sn.getAppletObject=function(){var xt=Ie.id!==void 0?Ie.id:"ggbApplet";return window[xt]},Sn.resize=function(){};var qe=function(xt,Ut,Ht){var dn=document.createElement("param");dn.setAttribute("name",Ut),dn.setAttribute("value",Ht),xt.appendChild(dn)},Xe=function(xt){return xt&&xt!=="false"},vt=function(xt,Ut,Ht){ve(ue)<=4.2&&(Ht=!0);var dn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ue||ggbHTML5LoadedCodebaseIsWebSimple&&!z)&&(dn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ft=document.createElement("div");Ft.classList.add("appletParameters","notranslate");var fn=Ut.width,It=Ut.height;if(Ut.disableAutoScale=Ut.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ut.disableAutoScale,Ut.width!==void 0)if(ve(ue)<=4.4)Xe(Ut.showToolBar)&&(Ut.height-=7),Xe(Ut.showAlgebraInput)&&(Ut.height-=37),Ut.width<605&&Xe(Ut.showToolBar)&&(Ut.width=605,fn=605);else{var Xt=100;(Xe(Ut.showToolBar)||Xe(Ut.showMenuBar))&&(Ut.hasOwnProperty("customToolBar")&&(Ut.customToolbar=Ut.customToolBar),Xt=Xe(Ut.showMenuBar)?245:155),fn<Xt&&(Ut.width=Xt,fn=Xt)}Ft.style.border="none",Ft.style.display="inline-block";for(var tn in Ut)Ut.hasOwnProperty(tn)&&tn!=="appletOnLoad"&&Ft.setAttribute("data-param-"+tn,Ut[tn]);le&&Ft.setAttribute("data-param-fontscssurl",le),Sn.resize=function(){GGBAppletUtils.responsiveResize(xt,Ut)},window.addEventListener("resize",function(pt){Sn.resize()});var lt=typeof Ut.appletOnLoad=="function"?Ut.appletOnLoad:function(){};if(!Ht&&Ut.width!==void 0){Ut.hasOwnProperty("showSplash")||Ft.setAttribute("data-param-showSplash","false");var He=xt.querySelector(".applet_scaler.prerender"),ze=He!==null;if(ze)var it=He.querySelector(".ggb_preview");else{var it=ct(fn,It,Ut.borderColor,!1);He=document.createElement("div"),He.className="applet_scaler",He.style.position="relative",He.style.display="block",He.style.width=fn+"px",He.style.height=It+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(He,"66%"),ve(ue)>=5?(Ut.appletOnLoad=function(pt){var Mt=xt.querySelector(".ggb_preview");Mt&&Mt.parentNode.removeChild(Mt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(He),window.GGBT_wsf_view&&$(window).trigger("resize"),lt(pt)},ze||He.appendChild(it)):Ft.appendChild(it),He.appendChild(Ft),ze||xt.appendChild(He),setTimeout(function(){Sn.resize()},1)}else{var dt=document.createElement("div");dt.className="applet_scaler",dt.style.position="relative",dt.style.display="block",dt.appendChild(Ft),xt.appendChild(dt),Ut.appletOnLoad=function(pt){Sn.resize(),lt(pt)}}function tt(pt,Mt){Mt&&typeof Mt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(pt,Mt.appletOnLoad):renderGGBElement(pt),yt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Mt)}function Ke(pt,Mt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:pt,params:Mt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Qt){tt(Qt.article,Qt.params)}),html5AppletsToProcess=null)},ve(ue)<5&&(pt.className+=" geogebraweb")):tt(pt,Mt)}if(dn){scriptLoadStarted=!0;for(var je=0;je<Ft.childNodes.length;je++){var Re=Ft.childNodes[je].tagName;Re==="TABLE"&&(Ft.removeChild(Ft.childNodes[je]),je--)}if(ggbHTML5LoadedScript!==null){var Qe=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Qe!=null&&Qe.parentNode.removeChild(Qe)}var Ve=document.createElement("script"),We=function(){Ke(Ft,Ut)};Ve.src=de+ee,ggbHTML5LoadedCodebaseIsWebSimple=z,ggbHTML5LoadedCodebaseVersion=ue,ggbHTML5LoadedScript=Ve.src,yt("GeoGebra HTML5 codebase loaded: '"+de+"'.",Ut),!be&&(!xe||xe=="5.0")?(z?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),We()):de.requirejs?__webpack_require__.e(7963).then(function(){var pt=[__webpack_require__(87963)];We.apply(null,pt)}.bind(this)).catch(__webpack_require__.oe):(Ve.onload=We,xt.appendChild(Ve))}else Ke(Ft,Ut);Ut.height=It,Ut.width=fn},gt=function(xt,Ut,Ht){var dn=ct(Ut.width,Ut.height,Ut.borderColor,Ht),Ft=document.createElement("div");Ft.style.position="relative",Ft.style.display="block",Ft.style.width=Ut.width+"px",Ft.style.height=Ut.height+"px",Ft.className="applet_screenshot applet_scaler"+(Ht?" applet_screenshot_play":""),Ft.appendChild(dn);var fn=GGBAppletUtils.getScale(Ut,xt,Ht);Ht?(xt.appendChild(bt()),window.GGBT_wsf_view||(xt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ft,"66%"),xt.appendChild(Ft),fn!==1&&!isNaN(fn)&&(GGBAppletUtils.scaleElement(Ft,fn),Ft.style.width=Ut.width+"px",Ft.style.height=Ut.height+"px",Ft.parentNode.style.width=Ut.width*fn+"px",Ft.parentNode.style.height=Ut.height*fn+"px"),Sn.resize=function(){kt(xt,dn,Ft,Ht)},window.addEventListener("resize",function(It){Sn.resize()}),Sn.resize()};function kt(xt,Ut,Ht,dn){if(xt.contains(Ut)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(xt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(xt)}var Ft=GGBAppletUtils.getScale(Ie,xt,dn);Ht.parentNode!==null&&(!isNaN(Ft)&&Ft!==1?(GGBAppletUtils.scaleElement(Ht,Ft),Ht.parentNode.style.width=Ie.width*Ft+"px",Ht.parentNode.style.height=Ie.height*Ft+"px"):(GGBAppletUtils.scaleElement(Ht,1),Ht.parentNode.style.width=Ie.width+"px",Ht.parentNode.style.height=Ie.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()}}Sn.onExitFullscreen=function(xt,Ut){Ut.appendChild(xt)};var at=function(xt,Ut,Ht,dn){gt(xt,Ut,!0);for(var Ft=function(){var Xt=[];for(It=0;It<xt.childNodes.length;It++)Xt.push(xt.childNodes[It]);if(window.GGBT_wsf_view){var tn=window.GGBT_wsf_view.renderFullScreen(xt,Ut.id),lt=document.getElementById("fullscreencontainer"),He=jQuery(xt).find(".fullscreencontent");He.length>0?(tn.remove(),He.attr("id","fullscreencontent").show(),jQuery(lt).append(He),window.dispatchEvent(new Event("resize"))):vt(tn,Ut,!1),window.GGBT_wsf_view.launchFullScreen(lt)}else fe=dn,vt(xt,Ut,!1);if(!window.GGBT_wsf_view)for(It=0;It<Xt.length;It++)xt.removeChild(Xt[It])},fn=xt.getElementsByClassName("ggb_preview_play"),It=0;It<fn.length;It++)fn[It].addEventListener("click",Ft,!1),fn[It].addEventListener("ontouchstart",Ft,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(xt),Ae()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},bt=function(){var xt=document.createElement("div");if(xt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Ut='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Ht=document.createElement("style");Ht.styleSheet?Ht.styleSheet.cssText=Ut:Ht.appendChild(document.createTextNode(Ut)),document.getElementsByTagName("head")[0].appendChild(Ht)}return xt},ct=function(xt,Ut,Ht,dn){var Ft=document.createElement("div");Ft.className="ggb_preview",Ft.style.position="absolute",Ft.style.zIndex="90",Ft.style.width=xt-2+"px",Ft.style.height=Ut-2+"px",Ft.style.top="0px",Ft.style.left="0px",Ft.style.overflow="hidden",Ft.style.backgroundColor="white";var fn="lightgrey";Ht!==void 0&&(Ht==="none"?fn="transparent":fn=Ht),Ft.style.border="1px solid "+fn;var It=document.createElement("img");if(It.style.position="relative",It.style.zIndex="1000",It.style.top="-1px",It.style.left="-1px",oe!==null&&It.setAttribute("src",oe),It.style.opacity=.7,re!==null){var Xt,tn,lt;if(!dn){Xt=document.createElement("img"),Xt.style.position="absolute",Xt.style.zIndex="1001",Xt.style.opacity=1,It.style.opacity=.3,tn=360,tn>xt/4*3&&(tn=xt/4*3),lt=tn/5.8,Xt.setAttribute("src",re),Xt.setAttribute("width",tn),Xt.setAttribute("height",lt);var He=(xt-tn)/2,ze=(Ut-lt)/2;Xt.style.left=He+"px",Xt.style.top=ze+"px",Ft.appendChild(Xt)}}return Ft.appendChild(It),Ft},Rt=function(xt){return xt=xt.toLowerCase(),xt==="html5"||xt==="screenshot"?xt:"html5"},ut=["web","webSimple","web3d","tablet","tablet3d","phone"],ot=function(xt,Ut){if(ue=xt,Ut){ht(ue,!0);return}var Ht=!Se;if(Ht){var dn=ve(ue);!isNaN(dn)&&dn<4.4&&(Ht=!1)}var Ft,fn;window.location.protocol.substr(0,4)==="http"?Ft=window.location.protocol:Ft="http:";var It=ue.indexOf("//");It>0?fn=ue:It===0?fn=Ft+ue:fn="https://www.geogebra.org/apps/5.2.814.0/";for(var Xt in ut)if(ue.slice(ut[Xt].length*-1)===ut[Xt]||ue.slice((ut[Xt].length+1)*-1)===ut[Xt]+"/"){ht(fn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ht&&!ke.is3D&&!ke.AV&&!ke.SV&&!ke.CV&&!ke.EV2&&!ke.CP&&!ke.PC&&!ke.DA&&!ke.FI&&!ke.PV&&!Xe(Ie.showToolBar)&&!Xe(Ie.showMenuBar)&&!Xe(Ie.showAlgebraInput)&&!Xe(Ie.enableRightClick)&&(!Ie.appName||Ie.appName=="classic")?fn+="webSimple/":fn+="web3d/",ht(fn,!1)},ht=function(xt,Ut){if(xt.requirejs){de=xt;return}xt.slice(-1)!=="/"&&(xt+="/"),de=xt,Ut===null&&(Ut=xt.indexOf("http")===-1),ge=Ut,ee="web.nocache.js",z=!1;var Ht=de.split("/");Ht.length>1&&(!Ut&&Ht[Ht.length-2]==="webSimple"?(ee="webSimple.nocache.js",z=!0):ut.indexOf(Ht[Ht.length-2])>=0&&(ee=Ht[Ht.length-2]+".nocache.js")),Ht=xt.split("/"),ue=Ht[Ht.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 dn=parseFloat(ue);dn!==NaN&&dn<5&&xt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+dn+" is deprecated. Using version latest instead."),ot("5.0",Ut))},yt=function(xt,Ut){window.console&&window.console.log&&(!Ut||typeof Ut.showLogging=="undefined"||Ut.showLogging&&Ut.showLogging!=="false")&&console.log(xt)};Ie.material_id!==void 0?De(_t):_t();function _t(){var xt=ln;xe!==null?xt=xe:parseFloat(xt)<5&&(xt="5.0"),ot(xt,!1),be!==null&&ht(be,ge),Ce=!0}return Sn},GGBAppletUtils=function(){"use strict";function Sn(){return window.GGBT_wsf_edit!==void 0}function ln(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 Ie(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=Ie(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);Sn()&&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",ln(we,ye)):(ln(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:Sn,positionCenter:Be,getScale:Se,scaleElement:ln}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Sn=n.location.search;return Sn.indexOf(J)!=-1||Sn.indexOf(K)!=-1}function q(Sn,ln){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Sn){var ln=s[L].bindings;s[L].bindings=function(){for(var Ie=ln?ln():{},ke=Sn[webModule.__softPermutationId],Se=O;Se<ke.length;Se++){var Be=ke[Se];Ie[Be[O]]=Be[P]}return Ie}};var t;function u(){return v(),t}function v(){if(!t){var Sn=o.createElement(Q);if(Sn.id=L,Sn.style.cssText=R+S,Sn.tabIndex=-1,o.body.appendChild(Sn),t=Sn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var ln=document.compatMode==U?V:W;t.write(ln+X),t.close()}}}function w(Sn){function ln(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 Ie(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)}ln(function(){Ie(Sn)})}webModule.__startLoadingFragment=function(Sn){return C(Sn)},webModule.__installRunAsyncCode=function(Sn){var ln=u(),Ie=ln.body,ke=ln.createElement(_);ke.language=ab,ke.text=Sn,Ie.appendChild(ke),Ie.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(Sn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Sn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Sn){var ln=c[Sn];return ln==null?null:ln},r=d,webModule.__errFn=e}function B(){function Sn(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 ln(Ce){if(!Ce.match(/^\w+:\/\//)){var xe=o.createElement(ub);xe.src=Ce+vb,Ce=Sn(xe.src)}return Ce}function Ie(){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 Sn(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=Ie();return Le==W&&(Le=ke()),Le==W&&(Le=Se()),Le==W&&Be()&&(Le=Sn(o.location.href)),Le=ln(Le),Le}function C(Sn){return Sn.match(/^\//)||Sn.match(/^[a-zA-Z]+:\/\//)?Sn:webModule.__moduleBase+Sn}function D(){var Sn=[],ln=O,Ie=[],ke=[];function Se(Ce){var xe=ke[Ce](),be=Ie[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 Ie[Ce]},webModule.__getPropMap=function(){var Ce={};for(var xe in Ie)Ie.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&&(ln=parseInt(Be.substring(Le+P),$),Be=Be.substring(O,Le))}catch(Ce){}return webModule.__softPermutationId=ln,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})()},46699:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Ax:function(){return Le},Ds:function(){return Ce},KI:function(){return be},SI:function(){return Be},f1:function(){return Se}});var ke=Ie(346);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},9507:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return de}});var ke=Ie(59301),Se={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Be=Ie(92310),Le=Ie.n(Be),Ce=Ie(29787),xe=Ie(2859),be=Ie(38986),ye=Ie(51257),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,De]=(0,ke.useState)(!1),[Oe,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*(){De(!0),Ze("\u6B63\u5728\u52A0\u8F7D\u4E2D");const kt=yield(0,ye.ZJ)(ge==null?void 0:ge.src);le.current.src="",le.current.src=kt,le.current.onload=function(){gt()},De(!1),Ze("")}),Xe=kt=>we(void 0,null,function*(){De(!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:kt.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(kt.state)}})).status===0&&oe():at!=null&&at.id&&oe(at),De(!1),Ze("")}),vt=()=>{const kt=document.querySelector('a[href="https://markerjs.com/"]');kt&&kt.parentNode&&(kt.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(bt=>{const ct=document.querySelector(bt.name);ct&&ct.setAttribute("title",bt.title)})},gt=()=>{me.current=new xe.hP(le.current),me.current.targetRoot=Pe.current,me.current.addEventListener("render",Xe),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),vt()},300)};return ke.createElement(ke.Fragment,null,(ge==null?void 0:ge.visible)&&ke.createElement(Ce.Z,{spinning:Ae,tip:Oe,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}))))}},76562:function(Sn,ln,Ie){"use strict";var ke=Ie(59301),Se=Ie(77019),Be=Ie(5269),Le=Ie(20554),Ce=Ie(99571),xe=Ie(76902),be=Ie(99587),ye=Ie(48136),we=Ie(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((De,Oe)=>we.createElement(Be.Z,{key:Oe,onClick:()=>re(De),className:be.Z.diamond},we.createElement(xe.Z,{value:"`$$"+De.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((De,Oe)=>we.createElement(Be.Z,{key:Oe,onClick:()=>re(De),className:be.Z.diamond},we.createElement(xe.Z,{value:"`$$"+De.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")))});ln.Z=pe},28426:function(Sn,ln,Ie){"use strict";var ke=Ie(59301),Se=Ie(93314),Be=Ie(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);ln.Z=fe},45677:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return le}});var ke=Ie(59301),Se={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Be=Ie(99571),Le=Ie(70557),Ce=Ie(75975),xe=Ie(25399),be=Ie(51257),ye=Ie(81722),we=Ie(28426),pe=Ie(346),de=Ie(44203),ge=Ie(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,De)=>{var Oe=Xe=>{try{qe(Pe.next(Xe))}catch(vt){De(vt)}},Ze=Xe=>{try{qe(Pe.throw(Xe))}catch(vt){De(vt)}},qe=Xe=>Xe.done?Ae(Xe.value):Promise.resolve(Xe.value).then(Oe,Ze);qe((Pe=Pe.apply(me,ve)).next())}),le=({editOffice:me="view",data:ve,issaver:Pe,onSaver:Ae,theme:De,type:Oe,filename:Ze,monacoEditor:qe,className:Xe,style:vt,close:gt,onClose:kt,hasMask:at,disabledDownload:bt,onImgDimensions:ct,showNodata:Rt,recordInfo:ut})=>{const[ot,ht]=(0,ke.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[yt,_t]=(0,ke.useState)(""),[xt,Ut]=(0,ke.useState)(),Ht=window.ENV==="build"?"/react/build":"",dn=location.host.startsWith("localhost")?pe.Z.PROXY_SERVER:pe.Z.API_SERVER,fn=10*(1024*1024),It=(0,ke.useRef)();ve!=null&&ve.startsWith("/api")&&Oe!=="txt"&&(ve=pe.Z.API_SERVER+ve);const Xt=it=>it.substring(it.lastIndexOf("/")+1).split(".").pop();Ze&&qe&&(qe.filename=Ze),(0,ke.useEffect)(()=>{var it,dt;const tt=(dt=(it=document.cookie)==null?void 0:it.replace(/\s/g,""))==null?void 0:dt.split(";");tt==null||tt.map(Ke=>{let je=Ke.split("=");je[0]==="_educoder_session"&&_t(je[1])})},[]),(0,ke.useEffect)(()=>{Oe==="office"&&(ve.indexOf("bigfilescdn.")>-1||ve.indexOf("bigfiles1")>-1?Ut({url:ve,fileType:Xt(ve),model:ve.indexOf("model=edit")?"edit":"view"}):lt())},[Oe,ve]);function tn(it){return ae(this,null,function*(){it.data.type==="pdfdata"&&(Ae(it.data.data),window.removeEventListener("message",tn,!1)),console.log("mess---:",it.data)})}const lt=()=>ae(void 0,null,function*(){console.log("data:",ve);let it=ve;ve.startsWith("http")||(it=location.origin+it);let dt=new URL(it).pathname.split("/").pop();const tt=yield(0,ye.gJ)({attachment_id:dt});tt.url=dn+tt.url,Ut(tt)}),He=()=>{if(ve.startsWith("http")||ve.startsWith("blob:")){ze();return}(0,be.Sv)(Ze||"educoder",ve,Ze)},ze=()=>{ut&&(0,de.fc)({id:ut==null?void 0:ut.id,watch_type:1,course_id:ut==null?void 0:ut.course_id}),(0,be.Nd)(Ze||"educoder",decodeURIComponent(ve))};return ge.createElement("div",{style:re({},vt||{}),className:`${at&&Se.bgBlack} ${Oe?Se.wrp:"hide"}`},gt&&ge.createElement("div",{className:Se.close,ref:It},!!ct&&ge.createElement(xe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>It.current},ge.createElement("span",{onClick:()=>{kt(),ct()}},ge.createElement("i",{className:"icon-yulanpizhu"}))),!bt&&ge.createElement(xe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>It.current},ge.createElement("span",{onClick:ze},ge.createElement("i",{className:"icon-quxiaozhiding"}))),Pe&&ge.createElement(xe.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>It.current},ge.createElement("span",{className:"",onClick:()=>{const it=document.getElementById("pdfiframe");window.addEventListener("message",tn,!1),setTimeout(()=>{it.contentWindow.postMessage("getData","*")},300)}},ge.createElement("i",{className:"icon-baocun"}))),ge.createElement(xe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>It.current},ge.createElement("span",{className:"",onClick:()=>{kt()}},ge.createElement("i",{className:"icon-guanbi1"})))),ge.createElement("div",{className:`${Se[Xe]} ${Xe} ${Se.monaco} ${Oe==="txt"?"show":"hide"}`},Oe==="txt"&&ge.createElement(ge.Fragment,null,ge.createElement(Ce.ZP,re({},qe)))),Oe==="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}),Oe==="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})),Oe==="office"&&xt&&ge.createElement("iframe",{src:`${Ht}/office.html?key=${xt.key}&url=${btoa(xt.url)}&callbackUrl=${dn+(xt.callbackUrl||"")}&fileType=${xt.fileType}&title=${xt.title||""}&model=${me}&officeServer=${pe.Z.ONLYOFFICE}&disabledDownload=${!!bt}`}),Oe==="html"&&ge.createElement("iframe",{src:ve+"&disposition=inline"}),Oe==="pdf"&&ge.createElement("iframe",{id:"pdfiframe",src:`${Ht}/js/pdfview/index.html?filename=${Ze||"educoder.pdf"}&url=${encodeURIComponent(ve)}&disabledDownload=${!!bt}&model=${me}`}),Oe==="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}`}),(Oe==="other"||Oe==="download")&&ge.createElement(ge.Fragment,null,Rt?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:He,disabled:bt},"\u4E0B\u8F7D")}):ge.createElement(Be.ZP,{type:"primary",size:"middle",onClick:He,disabled:bt},ge.createElement(Le.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(Sn,ln,Ie){"use strict";Ie.d(ln,{z:function(){return De},Z:function(){return Oe}});var ke=Ie(59301),Se=Ie(8944),Be=Ie(81428),Le=Ie(64018),Ce=Ie(79710),xe=Ie(346),be=Ie(51257),ye=Ie(15342),we=Ie(1012),pe=Ie(45677),de=Ie(59301),fe=({html:Ze})=>{const qe=(0,ke.useRef)(null),Xe=(0,ke.useRef)(null),vt=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,ke.useEffect)(()=>{const gt=qe.current.attachShadow({mode:"open"});Xe.current=document.createElement("div"),Xe.current.className="markdown-body",Xe.current.innerHTML=Ze,gt.appendChild(Xe.current);const kt=document.createElement("style");return kt.textContent=vt,gt.appendChild(kt),()=>{gt.innerHTML=""}},[]),(0,ke.useEffect)(()=>{Xe.current&&(Xe.current.innerHTML=Ze)},[Ze]),de.createElement("div",{ref:qe})};function ue(Ze){const qe=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Xe=new RegExp(`\\b(${qe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ze.replace(Xe,"").trim()}var ee=Object.defineProperty,z=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ae=(Ze,qe,Xe)=>qe in Ze?ee(Ze,qe,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Ze[qe]=Xe,le=(Ze,qe)=>{for(var Xe in qe||(qe={}))oe.call(qe,Xe)&&ae(Ze,Xe,qe[Xe]);if(z)for(var Xe of z(qe))re.call(qe,Xe)&&ae(Ze,Xe,qe[Xe]);return Ze};const me="@\u2581\u2581@",ve="@\u2581@",Pe=/<pre[^>]*>/g;function Ae(Ze){let qe=document.createElement("div");return qe.innerHTML=Ze,qe.childNodes.length===0?"":qe.childNodes[0].nodeValue}const De=(Ze,qe)=>{Ze=Ze||"";const Xe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,vt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,gt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,kt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return qe?Ze.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Xe,(at,bt,ct,Rt,ut,ot,ht)=>{const yt=bt||Rt||ot,_t=ct||ut||ht||"?";return xe.Z.API_SERVER+"/api/attachments/"+yt+_t+"&t="+(0,be.Jn)(yt,Date.now())+(at.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ze=Ze.replace(kt,(at,bt,ct,Rt,ut,ot,ht)=>{const yt=bt||Rt||ot,_t=ct||ut||ht||"?";return xe.Z.API_SERVER+"/attachments/download/"+yt+_t+"&t="+(0,be.Jn)(yt,Date.now())+(at.indexOf(")")>-1?")":"&")}).replace(Xe,(at,bt,ct,Rt,ut,ot,ht)=>{const yt=bt||Rt||ot,_t=ct||ut||ht||"?";return xe.Z.API_SERVER+"/api/attachments/"+yt+_t+"&t="+(0,be.Jn)(yt,Date.now())+(at.indexOf(")")>-1?")":"&")}).replace(vt,(at,bt,ct,Rt,ut)=>{const ot=bt||Rt,ht=ct||ut||"";return'"'+xe.Z.API_SERVER+"/api/attachments/"+ot+ht+ot+ht+"&t="+(0,be.Jn)(ot,Date.now())}).replace(gt,(at,bt,ct,Rt,ut)=>{const ot=bt||Rt,ht=ct||ut||"";return"("+xe.Z.API_SERVER+"/files/uploads/"+ot+ht+ot+ht+"&t="+(0,be.Jn)(ot,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Ze)};var Oe=({value:Ze="",className:qe,showTextOnly:Xe,showLines:vt,style:gt={},stylesPrev:kt={},highlightKeywords:at,showProgramFill:bt,isProgramFill:ct,disabledFill:Rt=!1,programFillValue:ut,onFillChange:ot=_t=>{},onFillBlur:ht=()=>{},onFillFocus:yt=()=>{}})=>{let _t=ue(String(Ze||""));const[xt,Ut]=(0,ke.useState)(""),[Ht,dn]=(0,ke.useState)("office"),[Ft,fn]=(0,ke.useState)([]),It=(0,ke.useRef)("a"+(0,we.Z)()),Xt={},tn=We=>/<style[\s\S]*?>/i.test(We||""),lt=(We,pt,Mt)=>{const Qt=document.createElement(We===ve?"input":"textarea");Qt.style.width="100%",Qt.style.height=We===ve?"40px":"151px",Qt.rows=5,Qt.spellcheck=!1,Qt.name="edu-program-fill",Qt.placeholder="\u8BF7\u8F93\u5165",Qt.dataset.id=pt;const qt=Object.keys(Xt).length;return Xt[qt]=Qt,`<span class="edu-program-fill-wrap ${We===ve?"":"show"}" style="width:${We===ve?"400px":"100%"}" title=${Mt||""}><span>${Qt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function He(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 ze=We=>!Xe&&tn(_t)?We:We.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(pt,Mt){let Qt=Mt.replace(/(\n|\r)/g,"").split("}"),qt=[];return Qt.map(Bt=>{Bt!=""&&qt.push(`.${It.current} ${Bt}`)}),`<style>${qt.join("}")}</style>`}),it=(0,ke.useMemo)(()=>{try{const Qt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,qt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Bt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,$t=/\(\/attachments\/download\//g;_t=_t.replace($t,"("+xe.Z.API_SERVER+"/attachments/download/").replace(Qt,"("+xe.Z.API_SERVER+"/api/attachments/").replace(qt,'"'+xe.Z.API_SERVER+"/api/attachments/").replace(Bt,'"'+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(Qt){}if(bt){let Qt=-1;return _t=_t.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(qt,Bt,$t){var Cn;return++Qt,lt(qt,Qt,(Cn=ut==null?void 0:ut[Qt])==null?void 0:Cn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${ze(_t||"")}</pre>`}let We=ze(_t);We=(0,Be.ZP)(We);const pt=(0,Be.ez)();_t.match(/\[TOC\]/)&&(We=We.replace("<p>[TOC]</p>",(0,Be.Qv)()),(0,Be.Iy)()),We=We.replace(/(__special_katext_id_\d+__)/g,(Qt,qt)=>{const{type:Bt,expression:$t}=pt[qt];return(0,ye.renderToString)(Ae($t)||"",{displayMode:Bt==="block",throwOnError:!1,output:"html"})}),We=We.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Be.AL)();const Mt=document.createElement("div");if(Mt.innerHTML=We,Xe)return Mt.innerText;if(at){const Qt=at.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return je(Mt,Qt),Mt.innerHTML}return setTimeout(()=>Ve(),500),Mt.innerHTML},[_t,at]);(0,ke.useEffect)(()=>{Re.current&&Re.current.querySelectorAll(["input","textarea"]).forEach(pt=>{pt.oninput=dt,pt.onblur=tt,pt.onfocus=Ke})},[Ft]),(0,ke.useEffect)(()=>{var We,pt,Mt,Qt,qt;if(ut!=null&&ut.length)try{const Bt=Re.current.querySelectorAll(".edu-program-fill-score"),$t=Re.current.querySelectorAll('[name="edu-program-fill"]');for(const[Cn,mn]of $t.entries())mn.value=((We=ut==null?void 0:ut[Cn])==null?void 0:We.value)||"",((pt=ut==null?void 0:ut[Cn])==null?void 0:pt.type)==="warning"?mn.className="program-fill-warning":((Mt=ut==null?void 0:ut[Cn])==null?void 0:Mt.type)==="success"?mn.className="program-fill-success":mn.className="";for(const[Cn,mn]of Bt.entries())mn.innerHTML=(Qt=ut==null?void 0:ut[Cn])!=null&&Qt.score?`${(qt=ut==null?void 0:ut[Cn])==null?void 0:qt.score}\u5206`:"";fn(ut)}catch(Bt){console.log(Bt,"error")}},[ut]);const dt=We=>{Ft[We.target.dataset.id]=Ft[We.target.dataset.id]||{},Ft[We.target.dataset.id].value=We.target.value,fn([...Ft]),ot(Ft,We.target.dataset.id)},tt=We=>{Ft[We.target.dataset.id]=Ft[We.target.dataset.id]||{},Ft[We.target.dataset.id].value=We.target.value,fn([...Ft]),ht(Ft,We.target.dataset.id)},Ke=We=>{Ft[We.target.dataset.id]=Ft[We.target.dataset.id]||{},Ft[We.target.dataset.id].value=We.target.value,fn([...Ft]),yt(Ft,We.target.dataset.id)};function je(We,pt){return We.childNodes.forEach(Mt=>{var Qt;if(Mt.childNodes.length>0)je(Mt,pt);else if(Mt.nodeName!=="IMG")if(Mt.innerHTML)Mt.innerHTML=(Qt=Mt.innerHTML)==null?void 0:Qt.replace(new RegExp(pt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const qt=document.createElement("span");qt.innerHTML=Mt.textContent.replace(new RegExp(pt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Mt.replaceWith(qt)}})}const Re=(0,ke.useRef)();Be.jb.WebkitLineClamp=vt,vt&&(gt=le(le({},gt),Be.jb));function Qe(We){let pt=We.target;if(pt.tagName.toUpperCase()==="A"){let Mt=pt.getAttribute("href");if(Mt.indexOf("office")>-1)We.preventDefault(),Ut(Mt),dn("office");else if(Mt.indexOf("application/pdf")>-1)We.preventDefault(),Ut(Mt),dn("pdf");else if(Mt.indexOf("text/html")>-1)We.preventDefault(),Ut(Mt),dn("html");else if(Mt.startsWith("#")){We.preventDefault();let Qt=document.getElementById(Mt.replace("#",""));Qt&&Qt.scrollIntoView(!0)}}}const Ve=()=>{var We;const pt=(We=Re.current)==null?void 0:We.querySelectorAll("video");pt==null||pt.forEach(Mt=>{if(Mt.oncontextmenu=()=>!1,Mt.src.indexOf(".m3u8")>-1&&!Mt.canPlayType("application/vnd.apple.mpegurl")){if(Ce.ZP.isSupported()){var Qt=new Ce.ZP;Qt.loadSource(Mt.src),Qt.attachMedia(Mt)}}})};return(0,ke.useEffect)(()=>{if(Re.current&&it&&it.match(Pe)&&window.PR.prettyPrint(),Re.current)return Re.current.addEventListener("click",Qe),()=>{var We;(We=Re.current)==null||We.removeEventListener("click",Qe),(0,Be.AL)(),(0,Be.Iy)()}},[it,Re.current,Qe]),(0,ke.useEffect)(()=>{var We;const pt=Mt=>{Mt.preventDefault(),Mt.clipboardData.setData("text",window.getSelection().toString())};return(We=Re.current)==null||We.addEventListener("copy",pt),()=>{var Mt;(Mt=Re.current)==null||Mt.removeEventListener("copy",pt)}},[Re.current]),ke.createElement(ke.Fragment,null,Xe&&ke.createElement("div",{ref:Re},it),!Xe&&!tn(it)&&ke.createElement("div",{ref:Re,style:le({},gt),className:`${qe||""} ${Rt?"disabled-fill":""} markdown-body ${It.current}`,dangerouslySetInnerHTML:{__html:it}}),!Xe&&tn(it)&&ke.createElement(fe,{html:it}),ke.createElement(pe.Z,{close:!0,data:xt,type:xt!=null&&xt.length?Ht:"",style:le({},kt),onClose:()=>Ut("")}))}},86074:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Le}});var ke=Ie(25690),Se={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Be=Ie(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))},8343:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Le}});var ke=Ie(59301),Se=Ie(49535),Be=Ie(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))}},94268:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return xe}});var ke=Ie(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=Ie(92310),Le=Ie.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)))},96680:function(Sn,ln,Ie){"use strict";var ke=Ie(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))};ln.Z=Be},3736:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return ee}});var ke=Ie(59301),Se=Ie(6767),Be=Ie(75727),Le=Ie(30647),Ce=Ie(79710),xe=Ie(48790),be=Ie(56102),ye=Ie(84989),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(De){le(De)}},ve=Ae=>{try{Pe(re.throw(Ae))}catch(De){le(De)}},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:De=()=>{},autoPlay:Oe=!1,onPlayEnded:Ze=()=>{},isShowWaterMark:qe=!0},Xe)=>{var vt;oe=oe==null?void 0:oe.replace("http://","https://");const kt=((vt=oe==null?void 0:oe.split("."))==null?void 0:vt.pop())==="flv",at=(0,ke.useRef)(),bt=(0,ke.useRef)(),ct=(0,ke.useRef)(),Rt=(0,ke.useRef)(),ut=(0,ke.useRef)(),ot=(0,ke.useRef)(),ht=(0,ke.useRef)(),yt=(0,ke.useRef)(),_t=(0,ke.useRef)(),xt=(0,ke.useRef)(),Ut=(0,ke.useRef)(),Ht=(0,ke.useRef)(),dn=(0,ke.useRef)(),Ft=(0,ke.useRef)(),fn=navigator.userAgent.toLowerCase().match(ue),It=fn?fn[0]:"pc",Xt=(0,ke.useRef)(!1),tn=(0,xe.eY)();let lt=0,He=0,ze=0,it=null,dt=!1,tt=20,Ke=1,je=!1,Re=!1,Qe=[];(0,ke.useImperativeHandle)(Xe,()=>({getLastUpdatedTime:()=>at.current.currentTime,getDuration:()=>at.current.duration})),Se.ZP.config({maxCount:1,getContainer:()=>ct.current});const Ve=(0,ke.useCallback)(($t,Cn=!1)=>{let mn={point:at.current.currentTime};it?(mn.log_id=it,mn.watch_duration=fe(Qe),mn.total_duration=He):(me?(mn.video_id=parseInt(ae,10),mn.course_id=me):mn.video_id=ae,mn.duration=lt,mn.device=It),Cn&&(mn.ed="1");function un(){return pe(this,null,function*(){je=!0,it=yield le==null?void 0:le(mn),je=!1,$t&&$t()})}un()},[ae,me]);(0,ke.useEffect)(()=>{at.current&&(Rt.current.style.display="none",ut.current.style.display="block"),Se.ZP.destroy();let $t=null;return Le.Z.isSupported&&kt&&oe&&(oe==null?void 0:oe.indexOf(".m3u8"))<0?($t=Le.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:oe,muted:!1}),at.current&&($t.attachMediaElement(at.current),$t.load())):at.current.setAttribute("src",oe),pt(),()=>{$t&&($t.unload(),$t.pause(),$t.destroy(),$t=null)}},[at,kt,oe]);function We(){at.current.paused?(Rt.current.style.display="none",ut.current.style.display="block"):(Rt.current.style.display="block",ut.current.style.display="none")}function pt(){Ut.current.style.display="none",dn.current.style.display="none",Ht.current.style.display="none",at.current.muted||at.current.volume===0?Ut.current.style.display="block":at.current.volume>0&&at.current.volume<=.5?dn.current.style.display="block":Ht.current.style.display="block"}(0,ke.useEffect)(()=>{const $t=document.getElementById("play"),Cn=document.querySelectorAll(".playback-icons use");function mn(){Ae(),ve&&!Xt.current&&(at.current.currentTime=ve),Xt.current=!0,Qe.push(at.current.currentTime),dt||(dt=!0,re&&Ve())}function un(){return pe(this,null,function*(){We(),Qe.push(at.current.currentTime),re&&Ve(()=>{it=null,ze=0,dt=!1,je=!1,Re=!1,Qe=[],He=0,Ke=1},!0),Ze()})}function Kn(){ot.current.value=Math.round(at.current.currentTime),ht.current.value=Math.round(at.current.currentTime)}function pn(){const Oi=de(Math.round(at.current.currentTime));_t.current.innerText=`${Oi.hour>0?Oi.hour+":":""}${Oi.minutes}:${Oi.seconds}`,_t.current.setAttribute("datetime",`${Oi.hour>0?" "+Oi.hour+" ":""}${Oi.minutes}m ${Oi.seconds}s`)}function Hn(){var Oi,Zi,pr,et,ai,ti,Ii;const gr=Math.round((Oi=at.current)==null?void 0:Oi.duration);(pr=(Zi=ot.current)==null?void 0:Zi.setAttribute)==null||pr.call(Zi,"max",gr),(ai=(et=ht.current)==null?void 0:et.setAttribute)==null||ai.call(et,"max",gr);const hr=de(gr);yt.current&&(yt.current.innerText=`${hr.hour>0?hr.hour+":":""}${hr.minutes}:${hr.seconds}`,(Ii=(ti=yt.current).setAttribute)==null||Ii.call(ti,"datetime",`${hr.hour>0?" "+hr.hour+" ":""}${hr.minutes}m ${hr.seconds}s`))}function Qn(){try{const Oi=Math.round(at.current.duration);ot.current.setAttribute("max",Oi),ht.current.setAttribute("max",Oi);const Zi=de(Oi);yt.current.innerText=`${Zi.hour>0?Zi.hour+":":""}${Zi.minutes}:${Zi.seconds}`,yt.current.setAttribute("datetime",`${Zi.hour>0?" "+Zi.hour+" ":""}${Zi.minutes}m ${Zi.seconds}s`),Kn(),pn();const{width:pr,height:et,x:ai,y:ti}=bt.current.getBoundingClientRect();if(ai<0||ti<0,!Re){let Ii=at.current.currentTime,gr=Ii-ze;Math.abs(gr)<10?(He+=Math.abs(gr),ze=Ii,je||He-Ke*tt>=0&&(Ke++,Qe.push(ze),re&&Ve())):(ze=Ii,re&&Ve())}}catch(Oi){console.log("videoplaying:",Oi)}}function Ai(){Re=!0}function ei(){at.current.playing&&Qe.push(at.current.currentTime,ze),ze=at.current.currentTime,Re=!1}function ki(){lt=at.current.duration,lt<=20&&(tt=lt/3),at.current.addEventListener("play",mn)}function Wi(Oi){Oi.preventDefault(),(0,ye.vp)()?(at.current.style.width="100%",at.current.style.height="100%"):at.current.style.cssText=""}function Ui(){Pe()}function rr(Oi){if(!z){Se.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const Zi=Oi.target.dataset.seek?Oi.target.dataset.seek:Oi.target.value;at.current.currentTime=Zi,ht.current.value=Zi,ot.current.value=Zi}function vr(Oi){const Zi=Math.round(Oi.offsetX/Oi.target.clientWidth*parseInt(Oi.target.getAttribute("max"),10));ot.current.setAttribute("data-seek",Zi);const pr=de(Zi);xt.current.textContent=`${pr.hour>0?pr.hour+":":""}${pr.minutes}:${pr.seconds}`;const et=at.current.getBoundingClientRect();xt.current.style.left=`${Oi.pageX-et.left}px`}function wr(Oi){switch(Oi.code){case"Space":Oi.preventDefault(),qt();break;case"ArrowRight":if(Oi.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,Kn();break;case"ArrowLeft":if(Oi.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,Kn();break;case"ArrowUp":Oi.preventDefault(),at.current.volume<1&&(at.current.volume=(parseInt(at.current.volume*10)+1)/10);break;case"ArrowDown":Oi.preventDefault(),at.current.volume>0&&(at.current.volume=(parseInt(at.current.volume*10)-1)/10);break}}return ct.current.addEventListener((0,ye.gH)(),Wi),at.current.addEventListener("canplay",ki),at.current.addEventListener("ended",un),at.current.addEventListener("seeking",Ai),at.current.addEventListener("seeked",ei),at.current.addEventListener("loadedmetadata",Hn),ot.current.addEventListener("mousemove",vr),ot.current.addEventListener("input",rr),at.current.addEventListener("timeupdate",Qn),at.current.addEventListener("pause",Ui),at.current.addEventListener("volumechange",pt),document.addEventListener("keydown",wr),()=>{var Oi,Zi,pr,et,ai,ti,Ii,gr,hr,or,po,$n;(Oi=at.current)==null||Oi.removeEventListener("canplay",ki),(Zi=at.current)==null||Zi.removeEventListener("play",mn),(pr=at.current)==null||pr.removeEventListener("ended",un),(et=at.current)==null||et.removeEventListener("seeking",Ai),(ai=at.current)==null||ai.removeEventListener("seeked",ei),(ti=ot.current)==null||ti.removeEventListener("mousemove",vr),(Ii=ot.current)==null||Ii.removeEventListener("input",rr),(gr=at.current)==null||gr.removeEventListener("timeupdate",Qn),(hr=at.current)==null||hr.removeEventListener("pause",Ui),(or=at.current)==null||or.removeEventListener("loadedmetadata",Hn),(po=at.current)==null||po.removeEventListener("volumechange",pt),document.removeEventListener("keydown",wr),($n=at.current)!=null&&$n.playing&&(Qe.push(ze,at.current.currentTime),re&&Ve())}},[at,oe]),(0,ke.useEffect)(()=>{if(at.current.onended=()=>{De(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 $t=new Ce.ZP;$t.loadSource(oe),$t.attachMedia(at.current)}}},[oe]);const[Mt,Qt]=(0,ke.useState)(1),qt=()=>{at.current.paused||at.current.ended?at.current.play():at.current.pause(),We()};function Bt(){at.current.muted=!at.current.muted,at.current.muted?(Ft.current.setAttribute("data-volume",volume.value),Ft.current.value=0):Ft.current.value=Ft.current.dataset.volume}return ke.createElement("div",{style:{position:"relative"},ref:ct},ke.createElement("div",{ref:bt,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:Oe}),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:qt},ke.createElement("svg",{className:we["playback-icons"]},ke.createElement("use",{ref:ut,href:"#play-icon"}),ke.createElement("use",{ref:Rt,style:{display:"none"},href:"#pause"}))),ke.createElement("div",{className:we.time},ke.createElement("time",{id:"time-elapsed",ref:_t},"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:$t=>$t.parentNode,menu:{items:[{key:"1",label:ke.createElement("span",{onClick:()=>{Qt(1),at.current.playbackRate=1}},"1.0x")},{key:"2",label:ke.createElement("span",{onClick:()=>{Qt(1.5),at.current.playbackRate=1.5}},"1.5x")},{key:"3",label:ke.createElement("span",{onClick:()=>{Qt(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:Bt},ke.createElement("i",{ref:Ut,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),ke.createElement("i",{ref:dn,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),ke.createElement("i",{ref:Ht,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:Ft,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)(ct.current)}},ke.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),ke.createElement("div",{className:we["video-progress"]},ke.createElement("progress",{ref:ht,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"})))))})},87320:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Le}});var ke=Ie(59301),Se=Ie(49535),Be=Ie(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",Oe=>{xe(Oe),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(De){De.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=De=>{(De.nativeEvent.target===me.current||De.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:De=>{xe("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},69720:function(Sn,ln,Ie){"use strict";Ie.d(ln,{h:function(){return me}});var ke=Ie(59301),Se=Ie(82326),Be=Ie(28284),Le=Ie(99571),Ce=Ie(89780),xe=Ie.n(Ce),be=Ie(8336),ye=Ie(12469),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"]};ln.Z=({callback:ve,onCancel:Pe})=>{const[Ae,De]=(0,ke.useState)("python");function Oe(qe){De(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:Oe},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:De={}}){const Oe=(0,ke.useRef)(),[Ze,qe]=(0,ke.useState)();return(0,ke.useEffect)(()=>{if(Ze){let Xe=function(vt){const gt=vt.getValue();Pe&&Pe(gt)};return Ze.on("change",Xe),()=>{Ze.off("change",Xe)}}},[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(Oe.current&&!Ze){const Xe=xe().fromTextArea(Oe.current,z({mode:Ae,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},De));qe(Xe)}},[Oe.current,Ze]),ke.createElement("div",{className:"my-codemirror-container"},ke.createElement("textarea",{ref:Oe}))}},39793:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return $n}});var ke=Ie(59301),Se=Ie(89780),Be=Ie.n(Se),Le=Ie(76374),Ce=Ie(8336),xe=Ie(6313),be=Ie(25717),ye=Ie(99498),we=Ie(25419),pe=Ie(67549),de=Ie(76902),ge=({value:Ue="",className:Je,showTextOnly:nt,showLines:Pt,style:Nt={}})=>{const sn=(0,ke.useMemo)(()=>"",[Ue]);return ke.createElement(ke.Fragment,null,ke.createElement("div",{dangerouslySetInnerHTML:{__html:sn}}))},fe=Ie(59301),ue=Object.defineProperty,ee=Object.defineProperties,z=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,le=(Ue,Je,nt)=>Je in Ue?ue(Ue,Je,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Ue[Je]=nt,me=(Ue,Je)=>{for(var nt in Je||(Je={}))re.call(Je,nt)&&le(Ue,nt,Je[nt]);if(oe)for(var nt of oe(Je))ae.call(Je,nt)&&le(Ue,nt,Je[nt]);return Ue},ve=(Ue,Je)=>ee(Ue,z(Je));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:Ue,title:Je,icon:nt,actionName:Pt,className:Nt="",children:sn}){function Kt(){Ue(Pt)}return fe.createElement("a",{title:Je,className:Nt,onClick:Kt},fe.createElement("i",{className:`${nt}`}),sn)}var De=({watch:Ue,showNullButton:Je,showNullProgramButton:nt,onActionCallback:Pt,fullScreen:Nt,insertTemp:sn,hidetoolBar:Kt,extraUse:_n})=>{const zn=[...Pe,{title:`${Ue?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ue?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return fe.createElement("ul",{className:"markdown-toolbar-container"},!Kt&&zn.map((_i,Bi)=>fe.createElement("li",{key:Bi},_i.actionName?fe.createElement(Ae,ve(me({},_i),{onActionCallback:Pt})):fe.createElement("span",{className:"v-line"}))),Je?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:Pt},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:Pt},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:Pt},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:Pt},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:Pt})))},Oe=Ie(91558),Ze=Ie(28284),qe=Ie(37568),Xe=Ie(99571),vt=Object.defineProperty,gt=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,Rt=(Ue,Je,nt)=>Je in Ue?vt(Ue,Je,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Ue[Je]=nt,ut=(Ue,Je)=>{for(var nt in Je||(Je={}))bt.call(Je,nt)&&Rt(Ue,nt,Je[nt]);if(at)for(var nt of at(Je))ct.call(Je,nt)&&Rt(Ue,nt,Je[nt]);return Ue},ot=(Ue,Je)=>gt(Ue,kt(Je));const ht={labelCol:{span:4},wrapperCol:{span:20}};var yt=({callback:Ue,onCancel:Je})=>{function nt(Pt){Ue(Pt)}return ke.createElement(Ze.default,ot(ut({},ht),{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(Xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ke.createElement(Xe.ZP,{type:"ghost",onClick:Je},"\u53D6\u6D88")))},_t=Ie(69720),xt=Ie(17077),Ut=Ie(62957),Ht=Ie(77019),dn=Ie(9507),Ft=Ie(59301),fn=({callback:Ue,onCancel:Je})=>{const nt=document.createElement("canvas"),Pt=nt.getContext("2d");nt.width=1e3,nt.height=800,Pt.fillStyle="#ffffff",Pt.fillRect(0,0,nt.width,nt.height);const Nt=nt.toDataURL("image/png");return Ft.createElement(Ut.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ft.createElement(Ht.Z,{style:{height:"100vh"}},Ft.createElement(dn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Nt,visible:!0,title:String(Date.now())},onOk:sn=>{Ue({src:sn.url})},onClose:Je})))},It=Ie(12378);function Xt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Xt,go.CommandHandler),Xt.prototype.canAlignSelection=function(){var Ue=this.diagram;return!(Ue===null||Ue.isReadOnly||Ue.isModelReadOnly||Ue.selection.count<2)},Xt.prototype.alignLeft=function(){var Ue=this.diagram;Ue.startTransaction("aligning left");var Je=1/0;Ue.selection.each(function(nt){nt instanceof go.Link||(Je=Math.min(nt.position.x,Je))}),Ue.selection.each(function(nt){nt instanceof go.Link||nt.move(new go.Point(Je,nt.position.y))}),Ue.commitTransaction("aligning left")},Xt.prototype.alignRight=function(){var Ue=this.diagram;Ue.startTransaction("aligning right");var Je=-1/0;Ue.selection.each(function(nt){if(!(nt instanceof go.Link)){var Pt=nt.actualBounds.x+nt.actualBounds.width;Je=Math.max(Pt,Je)}}),Ue.selection.each(function(nt){nt instanceof go.Link||nt.move(new go.Point(Je-nt.actualBounds.width,nt.position.y))}),Ue.commitTransaction("aligning right")},Xt.prototype.alignTop=function(){var Ue=this.diagram;Ue.startTransaction("alignTop");var Je=1/0;Ue.selection.each(function(nt){nt instanceof go.Link||(Je=Math.min(nt.position.y,Je))}),Ue.selection.each(function(nt){nt instanceof go.Link||nt.move(new go.Point(nt.position.x,Je))}),Ue.commitTransaction("alignTop")},Xt.prototype.alignBottom=function(){var Ue=this.diagram;Ue.startTransaction("aligning bottom");var Je=-1/0;Ue.selection.each(function(nt){if(!(nt instanceof go.Link)){var Pt=nt.actualBounds.y+nt.actualBounds.height;Je=Math.max(Pt,Je)}}),Ue.selection.each(function(nt){nt instanceof go.Link||nt.move(new go.Point(nt.actualBounds.x,Je-nt.actualBounds.height))}),Ue.commitTransaction("aligning bottom")},Xt.prototype.alignCenterX=function(){var Ue=this.diagram,Je=Ue.selection.first();if(Je){Ue.startTransaction("aligning Center X");var nt=Je.actualBounds.x+Je.actualBounds.width/2;Ue.selection.each(function(Pt){Pt instanceof go.Link||Pt.move(new go.Point(nt-Pt.actualBounds.width/2,Pt.actualBounds.y))}),Ue.commitTransaction("aligning Center X")}},Xt.prototype.alignCenterY=function(){var Ue=this.diagram,Je=Ue.selection.first();if(Je){Ue.startTransaction("aligning Center Y");var nt=Je.actualBounds.y+Je.actualBounds.height/2;Ue.selection.each(function(Pt){Pt instanceof go.Link||Pt.move(new go.Point(Pt.actualBounds.x,nt-Pt.actualBounds.height/2))}),Ue.commitTransaction("aligning Center Y")}},Xt.prototype.alignColumn=function(Ue){var Je=this.diagram;Je.startTransaction("align Column"),Ue===void 0&&(Ue=0),Ue=parseFloat(Ue);var nt=new Array;Je.selection.each(function(_n){_n instanceof go.Link||nt.push(_n)});for(var Pt=0;Pt<nt.length-1;Pt++){var Nt=nt[Pt],sn=Nt.actualBounds.y+Nt.actualBounds.height+Ue,Kt=nt[Pt+1];Kt.move(new go.Point(Nt.actualBounds.x,sn))}Je.commitTransaction("align Column")},Xt.prototype.alignRow=function(Ue){Ue===void 0&&(Ue=0),Ue=parseFloat(Ue);var Je=this.diagram;Je.startTransaction("align Row");var nt=new Array;Je.selection.each(function(_n){_n instanceof go.Link||nt.push(_n)});for(var Pt=0;Pt<nt.length-1;Pt++){var Nt=nt[Pt],sn=Nt.actualBounds.x+Nt.actualBounds.width+Ue,Kt=nt[Pt+1];Kt.move(new go.Point(sn,Nt.actualBounds.y))}Je.commitTransaction("align Row")},Xt.prototype.canRotate=function(Ue){var Je=this.diagram;return!(Je===null||Je.isReadOnly||Je.isModelReadOnly||Je.selection.count<1)},Xt.prototype.rotate=function(Ue){Ue===void 0&&(Ue=90);var Je=this.diagram;Je.startTransaction("rotate "+Ue.toString());var Je=this.diagram;Je.selection.each(function(nt){nt instanceof go.Link||nt instanceof go.Group||(nt.angle+=Ue)}),Je.commitTransaction("rotate "+Ue.toString())},Xt.prototype.pullToFront=function(){var Ue=this.diagram;Ue.startTransaction("pullToFront");var Je=new go.Map;Ue.selection.each(function(nt){Je.set(nt.layer,0)}),Je.iteratorKeys.each(function(nt){var Pt=0;nt.parts.each(function(Nt){if(!Nt.isSelected){var sn=Nt.zOrder;isNaN(sn)?Nt.zOrder=0:Pt=Math.max(Pt,sn)}}),Je.set(nt,Pt)}),Ue.selection.each(function(nt){Xt._assignZOrder(nt,Je.get(nt.layer)+1)}),Ue.commitTransaction("pullToFront")},Xt.prototype.pushToBack=function(){var Ue=this.diagram;Ue.startTransaction("pushToBack");var Je=new go.Map;Ue.selection.each(function(nt){Je.set(nt.layer,0)}),Je.iteratorKeys.each(function(nt){var Pt=0;nt.parts.each(function(Nt){if(!Nt.isSelected){var sn=Nt.zOrder;isNaN(sn)?Nt.zOrder=0:Pt=Math.min(Pt,sn)}}),Je.set(nt,Pt)}),Ue.selection.each(function(nt){Xt._assignZOrder(nt,Je.get(nt.layer)-1-Xt._findGroupDepth(nt))}),Ue.commitTransaction("pushToBack")},Xt._assignZOrder=function(Ue,Je,nt){nt===void 0&&(nt=Ue),Ue.layer===nt.layer&&(Ue.zOrder=Je),Ue instanceof go.Group&&Ue.memberParts.each(function(Pt){Xt._assignZOrder(Pt,Je+1,nt)})},Xt._findGroupDepth=function(Ue){if(Ue instanceof go.Group){var Je=0;return Ue.memberParts.each(function(nt){Je=Math.max(Je,Xt._findGroupDepth(nt))}),Je+1}else return 0},Xt.prototype.doKeyDown=function(){var Ue=this.diagram;if(Ue!==null){var Je=Ue.lastInput;if(Je.key==="Up"||Je.key==="Down"||Je.key==="Left"||Je.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)}},Xt.prototype._getAllParts=function(){var Ue=new Array;return this.diagram.nodes.each(function(Je){Ue.push(Je)}),this.diagram.parts.each(function(Je){Ue.push(Je)}),Ue},Xt.prototype._arrowKeyMove=function(){var Ue=this.diagram,Je=Ue.lastInput,nt=0,Pt=0;if(Je.control||Je.meta)nt=1,Pt=1;else if(Ue.grid!==null){var Nt=Ue.grid.gridCellSize;Pt=Nt.width,nt=Nt.height}Ue.startTransaction("arrowKeyMove"),Ue.selection.each(function(sn){Je.key==="Up"?sn.move(new go.Point(sn.actualBounds.x,sn.actualBounds.y-nt)):Je.key==="Down"?sn.move(new go.Point(sn.actualBounds.x,sn.actualBounds.y+nt)):Je.key==="Left"?sn.move(new go.Point(sn.actualBounds.x-Pt,sn.actualBounds.y)):Je.key==="Right"&&sn.move(new go.Point(sn.actualBounds.x+Pt,sn.actualBounds.y))}),Ue.commitTransaction("arrowKeyMove")},Xt.prototype._arrowKeySelect=function(){var Ue=this.diagram,Je=Ue.lastInput,nt=null;Je.key==="Up"?nt=this._findNearestPartTowards(270):Je.key==="Down"?nt=this._findNearestPartTowards(90):Je.key==="Left"?nt=this._findNearestPartTowards(180):Je.key==="Right"&&(nt=this._findNearestPartTowards(0)),nt!==null&&(Je.shift?nt.isSelected=!0:Je.control||Je.meta?nt.isSelected=!nt.isSelected:Ue.select(nt))},Xt.prototype._findNearestPartTowards=function(Ue){var Je=this.diagram.selection.first();if(Je===null)return null;for(var nt=Je.actualBounds.center,Pt=this._getAllParts(),Nt=1/0,sn=Je,Kt=0;Kt<Pt.length;Kt++){var _n=Pt[Kt];if(_n!==Je&&_n.canSelect()){var zn=_n.actualBounds.center,_i=nt.directionPoint(zn),Bi=this._angleCloseness(_i,Ue);if(Bi<=45){var wt=nt.distanceSquaredPoint(zn);wt*=1+Math.sin(Bi*Math.PI/180),wt<Nt&&(Nt=wt,sn=_n)}}}return sn},Xt.prototype._angleCloseness=function(Ue,Je){return Math.min(Math.abs(Je-Ue),Math.min(Math.abs(Je+360-Ue),Math.abs(Je-360-Ue)))},Xt.prototype._arrowKeyTree=function(){var Ue=this.diagram,Je=Ue.selection.first();if(Je instanceof go.Node){var nt=Ue.lastInput;if(nt.key==="Right"){if(!Je.isTreeLeaf)if(!Je.isTreeExpanded)Ue.commandHandler.canExpandTree(Je)&&Ue.commandHandler.expandTree(Je);else{var Pt=this._sortTreeChildrenByY(Je).first();Pt!==null&&Ue.select(Pt)}}else if(nt.key==="Left")if(!Je.isTreeLeaf&&Je.isTreeExpanded)Ue.commandHandler.canCollapseTree(Je)&&Ue.commandHandler.collapseTree(Je);else{var Nt=Je.findTreeParentNode();Nt!==null&&Ue.select(Nt)}else if(nt.key==="Up"){var Nt=Je.findTreeParentNode();if(Nt!==null){var sn=this._sortTreeChildrenByY(Nt),Kt=sn.indexOf(Je);if(Kt>0){for(var _n=sn.elt(Kt-1);_n!==null&&_n.isTreeExpanded&&!_n.isTreeLeaf;){var zn=this._sortTreeChildrenByY(_n);_n=zn.last()}_n!==null&&Ue.select(_n)}else Ue.select(Nt)}}else if(nt.key==="Down")if(Je.isTreeExpanded&&!Je.isTreeLeaf){var Pt=this._sortTreeChildrenByY(Je).first();Pt!==null&&Ue.select(Pt)}else for(;Je!==null;){var Nt=Je.findTreeParentNode();if(Nt===null)break;var sn=this._sortTreeChildrenByY(Nt),Kt=sn.indexOf(Je);if(Kt<sn.length-1){Ue.select(sn.elt(Kt+1));break}else Je=Nt}var _i=Ue.selection.first();_i!==null&&Ue.scrollToRect(_i.actualBounds)}},Xt.prototype._sortTreeChildrenByY=function(Ue){var Je=new go.List().addAll(Ue.findTreeChildrenNodes());return Je.sort(function(nt,Pt){var Nt=nt.location,sn=Pt.location;return Nt.y<sn.y?-1:Nt.y>sn.y?1:Nt.x<sn.x?-1:Nt.x>sn.x?1:0}),Je},Xt.prototype.copyToClipboard=function(Ue){go.CommandHandler.prototype.copyToClipboard.call(this,Ue),this._lastPasteOffset.set(this.pasteOffset)},Xt.prototype.pasteFromClipboard=function(){var Ue=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ue,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ue},Object.defineProperty(Xt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ue){if(Ue!=="move"&&Ue!=="select"&&Ue!=="scroll"&&Ue!=="tree"&&Ue!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ue);this._arrowKeyBehavior=Ue}}),Object.defineProperty(Xt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ue){if(!(Ue instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ue);this._pasteOffset.set(Ue)}});var tn=Xt,lt=Ie(63720),He=Ie(5269),ze=Ie(38986),it={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},dt=Ie(48790),tt=Ie(59301),Ke=(Ue,Je,nt)=>new Promise((Pt,Nt)=>{var sn=zn=>{try{_n(nt.next(zn))}catch(_i){Nt(_i)}},Kt=zn=>{try{_n(nt.throw(zn))}catch(_i){Nt(_i)}},_n=zn=>zn.done?Pt(zn.value):Promise.resolve(zn.value).then(sn,Kt);_n((nt=nt.apply(Ue,Je)).next())});function je({onCancel:Ue,callback:Je}){let nt=(0,ke.useRef)(),Pt=(0,ke.useRef)(),Nt=(0,ke.useRef)(),sn=(0,ke.useRef)(!1);const Kt=(0,ke.useRef)(!1),[_n,zn]=(0,ke.useState)(0);function _i(){const wt=It.bx.make,zt={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};nt.current=new It.S0(Pt.current,{padding:20,grid:wt(It.s_,"Grid",wt(It.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),wt(It.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Vn=>{var mi=Vn.diagram.commandHandler.addTopLevelParts(Vn.diagram.selection,!0);mi||Vn.diagram.currentTool.doCancel()},commandHandler:wt(tn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Vn=>{var mi=Vn.subject;mi.location=mi.location.copy().snapToGridPoint(Vn.diagram.grid.gridOrigin,Vn.diagram.grid.gridCellSize),setTimeout(()=>{Vn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Vn=>{var mi=Vn.subject;setTimeout(()=>{Vn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Vn=>{var mi=Vn.parameter.part;mi.invalidateConnectedLinks();var di=Vn.subject;Vn.diagram.toolManager.linkingTool.isForwards?di.toNode.invalidateConnectedLinks():di.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),nt.current.nodeTemplate=wt(It.NB,"Auto",{locationSpot:It.z6.Center,locationObjectName:"SHAPE",desiredSize:new It.$u(120,60),minSize:new It.$u(40,40),resizable:!0,resizeCellSize:new It.$u(10,10),rotatable:!0},new It.KX("location","loc",It.E9.parse).makeTwoWay(It.E9.stringify),new It.KX("desiredSize","size",It.$u.parse).makeTwoWay(It.$u.stringify),wt(It.bn,{name:"SHAPE",fill:zt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:It.z6.AllSides,toSpot:It.z6.AllSides},new It.KX("figure"),new It.KX("fill"),new It.KX("stroke","borderColor"),new It.KX("strokeWidth","thickness"),new It.KX("strokeDashArray","dash")),wt(It.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),wt(It.al,{margin:1,textAlign:"center",overflow:It.al.OverflowEllipsis,editable:!0},new It.KX("text").makeTwoWay(),new It.KX("stroke","color"))),nt.current.nodeTemplate.toolTip=wt("ToolTip",wt(It.s_,"Vertical",{maxSize:new It.$u(200,NaN)},wt(It.al,{font:"bold 10pt sans-serif",textAlign:"center"},new It.KX("text")),wt(It.al,{font:"10pt sans-serif",textAlign:"center"},new It.KX("text","details"))));function En(Vn,mi){var di=(gi,Di)=>{gi.handled=!0,gi.diagram.model.commit(Ji=>{var cr=Di.part.adornedPart,_r=new It.E9().setRectSpot(cr.actualBounds,Vn);_r.subtract(cr.location),_r.scale(2,2),_r.x+=Math.sign(_r.x)*130,_r.y+=Math.sign(_r.y)*130,_r.add(cr.location),_r.snapToGridPoint(gi.diagram.grid.gridOrigin,gi.diagram.grid.gridCellSize);var Rr=Ji.copyNodeData(cr.data);Ji.setGroupKeyForNodeData(Rr,Ji.getGroupKeyForNodeData(cr.data)),Ji.addNodeData(Rr);var Mn={from:cr.key,to:Ji.getKeyForNodeData(Rr)};Ji.addLinkData(Mn);var Qr=gi.diagram.findNodeForData(Rr);Qr.location=_r,gi.diagram.select(Qr),setTimeout(()=>{gi.diagram.commandHandler.editTextBlock()},20)})};return wt(It.bn,{figure:mi,alignment:Vn,alignmentFocus:Vn.opposite(),width:Vn.equals(It.z6.Top)||Vn.equals(It.z6.Bottom)?25:18,height:Vn.equals(It.z6.Top)||Vn.equals(It.z6.Bottom)?18:25,fill:"orange",stroke:zt.white,strokeWidth:4,mouseEnter:(gi,Di)=>Di.fill="dodgerblue",mouseLeave:(gi,Di)=>Di.fill="orange",isActionable:!0,click:di,contextClick:di})}function bn(Vn){return wt(It.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:(mi,di)=>di.fill="dodgerblue",mouseLeave:(mi,di)=>di.fill="orange",click:(mi,di)=>{mi.diagram.commandHandler.showContextMenu(di.part.adornedPart)}},Vn||{})}nt.current.nodeTemplate.selectionAdornmentTemplate=wt(It.uz,"Spot",wt(It.Vm,{padding:10}),En(It.z6.Top,"TriangleUp"),En(It.z6.Left,"TriangleLeft"),En(It.z6.Right,"TriangleRight"),En(It.z6.Bottom,"TriangleDown"),bn({alignment:new It.z6(.75,0)}));function Yt(Vn,mi){return(di,gi)=>{di.handled=!0,di.diagram.model.commit(Di=>{Di.set(gi.part.adornedPart.data,Vn,mi)})}}function gn(Vn,mi){return mi||(mi="color"),wt(It.bn,{width:16,height:16,stroke:"lightgray",fill:Vn,margin:1,background:"transparent",mouseEnter:(di,gi)=>gi.stroke="dodgerblue",mouseLeave:(di,gi)=>gi.stroke="lightgray",click:Yt(mi,Vn),contextClick:Yt(mi,Vn)})}function yn(){return[wt("ContextMenuButton",wt(It.s_,"Horizontal",gn(zt.white,"fill"),gn(zt.beige,"fill"),gn(zt.extralightblue,"fill"),gn(zt.extralightred,"fill"))),wt("ContextMenuButton",wt(It.s_,"Horizontal",gn(zt.lightgray,"fill"),gn(zt.lightgreen,"fill"),gn(zt.lightblue,"fill"),gn(zt.lightred,"fill")))]}function vn(){return[wt("ContextMenuButton",wt(It.s_,"Horizontal",gn(zt.black),gn(zt.green),gn(zt.blue),gn(zt.red))),wt("ContextMenuButton",wt(It.s_,"Horizontal",gn(zt.white),gn(zt.magenta),gn(zt.purple),gn(zt.orange)))]}function jn(Vn,mi){return mi||(mi="thickness"),wt(It.bn,"LineH",{width:16,height:16,strokeWidth:Vn,margin:1,background:"transparent",mouseEnter:(di,gi)=>gi.background="dodgerblue",mouseLeave:(di,gi)=>gi.background="transparent",click:Yt(mi,Vn),contextClick:Yt(mi,Vn)})}function Un(Vn,mi){return mi||(mi="dash"),wt(It.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Vn,margin:1,background:"transparent",mouseEnter:(di,gi)=>gi.background="dodgerblue",mouseLeave:(di,gi)=>gi.background="transparent",click:Yt(mi,Vn),contextClick:Yt(mi,Vn)})}function Gn(){return[wt("ContextMenuButton",wt(It.s_,"Horizontal",jn(1),jn(2),jn(3),jn(4))),wt("ContextMenuButton",wt(It.s_,"Horizontal",Un(null),Un([2,4]),Un([4,4])))]}function An(Vn,mi){return mi||(mi="figure"),wt(It.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Vn,margin:1,background:"transparent",mouseEnter:(di,gi)=>gi.fill="dodgerblue",mouseLeave:(di,gi)=>gi.fill="lightgray",click:Yt(mi,Vn),contextClick:Yt(mi,Vn)})}nt.current.nodeTemplate.contextMenu=wt("ContextMenu",wt("ContextMenuButton",wt(It.s_,"Horizontal",An("Rectangle"),An("RoundedRectangle"),An("Ellipse"),An("Diamond"))),wt("ContextMenuButton",wt(It.s_,"Horizontal",An("Parallelogram2"),An("ManualOperation"),An("Procedure"),An("Cylinder1"))),wt("ContextMenuButton",wt(It.s_,"Horizontal",An("Terminator"),An("CreateRequest"),An("Document"),An("TriangleDown"))),yn(),vn(),Gn()),nt.current.groupTemplate=wt(It.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:It.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Vn,mi)=>{var di=mi.addMembers(mi.diagram.selection,!0);di||mi.diagram.currentTool.doCancel()},avoidable:!1},new It.KX("location","loc",It.E9.parse).makeTwoWay(It.E9.stringify),wt(It.s_,"Auto",{name:"BODY"},wt(It.bn,{parameter1:10,fill:zt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:It.z6.AllSides,toSpot:It.z6.AllSides},new It.KX("fill"),new It.KX("stroke","color"),new It.KX("strokeWidth","thickness"),new It.KX("strokeDashArray","dash")),wt(It.Vm,{background:"transparent",margin:20})),wt(It.al,{alignment:It.z6.Top,alignmentFocus:It.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new It.KX("text"),new It.KX("stroke","color"))),nt.current.groupTemplate.selectionAdornmentTemplate=wt(It.uz,"Spot",wt(It.s_,"Auto",wt(It.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),wt(It.Vm,{margin:1.5})),bn({alignment:It.z6.TopRight,alignmentFocus:It.z6.BottomRight})),nt.current.groupTemplate.contextMenu=wt("ContextMenu",yn(),vn(),Gn()),nt.current.linkTemplate=wt(It.rU,{layerName:"Foreground",routing:It.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new It.KX("fromSpot","fromSpot",It.z6.parse),new It.KX("toSpot","toSpot",It.z6.parse),new It.KX("fromShortLength","dir",Vn=>Vn>=1?10:0),new It.KX("toShortLength","dir",Vn=>Vn>=1?10:0),new It.KX("points").makeTwoWay(),wt(It.bn,{strokeWidth:2},new It.KX("stroke","color"),new It.KX("strokeWidth","thickness"),new It.KX("strokeDashArray","dash")),wt(It.bn,{segmentIndex:0,segmentOffset:new It.E9(15,0),segmentOrientation:It.rU.OrientAlong,alignmentFocus:It.z6.Right,figure:"circle",width:10,strokeWidth:0},new It.KX("fill","color"),new It.KX("visible","dir",Vn=>Vn===1)),wt(It.bn,{segmentIndex:-1,segmentOffset:new It.E9(-10,6),segmentOrientation:It.rU.OrientPlus90,alignmentFocus:It.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new It.KX("fill","color"),new It.KX("visible","dir",Vn=>Vn>=1),new It.KX("width","thickness",Vn=>7+3*Vn),new It.KX("height","thickness",Vn=>7+3*Vn),new It.KX("segmentOffset","thickness",Vn=>new It.E9(-15,4+1.5*Vn))),wt(It.bn,{segmentIndex:0,segmentOffset:new It.E9(15,-6),segmentOrientation:It.rU.OrientMinus90,alignmentFocus:It.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new It.KX("fill","color"),new It.KX("visible","dir",Vn=>Vn===2),new It.KX("width","thickness",Vn=>7+3*Vn),new It.KX("height","thickness",Vn=>7+3*Vn),new It.KX("segmentOffset","thickness",Vn=>new It.E9(-15,4+1.5*Vn))),wt(It.al,{alignmentFocus:new It.z6(0,1,-4,0),editable:!0},new It.KX("text").makeTwoWay(),new It.KX("stroke","color"))),nt.current.linkTemplate.selectionAdornmentTemplate=wt(It.uz,wt(It.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Li(2)},new It.KX("pathPattern","thickness",Li)),bn({alignmentFocus:new It.z6(0,0,-6,-4)}));function Li(Vn){return wt(It.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Vn+4).toString()+" H3"})}function xi(Vn){var mi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Vn===0?mi="M0 0 M16 16 M0 8 L16 8":Vn===2&&(mi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),wt(It.bn,{geometryString:mi,margin:2,background:"transparent",mouseEnter:(di,gi)=>gi.background="dodgerblue",mouseLeave:(di,gi)=>gi.background="transparent",click:Yt("dir",Vn),contextClick:Yt("dir",Vn)})}function bi(Vn){var mi=(di,gi)=>{di.handled=!0,di.diagram.model.commit(Di=>{var Ji=gi.part.adornedPart;Di.set(Ji.data,Vn?"toSpot":"fromSpot",It.z6.stringify(It.z6.AllSides)),(Vn?Ji.toNode:Ji.fromNode).invalidateConnectedLinks()})};return wt(It.bn,{width:12,height:12,fill:"transparent",mouseEnter:(di,gi)=>gi.background="dodgerblue",mouseLeave:(di,gi)=>gi.background="transparent",click:mi,contextClick:mi})}function hn(Vn,mi){var di=0,gi=It.z6.RightSide;Vn.equals(It.z6.Top)?(di=270,gi=It.z6.TopSide):Vn.equals(It.z6.Left)?(di=180,gi=It.z6.LeftSide):Vn.equals(It.z6.Bottom)&&(di=90,gi=It.z6.BottomSide),mi||(di-=180);var Di=(Ji,cr)=>{Ji.handled=!0,Ji.diagram.model.commit(_r=>{var Rr=cr.part.adornedPart;_r.set(Rr.data,mi?"toSpot":"fromSpot",It.z6.stringify(gi)),(mi?Rr.toNode:Rr.fromNode).invalidateConnectedLinks()})};return wt(It.bn,{alignment:Vn,alignmentFocus:Vn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:di,background:"transparent",mouseEnter:(Ji,cr)=>cr.background="dodgerblue",mouseLeave:(Ji,cr)=>cr.background="transparent",click:Di,contextClick:Di})}nt.current.linkTemplate.contextMenu=wt("ContextMenu",vn(),Gn(),wt("ContextMenuButton",wt(It.s_,"Horizontal",xi(0),xi(1),xi(2))),wt("ContextMenuButton",wt(It.s_,"Horizontal",wt(It.s_,"Spot",bi(!1),hn(It.z6.Top,!1),hn(It.z6.Left,!1),hn(It.z6.Right,!1),hn(It.z6.Bottom,!1)),wt(It.s_,"Spot",{margin:new It.Zt(0,0,0,2)},bi(!0),hn(It.z6.Top,!0),hn(It.z6.Left,!0),hn(It.z6.Right,!0),hn(It.z6.Bottom,!0)))));const Vi=`{ "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 lr=["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 Mr(Vn){return console.log("shapeName:",Vn),lr.indexOf(Vn)>=0}var xn=new It.YI(Nt.current,{maxSelectionCount:1,linkTemplate:wt(It.rU,{locationSpot:It.z6.Center,selectionAdornmentTemplate:wt(It.uz,"Link",{locationSpot:It.z6.Center},wt(It.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),wt(It.bn,{toArrow:"Standard",stroke:null}))},{routing:It.rU.AvoidsNodes,curve:It.rU.JumpOver,corner:5,toShortLength:4},new It.KX("points"),wt(It.bn,{isPanelMain:!0,strokeWidth:2}),wt(It.bn,{toArrow:"Standard",stroke:null})),model:new It.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...It.bn.getFigureGenerators().toArray().map(Vn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Vn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return nt.current.addDiagramListener("TextEdited",function(Vn){var mi;const di=Vn.subject.part;var gi=(mi=document.activeElement)==null?void 0:mi.value;typeof gi=="string"&&gi.trim()===""&&nt.current.model.commit(function(Di){Di.set(di.data,"text","\u672A\u547D\u540D"),nt.current.commandHandler.stopCommand()},"increment")}),xn.nodeTemplate=wt(It.NB,"Auto",{locationSpot:It.z6.Center},new It.KX("location","location",It.E9.parse).makeTwoWay(It.E9.stringify),wt(It.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 It.KX("stroke").makeTwoWay(),new It.KX("fill").makeTwoWay(),new It.KX("figure")),wt(It.al,{margin:new It.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new It.$u(16,16),maxSize:new It.$u(10,NaN),textAlign:"center",editable:!0},new It.KX("key").makeTwoWay())),setTimeout(()=>{nt.current.grid=wt(It.s_,"Grid",wt(It.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),wt(It.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 Bi=()=>Ke(this,null,function*(){var wt,zt=nt.current.makeImage();const En=yield(0,ze.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:zt.src,file_data:JSON.stringify({login:(wt=(0,dt.eY)())==null?void 0:wt.login,data:JSON.parse(nt.current.model.toJson())})}});Je({src:En.url})});return(0,ke.useEffect)(()=>(setTimeout(()=>{_i()},500),zn(_n+1),()=>{nt.current=null}),[]),tt.createElement("div",{ref:Kt,className:"body-overflow-initial"},tt.createElement(Ut.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!_n,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:tt.createElement(Ht.Z,null,tt.createElement(He.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),tt.createElement(He.Z,{onClick:()=>{var wt,zt,En=nt.current.selection.first();if(sn.current=!sn.current,document.activeElement&&En){let bn=(zt=(wt=document.activeElement)==null?void 0:wt.value)==null?void 0:zt.trim();typeof bn=="string"&&nt.current.model.commit(function(Yt){Yt.set(En.data,"text",bn||"\u672A\u547D\u540D"),nt.current.commandHandler.stopCommand()},"increment")}zn(_n+1)}},tt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ue},tt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:sn.current?"none":"block"},className:it.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:it.myPaletteDiv,ref:Nt})),tt.createElement("div",{style:{flex:1,position:"relative"}},tt.createElement("div",{ref:Pt,style:{height:"80vh"}}))),tt.createElement("div",{className:"tr"},tt.createElement(Xe.ZP,{size:"large",onClick:Bi,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Re=je,Qe=Ie(47889),Ve=Ie(71051);const We=Qe.ZP.Group,pt={margin:"0 8px"};var Mt=({callback:Ue,onCancel:Je})=>{function nt(Pt){Ue(Pt)}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(Ve.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(Ve.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(We,null,ke.createElement(Qe.ZP,{value:"default"},ke.createElement("i",{className:"fa fa-align-justify"})),ke.createElement(Qe.ZP,{value:"left"},ke.createElement("i",{className:"fa fa-align-left"})),ke.createElement(Qe.ZP,{value:"center"},ke.createElement("i",{className:"fa fa-align-center"})),ke.createElement(Qe.ZP,{value:"right"},ke.createElement("i",{className:"fa fa-align-right"}))))),ke.createElement("div",{className:"flex-container flex-end"},ke.createElement(Xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ke.createElement(Xe.ZP,{type:"ghost",onClick:Je},"\u53D6\u6D88")))},Qt=Ie(71411),qt=Ie(43001),Bt=Ie.n(qt),Cn=(0,ke.forwardRef)(({use3d:Ue,width:Je,height:nt,callback:Pt,showSaveButton:Nt},sn)=>{const Kt=(0,ke.useRef)(),_n=(0,ke.useRef)(),[zn,_i]=(0,ke.useState)(!1),Bi=(0,ke.useRef)({id:Kt,appName:"graphing",width:Je||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(Bt())(Bi.current,!0),window.onload=function(){_n.current.inject("applet_container")}},[]);const wt=()=>{var zt=window.ggbApplet.getPNGBase64(1,!0,72);return Pt&&Pt(zt),zt};return(0,ke.useEffect)(()=>{Bi.current.appName=zn?"3D":"graphing",_n.current.inject("applet_container")},[zn]),(0,ke.useEffect)(()=>{_i(Ue)},[Ue]),(0,ke.useImperativeHandle)(sn,()=>({getImgData:wt})),ke.createElement(ke.Fragment,null,ke.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Kt}),ke.createElement(Ht.Z,{align:"middle"},ke.createElement(He.Z,{flex:1},ke.createElement(Qt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:zn,onChange:zt=>_i(zt)})),ke.createElement(He.Z,null,ke.createElement(Xe.ZP,{size:"large",onClick:wt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),mn=Ie(76562),un=Ie(6767);const Kn="link",pn="upload-image",Hn="add-flowchart",Qn="draw-image",Ai="add-flowchart",ei="code-block",ki="add-table",Wi="------------",Ui={default:Wi,left:`:${Wi}`,center:`:${Wi}:`,right:`${Wi}:`};var rr=Ie(37808);function vr(){}let wr=0;const Oi=1e4,Zi="\u2581",pr="@\u2581\u2581@",et="@\u2581@",ai=`
**\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`,ti=["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(Ue){return/^\d+$/.test(Ue)?`${Ue}px`:Ue}const hr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",or={[hr+"-B"]:"bold",[hr+"-I"]:"italic"},po={[Kn]:"\u6DFB\u52A0\u94FE\u63A5",[ei]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[pn]:"\u6DFB\u52A0\u56FE\u7247",[Qn]:"\u6DFB\u52A0\u753B\u56FE",[Hn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ki]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var $n=({defaultValue:Ue="",onChange:Je,width:nt="100%",height:Pt=400,miniToolbar:Nt=!1,isFocus:sn=!1,watch:Kt,insertTemp:_n,mode:zn="markdown",id:_i="markdown-editor-id",showResizeBar:Bi=!1,noStorage:wt=!1,showNullButton:zt=!1,showNullProgramButton:En=!1,hidetoolBar:bn=!1,fullScreen:Yt=!1,onBlur:gn,onCMBeforeChange:yn,onFullScreen:vn,className:jn="",disablePaste:Un=!1,disabled:Gn=!1,disabledFill:An=!1,placeholder:Li="",values:xi="",extraUse:bi})=>{const[hn,Vi]=(0,ke.useState)(null),[lr,Mr]=(0,ke.useState)(Ue),[xn,Vn]=(0,ke.useState)(Kt),[mi,di]=(0,ke.useState)(Yt),[gi,Di]=(0,ke.useState)(""),[Ji,cr]=(0,ke.useState)(0),[_r,Rr]=(0,ke.useState)(Pt),[Mn,Qr]=(0,ke.useState)(!1),[kn,Ri]=(0,ke.useState)(0),[kr,mr]=(0,ke.useState)(0),eo=(0,ke.useRef)(),Tr=(0,ke.useRef)(),Sr=(0,ke.useRef)(),yo=(0,ke.useRef)();(0,ke.useEffect)(()=>{const ci=window.scrollY||window.pageYOffset;Mr(xi),hn==null||hn.setValue(xi),window.scrollTo(0,ci)},[xi]),(0,ke.useEffect)(()=>{vn==null||vn(mi)},[mi]),(0,ke.useEffect)(()=>{if(eo.current){let ci=function(Pn,wi){var ji;if(Un){wi.preventDefault();return}const br=wi.clipboardData;if(br){const nr=br.types.toString(),Zr=br.items;if(nr==="Files"||br.types.indexOf("Files")>-1){if(wi.preventDefault(),zn=="stex")return;try{let zr=Zr[1];((ji=Zr[0])==null?void 0:ji.kind)==="file"&&(zr=Zr[0]);const Ur=zr.getAsFile(),to=Ur.name.split(".").pop();(0,xt.I)(Ur,Jr=>{var ko,rn,Kr;Jr.id?((ko=Ur==null?void 0:Ur.type)==null?void 0:ko.indexOf("image"))>-1?ni.replaceSelection(`<img width="100%" src="/api/attachments/${Jr.id}?type=${Jr.content_type})" alt="" />`):((rn=Ur==null?void 0:Ur.type)==null?void 0:rn.indexOf("video"))>-1?ni.replaceSelection(`<video width="100%" controls src="/api/attachments/${Jr.id}"></video>`):((Kr=Ur==null?void 0:Ur.type)==null?void 0:Kr.indexOf("pdf"))>-1?ni.replaceSelection(`<a href="/api/attachments/${Jr.id}?type=${Ur.type}&disposition=inline" target="_blank">${Ur.name}</a>`):ti.includes(to)?ni.replaceSelection(`<a href="/api/attachments/${Jr.id}?type=office&disposition=inline" target="_blank">${Ur.name}</a>`):ni.replaceSelection(`[${Ur.name}](/api/attachments/${Jr.id}?type=${Jr.content_type})`):(Jr==null?void 0:Jr.status)===401&&(document.location.href="/user/login")})}catch(zr){un.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ni=Be().fromTextArea(eo.current,{mode:zn,lineNumbers:!Nt,lineWrapping:!0,value:Ue,autoCloseTags:!0,autoCloseBrackets:!0});return ni.on("keyup",function(Pn,wi){wi.keyCode===8&&(Pn.getValue()==""?ni.setOption("placeholder",Li):ni.setOption("placeholder",null))}),ni.on("keydown",function(Pn,wi){if(wi.keyCode===8){var ji=On(Pn);ji&&wi.preventDefault()}}),sn&&ni.focus(),ni.on("paste",ci),Gn&&ni.on("beforeChange",function(Pn,wi){(wi.origin==="paste"||wi.origin==="+input")&&wi.cancel()}),Vi(ni),()=>{ni.off("paste",ci)}}},[]);const an=(0,ke.useCallback)(()=>{if(Tr.current)try{}catch(ci){console.log(ci,"---- to set md editor body height")}},[_r,Tr,mi]);(0,ke.useEffect)(()=>{function ci(){let ni=new Le.Z(Pn=>{for(let wi of Pn)(wi.target.offsetHeight>0||wi.target.offsetWidth>0)&&(an(),hn.setSize("100%","100%"),hn.refresh())});return ni.observe(eo.current.parentElement),ni}if(hn){const ni=ci();return()=>{var Pn,wi;(Pn=eo.current)!=null&&Pn.parentElement&&ni.unobserve((wi=eo.current)==null?void 0:wi.parentElement)}}},[hn,an]),(0,ke.useEffect)(()=>{if(hn){let ci=[];for(const[ni,Pn]of Object.entries(or)){let wi={[ni]:()=>{on(Pn)}};ci.push(wi),hn.addKeyMap(wi)}return()=>{for(let ni of ci)hn.removeKeyMap(ni)}}},[hn]),(0,ke.useEffect)(()=>{Yt!==mi&&di(Yt)},[Yt]),(0,rr.Z)(()=>{if(!wt&&Ji>0){let ci=new Date().getTime(),ni=window.sessionStorage.getItem(_i);ci>=Ji+Oi&&(!ni||ni!==lr)&&(window.sessionStorage.setItem(_i,lr),Qr(!0))}},Oi),(0,ke.useEffect)(()=>{Vn(Kt)},[hn,Kt]),(0,ke.useEffect)(()=>{hn&&sn&&hn.focus()},[hn,sn]),(0,ke.useEffect)(()=>{if(xn&&hn){let ci=function(Pn){let wi=Pn.target;if(yo.current){let ji=wi.scrollTop/wi.scrollHeight;yo.current.scrollTop=yo.current.scrollHeight*ji}};const ni=hn.getScrollerElement();return ni.addEventListener("scroll",ci),()=>{ni.removeEventListener("scroll",ci)}}},[hn,xn]),(0,ke.useEffect)(()=>{if(hn&&yn){let ci=function(ni,Pn){yn(ni,Pn)};return hn.on("beforeChange",ci),()=>{hn.off("beforeChange",ci)}}},[hn,yn]),(0,ke.useEffect)(()=>{if(hn&&gn){let ci=function(){gn(hn.getValue())};return hn.on("blur",ci),()=>{hn.off("blur",ci)}}},[hn,gn]);function On(ci,ni){var Pn=ci.getDoc(),wi=Pn.getCursor(),ji=Pn.getLine(wi.line),br=ji.charAt(wi.ch-1),nr=ji.lastIndexOf("@\u2581@",wi.ch),Zr=ji.lastIndexOf("@\u2581\u2581@",wi.ch),zr=nr>Zr?nr:Zr,Ur=nr>Zr?3:4;if(pr.indexOf(br)===-1)return null;if(console.log("change1:",ni,ci,ji,wi,zr,nr,Zr,br),zr>=0&&wi.ch-zr<5){var to=zr+Ur;return Pn.replaceRange("",{line:wi.line,ch:zr},{line:wi.line,ch:to}),{line:wi.line,ch:to}}return null}(0,ke.useEffect)(()=>{if(hn){let ci=function(ni,Pn){const wi=ni.getValue();Mr(wi),cr(new Date().getTime()),ni.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Je&&(En?Je(wi,Yn(wi)):Je(wi))};return hn.on("change",ci),()=>{hn.off("change",ci)}}},[hn,Je]),(0,ke.useEffect)(()=>{if(hn)if(Ue==null)hn.setValue(""),Mr("");else{const ci=window.scrollY||window.pageYOffset;Ue!==hn.getValue()&&(hn.setValue(Ue),Mr(Ue),hn.setCursor(Gn?1:hn.lineCount(),0),window.scrollTo(0,ci))}},[hn,Ue]);const on=(0,ke.useCallback)(ci=>{const ni=hn.getCursor(),Pn=hn.getSelection();let wi=Pn.split(`
`);switch(ci){case"bold":return hn.replaceSelection("**"+Pn+"**"),Pn===""&&hn.setCursor(ni.line,ni.ch+2),hn.focus();case"italic":return hn.replaceSelection("*"+Pn+"*"),Pn===""&&hn.setCursor(ni.line,ni.ch+1),hn.focus();case"code":return hn.replaceSelection("`"+Pn+"`"),Pn===""&&hn.setCursor(ni.line,ni.ch+1),hn.focus();case"inline-latex":return Di("inline-latex"),hn.focus();case"latex":return hn.replaceSelection("```latex\n"+Pn+"\n```"),hn.setCursor(ni.line+1,Pn.length+1),hn.focus();case"line-break":return hn.replaceSelection(`<br/>
`),hn.focus();case"list-ul":return Pn===""?hn.replaceSelection("- "+Pn):hn.replaceSelection(wi.map(ji=>ji===""?"":`- ${ji}`).join(`
`)),hn.focus();case"list-ol":return Pn===""?hn.replaceSelection("1. "+Pn):hn.replaceSelection(wi.map((ji,br)=>ji===""?"":`${br+1}. ${ji}`).join(`
`)),hn.focus();case"add-null-ch":return Pn===""&&hn.setCursor(ni.line,ni.ch),hn.replaceSelection(Zi),hn.focus();case"add-signal":return Pn===""&&hn.setCursor(ni.line,ni.ch),hn.replaceSelection(et),hn.focus();case"add-multiple":return Pn===""&&hn.setCursor(ni.line,ni.ch),hn.replaceSelection(pr),hn.focus();case"inster-template-1":return Pn===""&&hn.setCursor(ni.line,ni.ch),hn.replaceSelection(ai),hn.focus();case"eraser":return hn.setValue(""),hn.focus();case"trigger-watch":return Vn(!xn),hn.focus();case"trigger-full-screen":return di(!mi),hn.focus();case Kn:Di(Kn);return;case ei:Di(ei);return;case pn:Di(pn);return;case Qn:Di(Qn);return;case"maths-latex":Di("maths-latex");return;case Hn:Di(Hn);return;case ki:Di(ki);return;default:throw new Error}},[hn,xn,mi]),ft=(0,ke.useCallback)((ci,ni)=>{var Pn,wi,ji,br,nr,Zr;switch(Di(""),gi){case Kn:const{title:ko,link:rn}=ci;return hn.replaceSelection(`[${ko}](${rn})`),hn.focus();case ei:const{language:Kr,content:Hr}=ci;return hn.replaceSelection(["```"+Kr,Hr,"```"].join(`
`)),hn.focus();case"maths-latex":for(var zr=atob(ci),Ur=new Uint8Array(zr.length),to=0;to<zr.length;to++)Ur[to]=zr.charCodeAt(to);var Jr=new Blob([Ur],{type:"image/png"});(0,xt.I)(Jr,us=>{us.id?hn.replaceSelection(`![,](/api/attachments/${us.id}?type=${us.content_type})`):(us==null?void 0:us.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":hn.replaceSelection("`$$"+ci+"$$`");break;case pn:case Qn:case Ai:const{src:sr,alt:yr}=ci,fr=ni,co=(ji=(wi=(Pn=fr==null?void 0:fr.name)==null?void 0:Pn.split("."))==null?void 0:wi.pop)==null?void 0:ji.call(wi);return((br=fr==null?void 0:fr.type)==null?void 0:br.indexOf("image"))>-1||!(fr!=null&&fr.type)?fr!=null&&fr.align||fr!=null&&fr.width?hn.replaceSelection(`<p style="text-align:${fr.align||"initial"}"><img width="${fr.width?fr.width+"%":"initial"}" src="${sr}" alt="${yr||""}" /></p>`):hn.replaceSelection(`<img width="100%" src="${sr}" alt="${yr||""}" />`):((nr=fr==null?void 0:fr.type)==null?void 0:nr.indexOf("video"))>-1?hn.replaceSelection(`<video width="100%" controls src="${sr}"></video>`):((Zr=fr==null?void 0:fr.type)==null?void 0:Zr.indexOf("pdf"))>-1?hn.replaceSelection(`<a href="${sr}?type=${fr.type}&disposition=inline" target="_blank">${fr.name}</a>`):ti.includes(co)?hn.replaceSelection(`<a href="${sr}?type=office&disposition=inline" target="_blank">${fr.name}</a>`):hn.replaceSelection(`[${fr.name}](${sr})`),hn.focus();case ki:const{row:fo,col:Er,align:no}=ci;let Qs=`
`;for(let us=0;us<fo;us++){let Aa=[],oa=[];for(let $i=0;$i<Er;$i++)us===1&&oa.push(Ui[no]),Aa.push(" ");us===1&&(Qs+=`| ${oa.join(" | ")} |
`),Qs+=`| ${Aa.join(Er===1?"":" | ")} |
`}return hn.replaceSelection(Qs+`
`),hn.focus();default:throw new Error}},[hn,gi]),Wn=(0,ke.useMemo)(()=>{switch(gi){case Kn:return ke.createElement(yt,{callback:ft,onCancel:ii});case ei:return ke.createElement(_t.Z,{callback:ft,onCancel:ii});case pn:return ke.createElement(xt.Z,{callback:ft,onCancel:ii});case Hn:return ke.createElement(Re,{callback:ft,onCancel:ii});case ki:return ke.createElement(Mt,{callback:ft,onCancel:ii});case"maths-latex":return ke.createElement(Cn,{showSaveButton:!0,callback:ft});case"inline-latex":return ke.createElement(mn.Z,{showSaveButton:!0,callback:ft});default:return null}},[gi]);function ii(){Di("")}(0,ke.useEffect)(()=>{if(Sr.current){let ci=function(nr){ji=!0,br=nr.pageY},ni=function(){ji=!1},Pn=function(nr){if(ji){let Zr=nr.pageY-br;Zr<0&&(Zr=0),Zr>300&&(Zr=300);let zr=Pt+Zr+"px";Rr(zr)}},wi=Sr.current,ji=!1,br=0;return wi.addEventListener("mousedown",ci),document.addEventListener("mousemove",Pn),document.addEventListener("mouseup",ni),()=>{wi.removeEventListener("mousedown",ci),document.removeEventListener("mousemove",Pn),document.removeEventListener("mouseup",ni)}}},[hn,Sr]),(0,ke.useEffect)(()=>{Rr(Pt)},[Pt]);const Mi=Ii(nt),vi=Ii(_r),hi={width:Mi,height:vi},Nn=(0,ke.useMemo)(()=>{if(Ji){let ci=new Date(Ji),ni=ci.getHours(),Pn=ci.getMinutes(),wi=ci.getSeconds();return ni=ni<10?"0"+ni:ni,Pn=Pn<10?"0"+Pn:Pn,wi=wi<10?"0"+wi:wi,`${ni}:${Pn}:${wi}`}return 0},[Ji]),Yn=ci=>{const ni=[];if(En){let Pn=-1;ci=ci.replace(/(@▁▁@|@▁@)/g,function(wi,ji,br){ni.push({multiLine:wi!==et})})}return ni};function qn(){window.sessionStorage.removeItem(_i),Qr(!1),cr(0)}function Bn(){Qr(!1),cr(0),hn.setValue(window.sessionStorage.getItem(_i))}(0,ke.useEffect)(()=>{po[gi]&&gi!==Qn&&gi!==Hn&&setTimeout(()=>{const ci=document.getElementsByClassName("markdown-popup-form")[0],ni=window.innerWidth/2-ci.offsetWidth/2,Pn=window.innerHeight/2-ci.offsetHeight/2;Ri(ni),mr(Pn)},0)},[gi]);const Jn=ci=>{ci.preventDefault();const ni=ci.clientX-kn,Pn=ci.clientY-kr;document.body.onmousemove=wi=>{let ji=wi.clientX-ni,br=wi.clientY-Pn;const nr=document.getElementsByClassName("markdown-popup-form")[0],Zr=window.innerWidth-nr.offsetWidth,zr=window.innerHeight-nr.offsetHeight;ji=Math.max(0,Math.min(ji,Zr)),br=Math.max(0,Math.min(br,zr)),Ti(wi.clientX,wi.clientY,ni,Pn)&&(Ri(ji),mr(br))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ti=(ci,ni,Pn,wi)=>{const ji=document.body.clientHeight,br=document.body.clientWidth;return ci<20&&Pn>ci||ci>br-20&&Pn<ci||ni<20&&wi>ni||ni>ji-20&&wi<ni?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ke.createElement(ke.Fragment,null,ke.createElement("div",{className:"markdown-editor-wrapper",ref:Tr},ke.createElement("div",{className:`markdown-editor-container ${jn} ${xn?"on-preview":""} ${Nt?"mini":""} ${mi?"full-screen":""}`,style:hi},ke.createElement(De,{insertTemp:_n,watch:xn,fullScreen:mi,showNullButton:zt,showNullProgramButton:En,onActionCallback:on,hidetoolBar:bn,extraUse:bi}),ke.createElement("div",{className:"markdown-editor-body"},ke.createElement("div",{className:"codemirror-container"},ke.createElement("textarea",{ref:eo,placeholder:Li})),xn?ke.createElement("div",{ref:yo,className:"preview-container"},zn==="stex"&&ke.createElement(ge,{value:lr}),zn!=="stex"&&ke.createElement(de.Z,{disabledFill:An,showProgramFill:En,value:lr})):null))),Bi?ke.createElement("a",{ref:Sr,className:"editor-resize"}):null,gi===Qn&&ke.createElement(fn,{callback:ft,onCancel:ii}),gi===Hn&&ke.createElement(Re,{callback:ft,onCancel:ii}),ke.createElement(Oe.Z,null,po[gi]&&gi!==Qn&&gi!==Hn?ke.createElement(Ut.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:kn,top:kr},title:ke.createElement("div",{style:{cursor:"move"},onMouseDown:Jn},po[gi]),open:!0,onCancel:ii,footer:null,destroyOnClose:!0,width:gi===Hn?"1200px":null,height:gi===Hn?"80vh":null,className:"markdown-popup-form"},Wn):null))}},17077:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Pe},I:function(){return De}});var ke=Ie(28284),Se=Ie(6767),Be=Ie(37568),Le=Ie(77736),Ce=Ie(71051),xe=Ie(47889),be=Ie(99571),ye=Ie(46699),we=Ie(59301),pe=Ie(59301),de=Object.defineProperty,ge=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(Oe,Ze,qe)=>Ze in Oe?de(Oe,Ze,{enumerable:!0,configurable:!0,writable:!0,value:qe}):Oe[Ze]=qe,re=(Oe,Ze)=>{for(var qe in Ze||(Ze={}))ee.call(Ze,qe)&&oe(Oe,qe,Ze[qe]);if(ue)for(var qe of ue(Ze))z.call(Ze,qe)&&oe(Oe,qe,Ze[qe]);return Oe},ae=(Oe,Ze)=>ge(Oe,fe(Ze));const{useForm:le}=ke.default,me={width:280,marginRight:10},ve={labelCol:{span:5},wrapperCol:{span:19}};var Pe=({callback:Oe,onCancel:Ze})=>{const[qe]=le();let Xe=(0,we.useRef)();function vt(at){Xe.current.width=qe.getFieldValue("width"),Xe.current.align=qe.getFieldValue("align"),Oe(at,Xe.current)}function gt(at,bt){if(at.status===-1){Se.ZP.error(at.message);return}qe.setFieldsValue({src:`/api/attachments/${at.id}`,type:bt.type})}function kt(at){let bt=at.target.files[0];Xe.current=bt,De(bt,gt)}return pe.createElement(ke.default,ae(re({form:qe},ve),{className:"upload-image-panel",onFinish:vt,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:kt}))),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:Oe}){return pe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",pe.createElement("input",{type:"file",onChange:Oe}))}function De(Oe,Ze){if(!Oe)throw new String("\u6CA1\u6709\u6587\u4EF6");let qe=new FormData;qe.append("editormd-image-file",Oe),qe.append("file_param_name","editormd-image-file"),qe.append("byxhr","true");var Xe=new window.XMLHttpRequest;Xe.withCredentials=!0,Xe.addEventListener("load",function(vt){Ze(JSON.parse(vt.target.responseText),Oe)},!1),Xe.addEventListener("error",function(vt){console.error(vt)},!1),Xe.open("POST",`${ye.KI}/api/attachments.json`),Xe.send(qe)}},91558:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Be}});var ke=Ie(59301),Se=Ie(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)}}},75975:function(Sn,ln,Ie){"use strict";Ie.d(ln,{SV:function(){return je},ZP:function(){return Ke}});var ke=Ie(59301),Se=Ie(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=Ie(53184),we=Ie.n(ye),pe=Object.defineProperty,de=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,z=(Re,Qe,Ve)=>Qe in Re?pe(Re,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Re[Qe]=Ve,oe=(Re,Qe)=>{for(var Ve in Qe||(Qe={}))ue.call(Qe,Ve)&&z(Re,Ve,Qe[Ve]);if(fe)for(var Ve of fe(Qe))ee.call(Qe,Ve)&&z(Re,Ve,Qe[Ve]);return Re},re=(Re,Qe)=>de(Re,ge(Qe)),ae=(Re,Qe,Ve)=>new Promise((We,pt)=>{var Mt=Bt=>{try{qt(Ve.next(Bt))}catch($t){pt($t)}},Qt=Bt=>{try{qt(Ve.throw(Bt))}catch($t){pt($t)}},qt=Bt=>Bt.done?We(Bt.value):Promise.resolve(Bt.value).then(Mt,Qt);qt((Ve=Ve.apply(Re,Qe)).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=(Re,Qe)=>Qe.map(Ve=>({label:Ve,kind:Re.languages.CompletionItemKind.Keyword,insertText:Ve})),ve=Re=>Object.keys(le.tables).map(Qe=>({label:Qe,kind:Re.languages.CompletionItemKind.Variable,insertText:Qe})),Pe=(Re,Qe)=>{const Ve=le.tables[Re];return Ve?Ve.map(We=>({label:We,kind:Qe.languages.CompletionItemKind.Field,insertText:We})):[]};function Ae(Re,Qe,Ve,We,pt){let Mt=Qe.getWordUntilPosition(Ve),Qt={startLineNumber:Ve.lineNumber,endLineNumber:Ve.lineNumber,startColumn:Mt.startColumn,endColumn:Mt.endColumn},qt=We.map(Bt=>({label:Bt,kind:Re.languages.CompletionItemKind.Keyword,insertText:Bt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qt}));return pt.map(Bt=>{qt.push(re(oe({},Bt),{range:Qt}))}),qt}var De=Re=>{le.languages.map(pt=>(Re.languages.registerDocumentFormattingEditProvider(pt,{provideDocumentFormattingEdits(Mt,Qt,qt){return ae(this,null,function*(){const Bt=we()(Mt.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:Mt.getFullModelRange(),text:Bt}]})}}),pt));const Qe=Ce.quickKey.map(pt=>({label:pt.label,kind:Re.languages.CompletionItemKind.Method,insertText:pt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ve=xe.quickKey.map(pt=>({label:pt.label,kind:Re.languages.CompletionItemKind.Method,insertText:pt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet})),We=Le.quickKey.map(pt=>({label:pt.label,kind:Re.languages.CompletionItemKind.Method,insertText:pt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Re.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(pt,Mt){var Qt=pt.getWordUntilPosition(Mt),qt={startLineNumber:Mt.lineNumber,endLineNumber:Mt.lineNumber,startColumn:Qt.startColumn,endColumn:Qt.endColumn},Bt=pt.getLineContent(Mt.lineNumber).substring(Qt.startColumn-2,Qt.endColumn);return{suggestions:[...Ce.keywords.map($t=>({label:$t,kind:Re.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt})),...Ce.quickKey.map($t=>({label:$t.label,kind:Re.languages.CompletionItemKind.Function,documentation:$t.content,insertText:Bt.startsWith("#")?$t.content.replace(/#/,""):$t.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}}),Re.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(pt,Mt){var Qt=pt.getWordUntilPosition(Mt),qt={startLineNumber:Mt.lineNumber,endLineNumber:Mt.lineNumber,startColumn:Qt.startColumn,endColumn:Qt.endColumn};return{suggestions:[...Be.keywords.map(Bt=>({label:Bt,kind:Re.languages.CompletionItemKind.Function,documentation:Bt,insertText:Bt,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}}),Re.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(pt,Mt){var Qt=pt.getWordUntilPosition(Mt),qt={startLineNumber:Mt.lineNumber,endLineNumber:Mt.lineNumber,startColumn:Qt.startColumn,endColumn:Qt.endColumn},Bt=pt.getLineContent(Mt.lineNumber).substring(Qt.startColumn-2,Qt.endColumn);return{suggestions:[...Le.keywords.map($t=>({label:$t,kind:Re.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt})),...Le.quickKey.map($t=>({label:$t.label,kind:Re.languages.CompletionItemKind.Function,documentation:$t.content,insertText:Bt.startsWith("#")?$t.content.replace(/#/,""):$t.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}}),Re.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(pt,Mt){var Qt=pt.getWordUntilPosition(Mt),qt={startLineNumber:Mt.lineNumber,endLineNumber:Mt.lineNumber,startColumn:Qt.startColumn,endColumn:Qt.endColumn},Bt=pt.getLineContent(Mt.lineNumber).substring(Qt.startColumn-2,Qt.endColumn);return{suggestions:[...be.keywords.map($t=>({label:$t,kind:Re.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt})),...be.quickKey.map($t=>({label:$t.label,kind:Re.languages.CompletionItemKind.Function,documentation:$t.content,insertText:Bt.startsWith("#")?$t.content.replace(/#/,""):$t.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}}),Re.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(pt,Mt){var Qt=pt.getWordUntilPosition(Mt),qt={startLineNumber:Mt.lineNumber,endLineNumber:Mt.lineNumber,startColumn:Qt.startColumn,endColumn:Qt.endColumn},Bt=pt.getLineContent(Mt.lineNumber).substring(Qt.startColumn-2,Qt.endColumn);return{suggestions:[...xe.keywords.map($t=>({label:$t,kind:Re.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt})),...xe.quickKey.map($t=>({label:$t.label,kind:Re.languages.CompletionItemKind.Function,documentation:$t.content,insertText:Bt.startsWith("#")?$t.content.replace(/#/,""):$t.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qt}))]}}})};const Oe="\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=(Re,Qe,Ve)=>Qe in Re?Ze(Re,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Re[Qe]=Ve,Xe=(Re,Qe,Ve)=>qe(Re,typeof Qe!="symbol"?Qe+"":Qe,Ve);const vt=class mx{constructor(Qe,Ve,We){this.placeholder=Qe,this.editor=Ve,this.monaco=We,Ve.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)}};Xe(vt,"ID","editor.widget.placeholderHint");var kt=vt,at=Ie(96236),bt=Ie(6767),ct=Ie(25399),Rt=Ie(89392),ut=Ie(49535),ot=Ie(56102),ht=Object.defineProperty,yt=Object.defineProperties,_t=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,Ut=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,dn=(Re,Qe,Ve)=>Qe in Re?ht(Re,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Re[Qe]=Ve,Ft=(Re,Qe)=>{for(var Ve in Qe||(Qe={}))Ut.call(Qe,Ve)&&dn(Re,Ve,Qe[Ve]);if(xt)for(var Ve of xt(Qe))Ht.call(Qe,Ve)&&dn(Re,Ve,Qe[Ve]);return Re},fn=(Re,Qe)=>yt(Re,_t(Qe)),It=(Re,Qe)=>{var Ve={};for(var We in Re)Ut.call(Re,We)&&Qe.indexOf(We)<0&&(Ve[We]=Re[We]);if(Re!=null&&xt)for(var We of xt(Re))Qe.indexOf(We)<0&&Ht.call(Re,We)&&(Ve[We]=Re[We]);return Ve},Xt=(Re,Qe,Ve)=>new Promise((We,pt)=>{var Mt=Bt=>{try{qt(Ve.next(Bt))}catch($t){pt($t)}},Qt=Bt=>{try{qt(Ve.throw(Bt))}catch($t){pt($t)}},qt=Bt=>Bt.done?We(Bt.value):Promise.resolve(Bt.value).then(Mt,Qt);qt((Ve=Ve.apply(Re,Qe)).next())});function tn(Re){return/^\d+$/.test(Re)?`${Re}px`:Re}function lt(){}let He=!1;const ze={"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 it(Re=[]){let Qe=Re;if(Array.isArray(Re)){for(let Ve=0;Ve<Re.length;Ve++){let We=ze[Re[Ve]];if(We)return We}return Qe[0]}return ze[Qe]||Qe}let dt=null;const tt=()=>Xt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Re){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Re)}});var Ke=Re=>{var Qe=Re,{width:Ve="100%",height:We="100%",value:pt,language:Mt="javascript",style:Qt={},options:qt={},overrideServices:Bt={},theme:$t="vs-dark",onEditBlur:Cn,isCopy:mn=!1,onSave:un,autoHeight:Kn=!1,forbidCopy:pn=!1,onChange:Hn=lt,editorDidMount:Qn=lt,onFocus:Ai=lt,onBreakPoint:ei=lt,breakPointValue:ki=[],filename:Wi="educoder.txt",errorLine:Ui,errorContent:rr="",highlightLine:vr,openBreakPoint:wr=!1,placeholder:Oi="",showMiniMap:Zi=!0}=Qe,pr=It(Qe,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const et=(0,ke.useRef)(),ai=(0,ke.useRef)({}),ti=(0,ke.useRef)(),Ii=(0,ke.useRef)(),gr=(0,ke.useRef)([]),hr=(0,ke.useRef)(!1),or=(0,ke.useRef)(),po=(0,ke.useRef)(),$n=(0,ke.useRef)(!1),[Ue,Je]=(0,ke.useState)(!1);function nt(){let yn;return et.current&&(yn=new Se.Z(vn=>{for(let jn of vn)(jn.target.offsetHeight>0||jn.target.offsetWidth>0)&&ai.current.instance.layout()}),yn.observe(et.current)),yn}function Pt(){bt.ZP.warning({content:decodeURIComponent(Oe),key:"monaco-editor-tip"})}const Nt=()=>{let yn=ai.current.instance;if(pt!=null&&yn&&Ue){const vn=yn.getModel();vn&&pt!==vn.getValue()&&(He=!0,vn.setValue(pt),yn.layout(),He=!1)}};(0,ke.useEffect)(()=>{const yn=ut.Z.subscribe("formatDocument",vn=>{var jn;let Un=ai.current.instance;(jn=Un==null?void 0:Un.getAction)==null||jn.call(Un,"editor.action.formatDocument").run()});return window.updateMonacoValue=vn=>{Hn(vn)},yn},[]),(0,ke.useEffect)(()=>{var yn;let vn=ai.current.instance;Ii.current&&clearTimeout(Ii.current),Ii.current=setTimeout(()=>{Nt()},500),pt&&(pt!=null&&pt.length)&&((yn=vn==null?void 0:vn.updateOptions)==null||yn.call(vn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(pt.split(/\r\n|\r|\n/g).length))+3,5)}))},[pt,Ue,ai.current]),(0,ke.useEffect)(()=>{if(Ui&&ai.current&&ai.current.instance){let vn=ai.current.instance;vn.changeViewZones(function(jn){var Un=document.createElement("div");Un.style.padding="10px 20px",Un.style.width="calc(100% - 20px)",Un.className="my-error-line-wrp",Un.innerHTML=rr,jn.addZone({afterLineNumber:Ui||11,heightInLines:3,domNode:Un})});var yn={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}};vn.addOverlayWidget(yn),vn.revealPositionInCenter({lineNumber:20,column:1})}},[Ui,ai.current,Ue]);const sn=(yn="",vn)=>{if(!yn||yn.trim()==="")return!0;const Un=ai.current.instance.getModel().getLineTokens(vn);let Gn=!1;for(let An=0;An<2;An++)Un.getStandardTokenType(An)===1&&(Gn=!0);return Gn};(0,ke.useEffect)(()=>{var yn;const vn=(yn=ai.current)==null?void 0:yn.instance;if(vn&&Ue&&pn){const jn=vn.onDidBlurEditorWidget(()=>{$n.current=!1}),Un=vn.onDidFocusEditorText(()=>{$n.current=!0});return()=>{jn.dispose(),Un.dispose()}}},[ai.current,Ue,pn]),(0,ke.useEffect)(()=>{var yn;if((yn=ai.current)!=null&&yn.instance&&Ue&&wr){let vn=ai.current.instance,jn=vn.getModel();if(!jn)return;(()=>{var Vn;let mi=[],di=[];const gi=jn.getAllDecorations();for(let Ji of gi)Ji.options.className==="highlighted-line"&&(mi.push((Vn=Ji==null?void 0:Ji.range)==null?void 0:Vn.startLineNumber),di.push(Ji==null?void 0:Ji.id));if(vr===mi[0])return;jn.deltaDecorations(di,[]);const Di=jn.getLineCount();vr&&vr<=Di&&(vn.deltaDecorations([],[{range:new dt.Range(vr,1,vr,jn.getLineMaxColumn(vr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),vn.revealLineInCenter(vr))})();const Gn=(Vn=!1)=>{var mi;let di=[],gi=[];const Di=jn.getAllDecorations();for(let Ji of Di)Ji.options.linesDecorationsClassName==="breakpoints-select"&&(di.push((mi=Ji==null?void 0:Ji.range)==null?void 0:mi.startLineNumber),gi.push(Ji==null?void 0:Ji.id));if(Vn)return{lines:di,ids:gi};ei(di)},An=Vn=>Xt(void 0,null,function*(){let mi={range:new dt.Range(Vn,1,Vn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield jn.deltaDecorations([],[mi]),Gn()}),Li=Vn=>Xt(void 0,null,function*(){let mi=[];const di=vn.getLineDecorations(Vn);for(let gi of di)gi.options.linesDecorationsClassName==="breakpoints-select"&&mi.push(gi.id);yield jn.deltaDecorations(mi,[]),Gn()}),xi=Vn=>{let mi=vn.getLineDecorations(Vn);for(let di of mi)if(di.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Rt.isEqual)(ki,Gn(!0).lines)){jn.deltaDecorations(Gn(!0).ids,[]);const Vn=ki.map(mi=>({range:new dt.Range(mi,1,mi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));jn.deltaDecorations([],Vn)}const bi=vn.onDidChangeModelContent(Vn=>{let mi=vn.getPosition();if(mi){let di=mi.lineNumber;clearTimeout(po.current),po.current=setTimeout(()=>{sn(jn.getLineContent(di),di)?Li(di):xi(di)?(Li(di),An(di)):Gn()},100)}}),hn=vn.onMouseDown(Vn=>{var mi,di,gi;if(Vn.target.detail&&((gi=(di=(mi=Vn.target)==null?void 0:mi.element)==null?void 0:di.className)!=null&&gi.includes("line-numbers"))){let Di=Vn.target.position.lineNumber;if(sn(jn.getLineContent(Di),Di))return;xi(Di)?Li(Di):An(Di)}}),Vi=Vn=>{let mi={range:new dt.Range(Vn,1,Vn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};gr.current=vn.deltaDecorations(gr.current,[mi])},lr=()=>{gr.current=vn.deltaDecorations(gr.current,[])},Mr=vn.onMouseMove(Vn=>{var mi,di,gi;if(lr(),Vn.target.detail&&((gi=(di=(mi=Vn.target)==null?void 0:mi.element)==null?void 0:di.className)!=null&&gi.includes("line-numbers"))){let Di=Vn.target.position.lineNumber;if(sn(jn.getLineContent(Di),Di))return;Vi(Di)}}),xn=vn.onMouseLeave(()=>{lr()});return()=>{bi.dispose(),hn.dispose(),Mr.dispose(),xn.dispose()}}},[ai.current,Ue,ki,vr,wr,Mt]),(0,ke.useEffect)(()=>{var yn;(yn=ai.current)!=null&&yn.instance&&wr&&ai.current.instance.setPosition({lineNumber:0,column:0})},[vr]);function Kt(){let yn=ai.current.instance;if(yn){const vn=yn.getSelection(),jn=ai.current.pastePos||{},Un=new dt.Range(jn.startLineNumber||vn.endLineNumber,jn.startColumn||vn.endColumn,jn.endLineNumber||vn.endLineNumber,jn.endColumn||vn.endColumn);setTimeout(()=>{yn.executeEdits("",[{range:Un,text:""}])},300)}}function _n(yn){(window.navigator.platform.match("Mac")?yn.metaKey:yn.ctrlKey)&&yn.keyCode==83&&(yn.preventDefault(),un())}const zn=()=>{if(Kn&&ai.current.instance){const yn=ai.current.instance.getContentHeight();Yt(yn<We?We:yn)}else Yt(We)};function _i(yn){var vn=document.createEvent("MouseEvents");vn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),yn.dispatchEvent(vn)}const Bi=yn=>{if(!$n.current)return;const{keyCode:vn,ctrlKey:jn,metaKey:Un,target:Gn,type:An}=yn;return(An==="paste"||(vn===67||vn===86)&&(Un||jn))&&Gn.nodeName==="TEXTAREA"&&(Pt(),yn.preventDefault()),!1};function wt(yn,vn){var jn=window.URL||window.webkitURL||window,Un=new Blob([vn]),Gn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Gn.href=jn.createObjectURL(Un),Gn.download=yn,_i(Gn)}(0,ke.useEffect)(()=>{zn()},[zn]),(0,ke.useEffect)(()=>{et.current&&!Ue&&Promise.all([Ie.e(8909),Ie.e(6656)]).then(Ie.bind(Ie,71448)).then(yn=>{try{dt=yn,ai.current.instance=dt.editor.create(et.current,{value:pt,language:it(Mt),theme:$t,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Zi||!1}},Bt);const vn=ai.current.instance;let Gn=[...at.BH._menuItems].find(bi=>bi[0]._debugName=="EditorContext")[1],An=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Li=(bi,hn)=>{var Vi,lr;let Mr=bi._first;do hn.includes((lr=(Vi=Mr.element)==null?void 0:Vi.command)==null?void 0:lr.id)&&bi._remove(Mr);while(Mr=Mr.next)};if(Qn(vn,dt),setTimeout(()=>{zn(),ai.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{wt(Wi||"educoder.txt",vn.getValue())}})},500),ai.current.subscription=vn.onDidChangeModelContent(bi=>{hr.current?clearTimeout(or.current):(zn(),Hn(vn.getValue(),bi)),or.current=setTimeout(()=>{hr.current=!1},500)}),window.Monaco||De(dt,it(Mt)),pn&&(Li(Gn,An),et.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Bi),window.removeEventListener("paste",Bi),window.addEventListener("keydown",Bi),window.addEventListener("paste",Bi)),window.Monaco=dt,Cn&&vn.onDidBlurEditorWidget(()=>{Cn(vn.getValue())}),Ai&&vn.onDidFocusEditorText(()=>{pn&&tt(),Ai(vn.getValue())}),pn){tt();try{vn.onDidPaste(bi=>{const hn=vn.getSelection(),Vi=ai.current.pastePos||{},lr=new dt.Range(Vi.startLineNumber||hn.endLineNumber,Vi.startColumn||hn.endColumn,Vi.endLineNumber||hn.endLineNumber,Vi.endColumn||hn.endColumn);vn.executeEdits("",[{range:bi.range,text:""}])})}catch(bi){}}let xi=nt();return Oi&&typeof Oi=="string"&&new kt(Oi,vn,dt),Je(!0),()=>{const bi=ai.current.instance;bi.dispose();const hn=bi.getModel();hn&&hn.dispose(),ai.current.subscription&&ai.current.subscription.dispose(),xi.unobserve(et.current)}}catch(vn){}})},[]),(0,ke.useEffect)(()=>{if(ai.current.instance&&Ue)return document.addEventListener("keydown",_n,!1),()=>{document.removeEventListener("keydown",_n)}},[un,Ue]),(0,ke.useEffect)(()=>{let yn=ai.current.instance;if(yn&&Ue){let vn=it(Mt);dt.editor.setModelLanguage(yn.getModel(),vn)}},[Mt,Ue]),(0,ke.useEffect)(()=>{ai.current.instance&&Ue&&dt.editor.setTheme($t)},[$t,Ue]),(0,ke.useEffect)(()=>{let yn=ai.current.instance;ti.current=qt,yn&&Ue&&(yn.updateOptions(Ft({},qt)),setTimeout(()=>{yn.getModel().updateOptions(Ft({},qt))},200))},[JSON.stringify(qt),Ue]),(0,ke.useEffect)(()=>{let yn=ai.current.instance;yn&&Ue&&yn.layout()},[Ve,We,Ue]);const[zt,En]=(0,ke.useState)(tn(Ve)),[bn,Yt]=(0,ke.useState)(tn(We)),gn=fn(Ft({},Qt),{width:zt,height:bn,position:"relative"});return ke.createElement("div",{className:"my-monaco-editor",ref:et,style:gn},mn&&ke.createElement(ot.CopyToClipboard,{text:pt,onCopy:()=>bt.ZP.success("\u590D\u5236\u6210\u529F")},ke.createElement(ct.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 je({width:Re="100%",height:Qe="100%",original:Ve,modified:We,language:pt,options:Mt={}}){const Qt=(0,ke.useRef)(),[qt,Bt]=(0,ke.useState)(null);function $t(Kn){let pn;return Qt.current&&(pn=new Se.Z(Hn=>{for(let Qn of Hn)(Qn.target.offsetHeight>0||Qn.target.offsetWidth>0)&&Kn.layout()}),pn.observe(Qt.current)),pn}(0,ke.useEffect)(()=>(Qt.current&&Promise.all([Ie.e(8909),Ie.e(9404)]).then(Ie.bind(Ie,2550)).then(Kn=>{dt=Kn;const pn=dt.editor.createDiffEditor(Qt.current,fn(Ft({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},Mt),{wordWrap:!0}));Bt(pn);let Hn=$t(pn);return()=>{pn.dispose();const Qn=pn.getModel();Qn&&Qn.dispose(),Hn.unobserve(Qt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ke.useEffect)(()=>{qt&&qt.setModel({original:dt.editor.createModel(Ve,pt),modified:dt.editor.createModel(We,pt)})},[Ve,We,pt,qt]);const Cn=tn(Re),mn=tn(Qe),un={width:Cn,height:mn};return ke.createElement("div",{className:"my-diff-editor",ref:Qt,style:un})}},58397:function(Sn,ln,Ie){"use strict";var ke=Ie(39744),Se=Ie(82326),Be=Ie(71411),Le=Ie(59301);const Ce=Se.default.Option;ln.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")))))}},37808:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Se}});var ke=Ie(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])}},10866:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Im:function(){return Ze},ZP:function(){return at},gZ:function(){return gt}});var ke=Ie(59301),Se=Ie(37568),Be=Ie(99571),Le=Ie(84105),Ce=Ie(87395),xe=Ie(24363),be=Ie(24334),ye=Ie(86074),we=Ie(76902),pe=Ie(51257),de=Ie(94268),ge=Ie(34376),fe=Ie(92310),ue=Ie.n(fe),ee=Ie(59301),z=Object.defineProperty,oe=Object.defineProperties,re=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,ve=(bt,ct,Rt)=>ct in bt?z(bt,ct,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):bt[ct]=Rt,Pe=(bt,ct)=>{for(var Rt in ct||(ct={}))le.call(ct,Rt)&&ve(bt,Rt,ct[Rt]);if(ae)for(var Rt of ae(ct))me.call(ct,Rt)&&ve(bt,Rt,ct[Rt]);return bt},Ae=(bt,ct)=>oe(bt,re(ct));const{TextArea:De}=Se.default,Oe={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=(bt=>(bt[bt.SET_VISIBLE=0]="SET_VISIBLE",bt[bt.SET_TABINDEX=1]="SET_TABINDEX",bt))(qe||{});function Xe(bt,ct){switch(ct.type){case 0:return Ae(Pe({},bt),{visible:ct.payload});case 1:return Ae(Pe({},bt),{tabIndex:ct.payload});default:throw new Error}}function vt({value:bt,className:ct}){const[Rt,ut]=(0,ke.useState)(!1),ot=(0,ke.useRef)(),ht=(0,ke.useRef)();return(0,ke.useEffect)(()=>{Rt&&(ht.current.reset(),ht.current.write((0,pe.pp)(bt||"")))},[bt,Rt]),(0,ke.useEffect)(()=>{var yt,_t,xt,Ut;if(ot.current){ht.current=new ge.Terminal({fontSize:14,disableStdin:!0}),ht.current.open(ot.current);const Ht=ot.current.offsetWidth-14,dn=((Ut=(xt=(_t=(yt=ht.current)==null?void 0:yt._core)==null?void 0:_t._renderService)==null?void 0:xt.dimensions)==null?void 0:Ut.actualCellWidth)||9.5,Ft=Math.ceil(Ht/dn);ht.current.resize(Ft,8),ut(!0)}},[]),ee.createElement("div",{ref:ot,className:ue()("XtermText-valueRef",ct)})}function gt(bt){const{status:ct,error_msg:Rt,output:ut,input:ot,expected_output:ht,is_file:yt,input_file_url:_t,output_file_url:xt,expected_output_file_url:Ut}=bt;let Ht=null;const dn={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(ct){case xe.h.NOMATCH:Ht=ee.createElement(ee.Fragment,null,ee.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!yt&&ee.createElement(vt,{className:"mb10",value:ot}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(_t,ot)},ot)),ee.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!yt&&ee.createElement(vt,{className:"mb10",value:ut&&be.Base64.decode(ut)||""}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(xt,ut)},ut)),ee.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!yt&&ee.createElement(vt,{className:"mb10",value:ht&&be.Base64.decode(ht)||""}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(Ut,ht)},ht)));break;case xe.h.EXECUTEFAILURE:Ht=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:dn}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(_t,ot)},ot)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Rt)));break;case xe.h.COMPILEFAILURE:Ht=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:dn}),yt&&ee.createElement("div",{style:dn},ee.createElement("a",{onClick:()=>(0,pe.LR)(_t,ot)},ot)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Rt)));break;case xe.h.PODFAILURE:Ht=ee.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case xe.h.TIMEOUT:Ht=ee.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ee.createElement(ee.Fragment,null," ",Ht," ")}function kt(bt){const{status:ct,error_msg:Rt,execute_time:ut,output:ot,input:ht,expected_output:yt,is_file:_t,input_file_url:xt,output_file_url:Ut,expected_output_file_url:Ht}=bt;let dn=null;switch(ct){case xe.h.OK:dn=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:dn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u8F93\u5165\uFF1A",ee.createElement("pre",null,ht)),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:dn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ee.createElement("pre",null,ht)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Rt)));break;case xe.h.COMPILEFAILURE:dn=ee.createElement(ee.Fragment,null,ee.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ee.createElement("pre",null,ht)),ee.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ee.createElement("pre",{className:"error"},be.Base64.decode(Rt)));break;case xe.h.PODFAILURE:dn=ee.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case xe.h.TIMEOUT:dn=ee.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ee.createElement(ee.Fragment,null," ",dn," ")}var at=({id:bt,is_file:ct,input:Rt,debuging:ut,submitting:ot,executingMessage:ht,debugResult:yt,onChangeInput:_t,onDebugCode:xt,onSubmitCode:Ut})=>{const[Ht,dn]=(0,ke.useReducer)(Xe,Oe),{visible:Ft,tabIndex:fn}=Ht;(0,ke.useEffect)(()=>{dn({type:0,payload:!1})},[bt]);function It(He){let ze=He.target.id;dn({type:1,payload:ze})}function Xt(){dn({type:0,payload:!Ft})}const tn=(0,ke.useMemo)(()=>{if(yt){const{status:He}=yt;return ee.createElement(ee.Fragment,null,kt(yt))}return null},[yt]);function lt(){dn({type:0,payload:!0}),dn({type:1,payload:"1"}),xt()}return ee.createElement("div",{className:"test-case-panel"},ee.createElement("div",{className:`test-case-panel-body ${Ft?"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(De,{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:ct?"":Rt,onChange:_t}),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 ${Ft?"up":""}`,onClick:Xt},Ft?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:()=>{dn({type:0,payload:!1}),Ut()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},30197:function(Sn,ln,Ie){"use strict";Ie.r(ln),Ie.d(ln,{default:function(){return yp}});var ke=Ie(59301),Se=Ie(10906),Be=Ie(76618),Le=Ie(25690),Ce=Ie(11938),xe=Ie(6767),be=Ie(62957),ye=Ie(29787),we=Ie(82326),pe=Ie(94881),de=Ie(8343),ge=Ie(346),fe=Ie(87169),ue=Ie(30641),ee=Ie(75975),z=Ie(91558),oe=Ie(23992),re=Ie(58397),ae=Ie(59301),le=Object.defineProperty,me=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Oe=(Dt,Vt,Jt)=>Vt in Dt?le(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,Ze=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))Ae.call(Vt,Jt)&&Oe(Dt,Jt,Vt[Jt]);if(Pe)for(var Jt of Pe(Vt))De.call(Vt,Jt)&&Oe(Dt,Jt,Vt[Jt]);return Dt},qe=(Dt,Vt)=>me(Dt,ve(Vt));const Xe={theme:(0,oe.G)("cmCodeMode","vs-dark"),fontSize:(0,oe.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,oe.G)("cmTabToSpace",!0)};var vt=(Dt=>(Dt[Dt.set_font_size=0]="set_font_size",Dt[Dt.set_theme=1]="set_theme",Dt[Dt.on_tab_to_space=2]="on_tab_to_space",Dt[Dt.set_show_editor_setting=3]="set_show_editor_setting",Dt))(vt||{});function gt(Dt,Vt){switch(Vt.type){case 3:return qe(Ze({},Dt),{showEditorSetting:Vt.payload});case 1:return qe(Ze({},Dt),{theme:Vt.payload});case 0:return qe(Ze({},Dt),{fontSize:Vt.payload});case 2:return qe(Ze({},Dt),{tabToSpace:Vt.payload});default:throw new Error}}var kt=({isLoading:Dt,value:Vt,onChange:Jt,language:Hi,onUpdateCode:Pi,ActionBarRender:si=yi=>ae.createElement(at,{onShowCodeSetting:yi})})=>{const[yi,oi]=(0,ke.useReducer)(gt,Xe),{theme:Ci,fontSize:qi,showEditorSetting:Po,tabToSpace:Cr}=yi,Go=(0,ke.useRef)(),Ki=(0,ke.useRef)(),To={onFontSizeChange:Vo=>{oi({type:0,payload:Vo}),(0,oe.t)("cmFontSize",Vo)},tabToSpace:Cr,cmFontSize:qi,className:"oj",cmCodeMode:Ci,onTabToSpace:Vo=>{oi({type:2,payload:Vo}),(0,oe.t)("cmTabToSpace",Vo)},onCodeModeChange:Vo=>{oi({type:1,payload:Vo}),(0,oe.t)("cmCodeMode",Vo)}};function Xr(){oi({type:3,payload:!1})}function rs(){oi({type:3,payload:!0})}const ho={value:Vt,language:Hi,theme:Ci,height:"calc(100% - 56px)",options:{fontSize:qi,insertSpaces:Cr},onChange:Vo=>{Jt(Vo),Ki.current=Vo,clearTimeout(Go.current),Go.current=setTimeout(()=>{Pi(Ki.current)},1e4)},onEditBlur:Vo=>{Ki.current&&Pi(Ki.current)}};return ae.createElement(ke.Fragment,null,ae.createElement("div",{className:"code-panel-container"},si(rs),!Dt&&ae.createElement(ee.ZP,Ze({},ho))),ae.createElement(z.Z,null,ae.createElement(ue.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Po,onClose:Xr},ae.createElement(re.Z,Ze({},To)))))};function at({onShowCodeSetting:Dt}){return ae.createElement("div",{className:"action-bar"},ae.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),ae.createElement("a",{onClick:Dt},ae.createElement("i",{className:"iconfont icon-shezhi"})))}var bt=Ie(24334),ct=Ie(42909),Rt=Ie(10866),ut=Ie(37568),ot=Ie(28284),ht=Ie(99571);const{TextArea:yt}=ut.default,_t=5e3;var xt=({callback:Dt,onCancel:Vt,notes:Jt})=>{function Hi(Pi){Dt(Pi)}return ke.createElement(ot.default,{className:"note-form-panel",onFinish:Hi,initialValues:{notes:Jt}},ke.createElement(ot.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:_t,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${_t}`}]},ke.createElement(yt,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),ke.createElement(ot.default.Item,{style:{textAlign:"right"}},ke.createElement(ht.ZP,{type:"ghost",onClick:Vt,style:{marginRight:10}}," \u53D6\u6D88 "),ke.createElement(ht.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},Ut={"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"},Ht={pagination:"pagination___npPu7",info:"info___aRH6C"},dn=Ie(54172),Ft=Ie(13747),fn=Ie(58617),It=Ie(81953),Xt=Ie(24363),tn=Ie(51257),lt=Ie(61186),He=Ie.n(lt);const{Column:ze}=dn.default;var it=({submitResult:Dt,submitting:Vt,submitRecords:Jt,page:Hi,onPageChange:Pi,topicId:si})=>{const{status:yi,id:oi,input:Ci,output:qi,expected_output:Po,is_file:Cr,input_file_url:Go,output_file_url:Ki,expected_output_file_url:To,error_msg:Xr}=Dt||{},{records:rs,records_count:ho}=Jt||{},Vo=(0,Le.useParams)();function Co(){Cr?navigator.clipboard.writeText(bt.Base64.decode(Xr)).then(()=>{xe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(bt.Base64.decode(qi)).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(fn.Z,{style:{fontSize:24},spin:!0})},oi?ke.createElement(ke.Fragment,null,ke.createElement("ul",{className:Ht.info},ke.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",ke.createElement("span",{className:yi===Xt.h.OK?"c-green":"c-red"},Rt.Im[yi])),ke.createElement("li",{className:Ht.error},ke.createElement("a",{onClick:Co},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",ke.createElement(It.Z,null)," ")),ke.createElement("li",null,ke.createElement(Le.Link,{to:`/problems/${si}/record-detail/${oi}?backId=${Vo==null?void 0:Vo.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),yi!==Xt.h.OK?ke.createElement(ke.Fragment,null,ke.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),ke.createElement("pre",null,!Cr&&Ci,Cr&&ke.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,tn.LR)(Go,Ci)},Ci)),ke.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),ke.createElement("pre",null,(yi===4||yi===5)&&bt.Base64.decode(Xr),yi!=4&&yi!=5&&(Cr?ke.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,tn.LR)(Ki,qi)},qi):bt.Base64.decode(qi))),ke.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),ke.createElement("pre",null,!Cr&&bt.Base64.decode(Po),Cr&&ke.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,tn.LR)(To,Po)},Po))):null):null,(rs==null?void 0:rs.length)>0?ke.createElement(dn.default,{dataSource:rs,rowKey:"id",pagination:!1},ke.createElement(ze,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Gr,Ko)=>ke.createElement("span",null," ",He()(Gr).format("YYYY-MM-DD HH:mm:ss"))}),ke.createElement(ze,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(Gr,Ko)=>{var Gi;return ke.createElement(Le.Link,{className:Gr===0?"c-green":"c-red",to:`/problems/${si}/record-detail/${Ko.id}?backId=${Vo==null?void 0:Vo.save_identifier}`},(Gi=Rt.Im[Gr])==null?void 0:Gi.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),ke.createElement(ze,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),ke.createElement(ze,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),ke.createElement(ze,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,ho>15?ke.createElement(Ft.Z,{className:Ht.pagination,current:Hi,pageSize:15,total:ho,onChange:Pi}):null)},dt=Ie(28426),tt=Ie(96599),Ke=Ie(77736),je={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Re=Ie(76902),Qe=Ie(59301);const Ve={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var We=({hack:Dt,onTriggerPraise:Vt,toDiscuss:Jt})=>{const{language:Hi,difficulty:Pi,time_limit:si,username:yi,user_path:oi,user_praise:Ci,comments_count:qi,praises_count:Po,description:Cr,pass_count:Go,submit_count:Ki}=Dt,To=(0,Le.useLocation)();console.log(Dt.language,"language");const Xr=Ve[Pi];return Qe.createElement(Qe.Fragment,null,Qe.createElement("ul",{className:je.info},Qe.createElement("li",null,"\u96BE\u5EA6\uFF1A",Qe.createElement(tt.default,{color:Xr==null?void 0:Xr.color},Xr==null?void 0:Xr.name)),Qe.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",Qe.createElement("b",null,si,"\u79D2"))),Qe.createElement(Re.Z,{value:Cr,className:je.desc}),Qe.createElement("ul",{className:je["commit-info"]},Qe.createElement("li",null,Qe.createElement(Ke.Z,{size:4},Qe.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",Qe.createElement("b",null,Go))),Qe.createElement("li",null,Qe.createElement(Ke.Z,{size:4},Qe.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",Qe.createElement("b",null,Ki))," "),Qe.createElement("li",{style:{flex:"1 0 0"}}),Qe.createElement("li",null,Qe.createElement(Ke.Z,{size:4},Qe.createElement("i",{className:"iconfont icon-huifu1",onClick:Jt})," ",Qe.createElement("b",null,qi))," ")))},pt=Ie(49535),Mt=Object.defineProperty,Qt=Object.getOwnPropertySymbols,qt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,$t=(Dt,Vt,Jt)=>Vt in Dt?Mt(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,Cn=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))qt.call(Vt,Jt)&&$t(Dt,Jt,Vt[Jt]);if(Qt)for(var Jt of Qt(Vt))Bt.call(Vt,Jt)&&$t(Dt,Jt,Vt[Jt]);return Dt};const mn=Dt=>React.createElement("svg",Cn({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},Dt),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 un="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Kn=Ie(38986);function pn(Dt){return(0,Kn.U2)("comments.json",Dt)}function Hn(Dt){return(0,Kn.v_)(`/discusses/${Dt}/plus.json`,{container_type:"Discuss",type:1})}function Qn(Dt){return(0,Kn.v_)("comments/reply.json",Dt)}function Ai(Dt){return(0,Kn.v_)("comments.json",Dt)}function ei(Dt){return(0,Kn.v_)(`comments/${Dt==null?void 0:Dt.id}/hidden.json`,Dt)}function ki(Dt){return(0,Kn.IV)(`comments/${Dt==null?void 0:Dt.id}.json`)}var Wi=Ie(75604),Ui=Ie(48790);function rr({author:Dt}){return ke.createElement("a",{href:`/users/${Dt.login}`,target:"_blank"},ke.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ge.Z.IMG_SERVER}/images/${Dt.image_url}`,width:"50"}))}function vr({data:Dt,index:Vt,parentDiscussIndex:Jt,user:Hi,onSetActionType:Pi}){const{author:si,can_delete:yi,content:oi,id:Ci,time:qi}=Dt;function Po(){Pi({id:Ci,index:Vt,type:"delete-discuss",parentDiscussIndex:Jt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Cr=Hi.admin||yi||si.user_id===Hi.user_id;return ke.createElement("div",{className:"discuss-item-container second-discuss "},ke.createElement(rr,{author:si}),ke.createElement("section",null,ke.createElement("div",{className:"discuss-info"},ke.createElement("a",{href:`/users/${si.login}`,target:"_blank"},si.name),ke.createElement("span",{className:"grey"},qi),ke.createElement("div",{className:"btn-group",style:{marginBottom:0}},Cr?ke.createElement("a",{onClick:Po,title:"\u5220\u9664"},ke.createElement("i",{className:"iconfont icon-shanchu"})):null)),ke.createElement(Re.Z,{className:"discuss-content",value:oi})))}var wr=({user:Dt,data:Vt,index:Jt,onPlusDiscuss:Hi,onSetActionType:Pi,activeDiscussIndex:si,onReplyDiscuss:yi,onSetActiveDiscussIndex:oi})=>{const{content:Ci,children:qi,hidden:Po,id:Cr,praise_count:Go,time:Ki,user_praise:To,can_delete:Xr,author:rs}=Vt;console.log(Xr&&(!qi||qi.length==0),"children22");function ho(){oi(Cr)}function Vo(){Hi(Cr,!To,Jt)}function Co(){Pi({id:Cr,index:Jt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Gr(){Pi({id:Cr,index:Jt,params:{hidden:Po?"0":"1"},type:"hidden-discuss",message:Po?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Ko=Dt.admin||Dt.user_id===rs.user_id;return ke.createElement("div",{className:"discuss-item-container",key:Cr},ke.createElement(rr,{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(Re.Z,{className:"discuss-content",value:Ci}),qi&&qi.length>0?ke.createElement("div",{className:"reply-discuss-container"},qi.map((Gi,$o)=>ke.createElement(vr,{key:Gi.id,data:Gi,index:$o,user:Dt,onSetActionType:Pi,parentDiscussIndex:Jt}))):null,ke.createElement("div",{className:"btn-group"},(0,Ui.Ny)()?ke.createElement("a",{onClick:Gr,title:Po?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},ke.createElement("i",{className:Po?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Xr&&(!qi||qi.length==0)?ke.createElement("a",{onClick:Co,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:Vo,className:To?"c-orange":""},ke.createElement("i",{className:To?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),ke.createElement("span",null,Go||""))),ke.createElement(Wi.Z,{id:Cr,activeDiscussIndex:si,onReplyDiscuss:yi})))},Oi=Ie(87320),Zi=Ie(39793),pr=(Dt,Vt,Jt)=>new Promise((Hi,Pi)=>{var si=Ci=>{try{oi(Jt.next(Ci))}catch(qi){Pi(qi)}},yi=Ci=>{try{oi(Jt.throw(Ci))}catch(qi){Pi(qi)}},oi=Ci=>Ci.done?Hi(Ci.value):Promise.resolve(Ci.value).then(si,yi);oi((Jt=Jt.apply(Dt,Vt)).next())}),et=({user_praise:Dt,praise_count:Vt,praisePlus:Jt,onCreateDiscuss:Hi,discuss_count:Pi})=>{const[si,yi]=(0,ke.useState)(!1),[oi,Ci]=(0,ke.useState)("");function qi(Ki){Ci(Ki)}function Po(){yi(!0)}function Cr(){yi(!1)}function Go(){return pr(this,null,function*(){Hi(oi),Ci(""),yi(!1)})}return ke.createElement("div",{className:`dis-input-editor-container ${si?"active":""} `},ke.createElement("div",{className:si?"text-area hide":"text-area"},ke.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:Po}),ke.createElement("a",{style:{alignItems:"center"}}," ",ke.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",Pi," "),ke.createElement("a",{className:"c-light-black",onClick:Jt,style:{alignItems:"center"},title:Dt?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},ke.createElement("i",{className:`mr3 ${Dt?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),Vt?ke.createElement("span",null,Vt):"")),si?ke.createElement("div",{className:"input-mask",onClick:Cr}):null,ke.createElement("div",{className:si?"md-container":"md-container hide"},ke.createElement(Zi.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:oi,height:240,onChange:qi}),ke.createElement("div",{className:"tip-container",onClick:Cr},ke.createElement("a",{className:"btn-send",onClick:Go}," \u53D1\u9001 "))))},ai=Object.defineProperty,ti=Object.defineProperties,Ii=Object.getOwnPropertyDescriptors,gr=Object.getOwnPropertySymbols,hr=Object.prototype.hasOwnProperty,or=Object.prototype.propertyIsEnumerable,po=(Dt,Vt,Jt)=>Vt in Dt?ai(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,$n=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))hr.call(Vt,Jt)&&po(Dt,Jt,Vt[Jt]);if(gr)for(var Jt of gr(Vt))or.call(Vt,Jt)&&po(Dt,Jt,Vt[Jt]);return Dt},Ue=(Dt,Vt)=>ti(Dt,Ii(Vt)),Je=(Dt,Vt,Jt)=>new Promise((Hi,Pi)=>{var si=Ci=>{try{oi(Jt.next(Ci))}catch(qi){Pi(qi)}},yi=Ci=>{try{oi(Jt.throw(Ci))}catch(qi){Pi(qi)}},oi=Ci=>Ci.done?Hi(Ci.value):Promise.resolve(Ci.value).then(si,yi);oi((Jt=Jt.apply(Dt,Vt)).next())});const nt={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var Pt=(Dt=>(Dt[Dt.GET_DISCUSSES=0]="GET_DISCUSSES",Dt[Dt.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",Dt[Dt.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",Dt[Dt.PLUS_DISCUSS=3]="PLUS_DISCUSS",Dt[Dt.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",Dt[Dt.SET_PAGE=5]="SET_PAGE",Dt[Dt.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",Dt))(Pt||{});function Nt(Dt,Vt){switch(Vt.type){case 6:return Ue($n({},Dt),{loading:!0});case 0:return $n($n({},Dt),Vt.payload);case 1:return $n($n({},Dt),Vt.payload);case 4:return $n($n({},Dt),Vt.payload);case 3:return $n($n({},Dt),Vt.payload);case 5:return $n($n({},Dt),Vt.payload);case 2:return $n($n({},Dt),Vt.payload);default:throw new Error}}var sn=({user:Dt,identifier:Vt,hack:Jt,onTriggerPraise:Hi,setDiscussTotal:Pi})=>{const[si,yi]=(0,ke.useReducer)(Nt,nt),{loading:oi,page:Ci,data:qi,count:Po,actionType:Cr,activeDiscussIndex:Go}=si;console.log("---",si);const Ki=(0,ke.useCallback)(()=>Je(void 0,null,function*(){yi({type:6});const Gi=yield pn({container_type:"Practice",container_identifier:Vt,limit:10,page:Ci}),{comments:$o,disscuss_count:vo}=Gi;yi({type:0,payload:{data:$o,count:vo,loading:!1}}),Pi(vo)}),[Ci,Vt]);(0,ke.useEffect)(()=>{Ki()},[Vt,Ci]);function To(Gi){yi({type:5,payload:{page:Gi}})}function Xr(Gi){yi({type:4,payload:{actionType:Gi}})}function rs(Gi){yi(Go===Gi?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:Gi}})}function ho(Gi,$o,vo){return Je(this,null,function*(){try{const Oo=yield Hn(Gi);qi[vo].user_praise=$o,qi[vo].praise_count=Oo.praise_count,yi({type:3,payload:{data:[...qi]}})}catch(Oo){console.log(Oo)}})}function Vo(){return Je(this,null,function*(){const{id:Gi,params:$o,type:vo,index:Oo,parentDiscussIndex:Vs}=Cr;vo==="hidden-discuss"&&(console.log($o,"params"),yield ei($n({id:Gi,container_type:"Practice",container_identifier:Vt},$o)),Vs?qi[Vs].children[Oo].hidden=$o.hidden==1:qi[Oo].hidden=$o.hidden==1,yi({type:4,payload:{actionType:null,data:[...qi]}})),vo==="delete-discuss"&&(yield ki({id:Gi,container_type:"Practice",container_identifier:Vt}),yi({type:4,payload:{actionType:null}}),yield Ki())})}function Co(){yi({type:4,payload:{actionType:null}})}function Gr(Gi,$o){return Je(this,null,function*(){try{yield Qn({container_type:"Practice",container_identifier:Vt,comments:{content:$o,parent_id:Gi}}),Ki()}catch(vo){console.log(vo)}})}function Ko(Gi){return Je(this,null,function*(){yi({type:6}),yield Ai({comments:{content:Gi},container_type:"Practice",container_identifier:Vt}),Ki()})}return ke.createElement(ke.Fragment,null,ke.createElement("div",{className:"discuss-panel"},qi.length===0?ke.createElement(dt.Z,null):ke.createElement(ye.Z,{spinning:oi},qi.map((Gi,$o)=>ke.createElement(wr,{onReplyDiscuss:Gr,onPlusDiscuss:ho,onSetActiveDiscussIndex:rs,onSetActionType:Xr,data:Gi,index:$o,user:Dt,activeDiscussIndex:Go}))),Po>10?ke.createElement("div",{className:"pagination-container mt10 mb10"},ke.createElement(Ft.Z,{showQuickJumper:!0,onChange:To,current:Ci,total:Po,showTotal:Gi=>ke.createElement("span",{style:{color:"#656F87"}},"\u5171",ke.createElement("span",{className:"c-light-primary"},Gi),"\u6761\u6570\u636E")})):null),ke.createElement(et,{user_praise:Jt.user_praise,praise_count:Jt.praises_count,praisePlus:Hi,discuss_count:Jt.comments_count,onCreateDiscuss:Ko}),ke.createElement(z.Z,null,ke.createElement(be.default,{centered:!0,title:"\u63D0\u793A",open:!!Cr,onOk:Vo,onCancel:Co},ke.createElement("p",null,Cr?Cr.message:"")),ke.createElement(Oi.Z,null)))},Kt={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"},zn=Object.defineProperty,_i=Object.getOwnPropertySymbols,Bi=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,zt=(Dt,Vt,Jt)=>Vt in Dt?zn(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,En=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))Bi.call(Vt,Jt)&&zt(Dt,Jt,Vt[Jt]);if(_i)for(var Jt of _i(Vt))wt.call(Vt,Jt)&&zt(Dt,Jt,Vt[Jt]);return Dt};const bn=Dt=>React.createElement("svg",En({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},Dt),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 Yt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",gn=Object.defineProperty,yn=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Un=(Dt,Vt,Jt)=>Vt in Dt?gn(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,Gn=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))vn.call(Vt,Jt)&&Un(Dt,Jt,Vt[Jt]);if(yn)for(var Jt of yn(Vt))jn.call(Vt,Jt)&&Un(Dt,Jt,Vt[Jt]);return Dt};const An=Dt=>React.createElement("svg",Gn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Dt),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 Li="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",xi=Object.defineProperty,bi=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,Vi=Object.prototype.propertyIsEnumerable,lr=(Dt,Vt,Jt)=>Vt in Dt?xi(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,Mr=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))hn.call(Vt,Jt)&&lr(Dt,Jt,Vt[Jt]);if(bi)for(var Jt of bi(Vt))Vi.call(Vt,Jt)&&lr(Dt,Jt,Vt[Jt]);return Dt};const xn=Dt=>React.createElement("svg",Mr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Dt),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 Vn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",mi=Object.defineProperty,di=Object.getOwnPropertySymbols,gi=Object.prototype.hasOwnProperty,Di=Object.prototype.propertyIsEnumerable,Ji=(Dt,Vt,Jt)=>Vt in Dt?mi(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,cr=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))gi.call(Vt,Jt)&&Ji(Dt,Jt,Vt[Jt]);if(di)for(var Jt of di(Vt))Di.call(Vt,Jt)&&Ji(Dt,Jt,Vt[Jt]);return Dt};const _r=Dt=>React.createElement("svg",cr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},Dt),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 Rr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",Mn=Object.defineProperty,Qr=Object.getOwnPropertySymbols,kn=Object.prototype.hasOwnProperty,Ri=Object.prototype.propertyIsEnumerable,kr=(Dt,Vt,Jt)=>Vt in Dt?Mn(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,mr=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))kn.call(Vt,Jt)&&kr(Dt,Jt,Vt[Jt]);if(Qr)for(var Jt of Qr(Vt))Ri.call(Vt,Jt)&&kr(Dt,Jt,Vt[Jt]);return Dt};const eo=Dt=>React.createElement("svg",mr({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},Dt),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 Tr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",yo=({style:Dt={},onClick:Vt,onAssist:Jt,onHide:Hi,data:Pi,active:si,showLine:yi})=>ke.createElement(ke.Fragment,null,ke.createElement("div",{className:si===(Pi==null?void 0:Pi.id)?`${_n.list} ${_n.active}`:_n.list,style:Dt,onClick:()=>Vt(Pi)},(Pi==null?void 0:Pi.video)&&ke.createElement("div",{className:_n.left},ke.createElement("img",{src:Pi==null?void 0:Pi.video_cover}),ke.createElement("div",null,ke.createElement("img",{src:Yt}),ke.createElement("span",null,Pi==null?void 0:Pi.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/"+(Pi==null?void 0:Pi.image_url),width:30,height:30}),ke.createElement("div",{title:Pi==null?void 0:Pi.name,className:_n.title},Pi==null?void 0:Pi.name),(Pi==null?void 0:Pi.is_authority)&&ke.createElement("div",{className:_n.b},"\u5B98\u65B9"),(Pi==null?void 0:Pi.is_excellent)&&ke.createElement("div",{className:_n.a},"\u7CBE\u9009")),ke.createElement("div",{className:_n.des},ke.createElement(Re.Z,{showLines:2,showTextOnly:!0,value:(Pi==null?void 0:Pi.content)||"\u6682\u65E0\u5185\u5BB9"})),ke.createElement("div",{className:_n.tag},ke.createElement("span",{className:"current",onClick:oi=>{oi.stopPropagation(),Jt(Pi)}},ke.createElement("img",{src:Pi!=null&&Pi.user_liker?Vn:Li}),ke.createElement("span",{style:{color:Pi!=null&&Pi.user_liker?"#0152d9":"#656f87"}},Pi==null?void 0:Pi.praises_count)),ke.createElement("span",null,ke.createElement("img",{src:Rr}),ke.createElement("span",null,Pi==null?void 0:Pi.discusses_count)),ke.createElement("span",null,ke.createElement("img",{src:Tr}),ke.createElement("span",null,Pi==null?void 0:Pi.viewed_count)),(0,Ui.Ny)()&&ke.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:oi=>{oi.stopPropagation(),Hi(Pi)}},Pi!=null&&Pi.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),yi&&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"},On=Ie(25399),on=Ie(67776),ft=Object.defineProperty,Wn=Object.getOwnPropertySymbols,ii=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable,vi=(Dt,Vt,Jt)=>Vt in Dt?ft(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,hi=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))ii.call(Vt,Jt)&&vi(Dt,Jt,Vt[Jt]);if(Wn)for(var Jt of Wn(Vt))Mi.call(Vt,Jt)&&vi(Dt,Jt,Vt[Jt]);return Dt};const Nn=Dt=>React.createElement("svg",hi({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},Dt),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 Yn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",qn=Object.defineProperty,Bn=Object.getOwnPropertySymbols,Jn=Object.prototype.hasOwnProperty,Ti=Object.prototype.propertyIsEnumerable,ci=(Dt,Vt,Jt)=>Vt in Dt?qn(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,ni=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))Jn.call(Vt,Jt)&&ci(Dt,Jt,Vt[Jt]);if(Bn)for(var Jt of Bn(Vt))Ti.call(Vt,Jt)&&ci(Dt,Jt,Vt[Jt]);return Dt};const Pn=Dt=>React.createElement("svg",ni({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},Dt),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 wi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",ji=Object.defineProperty,br=Object.getOwnPropertySymbols,nr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,zr=(Dt,Vt,Jt)=>Vt in Dt?ji(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,Ur=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))nr.call(Vt,Jt)&&zr(Dt,Jt,Vt[Jt]);if(br)for(var Jt of br(Vt))Zr.call(Vt,Jt)&&zr(Dt,Jt,Vt[Jt]);return Dt};const to=Dt=>React.createElement("svg",Ur({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},Dt),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 Jr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",ko=Object.defineProperty,rn=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable,sr=(Dt,Vt,Jt)=>Vt in Dt?ko(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,yr=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))Kr.call(Vt,Jt)&&sr(Dt,Jt,Vt[Jt]);if(rn)for(var Jt of rn(Vt))Hr.call(Vt,Jt)&&sr(Dt,Jt,Vt[Jt]);return Dt},fr=(Dt,Vt,Jt)=>new Promise((Hi,Pi)=>{var si=Ci=>{try{oi(Jt.next(Ci))}catch(qi){Pi(qi)}},yi=Ci=>{try{oi(Jt.throw(Ci))}catch(qi){Pi(qi)}},oi=Ci=>Ci.done?Hi(Ci.value):Promise.resolve(Ci.value).then(si,yi);oi((Jt=Jt.apply(Dt,Vt)).next())});const co=(Dt,Vt)=>{var Jt,Hi,Pi;const{uploadInfo:si={}}=Vt.payload;switch(Vt.type){case"addVideo":return{videoList:[...Dt.videoList,{name:si.file.name,size:si.file.size,type:si.file.type,fileHash:si.fileHash,state:si.state,video_id:si.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:Dt.videoList.filter(yi=>yi.name!==Vt.payload.name)};case"replaceVideo":return{videoList:Vt.payload};case"removeAll":return[];case"updateProgress":return{videoList:Dt.videoList.map(yi=>yi.name===Vt.payload.uploadInfo.file.name?yr(yr({},yi),{loaded:Vt.payload.progressPercent,video_id:si.videoId,fileHash:si.fileHash}):yi)};case"updateTitle":return{videoList:(Jt=Dt.videoList)==null?void 0:Jt.map(yi=>yi.name===Vt.payload.item.name?yr(yr({},yi),{title:Vt.payload.title}):yi)};case"updateImg":return{videoList:(Hi=Dt.videoList)==null?void 0:Hi.map(yi=>yi.name===Vt.payload.item.name?yr(yr({},yi),{attachment_id:Vt.payload.attachment_id}):yi)};case"updateImg":return{videoList:(Pi=Dt.videoList)==null?void 0:Pi.map(yi=>yi.name===Vt.payload.item.name?yr(yr({},yi),{attachment_id:Vt.payload.attachment_id}):yi)};default:return[]}};var Er=({onClose:Dt,onOk:Vt,identifier:Jt,active:Hi})=>{var Pi,si;const[yi]=ot.default.useForm(),[oi,Ci]=(0,ke.useState)({}),[qi,Po]=(0,ke.useState)(!1),[Cr,Go]=(0,ke.useState)(!1),[Ki,To]=(0,ke.useReducer)(co,{videoList:[]}),Xr=(0,Ui.eY)(),rs=(0,Le.useParams)(),ho=(0,ke.useRef)();(0,ke.useEffect)(()=>{Hi&&Vo()},[Hi]);const Vo=()=>fr(void 0,null,function*(){var qr,Uo,Vr,Oa,Ks,ol,ku,lo,Tu,So;const qo=yield(0,pe.M3)(Jt,{active:Hi});if((qo==null?void 0:qo.status)===0){const Rs={name:(qr=qo==null?void 0:qo.data)==null?void 0:qr.name,content:(Uo=qo==null?void 0:qo.data)==null?void 0:Uo.content};yi.setFieldsValue(Rs),Ci(Rs),(Oa=(Vr=qo==null?void 0:qo.data)==null?void 0:Vr.videos)!=null&&Oa[0]&&To({type:"replaceVideo",payload:[{video_id:(ku=(ol=(Ks=qo==null?void 0:qo.data)==null?void 0:Ks.videos)==null?void 0:ol[0])==null?void 0:ku.video_id,name:(So=(Tu=(lo=qo==null?void 0:qo.data)==null?void 0:lo.videos)==null?void 0:Tu[0])==null?void 0:So.title,loaded:100}]})}}),Co=(qr,Uo)=>{Ci(yr({},Uo))},Gr=qr=>fr(void 0,null,function*(){const Uo={videos:Ki.videoList,articles:qr};Go(!0);let Vr;Hi?(Uo.active=Hi,Vr=yield(0,pe.gu)(Jt,Uo)):Vr=yield(0,pe.bx)(Jt,Uo),(Vr==null?void 0:Vr.status)===0&&(console.log(Hi||(Vr==null?void 0:Vr.id),44),Vt(Hi||(Vr==null?void 0:Vr.id))),Go(!1)}),Ko=()=>{const qr=document.getElementById("fileUpload");qr.value=""},Gi=qr=>{var Uo='{"Vod":{}}';if(Po(!0),ho.current){ho.current.addFile(qr,null,null,null,Uo);return}(0,on.o)(Xr==null?void 0:Xr.login,"",{create:!ho,addFileSuccess:Vr=>{To({type:"addVideo",payload:{uploadInfo:Vr}})},onUploadProgress:(Vr,Oa,Ks)=>{const ol=Math.ceil(Ks*100);To({type:"updateProgress",payload:{uploadInfo:Vr,progressPercent:ol}}),Ko()},onUploadFailed:Vr=>{xe.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:Vr=>{Po(!1)},onUploadSucceed:Vr=>{Po(!1)},onUploadError:Vr=>{Po(!1)},gotUploader:Vr=>{Vr.addFile(qr,null,null,null,Uo),ho.current=Vr}})},$o=qr=>{var Uo;const Oa=qr.target.files[0];if(!Oa){Ko();return}let Ks=Oa.name.toLowerCase();if(Ks&&Ks.indexOf(".avi")==-1&&Ks.indexOf(".flv")==-1&&Ks.indexOf(".f4v")==-1&&Ks.indexOf(".m4v")==-1&&Ks.indexOf(".mov")==-1&&Ks.indexOf(".mp4")==-1&&Ks.indexOf(".rmvb")==-1&&Ks.indexOf(".swf")==-1&&Ks.indexOf(".webm")==-1&&Ks.indexOf(".wmv")==-1){xe.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Ko();return}if(Oa.size>1024*1024*1024){xe.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),Ko();return}if((Uo=Ki.videoList)!=null&&Uo.find(ol=>ol.name===Oa.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"),Ko();return}Gi(Oa)},vo=(qr,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:()=>{Ko(),To({type:"removeVideo",payload:{name:qr}})}})},Oo=()=>ke.createElement("label",{htmlFor:"fileUpload",className:an.main},ke.createElement("img",{src:Yn,alt:""}),ke.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Vs=qr=>ke.createElement("div",{className:an.mainLoading},ke.createElement("div",{className:an.proWarp},ke.createElement("div",{className:an.pro},ke.createElement("div",{style:{width:qr}})),ke.createElement("span",null,qr||0,"%")),ke.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),ke.createElement("div",{className:an.tip},ke.createElement(On.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:Jr,alt:""})))),dr=qr=>ke.createElement("div",{className:an.mainSucceed},ke.createElement("img",{src:wi,alt:""}),ke.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),ke.createElement("div",{className:an.tip},ke.createElement(On.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:Jr,alt:""}))),ke.createElement("div",{className:an.del,onClick:()=>vo(qr.name,qr.loaded==100)},ke.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),Fo=()=>{var qr;return ke.createElement(ke.Fragment,null,(qr=Ki.videoList)==null?void 0:qr.map((Uo,Vr)=>ke.createElement(ke.Fragment,{key:Vr},Uo.loaded==100?dr(Uo):Vs(Uo.loaded))))},Eo=()=>{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:Dt})},Or=(Pi=Ki.videoList)==null?void 0:Pi.length;return ke.createElement("div",{className:an.listForm},ke.createElement("header",null,Hi?"\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:yi,scrollToFirstError:!0,layout:"vertical",onValuesChange:Co,onFinish:Gr},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:`${((si=oi.name)==null?void 0:si.length)||0}/60`})),ke.createElement(ot.default.Item,{name:"content",label:"\u5185\u5BB9:"},ke.createElement(Zi.Z,{defaultValue:oi.content||"",watch:!0})))),ke.createElement("div",{className:an.upload},Or?Fo():Oo(),ke.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:$o,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(ht.ZP,{onClick:Eo,type:"primary",ghost:!0},"\u5173\u95ED"),ke.createElement(ht.ZP,{loading:Cr,disabled:qi,onClick:()=>yi.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},no={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"},Qs=Ie(458),us=Object.defineProperty,Aa=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,$i=Object.prototype.propertyIsEnumerable,ns=(Dt,Vt,Jt)=>Vt in Dt?us(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,ss=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))oa.call(Vt,Jt)&&ns(Dt,Jt,Vt[Jt]);if(Aa)for(var Jt of Aa(Vt))$i.call(Vt,Jt)&&ns(Dt,Jt,Vt[Jt]);return Dt};const zs=Dt=>React.createElement("svg",ss({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},Dt),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 hs="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Ms=Object.defineProperty,li=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,jr=(Dt,Vt,Jt)=>Vt in Dt?Ms(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,$r=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))er.call(Vt,Jt)&&jr(Dt,Jt,Vt[Jt]);if(li)for(var Jt of li(Vt))Pr.call(Vt,Jt)&&jr(Dt,Jt,Vt[Jt]);return Dt};const jo=Dt=>React.createElement("svg",$r({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},Dt),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 tr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",pa=Object.defineProperty,ps=Object.getOwnPropertySymbols,cs=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable,ws=(Dt,Vt,Jt)=>Vt in Dt?pa(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,ga=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))cs.call(Vt,Jt)&&ws(Dt,Jt,Vt[Jt]);if(ps)for(var Jt of ps(Vt))io.call(Vt,Jt)&&ws(Dt,Jt,Vt[Jt]);return Dt};const is=Dt=>React.createElement("svg",ga({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},Dt),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 Pa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Sa={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"},Na=Ie(77019),_s=Ie(5269),nl={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"},Hu=(Dt,Vt,Jt)=>new Promise((Hi,Pi)=>{var si=Ci=>{try{oi(Jt.next(Ci))}catch(qi){Pi(qi)}},yi=Ci=>{try{oi(Jt.throw(Ci))}catch(qi){Pi(qi)}},oi=Ci=>Ci.done?Hi(Ci.value):Promise.resolve(Ci.value).then(si,yi);oi((Jt=Jt.apply(Dt,Vt)).next())});const fl=({id:Dt,cb:Vt})=>{const[Jt,Hi]=(0,ke.useState)("");return ke.createElement("aside",{className:"mt10"},ke.createElement(Zi.Z,{defaultValue:Jt,id:"writeForumsReviewId",onChange:Pi=>{Hi(Pi)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ke.createElement(Na.Z,null,ke.createElement(_s.Z,{flex:"1"}),ke.createElement(_s.Z,null,ke.createElement(ht.ZP,{type:"primary",size:"middle",onClick:()=>Hu(void 0,null,function*(){Jt===""?xe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Vt(Dt,Jt)})},"\u53D1\u9001"))))},Ol=({data:Dt})=>{var Vt;return ke.createElement("div",{className:nl.thirdlyLevelDiscuss},ke.createElement("span",{className:"c-grey-333"},ke.createElement("span",{className:"font 14 c-light-primary"},(Vt=Dt==null?void 0:Dt.author)==null?void 0:Vt.name),"@",ke.createElement("span",{className:"font 14 c-light-primary"},Dt==null?void 0:Dt.parent_name),":"),ke.createElement(Re.Z,{value:Dt==null?void 0:Dt.content}))},il=({data:Dt,onReplyDiscuss:Vt,thirdlyReply:Jt,setThirdlyReply:Hi})=>{var Pi,si,yi,oi;const Ci=(0,Ui.eY)();return console.log(Ci,"user"),ke.createElement("div",{className:nl.list},ke.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+((Pi=Dt==null?void 0:Dt.author)==null?void 0:Pi.image_url)}),ke.createElement("div",{className:nl.wrap},ke.createElement("div",{className:"font14",style:{marginBottom:6}},ke.createElement("span",{className:"c-grey-333"},(si=Dt==null?void 0:Dt.author)==null?void 0:si.name),(Ci==null?void 0:Ci.login)!==((yi=Dt==null?void 0:Dt.author)==null?void 0:yi.login)&&ke.createElement("span",{onClick:()=>Hi(Dt==null?void 0:Dt.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(Re.Z,{value:Dt==null?void 0:Dt.content}),(oi=Dt==null?void 0:Dt.children)==null?void 0:oi.map(qi=>ke.createElement(Ol,{key:qi.id,data:qi})),Jt===(Dt==null?void 0:Dt.id)&&ke.createElement("div",null,ke.createElement(fl,{id:Dt==null?void 0:Dt.id,cb:Vt}),ke.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>Hi(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:nl.line})))};var eh=({data:Dt,onReplyDiscuss:Vt,secondReply:Jt,setSecondReply:Hi,thirdlyReply:Pi,setThirdlyReply:si,onPlusDiscuss:yi})=>{var oi,Ci,qi,Po;const[Cr,Go]=(0,ke.useState)(!1);return console.log(Dt,"data"),ke.createElement("div",{className:nl.discussItem},ke.createElement("div",{className:nl.list},ke.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+((oi=Dt==null?void 0:Dt.author)==null?void 0:oi.image_url)}),ke.createElement("div",{className:nl.wrap},ke.createElement("div",{className:"font14",style:{marginBottom:6}},ke.createElement("span",{className:"c-grey-333 mr30"},(Ci=Dt==null?void 0:Dt.author)==null?void 0:Ci.name),ke.createElement("span",{className:"c-grey-999"},Dt==null?void 0:Dt.time)),ke.createElement(Re.Z,{value:Dt==null?void 0:Dt.content}),ke.createElement("div",{className:nl.btns},ke.createElement("div",{onClick:()=>yi(Dt==null?void 0:Dt.id),className:Dt!=null&&Dt.user_praise?"c-light-primary":"c-grey-999"},ke.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),ke.createElement("span",null,Dt==null?void 0:Dt.praise_count)),ke.createElement("div",{onClick:()=>{var Ki;((Ki=Dt==null?void 0:Dt.children)==null?void 0:Ki.length)!==0&&(Hi(null),Go(!Cr))},style:{color:Cr?"#0152d9":"#999999"}},ke.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),ke.createElement("span",null,Cr?"\u6536\u8D77\u8BC4\u8BBA":(qi=Dt==null?void 0:Dt.children)==null?void 0:qi.length)),ke.createElement("div",{onClick:()=>{Go(!1),Hi(Jt===(Dt==null?void 0:Dt.id)?null:Dt==null?void 0:Dt.id)},style:{color:Jt===(Dt==null?void 0:Dt.id)?"#0152d9":"#999999"}},ke.createElement("i",{className:"iconfont icon-huifu3 mr3"}),ke.createElement("span",null,Jt===(Dt==null?void 0:Dt.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Jt===(Dt==null?void 0:Dt.id)&&ke.createElement(fl,{id:Dt==null?void 0:Dt.id,cb:(Ki,To)=>{Vt(Ki,To),Go(!0)}}),Cr&&ke.createElement("div",{className:nl.secondLevelDiscuss},(Po=Dt==null?void 0:Dt.children)==null?void 0:Po.map(Ki=>ke.createElement(il,{thirdlyReply:Pi,setThirdlyReply:si,key:Ki.id,data:Ki,onReplyDiscuss:Vt}))))))},lu=(Dt,Vt,Jt)=>new Promise((Hi,Pi)=>{var si=Ci=>{try{oi(Jt.next(Ci))}catch(qi){Pi(qi)}},yi=Ci=>{try{oi(Jt.throw(Ci))}catch(qi){Pi(qi)}},oi=Ci=>Ci.done?Hi(Ci.value):Promise.resolve(Ci.value).then(si,yi);oi((Jt=Jt.apply(Dt,Vt)).next())}),Gu=({identifier:Dt,active:Vt,onOk:Jt})=>{const[Hi,Pi]=(0,ke.useState)(""),[si,yi]=(0,ke.useState)(1),[oi,Ci]=(0,ke.useState)([]),[qi,Po]=(0,ke.useState)(0),[Cr,Go]=(0,ke.useState)(null),[Ki,To]=(0,ke.useState)(null);(0,ke.useEffect)(()=>{Xr(1),yi(1)},[Vt]);const Xr=Gr=>lu(void 0,null,function*(){const Ko=yield pn({container_type:"QuestionSolutionArticle",container_identifier:Vt,limit:5,page:Gr});Ko!=null&&Ko.comments&&(Ci((Ko==null?void 0:Ko.comments)||[]),yi(Gr),Po(Ko==null?void 0:Ko.disscuss_count))}),rs=()=>lu(void 0,null,function*(){if(Hi===""){xe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const Gr=yield Ai({comments:{content:Hi},container_type:"QuestionSolutionArticle",container_identifier:Vt});Gr!=null&&Gr.discuss&&(Pi(""),Xr(si),Jt())}),ho=(Gr,Ko,Gi)=>lu(void 0,null,function*(){const $o=yield Qn({container_type:"QuestionSolutionArticle",container_identifier:Vt,comments:{content:Ko,parent_id:Gr}});Go(null),To(null),Xr(si)}),Vo=Gr=>lu(void 0,null,function*(){const Ko=yield Hn(Gr);Xr(si)}),Co=Gr=>{yi(Gr),Xr(Gr)};return ke.createElement("div",{className:Sa.discuss},ke.createElement("aside",{className:Sa.reply,style:{borderWidth:qi?1:0}},ke.createElement(Zi.Z,{defaultValue:Hi,id:"writeForumsReviewId",onChange:Gr=>{Pi(Gr)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ke.createElement(Na.Z,null,ke.createElement(_s.Z,{flex:"1"}),ke.createElement(_s.Z,null,ke.createElement(ht.ZP,{type:"primary",size:"middle",onClick:()=>rs()},"\u53D1\u9001")))),oi==null?void 0:oi.map(Gr=>ke.createElement(eh,{secondReply:Cr,setSecondReply:Go,thirdlyReply:Ki,setThirdlyReply:To,key:Gr.id,data:Gr,onReplyDiscuss:ho,onPlusDiscuss:Vo})),ke.createElement(Ft.Z,{className:Sa.pagination,showTotal:Gr=>ke.createElement("span",{style:{color:"#656F87"}},"\u5171",ke.createElement("span",{className:"c-light-primary"},Gr),"\u6761\u6570\u636E"),current:si,onChange:Co,total:qi,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},th=Ie(3736),uu=Object.defineProperty,hu=Object.getOwnPropertySymbols,ua=Object.prototype.hasOwnProperty,ma=Object.prototype.propertyIsEnumerable,Os=(Dt,Vt,Jt)=>Vt in Dt?uu(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,$s=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))ua.call(Vt,Jt)&&Os(Dt,Jt,Vt[Jt]);if(hu)for(var Jt of hu(Vt))ma.call(Vt,Jt)&&Os(Dt,Jt,Vt[Jt]);return Dt},Il=(Dt,Vt,Jt)=>new Promise((Hi,Pi)=>{var si=Ci=>{try{oi(Jt.next(Ci))}catch(qi){Pi(qi)}},yi=Ci=>{try{oi(Jt.throw(Ci))}catch(qi){Pi(qi)}},oi=Ci=>Ci.done?Hi(Ci.value):Promise.resolve(Ci.value).then(si,yi);oi((Jt=Jt.apply(Dt,Vt)).next())}),Yo=({active:Dt,identifier:Vt,onAssist:Jt,onEdit:Hi,onArticlesSkip:Pi,onClose:si,onOk:yi,onDelete:oi,detailsIndex:Ci,btnShowStatus:qi})=>{var Po,Cr,Go,Ki,To,Xr,rs,ho,Vo,Co;const[Gr,Ko]=(0,ke.useState)(!0),[Gi,$o]=(0,ke.useState)({});(0,ke.useEffect)(()=>{Dt&&vo()},[Dt,Ci]);const vo=(Eo=!0)=>Il(void 0,null,function*(){Eo&&Ko(!0);const Or=yield(0,pe.wO)(Vt,{active:Dt});(Or==null?void 0:Or.status)===0&&$o((Or==null?void 0:Or.data)||{}),Ko(!1)}),Oo=Eo=>Il(void 0,null,function*(){const Or=yield(0,pe.qe)(Vt,$s({active:Dt},Eo));(Or==null?void 0:Or.status)===0&&(vo(!1),yi())}),Vs=Eo=>Il(void 0,null,function*(){(yield(0,pe.Rg)(Vt,{active:Eo==null?void 0:Eo.id})).status===0&&(vo(!1),yi())}),dr=Eo=>{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:()=>oi(Eo)})},Fo=()=>{vo(!1),yi()};return ke.createElement("div",{className:no.listDetails},ke.createElement(Qs.Z,{className:"pt20 pl20 pr20",loading:Gr,active:!0,paragraph:{rows:5}},ke.createElement("div",{className:no.head},ke.createElement("div",{className:no.name},ke.createElement("div",{title:Gi==null?void 0:Gi.name,className:no.title},Gi==null?void 0:Gi.name),(Gi==null?void 0:Gi.is_authority)&&ke.createElement("div",{className:no.b},"\u5B98\u65B9"),(Gi==null?void 0:Gi.is_excellent)&&ke.createElement("div",{className:no.a},"\u7CBE\u9009")),ke.createElement("div",{className:no.tag},ke.createElement("img",{src:ge.Z.IMG_SERVER+"/images/"+(Gi==null?void 0:Gi.image_url)}),ke.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Gi==null?void 0:Gi.username),ke.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",He()(Gi==null?void 0:Gi.created_at).format("YYYY-MM-DD")),ke.createElement("span",null,ke.createElement("img",{src:Li}),ke.createElement("span",null,Gi==null?void 0:Gi.praises_count)),ke.createElement("span",null,ke.createElement("img",{src:Rr}),ke.createElement("span",null,Gi==null?void 0:Gi.discusses_count)),ke.createElement("span",null,ke.createElement("img",{src:Tr}),ke.createElement("span",null,Gi==null?void 0:Gi.viewed_count)),ke.createElement("div",{className:no.btn},((0,Ui.Ny)()||(Gi==null?void 0:Gi.is_self))&&ke.createElement(ke.Fragment,null,ke.createElement(ht.ZP,{onClick:()=>dr(Gi),type:"primary",ghost:!0},"\u5220\u9664"),ke.createElement(ht.ZP,{onClick:()=>Hi(Gi),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,Ui.Ny)()&&ke.createElement(ht.ZP,{onClick:()=>Oo({is_authority:!(Gi!=null&&Gi.is_authority)}),type:"primary"},ke.createElement("img",{src:tr}),Gi!=null&&Gi.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,Ui.Ny)()&&ke.createElement(ht.ZP,{onClick:()=>Oo({is_excellent:!(Gi!=null&&Gi.is_excellent)}),type:"primary"},ke.createElement("img",{src:hs}),Gi!=null&&Gi.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),ke.createElement("div",{className:no.scroll},((Cr=(Po=Gi==null?void 0:Gi.videos)==null?void 0:Po[0])==null?void 0:Cr.id)&&ke.createElement("div",{className:no.video},ke.createElement(ye.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Ki=(Go=Gi==null?void 0:Gi.videos)==null?void 0:Go[0])!=null&&Ki.transcoded)},ke.createElement(th.Z,{poster:(Xr=(To=Gi==null?void 0:Gi.videos)==null?void 0:To[0])==null?void 0:Xr.cover_url,src:((ho=(rs=Gi==null?void 0:Gi.videos)==null?void 0:rs[0])==null?void 0:ho.play_url)||"",videoId:(Co=(Vo=Gi==null?void 0:Gi.videos)==null?void 0:Vo[0])==null?void 0:Co.id,logWatchHistory:()=>{}}))),ke.createElement(Re.Z,{className:no.html,value:(Gi==null?void 0:Gi.content)||""}),ke.createElement("div",{onClick:()=>Vs(Gi),className:no.g},ke.createElement("img",{className:"mr10",src:(Gi!=null&&Gi.user_liker,Pa)}),ke.createElement("span",null,Gi==null?void 0:Gi.praises_count)),ke.createElement(Gu,{onOk:Fo,active:Dt,identifier:Vt})),ke.createElement("div",{className:no.btns},ke.createElement(ht.ZP,{onClick:()=>si(),type:"primary",ghost:!0},"\u5173\u95ED"),qi[0]&&ke.createElement(ht.ZP,{onClick:Eo=>Pi(Eo,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),qi[1]&&ke.createElement(ht.ZP,{onClick:Eo=>Pi(Eo,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},zo=Object.defineProperty,wo=Object.getOwnPropertySymbols,Us=Object.prototype.hasOwnProperty,Fi=Object.prototype.propertyIsEnumerable,Hs=(Dt,Vt,Jt)=>Vt in Dt?zo(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,Zt=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))Us.call(Vt,Jt)&&Hs(Dt,Jt,Vt[Jt]);if(wo)for(var Jt of wo(Vt))Fi.call(Vt,Jt)&&Hs(Dt,Jt,Vt[Jt]);return Dt};const In=Dt=>React.createElement("svg",Zt({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},Dt),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 pl="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",Kl=Ie(59477),Ns=Ie(89489),sa=Object.defineProperty,rl=Object.defineProperties,bl=Object.getOwnPropertyDescriptors,Cu=Object.getOwnPropertySymbols,gs=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable,va=(Dt,Vt,Jt)=>Vt in Dt?sa(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,Is=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))gs.call(Vt,Jt)&&va(Dt,Jt,Vt[Jt]);if(Cu)for(var Jt of Cu(Vt))Fr.call(Vt,Jt)&&va(Dt,Jt,Vt[Jt]);return Dt},ms=(Dt,Vt)=>rl(Dt,bl(Vt)),ro=(Dt,Vt,Jt)=>new Promise((Hi,Pi)=>{var si=Ci=>{try{oi(Jt.next(Ci))}catch(qi){Pi(qi)}},yi=Ci=>{try{oi(Jt.throw(Ci))}catch(qi){Pi(qi)}},oi=Ci=>Ci.done?Hi(Ci.value):Promise.resolve(Ci.value).then(si,yi);oi((Jt=Jt.apply(Dt,Vt)).next())}),Da=({identifier:Dt,tabStatus:Vt,setFilterListTotal:Jt,setListStatus:Hi})=>{const Pi={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[si,yi]=(0,ke.useState)(Is({},Pi));const[oi,Ci]=(0,ke.useState)(!1),[qi,Po]=(0,ke.useState)(0),[Cr,Go]=(0,ke.useState)(1),[Ki,To]=(0,ke.useState)(null),[Xr,rs]=(0,ke.useState)([]),[ho,Vo]=(0,ke.useState)([!0,!0]),[Co,Gr]=(0,ke.useState)(0),Ko=(0,ke.useRef)(null);(0,ke.useEffect)(()=>{qr()},[Vt]),(0,ke.useEffect)(()=>{Gi()},[Ki]),(0,ke.useEffect)(()=>{vo(Is({},Pi)),qr()},[Dt]),(0,ke.useEffect)(()=>(window.addEventListener("resize",$o),Hi(Co),()=>{window.removeEventListener("resize",$o)}),[Co]);const Gi=()=>ro(void 0,null,function*(){if(!Ki){Vo([!0,!0]);return}const So=[!0,!0],qo=Xr==null?void 0:Xr.findIndex(Rs=>Rs.id===Ki);qo===0&&si.page===1&&(So[0]=!1),(si.page-1)*si.limit+(qo+1)===si.total&&(So[1]=!1),Vo(So)}),$o=()=>{var So;if(Co){const qo=window.innerWidth-((So=Ko.current)==null?void 0:So.clientWidth);Po(qo)}},vo=So=>ro(void 0,null,function*(){var qo,Rs,Au;Ci(!0);const Ia=yield(0,pe.WH)(Dt,So);return(Ia==null?void 0:Ia.status)===0&&(rs(((qo=Ia==null?void 0:Ia.data)==null?void 0:qo.articles)||[]),yi(ms(Is({},So),{total:(Rs=Ia==null?void 0:Ia.data)==null?void 0:Rs.articles_count})),Jt((Au=Ia==null?void 0:Ia.data)==null?void 0:Au.articles_count)),Ci(!1),Ia}),Oo=()=>{(si==null?void 0:si.sort_direction)===null?si.sort_direction="asc":(si==null?void 0:si.sort_direction)==="asc"?si.sort_direction="desc":(si==null?void 0:si.sort_direction)==="desc"&&(si.sort_direction=null),si.page=1,qr(),yi(Is({},si)),vo(si)},Vs=()=>{si.page=1,si.search=si==null?void 0:si.save_search,qr(),yi(Is({},si)),vo(si)},dr=()=>{var So;const qo=document.getElementsByClassName("btn-resize");qo[0].style.visibility="hidden";const Rs=window.innerWidth-((So=Ko.current)==null?void 0:So.clientWidth);Po(Rs)},Fo=()=>{dr(),Gr(1)},Eo=So=>{dr(),To(So==null?void 0:So.id),Gr(3)},Or=So=>{dr(),To(So==null?void 0:So.id),Gr(2)},qr=()=>{const So=document.getElementsByClassName("btn-resize");So[0].style.visibility="visible",Po(0),Gr(0),To(null)},Uo=So=>{Gr(3),To(So),si.page=1,yi(Is({},si)),vo(si)},Vr=So=>{Gr(3),To(So),yi(Is({},si)),vo(si)},Oa=So=>{yi(Is({},si)),vo(si)},Ks=So=>ro(void 0,null,function*(){(yield(0,pe.Rg)(Dt,{active:So==null?void 0:So.id})).status===0&&(vo(si),Go(Cr+1))}),ol=So=>ro(void 0,null,function*(){(yield(0,pe.rL)(Dt,{active:So==null?void 0:So.id})).status===0&&(vo(si),Go(Cr+1))}),ku=So=>ro(void 0,null,function*(){(yield(0,pe.de)(Dt,{active:So==null?void 0:So.id})).status===0&&(qr(),vo(si))}),lo=So=>{si.page=So,yi(Is({},si)),vo(si)},Tu=(So,qo)=>ro(void 0,null,function*(){var Rs,Au,Ia,$c;const gl=Xr==null?void 0:Xr.findIndex(ta=>ta.id===Ki);if(console.log(gl,qo,22),qo==="prev"){if(gl===void 0){xe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(gl===0){if(si.page===1){xe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(si.page!==1){si.page=si.page-1,yi(Is({},si));const ta=yield vo(si);if((ta==null?void 0:ta.status)===0){const ql=(Ia=ta==null?void 0:ta.data)==null?void 0:Ia.articles[((Au=(Rs=ta==null?void 0:ta.data)==null?void 0:Rs.articles)==null?void 0:Au.length)-1];To(ql==null?void 0:ql.id),console.log(So.target,555)}}}else{const ta=Xr[gl-1];To(ta==null?void 0:ta.id)}}if(qo==="next"){if(gl===void 0){xe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((si.page-1)*si.limit+(gl+1)===si.total){xe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(gl+1===si.limit){si.page=si.page+1,yi(Is({},si));const ta=yield vo(si);if((ta==null?void 0:ta.status)===0){const ql=($c=ta==null?void 0:ta.data)==null?void 0:$c.articles[0];To(ql==null?void 0:ql.id)}}else{const ta=Xr[gl+1];To(ta==null?void 0:ta.id)}}});return ke.createElement("div",{className:Kt.wrap,ref:Ko},ke.createElement("div",{className:Kt.head},ke.createElement("div",{className:Kt.sort,onClick:Oo},ke.createElement("span",null,"\u6700\u65B0"),ke.createElement("aside",null,ke.createElement(Kl.Z,{style:{color:(si==null?void 0:si.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),ke.createElement(Ns.Z,{style:{color:(si==null?void 0:si.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),ke.createElement(ut.default.Search,{value:si.save_search,className:Kt["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:So=>{si.save_search=So.target.value,yi(Is({},si))},onSearch:Vs}),ke.createElement("div",{onClick:Fo,className:Kt.btn},ke.createElement("img",{src:pl}),"\u5199\u9898\u89E3")),ke.createElement("div",{className:Kt.listWarp},ke.createElement(ye.Z,{spinning:oi,className:"mt20"},Xr==null?void 0:Xr.map((So,qo)=>{let Rs=!0;return qo+1===Xr.length&&qo!==0&&(Rs=!1),ke.createElement(yo,{active:Ki,key:So.id,data:So,showLine:Rs,onClick:Eo,onAssist:Ks,onHide:ol})}),(Xr==null?void 0:Xr.length)===0&&ke.createElement(dt.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),ke.createElement(Ft.Z,{className:Kt.pagination,showTotal:So=>ke.createElement("span",{style:{color:"#656F87"}},"\u5171",ke.createElement("span",{className:"c-light-primary"},So),"\u6761\u6570\u636E"),total:si.total,showSizeChanger:!1,current:si==null?void 0:si.page,onChange:lo,hideOnSinglePage:!0,showQuickJumper:!0}),Co>0&&ke.createElement("div",{className:Kt.fixedRight,style:{width:qi}},Co===1&&ke.createElement(Er,{identifier:Dt,onClose:qr,onOk:Uo}),Co===2&&ke.createElement(Er,{active:Ki,identifier:Dt,onClose:qr,onOk:Vr}),Co===3&&ke.createElement(Yo,{btnShowStatus:ho,onArticlesSkip:Tu,detailsIndex:Cr,active:Ki,identifier:Dt,onClose:qr,onOk:Oa,onEdit:Or,onAssist:Ks,onDelete:ku})))},Xo={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"},Ka=Object.defineProperty,ea=Object.defineProperties,Eu=Object.getOwnPropertyDescriptors,Io=Object.getOwnPropertySymbols,ha=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,es=(Dt,Vt,Jt)=>Vt in Dt?Ka(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,Jo=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))ha.call(Vt,Jt)&&es(Dt,Jt,Vt[Jt]);if(Io)for(var Jt of Io(Vt))Ro.call(Vt,Jt)&&es(Dt,Jt,Vt[Jt]);return Dt},ds=(Dt,Vt)=>ea(Dt,Eu(Vt)),No=(Dt,Vt,Jt)=>new Promise((Hi,Pi)=>{var si=Ci=>{try{oi(Jt.next(Ci))}catch(qi){Pi(qi)}},yi=Ci=>{try{oi(Jt.throw(Ci))}catch(qi){Pi(qi)}},oi=Ci=>Ci.done?Hi(Ci.value):Promise.resolve(Ci.value).then(si,yi);oi((Jt=Jt.apply(Dt,Vt)).next())}),Nr=({visible:Dt,onVisible:Vt,value:Jt,onChange:Hi,setIndex:Pi})=>{var si;const yi={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[oi,Ci]=(0,ke.useState)(yi);const[qi,Po]=(0,ke.useState)([]),[Cr,Go]=(0,ke.useState)([]),[Ki,To]=(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(()=>{Vo(30)},3e4)),()=>{clearInterval(rs.current)}),[]);const Vo=dr=>No(void 0,null,function*(){const Fo=yield(0,pe.uc)(ho==null?void 0:ho.id,{practice_time:dr})});(0,ke.useEffect)(()=>{vo(oi),Gi()},[]),(0,ke.useEffect)(()=>(window.addEventListener("click",Gr),()=>{window.removeEventListener("click",Gr)}),[ho==null?void 0:ho.save_identifier,Dt]),(0,ke.useEffect)(()=>{const dr=Xr.current.findIndex(Uo=>Uo.identifier===(ho==null?void 0:ho.save_identifier)),Fo=Xr.current[dr-1],Eo=Xr.current[dr+1],Or=document.getElementById("oj-prev"),qr=document.getElementById("oj-next");Fo?Or.style.display="block":Or.style.display="none",Eo?qr.style.display="block":qr.style.display="none"},[ho==null?void 0:ho.save_identifier,Xr.current]);const Co=(dr,Fo)=>{if(dr.id===Fo)return dr;for(let Eo=0,Or=dr;Or=Or.parentNode;Eo++){if(Or.id===Fo)return Or;if(Or==document.documentElement)return!1}},Gr=dr=>No(void 0,null,function*(){!Co(dr.target,"oj-drawer")&&Dt&&Vt(!1);const Fo=Xr.current.findIndex(qr=>qr.identifier===(ho==null?void 0:ho.save_identifier)),Eo=Xr.current[Fo-1],Or=Xr.current[Fo+1];if(dr.target.id==="oj-prev"){if(!Eo||Fo===-1){xe.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}dr.target.style.pointerEvents="none",dr.target.style.cursor="not-allowed",yield Oo(Eo==null?void 0:Eo.identifier),Pi("0"),setTimeout(()=>{dr.target.style.pointerEvents="auto",dr.target.style.cursor="pointer"},400)}if(dr.target.id==="oj-next"||dr.target.id==="oj-modal-next"){if(!Or||Fo===-1){xe.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}dr.target.style.pointerEvents="none",dr.target.style.cursor="not-allowed",yield Oo(Or==null?void 0:Or.identifier),Pi("0"),setTimeout(()=>{dr.target.style.pointerEvents="auto",dr.target.style.cursor="pointer"},400)}});(0,ke.useEffect)(()=>{Hi(ho==null?void 0:ho.save_identifier);const dr=Cr.findIndex(Fo=>Fo.some(Eo=>Eo.identifier===(ho==null?void 0:ho.save_identifier)));Ci(dr===-1?ds(Jo({},oi),{page:1}):ds(Jo({},oi),{page:dr+1}))},[ho==null?void 0:ho.save_identifier,Cr]);const Ko=dr=>{oi.page=1,oi.tag_discipline_id=dr,Ci(Jo({},oi)),vo(oi)},Gi=()=>No(void 0,null,function*(){const dr=yield(0,Kn.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});Po(dr.tag_disciplines||[])}),$o=dr=>{oi.page=1,oi.difficulty=typeof dr=="number"?dr:null,Ci(Jo({},oi)),vo(oi)},vo=dr=>No(void 0,null,function*(){var Fo,Eo;To(!0);const Or=yield(0,pe.KC)(dr);if(Or!=null&&Or.practices_list){for(var qr=(Fo=Or==null?void 0:Or.practices_list)==null?void 0:Fo.length,Uo=[],Vr=0;Vr<qr;Vr+=oi==null?void 0:oi.per_page)Uo.push((Eo=Or==null?void 0:Or.practices_list)==null?void 0:Eo.slice(Vr,Vr+(oi==null?void 0:oi.per_page)));Ci(ds(Jo({},oi),{total:Or==null?void 0:Or.practices_count})),Xr.current=(Or==null?void 0:Or.practices_list)||[],Go(Uo)}To(!1)}),Oo=(dr,Fo)=>No(void 0,null,function*(){const Eo=yield(0,Kn.ZP)(`/api/practices/${dr}/start`,{method:"get"});(Eo==null?void 0:Eo.status)===0&&Le.history.push(`/problems/${Eo==null?void 0:Eo.identifier}/oj/${dr}`)}),Vs=dr=>{oi.page=dr,Ci(Jo({},oi))};return ke.createElement("div",{className:Xo.wrap,id:"oj-drawer",style:{left:Dt?0:-700}},ke.createElement("div",{className:Xo.head},ke.createElement("div",{className:Xo.title},"\u9898\u76EE\u5217\u8868"),ke.createElement(ut.default.Search,{value:oi==null?void 0:oi.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:dr=>{oi.save_search=dr.target.value,Ci(Jo({},oi))},onSearch:()=>{oi.page=1,oi.search=oi.save_search,Ci(Jo({},oi)),vo(oi)}}),ke.createElement(we.default,{value:oi==null?void 0:oi.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:dr=>dr.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:Ko},qi.map(dr=>ke.createElement(we.default.Option,{key:dr.id,value:dr.id},dr.name))),ke.createElement(we.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:dr=>dr.parentNode,value:oi==null?void 0:oi.difficulty,onChange:$o},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:Xo.content},ke.createElement(ye.Z,{spinning:Ki},(si=Cr==null?void 0:Cr[oi.page-1])==null?void 0:si.map(dr=>ke.createElement("div",{key:dr.identifier,className:Xo.list,onClick:Fo=>Oo(dr.identifier,Fo)},ke.createElement("i",{style:{visibility:Jt===dr.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),ke.createElement("span",{style:{fontWeight:Jt===dr.identifier?"bold":400,color:Jt===dr.identifier?"#ffffff":"#bac4cd"},title:dr==null?void 0:dr.name},dr.name),(dr==null?void 0:dr.difficulty)===1&&ke.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(dr==null?void 0:dr.difficulty)===2&&ke.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(dr==null?void 0:dr.difficulty)===3&&ke.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),ke.createElement("div",{className:Xo.footer},ke.createElement(Ft.Z,{showTotal:dr=>ke.createElement("span",{style:{color:"#656F87"}},"\u5171",ke.createElement("span",{className:"c-light-primary"},dr),"\u6761\u6570\u636E"),total:oi.total,pageSize:oi==null?void 0:oi.per_page,current:oi==null?void 0:oi.page,showSizeChanger:!1,onChange:Vs,showQuickJumper:!0,hideOnSinglePage:!0})))},vc=({hack:Dt,onTriggerPraise:Vt,topicId:Jt,page:Hi,onPageChange:Pi,user:si,submitRecords:yi,submitting:oi,submitResult:Ci})=>{const[qi]=(0,Le.useSearchParams)(),Po=(0,Le.useLocation)(),[Cr,Go]=(0,ke.useState)(qi.get("tab")||"0"),[Ki,To]=(0,ke.useState)(0),[Xr,rs]=(0,ke.useState)(0),[ho,Vo]=(0,ke.useState)(0),[Co,Gr]=(0,ke.useState)(),[Ko,Gi]=(0,ke.useState)(!1);function $o(Oo){const Vs=Oo.target.id;if(Cr==="3"&&Vs!==Cr&&(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(Vs)}});return}Go(Vs)}(0,ke.useEffect)(()=>pt.Z.subscribe("to-commit-info",()=>{Go("1")}),[]);function vo(){Go("2")}return ke.createElement("div",{className:Ut["left-panel"]},ke.createElement("ul",{className:`${Ut["s-navs"]} ${Ut["bg-white"]} ${Ut.b1}`},ke.createElement("li",{className:"mr40 current"},ke.createElement("img",{onClick:()=>Gi(!0),src:un})),ke.createElement("li",{className:Ut["oj-mr"]},ke.createElement("a",{className:Cr==="0"?Ut.active:"",id:"0",onClick:$o},"\u4EFB\u52A1\u63CF\u8FF0")),ke.createElement("li",{className:Ut["oj-mr"]},ke.createElement("a",{className:Cr==="3"?Ut.active:"",id:"3",onClick:$o},"\u9898\u89E3",ho?`(${ho})`:"")),ke.createElement("li",{className:Ut["oj-mr"]},ke.createElement("a",{className:Cr==="2"?Ut.active:"",id:"2",onClick:$o},"\u8BC4\u8BBA",Ki?`(${Ki})`:"")),ke.createElement("li",null,ke.createElement("a",{className:Cr==="1"?Ut.active:"",id:"1",onClick:$o},"\u63D0\u4EA4\u8BB0\u5F55"))),ke.createElement("div",{className:`${Ut["tab-panel-body"]} ${Cr==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},ke.createElement(We,{hack:Dt,onTriggerPraise:Vt,toDiscuss:vo})),ke.createElement("div",{className:`${Ut["tab-panel-body"]} ${Cr==="1"?"":"hide"}`},yi!=null&&yi.records_count?ke.createElement(it,{page:Hi,onPageChange:Pi,topicId:Jt,submitting:oi,submitRecords:yi,submitResult:Ci}):ke.createElement(dt.Z,null)),ke.createElement("div",{className:`${Ut["tab-panel-body"]} ${Cr==="2"?"":"hide"}`,style:{padding:0}},ke.createElement(sn,{setDiscussTotal:To,user:si,identifier:Dt.identifier,hack:Dt,onTriggerPraise:Vt})),ke.createElement("div",{className:`${Ut["tab-panel-body"]} ${Cr==="3"?"":"hide"}`,style:{padding:0}},ke.createElement(Da,{setListStatus:rs,setFilterListTotal:Vo,tabStatus:Cr,identifier:Dt.identifier})),ke.createElement(Nr,{visible:Ko,setIndex:Go,onVisible:Oo=>Gi(Oo),value:Co,onChange:Oo=>Gr(Oo)}))},bo=Ie(96680),Gh=Ie(62522),Lu=Ie(3932),ih=Ie(64126),Wh=Ie(89392),Ph=Ie.n(Wh),Yl=Ie(56102),Yr=Ie(59301),Ho=Object.defineProperty,Pl=Object.defineProperties,Ch=Object.getOwnPropertyDescriptors,Cl=Object.getOwnPropertySymbols,Eh=Object.prototype.hasOwnProperty,Xl=Object.prototype.propertyIsEnumerable,mo=(Dt,Vt,Jt)=>Vt in Dt?Ho(Dt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Dt[Vt]=Jt,Dr=(Dt,Vt)=>{for(var Jt in Vt||(Vt={}))Eh.call(Vt,Jt)&&mo(Dt,Jt,Vt[Jt]);if(Cl)for(var Jt of Cl(Vt))Xl.call(Vt,Jt)&&mo(Dt,Jt,Vt[Jt]);return Dt},Do=(Dt,Vt)=>Pl(Dt,Ch(Vt)),ya=(Dt,Vt)=>{var Jt={};for(var Hi in Dt)Eh.call(Dt,Hi)&&Vt.indexOf(Hi)<0&&(Jt[Hi]=Dt[Hi]);if(Dt!=null&&Cl)for(var Hi of Cl(Dt))Vt.indexOf(Hi)<0&&Xl.call(Dt,Hi)&&(Jt[Hi]=Dt[Hi]);return Jt},ls=(Dt,Vt,Jt)=>new Promise((Hi,Pi)=>{var si=Ci=>{try{oi(Jt.next(Ci))}catch(qi){Pi(qi)}},yi=Ci=>{try{oi(Jt.throw(Ci))}catch(qi){Pi(qi)}},oi=Ci=>Ci.done?Hi(Ci.value):Promise.resolve(Ci.value).then(si,yi);oi((Jt=Jt.apply(Dt,Vt)).next())});const{Countdown:Wu}=Ce.default,cu={Java:"java",C:"c",Python:"py","C++":"c"};var Mu=(Dt=>(Dt[Dt.SET_LOADING=0]="SET_LOADING",Dt[Dt.GET_DATA=1]="GET_DATA",Dt[Dt.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",Dt[Dt.SET_DATA=3]="SET_DATA",Dt[Dt.SET_DEBUGING=4]="SET_DEBUGING",Dt[Dt.SET_SUBMITING=5]="SET_SUBMITING",Dt[Dt.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",Dt[Dt.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",Dt[Dt.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",Dt[Dt.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",Dt[Dt.SET_PAGE=10]="SET_PAGE",Dt[Dt.GET_LANGUAGE=11]="GET_LANGUAGE",Dt[Dt.GET_DRAWER=12]="GET_DRAWER",Dt))(Mu||{});function Ya(){return new Date().getTime()}const Jl={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(Dt,Vt){switch(Vt.type){case 1:return Dr(Dr({},Dt),Vt.payload);case 3:return Do(Dr({},Dt),{data:Vt.payload});case 0:return Do(Dr({},Dt),{loading:Vt.payload});case 11:return Do(Dr({},Dt),{languageList:Vt.payload});case 12:return Do(Dr({},Dt),{drawerData:Vt.payload});case 9:return Do(Dr({},Dt),{showNote:Vt.payload});case 4:return Do(Dr({},Dt),{debuging:Vt.payload});case 5:return Do(Dr({},Dt),{submitting:Vt.payload});case 2:return Do(Dr({},Dt),{submitRecords:Vt.payload});case 10:return Do(Dr({},Dt),{submitRecordPage:Vt.payload});case 6:return Do(Dr({},Dt),{executingMessage:Vt.payload});case 7:return Dr(Dr({},Dt),Vt.payload);case 8:return Dr(Dr({},Dt),Vt.payload);default:throw new Error}}var yp=({children:Dt})=>{var Vt,Jt,Hi,Pi;const[si,yi]=(0,ke.useReducer)(vp,Jl),{id:oi}=(0,Le.useParams)(),Ci=(0,Le.useLocation)(),[qi]=(0,Le.useSearchParams)(),{languageValue:Po,languageList:Cr,loading:Go,data:Ki,debugResult:To,submitResult:Xr,submitRecords:rs,submitRecordPage:ho,showNote:Vo,debuging:Co,submitting:Gr,executingMessage:Ko}=si,[Gi,$o]=(0,ke.useState)("#FFF"),[vo,Oo]=(0,ke.useState)(null),[Vs,dr]=(0,ke.useState)({}),[Fo,Eo]=(0,ke.useState)(!1),Or=(0,ke.useRef)(null),qr=(0,ke.useRef)(null),Uo=Ki==null?void 0:Ki.user,Vr=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"),aa=document.getElementById("oj-modal-next");((xo=Ds==null?void 0:Ds.style)==null?void 0:xo.display)==="none"?aa.style.display="none":aa.style.display="block"}},[Fo]),(0,ke.useEffect)(()=>{function xo(){return ls(this,null,function*(){var Ds,aa,Gs;const xs=yield(0,pe.fu)(oi);if(xs.status===401)document.location.href="/user/login";else{xs.hack=xs.practice,xs.hack.code=bt.Base64.decode((Ds=xs==null?void 0:xs.hack)==null?void 0:Ds.code);const Ql=`${Uo==null?void 0:Uo.login}-language`;localStorage.getItem(Ql)&&(xs.hack.language=localStorage.getItem(Ql)),qr.current=Ph().cloneDeep(xs),qr.current.language=(aa=xs==null?void 0:xs.hack)==null?void 0:aa.language,yi({type:1,payload:{loading:!1,data:xs}}),yi({type:8,payload:{languageValue:(Gs=xs==null?void 0:xs.hack)==null?void 0:Gs.language}})}})}oi&&xo()},[oi]),(0,ke.useEffect)(()=>{yi({type:8,payload:{debugResult:void 0}}),ol(),Eo(!1)},[oi]),(0,ke.useEffect)(()=>{clearTimeout(Or.current)},[oi]),(0,ke.useEffect)(()=>{Ks()},[oi,ho]);const Oa=()=>{window.parent.postMessage("backExercise","*")};function Ks(){return ls(this,null,function*(){try{const xo=yield(0,pe.zO)(oi,{limit:15,page:ho});yi({type:2,payload:xo})}catch(xo){console.log(xo)}})}function ol(){return ls(this,null,function*(){try{const xo=yield(0,pe.dd)(oi);yi({type:11,payload:xo==null?void 0:xo.data})}catch(xo){console.log(xo)}})}function ku(xo){yi({type:10,payload:xo})}function lo(xo){return ls(this,null,function*(){var Ds,aa,Gs;const xs=((Gs=(aa=(Ds=window==null?void 0:window.location)==null?void 0:Ds.pathname)==null?void 0:aa.split("/"))==null?void 0:Gs[2])||oi;return yield(0,pe.n4)(xs,xo||{code:bt.Base64.encode(Vr.code),language:Po})})}function Tu(){return ls(this,null,function*(){var xo;if(!Vr.code||((xo=Vr.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(!Gr){yi({type:5,payload:!0});try{if(pt.Z.publish("to-commit-info"),(yield lo()).status===0){let rh=function(){return ls(this,null,function*(){const{status:Lh,data:oh}=yield(0,pe.rX)(oi,"submit"),du=Ya()-El>(xs*Ql+3)*1e3;if(Lh!==0&&!du&&setTimeout(rh,1e3),du){be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),yi({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)(oi,{limit:15,page:ho});yi({type:8,payload:Do(Dr({},si),{submitResult:oh,submitting:!1,submitRecords:mf})}),(oh==null?void 0:oh.status)===0&&Eo(!0)}})},aa={};if((yield(0,pe.bM)(oi,aa)).status===-1&&qi.get("exercisesId")){window.parent.location.href=`/classrooms/${qi.get("coursesId")}/exercise/${qi.get("exercisesId")}/detail`;return}const{time_limit:xs,test_case_size:Ql}=Vr,El=Ya();rh()}}catch(Ds){yi({type:5,payload:!1})}}})}function So(){return ls(this,null,function*(){var xo;if(!Vr.code||((xo=Vr.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}si.debuging=!0,yi({type:4,payload:!0});try{if((yield lo()).status===0){let El=function(){return ls(this,null,function*(){const{status:rh,message:Lh,data:oh}=yield(0,pe.rX)(oi,"debug"),du=Ya()-Ql>(aa+3)*1e3;if(rh!==0&&!du&&(yi({type:6,payload:Lh}),setTimeout(El,1e3)),du){be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),yi({type:4,payload:!1});return}rh===0&&(yi({type:4,payload:!1}),oh.status===2&&be.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),yi({type:7,payload:Do(Dr({},si),{debugResult:oh,debuging:!1})}))})};const{time_limit:aa}=Vr;let Gs={input:encodeURIComponent(Ki.test_case.input)};if((yield(0,pe.MU)(oi,Gs)).status===-1&&qi.get("exercisesId")){window.parent.location.href=`/classrooms/${qi.get("coursesId")}/exercise/${qi.get("exercisesId")}/detail`;return}const Ql=Ya();El()}else yi({type:4,payload:!1})}catch(Ds){console.log(Ds)}finally{}})}function qo(xo){var Ds;clearTimeout(Or.current),Or.current=setTimeout(()=>{var aa;lo({code:bt.Base64.encode(xo),language:(aa=qr==null?void 0:qr.current)==null?void 0:aa.language})},2e3),yi({type:3,payload:Do(Dr({},qr==null?void 0:qr.current),{hack:Do(Dr({},(Ds=qr==null?void 0:qr.current)==null?void 0:Ds.hack),{code:xo})})})}function Rs(xo){let Ds=xo.target.value;yi({type:3,payload:Do(Dr({},Ki),{test_case:{input:Ds}})})}const Au=xo=>ls(void 0,null,function*(){var Ds;if(yi({type:0,payload:!0}),(yield lo()).status===0){yi({type:8,payload:{languageValue:xo}}),qr.current.language=xo;const Gs=`${Uo==null?void 0:Uo.login}-language`;localStorage.setItem(Gs,xo);const xs=yield(0,pe.dd)(oi);if(xs.status===0){const Ql=(Ds=xs==null?void 0:xs.data)==null?void 0:Ds.find(El=>El.language===xo);qo(bt.Base64.decode(Ql.code))}}setTimeout(()=>{yi({type:0,payload:!1})},300)});function Ia(){return ls(this,null,function*(){try{const xo=yield(0,pe.H7)(oi,{language:Po});xo.status===401?Le.history.replace("/login",{from:Ci.pathname}):(qo(bt.Base64.decode(xo.code)),ol())}catch(xo){console.log(xo)}})}function $c(){be.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Yr.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",Yr.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)(oi,{language:Po});xo.status===401?Le.history.replace("/login",{from:Ci.pathname}):qo(bt.Base64.decode(xo.code))})}})}function gl(){yi({type:9,payload:!0})}function ta(){yi({type:9,payload:!1})}function ql(xo){return ls(this,null,function*(){yield(0,pe.MK)(oi,xo),yi({type:1,payload:{showNote:!1,data:Do(Dr({},Ki),{hack:Do(Dr({},Vr),{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:((Hi=qr.current)==null?void 0:Hi.language)||(Vr==null?void 0:Vr.language),code:Vr==null?void 0:Vr.code,title:"main."+cu[Vr==null?void 0:Vr.language],modify_code:Vr==null?void 0:Vr.modify_code,notes:Vr==null?void 0:Vr.notes,debugResult:To,debuging:Co,submitting:Gr,executingMessage:Ko,id:oi,languageValue:Po,languageList:Cr,onChangeLanguage:Au,onCancelNote:ta,onAddNote:ql,showNote:Vo,onShowNote:gl,onSubmitCode:Tu,onChangeCode:qo,onChangeInput:Rs,onDebugCode:So,onResetCode:Ia,onSyncCode:$c,onUpdateCode:lo};function Sc(){return ls(this,null,function*(){const{praise_count:xo}=yield(0,pe.vl)(Vr.id,{container_type:"Hack",type:1});let Ds=Do(Dr({},Ki),{hack:Do(Dr({},Vr),{praises_count:xo,user_praise:!Vr.user_praise})});yi({type:3,payload:Ds})})}const Td={topicId:oi,submitResult:Xr,submitRecords:rs,submitting:Gr,page:ho,onPageChange:ku,hack:Vr,user:Ki==null?void 0:Ki.user,onTriggerPraise:Sc};return console.log(Ki,qr==null?void 0:qr.current,"data--------"),Yr.createElement(Yr.Fragment,null,Yr.createElement(ye.Z,{className:"oj-custom-large-spin",size:"large",spinning:Go},Ki?Yr.createElement("div",{className:"oj-custom-warp"},Yr.createElement("header",{className:ct.Z.header,style:{minWidth:1200}},Yr.createElement("div",null,Yr.createElement("img",{src:`${ge.Z.IMG_SERVER}/images/${Uo.image_url}`,alt:"user",width:30}),Yr.createElement("span",null,Uo.name)),Yr.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},Yr.createElement("div",null,Vr.name),Yr.createElement(bo.Z,{onChange:xo=>{},className:"font12 c-grey-999"})),Yr.createElement(Yl.CopyToClipboard,{text:`${(Pi=window.location)==null?void 0:Pi.origin}/problems/${Vr.identifier}/share`,onCopy:()=>xe.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},Yr.createElement("span",{className:ct.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",Yr.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),Vr.edit_privilege?Yr.createElement(Le.Link,{className:ct.Z.btn_back,to:`/problems/${Vr.identifier}/ojedit`,style:{marginRight:10}}," ",Yr.createElement(Se.Z,null)," \u7F16\u8F91"):null,Yr.createElement(Le.Link,{className:ct.Z.btn_back,onClick:()=>{},to:"/problems"}," ",Yr.createElement(Be.Z,null),"\u9000\u51FA")),Yr.createElement(de.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:Yr.createElement(vc,Dr({},Td)),rightChild:Yr.createElement(gf,Dr({},yc))})):null),Yr.createElement(be.default,{centered:!0,closable:!1,width:680,footer:null,open:Fo,className:"oj-modal"},Yr.createElement("section",{className:"oj-modal-content"},Yr.createElement("div",{className:"oj-modal-head"},Yr.createElement("img",{src:Gh,alt:""}),Yr.createElement("i",{onClick:()=>Eo(!1),className:"iconfont icon-guanbi1"})),Yr.createElement("aside",null,Yr.createElement("img",{className:"mr30",src:ih.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",Yr.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Xr==null?void 0:Xr.execute_time,"s"),"\u4F18\u4E8E",Yr.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Xr==null?void 0:Xr.time_better_than)||100,"%"),"\u7684\u7528\u6237"),Yr.createElement("aside",{className:"mb50"},Yr.createElement("img",{src:Lu.Z,className:"mr30"}),Yr.createElement("span",{className:"oj-modal-tt"},Yr.createElement("span",null,Yr.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),Yr.createElement("span",{className:"c-light-primary"},Xr==null?void 0:Xr.execute_memory,"mb")),Yr.createElement("span",null,Yr.createElement("span",null))),"\u4F18\u4E8E",Yr.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Xr==null?void 0:Xr.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),Yr.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Sp({languageValue:Dt,languageList:Vt,onChangeLanguage:Jt,title:Hi,modify_code:Pi,onSyncCode:si,onShowCodeSetting:yi,onResetCode:oi}){const Ci=(0,Le.useLocation)(),qi=()=>{be.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:Yr.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:oi})};return Yr.createElement("div",{className:"action-bar"},Yr.createElement(we.default,{className:"oj-select",value:Dt,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Jt},Vt==null?void 0:Vt.map(Po=>Yr.createElement(we.default.Option,{key:Po.language,value:Po.language},Po.language))),Yr.createElement("span",null),Yr.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:qi},Yr.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),Yr.createElement("a",{onClick:yi},Yr.createElement("i",{className:"iconfont icon-shezhi"})))}function gf(Dt){var Vt=Dt,{id:Jt,input:Hi,is_file:Pi,showNote:si,onShowNote:yi,notes:oi,onCancelNote:Ci,onAddNote:qi,debugResult:Po,language:Cr,debuging:Go,submitting:Ki,executingMessage:To,code:Xr,onSubmitCode:rs,onDebugCode:ho,onChangeCode:Vo,onChangeInput:Co,onUpdateCode:Gr}=Vt,Ko=ya(Vt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function Gi(vo){return Yr.createElement(Sp,Do(Dr({},Ko),{onShowCodeSetting:vo}))}const $o={id:Jt,input:Hi,debugResult:Po,debuging:Go,is_file:Pi,submitting:Ki,executingMessage:To,onDebugCode:ho,onChangeCode:Vo,onSubmitCode:rs,onChangeInput:Co};return Yr.createElement("div",{className:"right-panel"},Yr.createElement(kt,{onUpdateCode:()=>{},language:Cr,value:Xr,onChange:Vo,ActionBarRender:Gi}),Yr.createElement("div",{className:`note-form-area ${si?"active":""}`},Yr.createElement(xt,{onCancel:Ci,notes:oi,callback:qi})),Yr.createElement(Rt.ZP,Dr({},$o)))}},24363:function(Sn,ln,Ie){"use strict";Ie.d(ln,{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||{})},94881:function(Sn,ln,Ie){"use strict";Ie.d(ln,{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=Ie(38986);function Se(De){return(0,ke.U2)(`mypractices/${De}.json`,{hidePopLogin:!0})}function Be(De,Oe){return(0,ke.v_)(`mypractices/${De}/code_submit.json`,Oe)}function Le(De,Oe){return(0,ke.v_)(`mypractices/${De}/code_debug.json`,Oe)}function Ce(De,Oe){return Oe.language&&(Oe.language=encodeURIComponent(Oe.language)),(0,ke.U2)(`mypractices/${De}/submit_records.json`,Oe)}function xe(De){return(0,ke.U2)("mypractices/record_detail.json",{id:De})}function be(De,Oe){return(0,ke.U2)(`mypractices/${De}/result.json`,{mode:Oe})}function ye(De,Oe){return(0,ke.v_)(`mypractices/${De}/add_notes.json`,Oe)}function we(De,Oe){return(0,ke.v_)(`mypractices/${De}/restore_initial_code.json`,Oe)}function pe(De,Oe){return(0,ke.v_)(`mypractices/${De}/sync_code.json`,Oe)}function de(De,Oe){return(0,ke.v_)(`mypractices/${De}/update_code.json`,Oe)}function ge(De){return(0,ke.v_)(`mypractices/${De}/initial_codes.json`)}function fe(De,Oe){return(0,ke.v_)(`discusses/${De}/plus.json`,Oe)}function ue(De){return(0,ke.U2)("practices/practices_list.json",De)}function ee(De,Oe){return(0,ke.U2)(`practices/${De}/question_solution_articles`,Oe)}function z(De,Oe){return(0,ke.v_)(`practices/${De}/question_solution_articles`,Oe)}function oe(De,Oe){return(0,ke.gz)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}`,Oe)}function re(De,Oe){return(0,ke.U2)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}/edit`,Oe)}function ae(De,Oe){return(0,ke.U2)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}`,Oe)}function le(De,Oe){return(0,ke.v_)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}/set_authority_or_excellent`,Oe)}function me(De,Oe){return(0,ke.v_)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}/praise_or_treads`,Oe)}function ve(De,Oe){return(0,ke.v_)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}/hide`)}function Pe(De,Oe){return(0,ke.IV)(`practices/${De}/question_solution_articles/${Oe==null?void 0:Oe.active}`,Oe)}function Ae(De,Oe){return(0,ke.v_)(`mypractices/${De}/update_practice_time_sum`,Oe)}},75604:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return fe}});var ke=Ie(59301),Se=Ie(6767),Be=Ie(25399),Le=Ie(29787),Ce=Ie(77019),xe=Ie(5269),be=Ie(13747),ye=Ie(99571),we=Ie(39793),pe=Ie(38986),de=Ie(76902),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(De){le(De)}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")))))}},67776:function(Sn,ln,Ie){"use strict";Ie.d(ln,{o:function(){return we}});var ke=Ie(38986),Se=Ie(93125),Be=Ie.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)}},84989:function(Sn,ln,Ie){"use strict";Ie.d(ln,{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}},81428:function(Sn,ln,Ie){"use strict";Ie.d(ln,{AL:function(){return me},Iy:function(){return de},Qv:function(){return ue},ez:function(){return le},jb:function(){return ge}});var ke=Ie(32834),Se=Ie.n(ke),Be=Ie(11690),Le=Ie.n(Be);let Ce=1;function xe(Oe,Ze){const qe=Oe.match(/^(\s+)(?:```)/);if(qe===null)return Ze;const Xe=qe[1];return Ze.split(`
`).map(vt=>{const gt=vt.match(/^\s+/);if(gt===null)return vt;const[kt]=gt;return kt.length>=Xe.length?vt.slice(Xe.length):vt}).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(Oe,Ze,qe,Xe){if(Ze>=Oe.length||Oe[Ze].level<=qe)return Ze;var vt=Oe[Ze];Xe.push("<li><a href='#"+Ce+vt.anchor+"'>"+vt.text+"</a>"),Ze++;var gt=[];return Ze=fe(Oe,Ze,vt.level,gt),gt.length>0&&(Xe.push("<ul>"),gt.forEach(function(kt){Xe.push(kt)}),Xe.push("</ul>")),Xe.push("</li>"),Ze=fe(Oe,Ze,qe,Xe),Ze}function ue(){return fe(be,0,0,ye),ye.push("</ul>"),ye.join("")}const ee={heading(Oe){const Ze=pe.exec(Oe);if(Ce+=1,Ze)return{type:"heading",raw:Ze[0],depth:Ze[1].length,text:Ze[2]}},fences(Oe){const Ze=this.rules.block.fences.exec(Oe);if(Ze){const qe=Ze[0];let Xe=xe(qe,Ze[3]||"");const vt=Ze[2]?Ze[2].trim():Ze[2];if(["latex","katex","math"].indexOf(vt)>=0){const gt=re(),kt=Xe;Xe=gt,ae[gt]={type:"block",expression:kt}}return{type:"code",raw:qe,lang:vt,text:Xe}}}},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(Oe){return Oe=Oe.replace(z,(Ze,qe)=>{const Xe=re();return ae[Xe]={type:"inline",expression:qe},Xe}),Oe}const Pe=we.listitem;we.listitem=function(Oe){return Pe(ve(Oe))};const Ae=we.paragraph;we.paragraph=function(Oe){return Ae(ve(Oe))};const De=we.tablecell;we.tablecell=function(Oe,Ze){return De(ve(Oe),Ze)},we.code=function(Oe,Ze,qe){const Xe=(Ze||"").match(/\S*/)[0];return Xe?["latex","katex","math"].indexOf(Xe)>=0?`<p class='editormd-tex'>${Oe}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ze}">${qe?Oe:(0,Be.escape)(Oe,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(qe?Oe:(0,Be.escape)(Oe,!0))+"</code></pre>"},we.heading=function(Oe,Ze,qe){let Xe=this.options.headerPrefix+qe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return be.push({anchor:Xe,level:Ze,text:Oe}),"<h"+Ze+' id="'+Ce+Xe+'">'+Oe+"</h"+Ze+">"},Se().setOptions({silent:!0,gfm:!0,pedantic:!1}),Se().use({tokenizer:ee,renderer:we}),ln.ZP=Se()},23992:function(Sn,ln,Ie){"use strict";Ie.d(ln,{G:function(){return Ce},t:function(){return Le}});var ke=Ie(7062),Se=Ie.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}},30647:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return po}});class ke{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(Ue,Je){return Ue.__proto__=Je,Ue},Object.assign=Object.assign||function(Ue){if(Ue==null)throw new TypeError("Cannot convert undefined or null to object");let Je=Object(Ue);for(let nt=1;nt<arguments.length;nt++){let Pt=arguments[nt];if(Pt!=null)for(let Nt in Pt)Pt.hasOwnProperty(Nt)&&(Je[Nt]=Pt[Nt])}return Je},typeof self.Promise!="function"&&Ie(3867).polyfill()}}ke.install();var Se=ke,Be=Ie(86204),Le=Ie.n(Be);class Ce{static e(Ue,Je){(!Ue||Ce.FORCE_GLOBAL_TAG)&&(Ue=Ce.GLOBAL_TAG);let nt=`[${Ue}] > ${Je}`;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(Ue,Je){(!Ue||Ce.FORCE_GLOBAL_TAG)&&(Ue=Ce.GLOBAL_TAG);let nt=`[${Ue}] > ${Je}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","info",nt),Ce.ENABLE_INFO&&(console.info?console.info(nt):console.log(nt))}static w(Ue,Je){(!Ue||Ce.FORCE_GLOBAL_TAG)&&(Ue=Ce.GLOBAL_TAG);let nt=`[${Ue}] > ${Je}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","warn",nt),Ce.ENABLE_WARN&&(console.warn?console.warn(nt):console.log(nt))}static d(Ue,Je){(!Ue||Ce.FORCE_GLOBAL_TAG)&&(Ue=Ce.GLOBAL_TAG);let nt=`[${Ue}] > ${Je}`;Ce.ENABLE_CALLBACK&&Ce.emitter.emit("log","debug",nt),Ce.ENABLE_DEBUG&&(console.debug?console.debug(nt):console.log(nt))}static v(Ue,Je){(!Ue||Ce.FORCE_GLOBAL_TAG)&&(Ue=Ce.GLOBAL_TAG);let nt=`[${Ue}] > ${Je}`;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(Ue){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=Ue,this._totalBytes+=Ue):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=Ue,this._totalBytes+=Ue):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=Ue,this._totalBytes+=Ue,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let Ue=(this._now()-this._lastCheckpoint)/1e3;return Ue==0&&(Ue=1),this._intervalBytes/Ue/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let Ue=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/Ue/1024}}var ye=be;class we{constructor(Ue){this._message=Ue}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class pe extends we{constructor(Ue){super(Ue)}get name(){return"IllegalStateException"}}class de extends we{constructor(Ue){super(Ue)}get name(){return"InvalidArgumentException"}}class ge extends we{constructor(Ue){super(Ue)}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(Ue){this._type=Ue||"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(Ue){this._onContentLengthKnown=Ue}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(Ue){this._onURLRedirect=Ue}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ue){this._onDataArrival=Ue}get onError(){return this._onError}set onError(Ue){this._onError=Ue}get onComplete(){return this._onComplete}set onComplete(Ue){this._onComplete=Ue}open(Ue,Je){throw new ge("Unimplemented abstract function!")}abort(){throw new ge("Unimplemented abstract function!")}}let z={};function oe(){let $n=self.navigator.userAgent.toLowerCase(),Ue=/(edge)\/([\w.]+)/.exec($n)||/(opr)[\/]([\w.]+)/.exec($n)||/(chrome)[ \/]([\w.]+)/.exec($n)||/(iemobile)[\/]([\w.]+)/.exec($n)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec($n)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec($n)||/(webkit)[ \/]([\w.]+)/.exec($n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec($n)||/(msie) ([\w.]+)/.exec($n)||$n.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec($n)||$n.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec($n)||[],Je=/(ipad)/.exec($n)||/(ipod)/.exec($n)||/(windows phone)/.exec($n)||/(iphone)/.exec($n)||/(kindle)/.exec($n)||/(android)/.exec($n)||/(windows)/.exec($n)||/(mac)/.exec($n)||/(linux)/.exec($n)||/(cros)/.exec($n)||[],nt={browser:Ue[5]||Ue[3]||Ue[1]||"",version:Ue[2]||Ue[4]||"0",majorVersion:Ue[4]||Ue[2]||"0",platform:Je[0]||""},Pt={};if(nt.browser){Pt[nt.browser]=!0;let Nt=nt.majorVersion.split(".");Pt.version={major:parseInt(nt.majorVersion,10),string:nt.version},Nt.length>1&&(Pt.version.minor=parseInt(Nt[1],10)),Nt.length>2&&(Pt.version.build=parseInt(Nt[2],10))}if(nt.platform&&(Pt[nt.platform]=!0),(Pt.chrome||Pt.opr||Pt.safari)&&(Pt.webkit=!0),Pt.rv||Pt.iemobile){Pt.rv&&delete Pt.rv;let Nt="msie";nt.browser=Nt,Pt[Nt]=!0}if(Pt.edge){delete Pt.edge;let Nt="msedge";nt.browser=Nt,Pt[Nt]=!0}if(Pt.opr){let Nt="opera";nt.browser=Nt,Pt[Nt]=!0}if(Pt.safari&&Pt.android){let Nt="android";nt.browser=Nt,Pt[Nt]=!0}Pt.name=nt.browser,Pt.platform=nt.platform;for(let Nt in z)z.hasOwnProperty(Nt)&&delete z[Nt];Object.assign(z,Pt)}oe();var re=z;class ae extends ee{static isSupported(){try{let Ue=re.msedge&&re.version.minor>=15048,Je=re.msedge?Ue:!0;return self.fetch&&self.ReadableStream&&Je}catch(Ue){return!1}}constructor(Ue,Je){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=Ue,this._config=Je,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(Ue,Je){this._dataSource=Ue,this._range=Je;let nt=Ue.url;this._config.reuseRedirectedURL&&Ue.redirectedURL!=null&&(nt=Ue.redirectedURL);let Pt=this._seekHandler.getConfig(nt,Je),Nt=new self.Headers;if(typeof Pt.headers=="object"){let Kt=Pt.headers;for(let _n in Kt)Kt.hasOwnProperty(_n)&&Nt.append(_n,Kt[_n])}let sn={method:"GET",headers:Nt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let Kt in this._config.headers)Nt.append(Kt,this._config.headers[Kt]);Ue.cors===!1&&(sn.mode="same-origin"),Ue.withCredentials&&(sn.credentials="include"),Ue.referrerPolicy&&(sn.referrerPolicy=Ue.referrerPolicy),this._status=fe.kConnecting,self.fetch(Pt.url,sn).then(Kt=>{if(this._requestAbort){this._requestAbort=!1,this._status=fe.kIdle;return}if(Kt.ok&&Kt.status>=200&&Kt.status<=299){if(Kt.url!==Pt.url&&this._onURLRedirect){let zn=this._seekHandler.removeURLParameters(Kt.url);this._onURLRedirect(zn)}let _n=Kt.headers.get("Content-Length");return _n!=null&&(this._contentLength=parseInt(_n),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,Kt.body.getReader())}else if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Kt.status,msg:Kt.statusText});else throw new we("FetchStreamLoader: Http code invalid, "+Kt.status+" "+Kt.statusText)}).catch(Kt=>{if(this._status=fe.kError,this._onError)this._onError(ue.EXCEPTION,{code:-1,msg:Kt.message});else throw Kt})}abort(){this._requestAbort=!0}_pump(Ue){return Ue.read().then(Je=>{if(Je.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=fe.kError;let nt=ue.EARLY_EOF,Pt={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(nt,Pt);else throw new we(Pt.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,Ue.cancel();this._status=fe.kBuffering;let nt=Je.value.buffer,Pt=this._range.from+this._receivedLength;this._receivedLength+=nt.byteLength,this._onDataArrival&&this._onDataArrival(nt,Pt,this._receivedLength),this._pump(Ue)}}).catch(Je=>{if(Je.code===11&&re.msedge)return;this._status=fe.kError;let nt=0,Pt=null;if((Je.code===19||Je.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(nt=ue.EARLY_EOF,Pt={code:Je.code,msg:"Fetch stream meet Early-EOF"}):(nt=ue.EXCEPTION,Pt={code:Je.code,msg:Je.message}),this._onError)this._onError(nt,Pt);else throw new we(Pt.msg)})}}var le=ae;class me extends ee{static isSupported(){try{let Ue=new XMLHttpRequest;return Ue.open("GET","https://example.com",!0),Ue.responseType="moz-chunked-arraybuffer",Ue.responseType==="moz-chunked-arraybuffer"}catch(Ue){return xe.w("MozChunkedLoader",Ue.message),!1}}constructor(Ue,Je){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=Ue,this._config=Je,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(Ue,Je){this._dataSource=Ue,this._range=Je;let nt=Ue.url;this._config.reuseRedirectedURL&&Ue.redirectedURL!=null&&(nt=Ue.redirectedURL);let Pt=this._seekHandler.getConfig(nt,Je);this._requestURL=Pt.url;let Nt=this._xhr=new XMLHttpRequest;if(Nt.open("GET",Pt.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),Ue.withCredentials&&(Nt.withCredentials=!0),typeof Pt.headers=="object"){let sn=Pt.headers;for(let Kt in sn)sn.hasOwnProperty(Kt)&&Nt.setRequestHeader(Kt,sn[Kt])}if(typeof this._config.headers=="object"){let sn=this._config.headers;for(let Kt in sn)sn.hasOwnProperty(Kt)&&Nt.setRequestHeader(Kt,sn[Kt])}this._status=fe.kConnecting,Nt.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=fe.kComplete}_onReadyStateChange(Ue){let Je=Ue.target;if(Je.readyState===2){if(Je.responseURL!=null&&Je.responseURL!==this._requestURL&&this._onURLRedirect){let nt=this._seekHandler.removeURLParameters(Je.responseURL);this._onURLRedirect(nt)}if(Je.status!==0&&(Je.status<200||Je.status>299))if(this._status=fe.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:Je.status,msg:Je.statusText});else throw new we("MozChunkedLoader: Http code invalid, "+Je.status+" "+Je.statusText);else this._status=fe.kBuffering}}_onProgress(Ue){if(this._status===fe.kError)return;this._contentLength===null&&Ue.total!==null&&Ue.total!==0&&(this._contentLength=Ue.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let Je=Ue.target.response,nt=this._range.from+this._receivedLength;this._receivedLength+=Je.byteLength,this._onDataArrival&&this._onDataArrival(Je,nt,this._receivedLength)}_onLoadEnd(Ue){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(Ue){this._status=fe.kError;let Je=0,nt=null;if(this._contentLength&&Ue.loaded<this._contentLength?(Je=ue.EARLY_EOF,nt={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(Je=ue.EXCEPTION,nt={code:-1,msg:Ue.constructor.name+" "+Ue.type}),this._onError)this._onError(Je,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 Ue=new XMLHttpRequest;return Ue.open("GET","https://example.com",!0),Ue.responseType="ms-stream",Ue.responseType==="ms-stream"}catch(Ue){return Log.w("MSStreamLoader",Ue.message),!1}}constructor(Ue,Je){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=Ue,this._config=Je,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(Ue,Je){this._internalOpen(Ue,Je,!1)}_internalOpen(Ue,Je,nt){this._dataSource=Ue,nt?this._currentRange=Je:this._totalRange=Je;let Pt=Ue.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Pt=this._currentRedirectedURL:Ue.redirectedURL!=null&&(Pt=Ue.redirectedURL));let Nt=this._seekHandler.getConfig(Pt,Je);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 Kt=this._xhr=new XMLHttpRequest;if(Kt.open("GET",Nt.url,!0),Kt.responseType="ms-stream",Kt.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Kt.onerror=this._xhrOnError.bind(this),Ue.withCredentials&&(Kt.withCredentials=!0),typeof Nt.headers=="object"){let _n=Nt.headers;for(let zn in _n)_n.hasOwnProperty(zn)&&Kt.setRequestHeader(zn,_n[zn])}if(typeof this._config.headers=="object"){let _n=this._config.headers;for(let zn in _n)_n.hasOwnProperty(zn)&&Kt.setRequestHeader(zn,_n[zn])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,Kt.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(Ue){let Je=Ue.target;if(Je.readyState===2)if(Je.status>=200&&Je.status<=299){if(this._status=LoaderStatus.kBuffering,Je.responseURL!=null){let Pt=this._seekHandler.removeURLParameters(Je.responseURL);Je.responseURL!==this._currentRequestURL&&Pt!==this._currentRedirectedURL&&(this._currentRedirectedURL=Pt,this._onURLRedirect&&this._onURLRedirect(Pt))}let nt=Je.getResponseHeader("Content-Length");if(nt!=null&&this._contentLength==null){let Pt=parseInt(nt);Pt>0&&(this._contentLength=Pt,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:Je.status,msg:Je.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+Je.status+" "+Je.statusText);else if(Je.readyState===3&&Je.status>=200&&Je.status<=299){this._status=LoaderStatus.kBuffering;let nt=Je.response;this._reader.readAsArrayBuffer(nt)}}_xhrOnError(Ue){this._status=LoaderStatus.kError;let Je=LoaderErrors.EXCEPTION,nt={code:-1,msg:Ue.constructor.name+" "+Ue.type};if(this._onError)this._onError(Je,nt);else throw new RuntimeException(nt.msg)}_msrOnProgress(Ue){let nt=Ue.target.result;if(nt==null){this._doReconnectIfNeeded();return}let Pt=nt.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=nt.byteLength;let Nt=this._totalRange.from+this._receivedLength;this._receivedLength+=Pt.byteLength,this._onDataArrival&&this._onDataArrival(Pt,Nt,this._receivedLength),nt.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${Nt+Pt.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let Ue={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,Ue,!0)}}_msrOnLoad(Ue){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(Ue){this._status=LoaderStatus.kError;let Je=0,nt=null;if(this._contentLength&&this._receivedLength<this._contentLength?(Je=LoaderErrors.EARLY_EOF,nt={code:-1,msg:"MSStream meet Early-Eof"}):(Je=LoaderErrors.EARLY_EOF,nt={code:-1,msg:Ue.constructor.name+" "+Ue.type}),this._onError)this._onError(Je,nt);else throw new RuntimeException(nt.msg)}}var Ae=null;class De extends ee{static isSupported(){try{let Ue=new XMLHttpRequest;return Ue.open("GET","https://example.com",!0),Ue.responseType="arraybuffer",Ue.responseType==="arraybuffer"}catch(Ue){return xe.w("RangeLoader",Ue.message),!1}}constructor(Ue,Je){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=Ue,this._config=Je,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(Ue,Je){this._dataSource=Ue,this._range=Je,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 Ue=this._currentChunkSizeKB*1024,Je=this._range.from+this._receivedLength,nt=Je+Ue;this._contentLength!=null&&nt-this._range.from>=this._contentLength&&(nt=this._range.from+this._contentLength-1),this._currentRequestRange={from:Je,to:nt},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(Ue,Je){this._lastTimeLoaded=0;let nt=Ue.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?nt=this._currentRedirectedURL:Ue.redirectedURL!=null&&(nt=Ue.redirectedURL));let Pt=this._seekHandler.getConfig(nt,Je);this._currentRequestURL=Pt.url;let Nt=this._xhr=new XMLHttpRequest;if(Nt.open("GET",Pt.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),Ue.withCredentials&&(Nt.withCredentials=!0),typeof Pt.headers=="object"){let sn=Pt.headers;for(let Kt in sn)sn.hasOwnProperty(Kt)&&Nt.setRequestHeader(Kt,sn[Kt])}if(typeof this._config.headers=="object"){let sn=this._config.headers;for(let Kt in sn)sn.hasOwnProperty(Kt)&&Nt.setRequestHeader(Kt,sn[Kt])}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(Ue){let Je=Ue.target;if(Je.readyState===2){if(Je.responseURL!=null){let nt=this._seekHandler.removeURLParameters(Je.responseURL);Je.responseURL!==this._currentRequestURL&&nt!==this._currentRedirectedURL&&(this._currentRedirectedURL=nt,this._onURLRedirect&&this._onURLRedirect(nt))}if(Je.status>=200&&Je.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:Je.status,msg:Je.statusText});else throw new we("RangeLoader: Http code invalid, "+Je.status+" "+Je.statusText)}}_onProgress(Ue){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 Pt=Ue.total;this._internalAbort(),Pt!=null&Pt!==0&&(this._totalLength=Pt)}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 Je=Ue.loaded-this._lastTimeLoaded;this._lastTimeLoaded=Ue.loaded,this._speedSampler.addBytes(Je)}_normalizeSpeed(Ue){let Je=this._chunkSizeKBList,nt=Je.length-1,Pt=0,Nt=0,sn=nt;if(Ue<Je[0])return Je[0];for(;Nt<=sn;){if(Pt=Nt+Math.floor((sn-Nt)/2),Pt===nt||Ue>=Je[Pt]&&Ue<Je[Pt+1])return Je[Pt];Je[Pt]<Ue?Nt=Pt+1:sn=Pt-1}}_onLoad(Ue){if(this._status===fe.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let Je=this._speedSampler.lastSecondKBps;if(Je===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(Je=this._speedSampler.currentKBps)),Je!==0){let sn=this._normalizeSpeed(Je);this._currentSpeedNormalized!==sn&&(this._currentSpeedNormalized=sn,this._currentChunkSizeKB=sn)}let nt=Ue.target.response,Pt=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,Pt,this._receivedLength),Nt&&(this._status=fe.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(Ue){this._status=fe.kError;let Je=0,nt=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(Je=ue.EARLY_EOF,nt={code:-1,msg:"RangeLoader meet Early-Eof"}):(Je=ue.EXCEPTION,nt={code:-1,msg:Ue.constructor.name+" "+Ue.type}),this._onError)this._onError(Je,nt);else throw new we(nt.msg)}}var Oe=De;class Ze extends ee{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(Ue){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(Ue){try{let Je=this._ws=new self.WebSocket(Ue.url);Je.binaryType="arraybuffer",Je.onopen=this._onWebSocketOpen.bind(this),Je.onclose=this._onWebSocketClose.bind(this),Je.onmessage=this._onWebSocketMessage.bind(this),Je.onerror=this._onWebSocketError.bind(this),this._status=fe.kConnecting}catch(Je){this._status=fe.kError;let nt={code:Je.code,msg:Je.message};if(this._onError)this._onError(ue.EXCEPTION,nt);else throw new we(nt.msg)}}abort(){let Ue=this._ws;Ue&&(Ue.readyState===0||Ue.readyState===1)&&(this._requestAbort=!0,Ue.close()),this._ws=null,this._status=fe.kComplete}_onWebSocketOpen(Ue){this._status=fe.kBuffering}_onWebSocketClose(Ue){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=fe.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(Ue){if(Ue.data instanceof ArrayBuffer)this._dispatchArrayBuffer(Ue.data);else if(Ue.data instanceof Blob){let Je=new FileReader;Je.onload=()=>{this._dispatchArrayBuffer(Je.result)},Je.readAsArrayBuffer(Ue.data)}else{this._status=fe.kError;let Je={code:-1,msg:"Unsupported WebSocket message type: "+Ue.data.constructor.name};if(this._onError)this._onError(ue.EXCEPTION,Je);else throw new we(Je.msg)}}_dispatchArrayBuffer(Ue){let Je=Ue,nt=this._receivedLength;this._receivedLength+=Je.byteLength,this._onDataArrival&&this._onDataArrival(Je,nt,this._receivedLength)}_onWebSocketError(Ue){this._status=fe.kError;let Je={code:Ue.code,msg:Ue.message};if(this._onError)this._onError(ue.EXCEPTION,Je);else throw new we(Je.msg)}}var qe=Ze;class Xe{constructor(Ue){this._zeroStart=Ue||!1}getConfig(Ue,Je){let nt={};if(Je.from!==0||Je.to!==-1){let Pt;Je.to!==-1?Pt=`bytes=${Je.from.toString()}-${Je.to.toString()}`:Pt=`bytes=${Je.from.toString()}-`,nt.Range=Pt}else this._zeroStart&&(nt.Range="bytes=0-");return{url:Ue,headers:nt}}removeURLParameters(Ue){return Ue}}var vt=Xe;class gt{constructor(Ue,Je){this._startName=Ue,this._endName=Je}getConfig(Ue,Je){let nt=Ue;if(Je.from!==0||Je.to!==-1){let Pt=!0;nt.indexOf("?")===-1&&(nt+="?",Pt=!1),Pt&&(nt+="&"),nt+=`${this._startName}=${Je.from.toString()}`,Je.to!==-1&&(nt+=`&${this._endName}=${Je.to.toString()}`)}return{url:nt,headers:{}}}removeURLParameters(Ue){let Je=Ue.split("?")[0],nt,Pt=Ue.indexOf("?");Pt!==-1&&(nt=Ue.substring(Pt+1));let Nt="";if(nt!=null&&nt.length>0){let sn=nt.split("&");for(let Kt=0;Kt<sn.length;Kt++){let _n=sn[Kt].split("="),zn=Kt>0;_n[0]!==this._startName&&_n[0]!==this._endName&&(zn&&(Nt+="&"),Nt+=sn[Kt])}}return Nt.length===0?Je:Je+"?"+Nt}}var kt=gt;class at{constructor(Ue,Je,nt){this.TAG="IOController",this._config=Je,this._extraData=nt,this._stashInitialSize=1024*384,Je.stashInitialSize!=null&&Je.stashInitialSize>0&&(this._stashInitialSize=Je.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,Je.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=Ue,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(Ue.url),this._refTotalLength=Ue.filesize?Ue.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(Ue){this._extraData=Ue}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ue){this._onDataArrival=Ue}get onSeeked(){return this._onSeeked}set onSeeked(Ue){this._onSeeked=Ue}get onError(){return this._onError}set onError(Ue){this._onError=Ue}get onComplete(){return this._onComplete}set onComplete(Ue){this._onComplete=Ue}get onRedirect(){return this._onRedirect}set onRedirect(Ue){this._onRedirect=Ue}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(Ue){this._onRecoveredEarlyEof=Ue}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===Oe?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let Ue=this._config;if(Ue.seekType==="range")this._seekHandler=new vt(this._config.rangeLoadZeroStart);else if(Ue.seekType==="param"){let Je=Ue.seekParamStart||"bstart",nt=Ue.seekParamEnd||"bend";this._seekHandler=new kt(Je,nt)}else if(Ue.seekType==="custom"){if(typeof Ue.customSeekHandler!="function")throw new de("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new Ue.customSeekHandler}else throw new de(`Invalid seekType in config: ${Ue.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(Oe.isSupported())this._loaderClass=Oe;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(Ue){this._currentRange={from:0,to:-1},Ue&&(this._currentRange.from=Ue),this._speedSampler.reset(),Ue||(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 Ue=this._resumeFrom;this._resumeFrom=0,this._internalSeek(Ue,!0)}}seek(Ue){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(Ue,!0)}_internalSeek(Ue,Je){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Je),this._loader.destroy(),this._loader=null;let nt={from:Ue,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(Ue){if(!Ue||typeof Ue!="string"||Ue.length===0)throw new de("Url must be a non-empty string!");this._dataSource.url=Ue}_expandBuffer(Ue){let Je=this._stashSize;for(;Je+1024*1024*1<Ue;)Je*=2;if(Je+=1024*1024*1,Je===this._bufferSize)return;let nt=new ArrayBuffer(Je);if(this._stashUsed>0){let Pt=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(nt,0,Je).set(Pt,0)}this._stashBuffer=nt,this._bufferSize=Je}_normalizeSpeed(Ue){let Je=this._speedNormalizeList,nt=Je.length-1,Pt=0,Nt=0,sn=nt;if(Ue<Je[0])return Je[0];for(;Nt<=sn;){if(Pt=Nt+Math.floor((sn-Nt)/2),Pt===nt||Ue>=Je[Pt]&&Ue<Je[Pt+1])return Je[Pt];Je[Pt]<Ue?Nt=Pt+1:sn=Pt-1}}_adjustStashSize(Ue){let Je=0;this._config.isLive||Ue<512?Je=Ue:Ue>=512&&Ue<=1024?Je=Math.floor(Ue*1.5):Je=Ue*2,Je>8192&&(Je=8192);let nt=Je*1024+1024*1024*1;this._bufferSize<nt&&this._expandBuffer(nt),this._stashSize=Je*1024}_dispatchChunks(Ue,Je){return this._currentRange.to=Je+Ue.byteLength-1,this._onDataArrival(Ue,Je)}_onURLRedirect(Ue){this._redirectedURL=Ue,this._onRedirect&&this._onRedirect(Ue)}_onContentLengthKnown(Ue){Ue&&this._fullRequestFlag&&(this._totalLength=Ue,this._fullRequestFlag=!1)}_onLoaderChunkArrival(Ue,Je,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(Ue.byteLength);let Pt=this._speedSampler.lastSecondKBps;if(Pt!==0){let Nt=this._normalizeSpeed(Pt);this._speedNormalized!==Nt&&(this._speedNormalized=Nt,this._adjustStashSize(Nt))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Je),this._stashUsed+Ue.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(Ue),this._stashUsed),this._stashUsed+=Ue.byteLength;else{let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let sn=this._stashBuffer.slice(0,this._stashUsed),Kt=this._dispatchChunks(sn,this._stashByteStart);if(Kt<sn.byteLength){if(Kt>0){let _n=new Uint8Array(sn,Kt);Nt.set(_n,0),this._stashUsed=_n.byteLength,this._stashByteStart+=Kt}}else this._stashUsed=0,this._stashByteStart+=Kt;this._stashUsed+Ue.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+Ue.byteLength),Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Nt.set(new Uint8Array(Ue),this._stashUsed),this._stashUsed+=Ue.byteLength}else{let sn=this._dispatchChunks(Ue,Je);if(sn<Ue.byteLength){let Kt=Ue.byteLength-sn;Kt>this._bufferSize&&(this._expandBuffer(Kt),Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Nt.set(new Uint8Array(Ue,sn),0),this._stashUsed+=Kt,this._stashByteStart=Je+sn}}}else if(this._stashUsed===0){let Nt=this._dispatchChunks(Ue,Je);if(Nt<Ue.byteLength){let sn=Ue.byteLength-Nt;sn>this._bufferSize&&this._expandBuffer(sn),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(Ue,Nt),0),this._stashUsed+=sn,this._stashByteStart=Je+Nt}}else{this._stashUsed+Ue.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+Ue.byteLength);let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Nt.set(new Uint8Array(Ue),this._stashUsed),this._stashUsed+=Ue.byteLength;let sn=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(sn<this._stashUsed&&sn>0){let Kt=new Uint8Array(this._stashBuffer,sn);Nt.set(Kt,0)}this._stashUsed-=sn,this._stashByteStart+=sn}}_flushStashBuffer(Ue){if(this._stashUsed>0){let Je=this._stashBuffer.slice(0,this._stashUsed),nt=this._dispatchChunks(Je,this._stashByteStart),Pt=Je.byteLength-nt;if(nt<Je.byteLength)if(Ue)xe.w(this.TAG,`${Pt} bytes unconsumed data remain when flush buffer, dropped`);else{if(nt>0){let Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize),sn=new Uint8Array(Je,nt);Nt.set(sn,0),this._stashUsed=sn.byteLength,this._stashByteStart+=nt}return 0}return this._stashUsed=0,this._stashByteStart=0,Pt}return 0}_onLoaderComplete(Ue,Je){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(Ue,Je){switch(xe.e(this.TAG,`Loader error, code = ${Je.code}, msg = ${Je.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,Ue=ue.UNRECOVERABLE_EARLY_EOF),Ue){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}Ue=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(Ue,Je);else throw new we("IOException: "+Je.msg)}}var bt=at;const ct={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 Rt(){return Object.assign({},ct)}class ut{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let Ue=new bt({},Rt()),Je=Ue.loaderType;return Ue.destroy(),Je=="fetch-stream-loader"||Je=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let Ue=new bt({},Rt()),Je=Ue.loaderType;return Ue.destroy(),Je}static supportNativeMediaPlayback(Ue){ut.videoElement==null&&(ut.videoElement=window.document.createElement("video"));let Je=ut.videoElement.canPlayType(Ue);return Je==="probably"||Je=="maybe"}static getFeatureList(){let Ue={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return Ue.mseFlvPlayback=ut.supportMSEH264Playback(),Ue.networkStreamIO=ut.supportNetworkStreamIO(),Ue.networkLoaderName=ut.getNetworkLoaderTypeName(),Ue.mseLiveFlvPlayback=Ue.mseFlvPlayback&&Ue.networkStreamIO,Ue.nativeMP4H264Playback=ut.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),Ue.nativeWebmVP8Playback=ut.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),Ue.nativeWebmVP9Playback=ut.supportNativeMediaPlayback('video/webm; codecs="vp9"'),Ue}}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 _t{static get forceGlobalTag(){return xe.FORCE_GLOBAL_TAG}static set forceGlobalTag(Ue){xe.FORCE_GLOBAL_TAG=Ue,_t._notifyChange()}static get globalTag(){return xe.GLOBAL_TAG}static set globalTag(Ue){xe.GLOBAL_TAG=Ue,_t._notifyChange()}static get enableAll(){return xe.ENABLE_VERBOSE&&xe.ENABLE_DEBUG&&xe.ENABLE_INFO&&xe.ENABLE_WARN&&xe.ENABLE_ERROR}static set enableAll(Ue){xe.ENABLE_VERBOSE=Ue,xe.ENABLE_DEBUG=Ue,xe.ENABLE_INFO=Ue,xe.ENABLE_WARN=Ue,xe.ENABLE_ERROR=Ue,_t._notifyChange()}static get enableDebug(){return xe.ENABLE_DEBUG}static set enableDebug(Ue){xe.ENABLE_DEBUG=Ue,_t._notifyChange()}static get enableVerbose(){return xe.ENABLE_VERBOSE}static set enableVerbose(Ue){xe.ENABLE_VERBOSE=Ue,_t._notifyChange()}static get enableInfo(){return xe.ENABLE_INFO}static set enableInfo(Ue){xe.ENABLE_INFO=Ue,_t._notifyChange()}static get enableWarn(){return xe.ENABLE_WARN}static set enableWarn(Ue){xe.ENABLE_WARN=Ue,_t._notifyChange()}static get enableError(){return xe.ENABLE_ERROR}static set enableError(Ue){xe.ENABLE_ERROR=Ue,_t._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(Ue){xe.GLOBAL_TAG=Ue.globalTag,xe.FORCE_GLOBAL_TAG=Ue.forceGlobalTag,xe.ENABLE_VERBOSE=Ue.enableVerbose,xe.ENABLE_DEBUG=Ue.enableDebug,xe.ENABLE_INFO=Ue.enableInfo,xe.ENABLE_WARN=Ue.enableWarn,xe.ENABLE_ERROR=Ue.enableError,xe.ENABLE_CALLBACK=Ue.enableCallback}static _notifyChange(){let Ue=_t.emitter;if(Ue.listenerCount("change")>0){let Je=_t.getConfig();Ue.emit("change",Je)}}static registerListener(Ue){_t.emitter.addListener("change",Ue)}static removeListener(Ue){_t.emitter.removeListener("change",Ue)}static addLogListener(Ue){xe.emitter.addListener("log",Ue),xe.emitter.listenerCount("log")>0&&(xe.ENABLE_CALLBACK=!0,_t._notifyChange())}static removeLogListener(Ue){xe.emitter.removeListener("log",Ue),xe.emitter.listenerCount("log")===0&&(xe.ENABLE_CALLBACK=!1,_t._notifyChange())}}_t.emitter=new(Le());var xt=_t;class Ut{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 Ue=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,Je=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&&Ue&&Je}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(Ue){if(this.keyframesIndex==null)return null;let Je=this.keyframesIndex,nt=this._search(Je.times,Ue);return{index:nt,milliseconds:Je.times[nt],fileposition:Je.filepositions[nt]}}_search(Ue,Je){let nt=0,Pt=Ue.length-1,Nt=0,sn=0,Kt=Pt;for(Je<Ue[0]&&(nt=0,sn=Kt+1);sn<=Kt;)if(Nt=sn+Math.floor((Kt-sn)/2),Nt===Pt||Je>=Ue[Nt]&&Je<Ue[Nt+1]){nt=Nt;break}else Ue[Nt]<Je?sn=Nt+1:Kt=Nt-1;return nt}}var Ht=Ut;function dn($n,Ue,Je){let nt=$n;if(Ue+Je<nt.length){for(;Je--;)if((nt[++Ue]&192)!==128)return!1;return!0}else return!1}function Ft($n){let Ue=[],Je=$n,nt=0,Pt=$n.length;for(;nt<Pt;){if(Je[nt]<128){Ue.push(String.fromCharCode(Je[nt])),++nt;continue}else if(!(Je[nt]<192)){if(Je[nt]<224){if(dn(Je,nt,1)){let Nt=(Je[nt]&31)<<6|Je[nt+1]&63;if(Nt>=128){Ue.push(String.fromCharCode(Nt&65535)),nt+=2;continue}}}else if(Je[nt]<240){if(dn(Je,nt,2)){let Nt=(Je[nt]&15)<<12|(Je[nt+1]&63)<<6|Je[nt+2]&63;if(Nt>=2048&&(Nt&63488)!==55296){Ue.push(String.fromCharCode(Nt&65535)),nt+=3;continue}}}else if(Je[nt]<248&&dn(Je,nt,3)){let Nt=(Je[nt]&7)<<18|(Je[nt+1]&63)<<12|(Je[nt+2]&63)<<6|Je[nt+3]&63;if(Nt>65536&&Nt<1114112){Nt-=65536,Ue.push(String.fromCharCode(Nt>>>10|55296)),Ue.push(String.fromCharCode(Nt&1023|56320)),nt+=4;continue}}}Ue.push("\uFFFD"),++nt}return Ue.join("")}var fn=Ft;let It=function(){let $n=new ArrayBuffer(2);return new DataView($n).setInt16(0,256,!0),new Int16Array($n)[0]===256}();class Xt{static parseScriptData(Ue,Je,nt){let Pt={};try{let Nt=Xt.parseValue(Ue,Je,nt),sn=Xt.parseValue(Ue,Je+Nt.size,nt-Nt.size);Pt[Nt.data]=sn.data}catch(Nt){xe.e("AMF",Nt.toString())}return Pt}static parseObject(Ue,Je,nt){if(nt<3)throw new pe("Data not enough when parse ScriptDataObject");let Pt=Xt.parseString(Ue,Je,nt),Nt=Xt.parseValue(Ue,Je+Pt.size,nt-Pt.size),sn=Nt.objectEnd;return{data:{name:Pt.data,value:Nt.data},size:Pt.size+Nt.size,objectEnd:sn}}static parseVariable(Ue,Je,nt){return Xt.parseObject(Ue,Je,nt)}static parseString(Ue,Je,nt){if(nt<2)throw new pe("Data not enough when parse String");let Nt=new DataView(Ue,Je,nt).getUint16(0,!It),sn;return Nt>0?sn=fn(new Uint8Array(Ue,Je+2,Nt)):sn="",{data:sn,size:2+Nt}}static parseLongString(Ue,Je,nt){if(nt<4)throw new pe("Data not enough when parse LongString");let Nt=new DataView(Ue,Je,nt).getUint32(0,!It),sn;return Nt>0?sn=fn(new Uint8Array(Ue,Je+4,Nt)):sn="",{data:sn,size:4+Nt}}static parseDate(Ue,Je,nt){if(nt<10)throw new pe("Data size invalid when parse Date");let Pt=new DataView(Ue,Je,nt),Nt=Pt.getFloat64(0,!It),sn=Pt.getInt16(8,!It);return Nt+=sn*60*1e3,{data:new Date(Nt),size:10}}static parseValue(Ue,Je,nt){if(nt<1)throw new pe("Data not enough when parse Value");let Pt=new DataView(Ue,Je,nt),Nt=1,sn=Pt.getUint8(0),Kt,_n=!1;try{switch(sn){case 0:Kt=Pt.getFloat64(1,!It),Nt+=8;break;case 1:{Kt=!!Pt.getUint8(1),Nt+=1;break}case 2:{let zn=Xt.parseString(Ue,Je+1,nt-1);Kt=zn.data,Nt+=zn.size;break}case 3:{Kt={};let zn=0;for((Pt.getUint32(nt-4,!It)&16777215)===9&&(zn=3);Nt<nt-4;){let _i=Xt.parseObject(Ue,Je+Nt,nt-Nt-zn);if(_i.objectEnd)break;Kt[_i.data.name]=_i.data.value,Nt+=_i.size}Nt<=nt-3&&(Pt.getUint32(Nt-1,!It)&16777215)===9&&(Nt+=3);break}case 8:{Kt={},Nt+=4;let zn=0;for((Pt.getUint32(nt-4,!It)&16777215)===9&&(zn=3);Nt<nt-8;){let _i=Xt.parseVariable(Ue,Je+Nt,nt-Nt-zn);if(_i.objectEnd)break;Kt[_i.data.name]=_i.data.value,Nt+=_i.size}Nt<=nt-3&&(Pt.getUint32(Nt-1,!It)&16777215)===9&&(Nt+=3);break}case 9:Kt=void 0,Nt=1,_n=!0;break;case 10:{Kt=[];let zn=Pt.getUint32(1,!It);Nt+=4;for(let _i=0;_i<zn;_i++){let Bi=Xt.parseValue(Ue,Je+Nt,nt-Nt);Kt.push(Bi.data),Nt+=Bi.size}break}case 11:{let zn=Xt.parseDate(Ue,Je+1,nt-1);Kt=zn.data,Nt+=zn.size;break}case 12:{let zn=Xt.parseString(Ue,Je+1,nt-1);Kt=zn.data,Nt+=zn.size;break}default:Nt=nt,xe.w("AMF","Unsupported AMF value type "+sn)}}catch(zn){xe.e("AMF",zn.toString())}return{data:Kt,size:Nt,objectEnd:_n}}}var tn=Xt;class lt{constructor(Ue){this.TAG="ExpGolomb",this._buffer=Ue,this._buffer_index=0,this._total_bytes=Ue.byteLength,this._total_bits=Ue.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let Ue=this._total_bytes-this._buffer_index;if(Ue<=0)throw new pe("ExpGolomb: _fillCurrentWord() but no bytes available");let Je=Math.min(4,Ue),nt=new Uint8Array(4);nt.set(this._buffer.subarray(this._buffer_index,this._buffer_index+Je)),this._current_word=new DataView(nt.buffer).getUint32(0,!1),this._buffer_index+=Je,this._current_word_bits_left=Je*8}readBits(Ue){if(Ue>32)throw new de("ExpGolomb: readBits() bits exceeded max 32bits!");if(Ue<=this._current_word_bits_left){let sn=this._current_word>>>32-Ue;return this._current_word<<=Ue,this._current_word_bits_left-=Ue,sn}let Je=this._current_word_bits_left?this._current_word:0;Je=Je>>>32-this._current_word_bits_left;let nt=Ue-this._current_word_bits_left;this._fillCurrentWord();let Pt=Math.min(nt,this._current_word_bits_left),Nt=this._current_word>>>32-Pt;return this._current_word<<=Pt,this._current_word_bits_left-=Pt,Je=Je<<Pt|Nt,Je}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let Ue;for(Ue=0;Ue<this._current_word_bits_left;Ue++)if(this._current_word&2147483648>>>Ue)return this._current_word<<=Ue,this._current_word_bits_left-=Ue,Ue;return this._fillCurrentWord(),Ue+this._skipLeadingZero()}readUEG(){let Ue=this._skipLeadingZero();return this.readBits(Ue+1)-1}readSEG(){let Ue=this.readUEG();return Ue&1?Ue+1>>>1:-1*(Ue>>>1)}}var He=lt;class ze{static _ebsp2rbsp(Ue){let Je=Ue,nt=Je.byteLength,Pt=new Uint8Array(nt),Nt=0;for(let sn=0;sn<nt;sn++)sn>=2&&Je[sn]===3&&Je[sn-1]===0&&Je[sn-2]===0||(Pt[Nt]=Je[sn],Nt++);return new Uint8Array(Pt.buffer,0,Nt)}static parseSPS(Ue){let Je=ze._ebsp2rbsp(Ue),nt=new He(Je);nt.readByte();let Pt=nt.readByte();nt.readByte();let Nt=nt.readByte();nt.readUEG();let sn=ze.getProfileString(Pt),Kt=ze.getLevelString(Nt),_n=1,zn=420,_i=[0,420,422,444],Bi=8;if((Pt===100||Pt===110||Pt===122||Pt===244||Pt===44||Pt===83||Pt===86||Pt===118||Pt===128||Pt===138||Pt===144)&&(_n=nt.readUEG(),_n===3&&nt.readBits(1),_n<=3&&(zn=_i[_n]),Bi=nt.readUEG()+8,nt.readUEG(),nt.readBits(1),nt.readBool())){let gi=_n!==3?8:12;for(let Di=0;Di<gi;Di++)nt.readBool()&&(Di<6?ze._skipScalingList(nt,16):ze._skipScalingList(nt,64))}nt.readUEG();let wt=nt.readUEG();if(wt===0)nt.readUEG();else if(wt===1){nt.readBits(1),nt.readSEG(),nt.readSEG();let gi=nt.readUEG();for(let Di=0;Di<gi;Di++)nt.readSEG()}let zt=nt.readUEG();nt.readBits(1);let En=nt.readUEG(),bn=nt.readUEG(),Yt=nt.readBits(1);Yt===0&&nt.readBits(1),nt.readBits(1);let gn=0,yn=0,vn=0,jn=0;nt.readBool()&&(gn=nt.readUEG(),yn=nt.readUEG(),vn=nt.readUEG(),jn=nt.readUEG());let Gn=1,An=1,Li=0,xi=!0,bi=0,hn=0;if(nt.readBool()){if(nt.readBool()){let gi=nt.readByte(),Di=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Ji=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];gi>0&&gi<16?(Gn=Di[gi-1],An=Ji[gi-1]):gi===255&&(Gn=nt.readByte()<<8|nt.readByte(),An=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 gi=nt.readBits(32),Di=nt.readBits(32);xi=nt.readBool(),bi=Di,hn=gi*2,Li=bi/hn}}let lr=1;(Gn!==1||An!==1)&&(lr=Gn/An);let Mr=0,xn=0;if(_n===0)Mr=1,xn=2-Yt;else{let gi=_n===3?1:2,Di=_n===1?2:1;Mr=gi,xn=Di*(2-Yt)}let Vn=(En+1)*16,mi=(2-Yt)*((bn+1)*16);Vn-=(gn+yn)*Mr,mi-=(vn+jn)*xn;let di=Math.ceil(Vn*lr);return nt.destroy(),nt=null,{profile_string:sn,level_string:Kt,bit_depth:Bi,ref_frames:zt,chroma_format:zn,chroma_format_string:ze.getChromaFormatString(zn),frame_rate:{fixed:xi,fps:Li,fps_den:hn,fps_num:bi},sar_ratio:{width:Gn,height:An},codec_size:{width:Vn,height:mi},present_size:{width:di,height:mi}}}static _skipScalingList(Ue,Je){let nt=8,Pt=8,Nt=0;for(let sn=0;sn<Je;sn++)Pt!==0&&(Nt=Ue.readSEG(),Pt=(nt+Nt+256)%256),nt=Pt===0?nt:Pt}static getProfileString(Ue){switch(Ue){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(Ue){return(Ue/10).toFixed(1)}static getChromaFormatString(Ue){switch(Ue){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var it=ze,tt={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function Ke($n){return $n>>>8&255|($n&255)<<8}function je($n){return($n&4278190080)>>>24|($n&16711680)>>>8|($n&65280)<<8|($n&255)<<24}function Re($n,Ue){return $n[Ue]<<24|$n[Ue+1]<<16|$n[Ue+2]<<8|$n[Ue+3]}class Qe{constructor(Ue,Je){this.TAG="FLVDemuxer",this._config=Je,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=Ue.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=Ue.hasAudioTrack,this._hasVideo=Ue.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Ht,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(Ue){let Je=new Uint8Array(Ue),nt={match:!1};if(Je[0]!==70||Je[1]!==76||Je[2]!==86||Je[3]!==1)return nt;let Pt=(Je[4]&4)>>>2!==0,Nt=(Je[4]&1)!==0,sn=Re(Je,5);return sn<9?nt:{match:!0,consumed:sn,dataOffset:sn,hasAudioTrack:Pt,hasVideoTrack:Nt}}bindDataSource(Ue){return Ue.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(Ue){this._onTrackMetadata=Ue}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(Ue){this._onMediaInfo=Ue}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(Ue){this._onMetaDataArrived=Ue}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(Ue){this._onScriptDataArrived=Ue}get onError(){return this._onError}set onError(Ue){this._onError=Ue}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(Ue){this._onDataAvailable=Ue}get timestampBase(){return this._timestampBase}set timestampBase(Ue){this._timestampBase=Ue}get overridedDuration(){return this._duration}set overridedDuration(Ue){this._durationOverrided=!0,this._duration=Ue,this._mediaInfo.duration=Ue}set overridedHasAudio(Ue){this._hasAudioFlagOverrided=!0,this._hasAudio=Ue,this._mediaInfo.hasAudio=Ue}set overridedHasVideo(Ue){this._hasVideoFlagOverrided=!0,this._hasVideo=Ue,this._mediaInfo.hasVideo=Ue}resetMediaInfo(){this._mediaInfo=new Ht}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(Ue,Je){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new pe("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let nt=0,Pt=this._littleEndian;if(Je===0)if(Ue.byteLength>13)nt=Qe.probe(Ue).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,Je+nt!==this._dataOffset&&xe.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(Ue,nt).getUint32(0,!Pt)!==0&&xe.w(this.TAG,"PrevTagSize0 !== 0 !!!"),nt+=4);nt<Ue.byteLength;){this._dispatch=!0;let Nt=new DataView(Ue,nt);if(nt+11+4>Ue.byteLength)break;let sn=Nt.getUint8(0),Kt=Nt.getUint32(0,!Pt)&16777215;if(nt+11+Kt+4>Ue.byteLength)break;if(sn!==8&&sn!==9&&sn!==18){xe.w(this.TAG,`Unsupported tag type ${sn}, skipped`),nt+=11+Kt+4;continue}let _n=Nt.getUint8(4),zn=Nt.getUint8(5),_i=Nt.getUint8(6),Bi=Nt.getUint8(7),wt=_i|zn<<8|_n<<16|Bi<<24;(Nt.getUint32(7,!Pt)&16777215)!==0&&xe.w(this.TAG,"Meet tag which has StreamID != 0!");let En=nt+11;switch(sn){case 8:this._parseAudioData(Ue,En,Kt,wt);break;case 9:this._parseVideoData(Ue,En,Kt,wt,Je+nt);break;case 18:this._parseScriptData(Ue,En,Kt);break}let bn=Nt.getUint32(11+Kt,!Pt);bn!==11+Kt&&xe.w(this.TAG,`Invalid PrevTagSize ${bn}`),nt+=11+Kt+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),nt}_parseScriptData(Ue,Je,nt){let Pt=tn.parseScriptData(Ue,Je,nt);if(Pt.hasOwnProperty("onMetaData")){if(Pt.onMetaData==null||typeof Pt.onMetaData!="object"){xe.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&xe.w(this.TAG,"Found another onMetaData tag!"),this._metadata=Pt;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 Kt=sn/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Kt,this._referenceFrameRate.fps_num=sn,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Kt}}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(Pt).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},Pt))}_parseKeyframesIndex(Ue){let Je=[],nt=[];for(let Pt=1;Pt<Ue.times.length;Pt++){let Nt=this._timestampBase+Math.floor(Ue.times[Pt]*1e3);Je.push(Nt),nt.push(Ue.filepositions[Pt])}return{times:Je,filepositions:nt}}_parseAudioData(Ue,Je,nt,Pt){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,Kt=new DataView(Ue,Je,nt).getUint8(0),_n=Kt>>>4;if(_n!==2&&_n!==10){this._onError(tt.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+_n);return}let zn=0,_i=(Kt&12)>>>2;if(_i>=0&&_i<=4)zn=this._flvSoundRateTable[_i];else{this._onError(tt.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+_i);return}let Bi=(Kt&2)>>>1,wt=Kt&1,zt=this._audioMetadata,En=this._audioTrack;if(zt||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),zt=this._audioMetadata={},zt.type="audio",zt.id=En.id,zt.timescale=this._timescale,zt.duration=this._duration,zt.audioSampleRate=zn,zt.channelCount=wt===0?1:2),_n===10){let bn=this._parseAACAudioData(Ue,Je+1,nt-1);if(bn==null)return;if(bn.packetType===0){zt.config&&xe.w(this.TAG,"Found another AudioSpecificConfig!");let Yt=bn.data;zt.audioSampleRate=Yt.samplingRate,zt.channelCount=Yt.channelCount,zt.codec=Yt.codec,zt.originalCodec=Yt.originalCodec,zt.config=Yt.config,zt.refSampleDuration=1024/zt.audioSampleRate*zt.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",zt);let gn=this._mediaInfo;gn.audioCodec=zt.originalCodec,gn.audioSampleRate=zt.audioSampleRate,gn.audioChannelCount=zt.channelCount,gn.hasVideo?gn.videoCodec!=null&&(gn.mimeType='video/x-flv; codecs="'+gn.videoCodec+","+gn.audioCodec+'"'):gn.mimeType='video/x-flv; codecs="'+gn.audioCodec+'"',gn.isComplete()&&this._onMediaInfo(gn)}else if(bn.packetType===1){let Yt=this._timestampBase+Pt,gn={unit:bn.data,length:bn.data.byteLength,dts:Yt,pts:Yt};En.samples.push(gn),En.length+=bn.data.length}else xe.e(this.TAG,`Flv: Unsupported AAC data type ${bn.packetType}`)}else if(_n===2){if(!zt.codec){let yn=this._parseMP3AudioData(Ue,Je+1,nt-1,!0);if(yn==null)return;zt.audioSampleRate=yn.samplingRate,zt.channelCount=yn.channelCount,zt.codec=yn.codec,zt.originalCodec=yn.originalCodec,zt.refSampleDuration=1152/zt.audioSampleRate*zt.timescale,xe.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",zt);let vn=this._mediaInfo;vn.audioCodec=zt.codec,vn.audioSampleRate=zt.audioSampleRate,vn.audioChannelCount=zt.channelCount,vn.audioDataRate=yn.bitRate,vn.hasVideo?vn.videoCodec!=null&&(vn.mimeType='video/x-flv; codecs="'+vn.videoCodec+","+vn.audioCodec+'"'):vn.mimeType='video/x-flv; codecs="'+vn.audioCodec+'"',vn.isComplete()&&this._onMediaInfo(vn)}let bn=this._parseMP3AudioData(Ue,Je+1,nt-1,!1);if(bn==null)return;let Yt=this._timestampBase+Pt,gn={unit:bn,length:bn.byteLength,dts:Yt,pts:Yt};En.samples.push(gn),En.length+=bn.length}}_parseAACAudioData(Ue,Je,nt){if(nt<=1){xe.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let Pt={},Nt=new Uint8Array(Ue,Je,nt);return Pt.packetType=Nt[0],Nt[0]===0?Pt.data=this._parseAACAudioSpecificConfig(Ue,Je+1,nt-1):Pt.data=Nt.subarray(1),Pt}_parseAACAudioSpecificConfig(Ue,Je,nt){let Pt=new Uint8Array(Ue,Je,nt),Nt=null,sn=0,Kt=0,_n=null,zn=0,_i=null;if(sn=Kt=Pt[0]>>>3,zn=(Pt[0]&7)<<1|Pt[1]>>>7,zn<0||zn>=this._mpegSamplingRates.length){this._onError(tt.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Bi=this._mpegSamplingRates[zn],wt=(Pt[1]&120)>>>3;if(wt<0||wt>=8){this._onError(tt.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}sn===5&&(_i=(Pt[1]&7)<<1|Pt[2]>>>7,_n=(Pt[2]&124)>>>2);let zt=self.navigator.userAgent.toLowerCase();return zt.indexOf("firefox")!==-1?zn>=6?(sn=5,Nt=new Array(4),_i=zn-3):(sn=2,Nt=new Array(2),_i=zn):zt.indexOf("android")!==-1?(sn=2,Nt=new Array(2),_i=zn):(sn=5,_i=zn,Nt=new Array(4),zn>=6?_i=zn-3:wt===1&&(sn=2,Nt=new Array(2),_i=zn)),Nt[0]=sn<<3,Nt[0]|=(zn&15)>>>1,Nt[1]=(zn&15)<<7,Nt[1]|=(wt&15)<<3,sn===5&&(Nt[1]|=(_i&15)>>>1,Nt[2]=(_i&1)<<7,Nt[2]|=8,Nt[3]=0),{config:Nt,samplingRate:Bi,channelCount:wt,codec:"mp4a.40."+sn,originalCodec:"mp4a.40."+Kt}}_parseMP3AudioData(Ue,Je,nt,Pt){if(nt<4){xe.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let Nt=this._littleEndian,sn=new Uint8Array(Ue,Je,nt),Kt=null;if(Pt){if(sn[0]!==255)return;let _n=sn[1]>>>3&3,zn=(sn[1]&6)>>1,_i=(sn[2]&240)>>>4,Bi=(sn[2]&12)>>>2,zt=(sn[3]>>>6&3)!==3?2:1,En=0,bn=0,Yt=34,gn="mp3";switch(_n){case 0:En=this._mpegAudioV25SampleRateTable[Bi];break;case 2:En=this._mpegAudioV20SampleRateTable[Bi];break;case 3:En=this._mpegAudioV10SampleRateTable[Bi];break}switch(zn){case 1:Yt=34,_i<this._mpegAudioL3BitRateTable.length&&(bn=this._mpegAudioL3BitRateTable[_i]);break;case 2:Yt=33,_i<this._mpegAudioL2BitRateTable.length&&(bn=this._mpegAudioL2BitRateTable[_i]);break;case 3:Yt=32,_i<this._mpegAudioL1BitRateTable.length&&(bn=this._mpegAudioL1BitRateTable[_i]);break}Kt={bitRate:bn,samplingRate:En,channelCount:zt,codec:gn,originalCodec:gn}}else Kt=sn;return Kt}_parseVideoData(Ue,Je,nt,Pt,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(Ue,Je,nt)[0],Kt=(sn&240)>>>4,_n=sn&15;if(_n!==7){this._onError(tt.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${_n}`);return}this._parseAVCVideoPacket(Ue,Je+1,nt-1,Pt,Nt,Kt)}_parseAVCVideoPacket(Ue,Je,nt,Pt,Nt,sn){if(nt<4){xe.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let Kt=this._littleEndian,_n=new DataView(Ue,Je,nt),zn=_n.getUint8(0),Bi=(_n.getUint32(0,!Kt)&16777215)<<8>>8;if(zn===0)this._parseAVCDecoderConfigurationRecord(Ue,Je+4,nt-4);else if(zn===1)this._parseAVCVideoData(Ue,Je+4,nt-4,Pt,Nt,sn,Bi);else if(zn!==2){this._onError(tt.FORMAT_ERROR,`Flv: Invalid video packet type ${zn}`);return}}_parseAVCDecoderConfigurationRecord(Ue,Je,nt){if(nt<7){xe.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let Pt=this._videoMetadata,Nt=this._videoTrack,sn=this._littleEndian,Kt=new DataView(Ue,Je,nt);Pt?typeof Pt.avcc!="undefined"&&xe.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),Pt=this._videoMetadata={},Pt.type="video",Pt.id=Nt.id,Pt.timescale=this._timescale,Pt.duration=this._duration);let _n=Kt.getUint8(0),zn=Kt.getUint8(1),_i=Kt.getUint8(2),Bi=Kt.getUint8(3);if(_n!==1||zn===0){this._onError(tt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Kt.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(tt.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let wt=Kt.getUint8(5)&31;if(wt===0){this._onError(tt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else wt>1&&xe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${wt}`);let zt=6;for(let bn=0;bn<wt;bn++){let Yt=Kt.getUint16(zt,!sn);if(zt+=2,Yt===0)continue;let gn=new Uint8Array(Ue,Je+zt,Yt);zt+=Yt;let yn=it.parseSPS(gn);if(bn!==0)continue;Pt.codecWidth=yn.codec_size.width,Pt.codecHeight=yn.codec_size.height,Pt.presentWidth=yn.present_size.width,Pt.presentHeight=yn.present_size.height,Pt.profile=yn.profile_string,Pt.level=yn.level_string,Pt.bitDepth=yn.bit_depth,Pt.chromaFormat=yn.chroma_format,Pt.sarRatio=yn.sar_ratio,Pt.frameRate=yn.frame_rate,(yn.frame_rate.fixed===!1||yn.frame_rate.fps_num===0||yn.frame_rate.fps_den===0)&&(Pt.frameRate=this._referenceFrameRate);let vn=Pt.frameRate.fps_den,jn=Pt.frameRate.fps_num;Pt.refSampleDuration=Pt.timescale*(vn/jn);let Un=gn.subarray(1,4),Gn="avc1.";for(let Li=0;Li<3;Li++){let xi=Un[Li].toString(16);xi.length<2&&(xi="0"+xi),Gn+=xi}Pt.codec=Gn;let An=this._mediaInfo;An.width=Pt.codecWidth,An.height=Pt.codecHeight,An.fps=Pt.frameRate.fps,An.profile=Pt.profile,An.level=Pt.level,An.refFrames=yn.ref_frames,An.chromaFormat=yn.chroma_format_string,An.sarNum=Pt.sarRatio.width,An.sarDen=Pt.sarRatio.height,An.videoCodec=Gn,An.hasAudio?An.audioCodec!=null&&(An.mimeType='video/x-flv; codecs="'+An.videoCodec+","+An.audioCodec+'"'):An.mimeType='video/x-flv; codecs="'+An.videoCodec+'"',An.isComplete()&&this._onMediaInfo(An)}let En=Kt.getUint8(zt);if(En===0){this._onError(tt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else En>1&&xe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${En}`);zt++;for(let bn=0;bn<En;bn++){let Yt=Kt.getUint16(zt,!sn);zt+=2,Yt!==0&&(zt+=Yt)}Pt.avcc=new Uint8Array(nt),Pt.avcc.set(new Uint8Array(Ue,Je,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",Pt)}_parseAVCVideoData(Ue,Je,nt,Pt,Nt,sn,Kt){let _n=this._littleEndian,zn=new DataView(Ue,Je,nt),_i=[],Bi=0,wt=0;const zt=this._naluLengthSize;let En=this._timestampBase+Pt,bn=sn===1;for(;wt<nt;){if(wt+4>=nt){xe.w(this.TAG,`Malformed Nalu near timestamp ${En}, offset = ${wt}, dataSize = ${nt}`);break}let Yt=zn.getUint32(wt,!_n);if(zt===3&&(Yt>>>=8),Yt>nt-zt){xe.w(this.TAG,`Malformed Nalus near timestamp ${En}, NaluSize > DataSize!`);return}let gn=zn.getUint8(wt+zt)&31;gn===5&&(bn=!0);let yn=new Uint8Array(Ue,Je+wt,zt+Yt),vn={type:gn,data:yn};_i.push(vn),Bi+=yn.byteLength,wt+=zt+Yt}if(_i.length){let Yt=this._videoTrack,gn={units:_i,length:Bi,isKeyframe:bn,dts:En,cts:Kt,pts:En+Kt};bn&&(gn.fileposition=Nt),Yt.samples.push(gn),Yt.length+=Bi}}}var Ve=Qe;class We{static init(){We.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 Je in We.types)We.types.hasOwnProperty(Je)&&(We.types[Je]=[Je.charCodeAt(0),Je.charCodeAt(1),Je.charCodeAt(2),Je.charCodeAt(3)]);let Ue=We.constants={};Ue.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Ue.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Ue.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Ue.STSC=Ue.STCO=Ue.STTS,Ue.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ue.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]),Ue.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]),Ue.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ue.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ue.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(Ue){let Je=8,nt=null,Pt=Array.prototype.slice.call(arguments,1),Nt=Pt.length;for(let Kt=0;Kt<Nt;Kt++)Je+=Pt[Kt].byteLength;nt=new Uint8Array(Je),nt[0]=Je>>>24&255,nt[1]=Je>>>16&255,nt[2]=Je>>>8&255,nt[3]=Je&255,nt.set(Ue,4);let sn=8;for(let Kt=0;Kt<Nt;Kt++)nt.set(Pt[Kt],sn),sn+=Pt[Kt].byteLength;return nt}static generateInitSegment(Ue){let Je=We.box(We.types.ftyp,We.constants.FTYP),nt=We.moov(Ue),Pt=new Uint8Array(Je.byteLength+nt.byteLength);return Pt.set(Je,0),Pt.set(nt,Je.byteLength),Pt}static moov(Ue){let Je=We.mvhd(Ue.timescale,Ue.duration),nt=We.trak(Ue),Pt=We.mvex(Ue);return We.box(We.types.moov,Je,nt,Pt)}static mvhd(Ue,Je){return We.box(We.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ue>>>24&255,Ue>>>16&255,Ue>>>8&255,Ue&255,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&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(Ue){return We.box(We.types.trak,We.tkhd(Ue),We.mdia(Ue))}static tkhd(Ue){let Je=Ue.id,nt=Ue.duration,Pt=Ue.presentWidth,Nt=Ue.presentHeight;return We.box(We.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&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,Pt>>>8&255,Pt&255,0,0,Nt>>>8&255,Nt&255,0,0]))}static mdia(Ue){return We.box(We.types.mdia,We.mdhd(Ue),We.hdlr(Ue),We.minf(Ue))}static mdhd(Ue){let Je=Ue.timescale,nt=Ue.duration;return We.box(We.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255,85,196,0,0]))}static hdlr(Ue){let Je=null;return Ue.type==="audio"?Je=We.constants.HDLR_AUDIO:Je=We.constants.HDLR_VIDEO,We.box(We.types.hdlr,Je)}static minf(Ue){let Je=null;return Ue.type==="audio"?Je=We.box(We.types.smhd,We.constants.SMHD):Je=We.box(We.types.vmhd,We.constants.VMHD),We.box(We.types.minf,Je,We.dinf(),We.stbl(Ue))}static dinf(){return We.box(We.types.dinf,We.box(We.types.dref,We.constants.DREF))}static stbl(Ue){return We.box(We.types.stbl,We.stsd(Ue),We.box(We.types.stts,We.constants.STTS),We.box(We.types.stsc,We.constants.STSC),We.box(We.types.stsz,We.constants.STSZ),We.box(We.types.stco,We.constants.STCO))}static stsd(Ue){return Ue.type==="audio"?Ue.codec==="mp3"?We.box(We.types.stsd,We.constants.STSD_PREFIX,We.mp3(Ue)):We.box(We.types.stsd,We.constants.STSD_PREFIX,We.mp4a(Ue)):We.box(We.types.stsd,We.constants.STSD_PREFIX,We.avc1(Ue))}static mp3(Ue){let Je=Ue.channelCount,nt=Ue.audioSampleRate,Pt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Je,0,16,0,0,0,0,nt>>>8&255,nt&255,0,0]);return We.box(We.types[".mp3"],Pt)}static mp4a(Ue){let Je=Ue.channelCount,nt=Ue.audioSampleRate,Pt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Je,0,16,0,0,0,0,nt>>>8&255,nt&255,0,0]);return We.box(We.types.mp4a,Pt,We.esds(Ue))}static esds(Ue){let Je=Ue.config||[],nt=Je.length,Pt=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(Je).concat([6,1,2]));return We.box(We.types.esds,Pt)}static avc1(Ue){let Je=Ue.avcc,nt=Ue.codecWidth,Pt=Ue.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,Pt>>>8&255,Pt&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 We.box(We.types.avc1,Nt,We.box(We.types.avcC,Je))}static mvex(Ue){return We.box(We.types.mvex,We.trex(Ue))}static trex(Ue){let Je=Ue.id,nt=new Uint8Array([0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return We.box(We.types.trex,nt)}static moof(Ue,Je){return We.box(We.types.moof,We.mfhd(Ue.sequenceNumber),We.traf(Ue,Je))}static mfhd(Ue){let Je=new Uint8Array([0,0,0,0,Ue>>>24&255,Ue>>>16&255,Ue>>>8&255,Ue&255]);return We.box(We.types.mfhd,Je)}static traf(Ue,Je){let nt=Ue.id,Pt=We.box(We.types.tfhd,new Uint8Array([0,0,0,0,nt>>>24&255,nt>>>16&255,nt>>>8&255,nt&255])),Nt=We.box(We.types.tfdt,new Uint8Array([0,0,0,0,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255])),sn=We.sdtp(Ue),Kt=We.trun(Ue,sn.byteLength+16+16+8+16+8+8);return We.box(We.types.traf,Pt,Nt,Kt,sn)}static sdtp(Ue){let Je=Ue.samples||[],nt=Je.length,Pt=new Uint8Array(4+nt);for(let Nt=0;Nt<nt;Nt++){let sn=Je[Nt].flags;Pt[Nt+4]=sn.isLeading<<6|sn.dependsOn<<4|sn.isDependedOn<<2|sn.hasRedundancy}return We.box(We.types.sdtp,Pt)}static trun(Ue,Je){let nt=Ue.samples||[],Pt=nt.length,Nt=12+16*Pt,sn=new Uint8Array(Nt);Je+=8+Nt,sn.set([0,0,15,1,Pt>>>24&255,Pt>>>16&255,Pt>>>8&255,Pt&255,Je>>>24&255,Je>>>16&255,Je>>>8&255,Je&255],0);for(let Kt=0;Kt<Pt;Kt++){let _n=nt[Kt].duration,zn=nt[Kt].size,_i=nt[Kt].flags,Bi=nt[Kt].cts;sn.set([_n>>>24&255,_n>>>16&255,_n>>>8&255,_n&255,zn>>>24&255,zn>>>16&255,zn>>>8&255,zn&255,_i.isLeading<<2|_i.dependsOn,_i.isDependedOn<<6|_i.hasRedundancy<<4|_i.isNonSync,0,0,Bi>>>24&255,Bi>>>16&255,Bi>>>8&255,Bi&255],12+16*Kt)}return We.box(We.types.trun,sn)}static mdat(Ue){return We.box(We.types.mdat,Ue)}}We.init();var pt=We;class Mt{static getSilentFrame(Ue,Je){if(Ue==="mp4a.40.2"){if(Je===1)return new Uint8Array([0,200,0,128,35,128]);if(Je===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(Je===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(Je===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(Je===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(Je===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(Je===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(Je===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(Je===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 Qt=Mt;class qt{constructor(Ue,Je,nt,Pt,Nt){this.dts=Ue,this.pts=Je,this.duration=nt,this.originalDts=Pt,this.isSyncPoint=Nt,this.fileposition=null}}class Bt{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(Ue){Ue.isSyncPoint=!0,this.syncPoints.push(Ue)}}class $t{constructor(){this._list=[]}clear(){this._list=[]}appendArray(Ue){let Je=this._list;Ue.length!==0&&(Je.length>0&&Ue[0].originalDts<Je[Je.length-1].originalDts&&this.clear(),Array.prototype.push.apply(Je,Ue))}getLastSyncPointBeforeDts(Ue){if(this._list.length==0)return null;let Je=this._list,nt=0,Pt=Je.length-1,Nt=0,sn=0,Kt=Pt;for(Ue<Je[0].dts&&(nt=0,sn=Kt+1);sn<=Kt;)if(Nt=sn+Math.floor((Kt-sn)/2),Nt===Pt||Ue>=Je[Nt].dts&&Ue<Je[Nt+1].dts){nt=Nt;break}else Je[Nt].dts<Ue?sn=Nt+1:Kt=Nt-1;return this._list[nt]}}class Cn{constructor(Ue){this._type=Ue,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(Ue){let Je=this._list;if(Je.length===0)return-2;let nt=Je.length-1,Pt=0,Nt=0,sn=nt,Kt=0;if(Ue<Je[0].originalBeginDts)return Kt=-1,Kt;for(;Nt<=sn;)if(Pt=Nt+Math.floor((sn-Nt)/2),Pt===nt||Ue>Je[Pt].lastSample.originalDts&&Ue<Je[Pt+1].originalBeginDts){Kt=Pt;break}else Je[Pt].originalBeginDts<Ue?Nt=Pt+1:sn=Pt-1;return Kt}_searchNearestSegmentAfter(Ue){return this._searchNearestSegmentBefore(Ue)+1}append(Ue){let Je=this._list,nt=Ue,Pt=this._lastAppendLocation,Nt=0;Pt!==-1&&Pt<Je.length&&nt.originalBeginDts>=Je[Pt].lastSample.originalDts&&(Pt===Je.length-1||Pt<Je.length-1&&nt.originalBeginDts<Je[Pt+1].originalBeginDts)?Nt=Pt+1:Je.length>0&&(Nt=this._searchNearestSegmentBefore(nt.originalBeginDts)+1),this._lastAppendLocation=Nt,this._list.splice(Nt,0,nt)}getLastSegmentBefore(Ue){let Je=this._searchNearestSegmentBefore(Ue);return Je>=0?this._list[Je]:null}getLastSampleBefore(Ue){let Je=this.getLastSegmentBefore(Ue);return Je!=null?Je.lastSample:null}getLastSyncPointBefore(Ue){let Je=this._searchNearestSegmentBefore(Ue),nt=this._list[Je].syncPoints;for(;nt.length===0&&Je>0;)Je--,nt=this._list[Je].syncPoints;return nt.length>0?nt[nt.length-1]:null}}class mn{constructor(Ue){this.TAG="MP4Remuxer",this._config=Ue,this._isLive=Ue.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 Cn("audio"),this._videoSegmentInfoList=new Cn("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(Ue){return Ue.onDataAvailable=this.remux.bind(this),Ue.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(Ue){this._onInitSegment=Ue}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(Ue){this._onMediaSegment=Ue}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(Ue){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(Ue,Je){if(!this._onMediaSegment)throw new pe("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(Ue,Je),this._remuxVideo(Je),this._remuxAudio(Ue)}_onTrackMetadataReceived(Ue,Je){let nt=null,Pt="mp4",Nt=Je.codec;if(Ue==="audio")this._audioMeta=Je,Je.codec==="mp3"&&this._mp3UseMpegAudio?(Pt="mpeg",Nt="",nt=new Uint8Array):nt=pt.generateInitSegment(Je);else if(Ue==="video")this._videoMeta=Je,nt=pt.generateInitSegment(Je);else return;if(!this._onInitSegment)throw new pe("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(Ue,{type:Ue,data:nt.buffer,codec:Nt,container:`${Ue}/${Pt}`,mediaDuration:Je.duration})}_calculateDtsBase(Ue,Je){this._dtsBaseInited||(Ue.samples&&Ue.samples.length&&(this._audioDtsBase=Ue.samples[0].dts),Je.samples&&Je.samples.length&&(this._videoDtsBase=Je.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let Ue=this._videoStashedLastSample,Je=this._audioStashedLastSample,nt={type:"video",id:1,sequenceNumber:0,samples:[],length:0};Ue!=null&&(nt.samples.push(Ue),nt.length=Ue.length);let Pt={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};Je!=null&&(Pt.samples.push(Je),Pt.length=Je.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(nt,!0),this._remuxAudio(Pt,!0)}_remuxAudio(Ue,Je){if(this._audioMeta==null)return;let nt=Ue,Pt=nt.samples,Nt,sn=-1,Kt=-1,_n=-1,zn=this._audioMeta.refSampleDuration,_i=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Bi=this._dtsBaseInited&&this._audioNextDts===void 0,wt=!1;if(!Pt||Pt.length===0||Pt.length===1&&!Je)return;let zt=0,En=null,bn=0;_i?(zt=0,bn=nt.length):(zt=8,bn=8+nt.length);let Yt=null;if(Pt.length>1&&(Yt=Pt.pop(),bn-=Yt.length),this._audioStashedLastSample!=null){let An=this._audioStashedLastSample;this._audioStashedLastSample=null,Pt.unshift(An),bn+=An.length}Yt!=null&&(this._audioStashedLastSample=Yt);let gn=Pt[0].dts-this._dtsBase;if(this._audioNextDts)Nt=gn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Nt=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(wt=!0);else{let An=this._audioSegmentInfoList.getLastSampleBefore(gn);if(An!=null){let Li=gn-(An.originalDts+An.duration);Li<=3&&(Li=0);let xi=An.dts+An.duration+Li;Nt=gn-xi}else Nt=0}if(wt){let An=gn-Nt,Li=this._videoSegmentInfoList.getLastSegmentBefore(gn);if(Li!=null&&Li.beginDts<An){let xi=Qt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(xi){let bi=Li.beginDts,hn=An-Li.beginDts;xe.v(this.TAG,`InsertPrefixSilentAudio: dts: ${bi}, duration: ${hn}`),Pt.unshift({unit:xi,dts:bi,pts:bi}),bn+=xi.byteLength}}else wt=!1}let yn=[];for(let An=0;An<Pt.length;An++){let Li=Pt[An],xi=Li.unit,bi=Li.dts-this._dtsBase,hn=bi-Nt;sn===-1&&(sn=hn);let Vi=0;An!==Pt.length-1?Vi=Pt[An+1].dts-this._dtsBase-Nt-hn:Yt!=null?Vi=Yt.dts-this._dtsBase-Nt-hn:yn.length>=1?Vi=yn[yn.length-1].duration:Vi=Math.floor(zn);let lr=!1,Mr=null;if(Vi>zn*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!re.safari){lr=!0;let xn=Math.abs(Vi-zn),Vn=Math.ceil(xn/zn),mi=hn+zn;xe.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
dts: ${hn+Vi} ms, expected: ${hn+Math.round(zn)} ms, delta: ${Math.round(xn)} ms, generate: ${Vn} frames`);let di=Qt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);di==null&&(xe.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),di=xi),Mr=[];for(let Di=0;Di<Vn;Di++){let Ji=Math.round(mi);if(Mr.length>0){let _r=Mr[Mr.length-1];_r.duration=Ji-_r.dts}let cr={dts:Ji,pts:Ji,cts:0,unit:di,size:di.byteLength,duration:0,originalDts:bi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Mr.push(cr),bn+=cr.size,mi+=zn}let gi=Mr[Mr.length-1];gi.duration=hn+Vi-gi.dts,Vi=Math.round(zn)}yn.push({dts:hn,pts:hn,cts:0,unit:Li.unit,size:Li.unit.byteLength,duration:Vi,originalDts:bi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),lr&&yn.push.apply(yn,Mr)}_i?En=new Uint8Array(bn):(En=new Uint8Array(bn),En[0]=bn>>>24&255,En[1]=bn>>>16&255,En[2]=bn>>>8&255,En[3]=bn&255,En.set(pt.types.mdat,4));for(let An=0;An<yn.length;An++){let Li=yn[An].unit;En.set(Li,zt),zt+=Li.byteLength}let vn=yn[yn.length-1];Kt=vn.dts+vn.duration,this._audioNextDts=Kt;let jn=new Bt;jn.beginDts=sn,jn.endDts=Kt,jn.beginPts=sn,jn.endPts=Kt,jn.originalBeginDts=yn[0].originalDts,jn.originalEndDts=vn.originalDts+vn.duration,jn.firstSample=new qt(yn[0].dts,yn[0].pts,yn[0].duration,yn[0].originalDts,!1),jn.lastSample=new qt(vn.dts,vn.pts,vn.duration,vn.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(jn),nt.samples=yn,nt.sequenceNumber++;let Un=null;_i?Un=new Uint8Array:Un=pt.moof(nt,sn),nt.samples=[],nt.length=0;let Gn={type:"audio",data:this._mergeBoxes(Un,En).buffer,sampleCount:yn.length,info:jn};_i&&Bi&&(Gn.timestampOffset=sn),this._onMediaSegment("audio",Gn)}_remuxVideo(Ue,Je){if(this._videoMeta==null)return;let nt=Ue,Pt=nt.samples,Nt,sn=-1,Kt=-1,_n=-1,zn=-1;if(!Pt||Pt.length===0||Pt.length===1&&!Je)return;let _i=8,Bi=null,wt=8+Ue.length,zt=null;if(Pt.length>1&&(zt=Pt.pop(),wt-=zt.length),this._videoStashedLastSample!=null){let vn=this._videoStashedLastSample;this._videoStashedLastSample=null,Pt.unshift(vn),wt+=vn.length}zt!=null&&(this._videoStashedLastSample=zt);let En=Pt[0].dts-this._dtsBase;if(this._videoNextDts)Nt=En-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Nt=0;else{let vn=this._videoSegmentInfoList.getLastSampleBefore(En);if(vn!=null){let jn=En-(vn.originalDts+vn.duration);jn<=3&&(jn=0);let Un=vn.dts+vn.duration+jn;Nt=En-Un}else Nt=0}let bn=new Bt,Yt=[];for(let vn=0;vn<Pt.length;vn++){let jn=Pt[vn],Un=jn.dts-this._dtsBase,Gn=jn.isKeyframe,An=Un-Nt,Li=jn.cts,xi=An+Li;sn===-1&&(sn=An,_n=xi);let bi=0;if(vn!==Pt.length-1?bi=Pt[vn+1].dts-this._dtsBase-Nt-An:zt!=null?bi=zt.dts-this._dtsBase-Nt-An:Yt.length>=1?bi=Yt[Yt.length-1].duration:bi=Math.floor(this._videoMeta.refSampleDuration),Gn){let hn=new qt(An,xi,bi,jn.dts,!0);hn.fileposition=jn.fileposition,bn.appendSyncPoint(hn)}Yt.push({dts:An,pts:xi,cts:Li,units:jn.units,size:jn.length,isKeyframe:Gn,duration:bi,originalDts:Un,flags:{isLeading:0,dependsOn:Gn?2:1,isDependedOn:Gn?1:0,hasRedundancy:0,isNonSync:Gn?0:1}})}Bi=new Uint8Array(wt),Bi[0]=wt>>>24&255,Bi[1]=wt>>>16&255,Bi[2]=wt>>>8&255,Bi[3]=wt&255,Bi.set(pt.types.mdat,4);for(let vn=0;vn<Yt.length;vn++){let jn=Yt[vn].units;for(;jn.length;){let Gn=jn.shift().data;Bi.set(Gn,_i),_i+=Gn.byteLength}}let gn=Yt[Yt.length-1];if(Kt=gn.dts+gn.duration,zn=gn.pts+gn.duration,this._videoNextDts=Kt,bn.beginDts=sn,bn.endDts=Kt,bn.beginPts=_n,bn.endPts=zn,bn.originalBeginDts=Yt[0].originalDts,bn.originalEndDts=gn.originalDts+gn.duration,bn.firstSample=new qt(Yt[0].dts,Yt[0].pts,Yt[0].duration,Yt[0].originalDts,Yt[0].isKeyframe),bn.lastSample=new qt(gn.dts,gn.pts,gn.duration,gn.originalDts,gn.isKeyframe),this._isLive||this._videoSegmentInfoList.append(bn),nt.samples=Yt,nt.sequenceNumber++,this._forceFirstIDR){let vn=Yt[0].flags;vn.dependsOn=2,vn.isNonSync=0}let yn=pt.moof(nt,sn);nt.samples=[],nt.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(yn,Bi).buffer,sampleCount:Yt.length,info:bn})}_mergeBoxes(Ue,Je){let nt=new Uint8Array(Ue.byteLength+Je.byteLength);return nt.set(Ue,0),nt.set(Je,Ue.byteLength),nt}}var un=mn,pn={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 Hn{constructor(Ue,Je){this.TAG="TransmuxingController",this._emitter=new(Le()),this._config=Je,Ue.segments||(Ue.segments=[{duration:Ue.duration,filesize:Ue.filesize,url:Ue.url}]),typeof Ue.cors!="boolean"&&(Ue.cors=!0),typeof Ue.withCredentials!="boolean"&&(Ue.withCredentials=!1),this._mediaDataSource=Ue,this._currentSegmentIndex=0;let nt=0;this._mediaDataSource.segments.forEach(Pt=>{Pt.timestampBase=nt,nt+=Pt.duration,Pt.cors=Ue.cors,Pt.withCredentials=Ue.withCredentials,Je.referrerPolicy&&(Pt.referrerPolicy=Je.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(Ue,Je){this._emitter.addListener(Ue,Je)}off(Ue,Je){this._emitter.removeListener(Ue,Je)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(Ue,Je){this._currentSegmentIndex=Ue;let nt=this._mediaDataSource.segments[Ue],Pt=this._ioctl=new bt(nt,this._config,Ue);Pt.onError=this._onIOException.bind(this),Pt.onSeeked=this._onIOSeeked.bind(this),Pt.onComplete=this._onIOComplete.bind(this),Pt.onRedirect=this._onIORedirect.bind(this),Pt.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),Je?this._demuxer.bindDataSource(this._ioctl):Pt.onDataArrival=this._onInitChunkArrival.bind(this),Pt.open(Je)}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(Ue){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let Je=this._searchSegmentIndexContains(Ue);if(Je===this._currentSegmentIndex){let nt=this._mediaInfo.segments[Je];if(nt==null)this._pendingSeekTime=Ue;else{let Pt=nt.getNearestKeyframe(Ue);this._remuxer.seek(Pt.milliseconds),this._ioctl.seek(Pt.fileposition),this._pendingResolveSeekPoint=Pt.milliseconds}}else{let nt=this._mediaInfo.segments[Je];if(nt==null)this._pendingSeekTime=Ue,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(Je);else{let Pt=nt.getNearestKeyframe(Ue);this._internalAbort(),this._remuxer.seek(Ue),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[Je].timestampBase,this._loadSegment(Je,Pt.fileposition),this._pendingResolveSeekPoint=Pt.milliseconds,this._reportSegmentMediaInfo(Je)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(Ue){let Je=this._mediaDataSource.segments,nt=Je.length-1;for(let Pt=0;Pt<Je.length;Pt++)if(Ue<Je[Pt].timestampBase){nt=Pt-1;break}return nt}_onInitChunkArrival(Ue,Je){let nt=null,Pt=0;if(Je>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,Pt=this._demuxer.parseChunks(Ue,Je);else if((nt=Ve.probe(Ue)).match){this._demuxer=new Ve(nt,this._config),this._remuxer||(this._remuxer=new un(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),Pt=this._demuxer.parseChunks(Ue,Je)}else nt=null,xe.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(pn.DEMUX_ERROR,tt.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),Pt=0;return Pt}_onMediaInfo(Ue){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},Ue),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Ht.prototype));let Je=Object.assign({},Ue);Object.setPrototypeOf(Je,Ht.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=Je,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let nt=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(nt)})}_onMetaDataArrived(Ue){this._emitter.emit(pn.METADATA_ARRIVED,Ue)}_onScriptDataArrived(Ue){this._emitter.emit(pn.SCRIPTDATA_ARRIVED,Ue)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(Ue){let nt=Ue+1;nt<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(nt)):(this._remuxer.flushStashedSamples(),this._emitter.emit(pn.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(Ue){let Je=this._ioctl.extraData;this._mediaDataSource.segments[Je].redirectedURL=Ue}_onIORecoveredEarlyEof(){this._emitter.emit(pn.RECOVERED_EARLY_EOF)}_onIOException(Ue,Je){xe.e(this.TAG,`IOException: type = ${Ue}, code = ${Je.code}, msg = ${Je.msg}`),this._emitter.emit(pn.IO_ERROR,Ue,Je),this._disableStatisticsReporter()}_onDemuxException(Ue,Je){xe.e(this.TAG,`DemuxException: type = ${Ue}, info = ${Je}`),this._emitter.emit(pn.DEMUX_ERROR,Ue,Je)}_onRemuxerInitSegmentArrival(Ue,Je){this._emitter.emit(pn.INIT_SEGMENT,Ue,Je)}_onRemuxerMediaSegmentArrival(Ue,Je){if(this._pendingSeekTime==null&&(this._emitter.emit(pn.MEDIA_SEGMENT,Ue,Je),this._pendingResolveSeekPoint!=null&&Ue==="video")){let nt=Je.info.syncPoints,Pt=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,re.safari&&nt.length>0&&nt[0].originalDts===Pt&&(Pt=nt[0].pts),this._emitter.emit(pn.RECOMMEND_SEEKPOINT,Pt)}}_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(Ue){let Je=this._mediaInfo.segments[Ue],nt=Object.assign({},Je);nt.duration=this._mediaInfo.duration,nt.segmentCount=this._mediaInfo.segmentCount,delete nt.segments,delete nt.keyframesIndex,this._emitter.emit(pn.MEDIA_INFO,nt)}_reportStatisticsInfo(){let Ue={};Ue.url=this._ioctl.currentURL,Ue.hasRedirect=this._ioctl.hasRedirect,Ue.hasRedirect&&(Ue.redirectedURL=this._ioctl.currentRedirectedURL),Ue.speed=this._ioctl.currentSpeed,Ue.loaderType=this._ioctl.loaderType,Ue.currentSegmentIndex=this._currentSegmentIndex,Ue.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(pn.STATISTICS_INFO,Ue)}}var Qn=Hn,ei=function($n){let Ue="TransmuxingWorker",Je=null,nt=bn.bind(this);Se.install(),$n.addEventListener("message",function(Yt){switch(Yt.data.cmd){case"init":Je=new Qn(Yt.data.param[0],Yt.data.param[1]),Je.on(pn.IO_ERROR,wt.bind(this)),Je.on(pn.DEMUX_ERROR,zt.bind(this)),Je.on(pn.INIT_SEGMENT,Pt.bind(this)),Je.on(pn.MEDIA_SEGMENT,Nt.bind(this)),Je.on(pn.LOADING_COMPLETE,sn.bind(this)),Je.on(pn.RECOVERED_EARLY_EOF,Kt.bind(this)),Je.on(pn.MEDIA_INFO,_n.bind(this)),Je.on(pn.METADATA_ARRIVED,zn.bind(this)),Je.on(pn.SCRIPTDATA_ARRIVED,_i.bind(this)),Je.on(pn.STATISTICS_INFO,Bi.bind(this)),Je.on(pn.RECOMMEND_SEEKPOINT,En.bind(this));break;case"destroy":Je&&(Je.destroy(),Je=null),$n.postMessage({msg:"destroyed"});break;case"start":Je.start();break;case"stop":Je.stop();break;case"seek":Je.seek(Yt.data.param);break;case"pause":Je.pause();break;case"resume":Je.resume();break;case"logging_config":{let gn=Yt.data.param;xt.applyConfig(gn),gn.enableCallback===!0?xt.addLogListener(nt):xt.removeLogListener(nt);break}}});function Pt(Yt,gn){let yn={msg:pn.INIT_SEGMENT,data:{type:Yt,data:gn}};$n.postMessage(yn,[gn.data])}function Nt(Yt,gn){let yn={msg:pn.MEDIA_SEGMENT,data:{type:Yt,data:gn}};$n.postMessage(yn,[gn.data])}function sn(){let Yt={msg:pn.LOADING_COMPLETE};$n.postMessage(Yt)}function Kt(){let Yt={msg:pn.RECOVERED_EARLY_EOF};$n.postMessage(Yt)}function _n(Yt){let gn={msg:pn.MEDIA_INFO,data:Yt};$n.postMessage(gn)}function zn(Yt){let gn={msg:pn.METADATA_ARRIVED,data:Yt};$n.postMessage(gn)}function _i(Yt){let gn={msg:pn.SCRIPTDATA_ARRIVED,data:Yt};$n.postMessage(gn)}function Bi(Yt){let gn={msg:pn.STATISTICS_INFO,data:Yt};$n.postMessage(gn)}function wt(Yt,gn){$n.postMessage({msg:pn.IO_ERROR,data:{type:Yt,info:gn}})}function zt(Yt,gn){$n.postMessage({msg:pn.DEMUX_ERROR,data:{type:Yt,info:gn}})}function En(Yt){$n.postMessage({msg:pn.RECOMMEND_SEEKPOINT,data:Yt})}function bn(Yt,gn){$n.postMessage({msg:"logcat_callback",data:{type:Yt,logcat:gn}})}};class ki{constructor(Ue,Je){if(this.TAG="Transmuxer",this._emitter=new(Le()),Je.enableWorker&&typeof Worker!="undefined")try{let nt=Ie(82059);this._worker=nt(ei),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[Ue,Je]}),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 Qn(Ue,Je)}else this._controller=new Qn(Ue,Je);if(this._controller){let nt=this._controller;nt.on(pn.IO_ERROR,this._onIOError.bind(this)),nt.on(pn.DEMUX_ERROR,this._onDemuxError.bind(this)),nt.on(pn.INIT_SEGMENT,this._onInitSegment.bind(this)),nt.on(pn.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),nt.on(pn.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),nt.on(pn.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),nt.on(pn.MEDIA_INFO,this._onMediaInfo.bind(this)),nt.on(pn.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),nt.on(pn.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),nt.on(pn.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),nt.on(pn.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(Ue,Je){this._emitter.addListener(Ue,Je)}off(Ue,Je){this._emitter.removeListener(Ue,Je)}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(Ue){this._worker?this._worker.postMessage({cmd:"seek",param:Ue}):this._controller.seek(Ue)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(Ue,Je){Promise.resolve().then(()=>{this._emitter.emit(pn.INIT_SEGMENT,Ue,Je)})}_onMediaSegment(Ue,Je){Promise.resolve().then(()=>{this._emitter.emit(pn.MEDIA_SEGMENT,Ue,Je)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(pn.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(pn.RECOVERED_EARLY_EOF)})}_onMediaInfo(Ue){Promise.resolve().then(()=>{this._emitter.emit(pn.MEDIA_INFO,Ue)})}_onMetaDataArrived(Ue){Promise.resolve().then(()=>{this._emitter.emit(pn.METADATA_ARRIVED,Ue)})}_onScriptDataArrived(Ue){Promise.resolve().then(()=>{this._emitter.emit(pn.SCRIPTDATA_ARRIVED,Ue)})}_onStatisticsInfo(Ue){Promise.resolve().then(()=>{this._emitter.emit(pn.STATISTICS_INFO,Ue)})}_onIOError(Ue,Je){Promise.resolve().then(()=>{this._emitter.emit(pn.IO_ERROR,Ue,Je)})}_onDemuxError(Ue,Je){Promise.resolve().then(()=>{this._emitter.emit(pn.DEMUX_ERROR,Ue,Je)})}_onRecommendSeekpoint(Ue){Promise.resolve().then(()=>{this._emitter.emit(pn.RECOMMEND_SEEKPOINT,Ue)})}_onLoggingConfigChanged(Ue){this._worker&&this._worker.postMessage({cmd:"logging_config",param:Ue})}_onWorkerMessage(Ue){let Je=Ue.data,nt=Je.data;if(Je.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Je.msg){case pn.INIT_SEGMENT:case pn.MEDIA_SEGMENT:this._emitter.emit(Je.msg,nt.type,nt.data);break;case pn.LOADING_COMPLETE:case pn.RECOVERED_EARLY_EOF:this._emitter.emit(Je.msg);break;case pn.MEDIA_INFO:Object.setPrototypeOf(nt,Ht.prototype),this._emitter.emit(Je.msg,nt);break;case pn.METADATA_ARRIVED:case pn.SCRIPTDATA_ARRIVED:case pn.STATISTICS_INFO:this._emitter.emit(Je.msg,nt);break;case pn.IO_ERROR:case pn.DEMUX_ERROR:this._emitter.emit(Je.msg,nt.type,nt.info);break;case pn.RECOMMEND_SEEKPOINT:this._emitter.emit(Je.msg,nt);break;case"logcat_callback":xe.emitter.emit("log",nt.type,nt.logcat);break;default:break}}}var Wi=ki,rr={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class vr{constructor(Ue){this.TAG="MSEController",this._config=Ue,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 $t}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ue,Je){this._emitter.addListener(Ue,Je)}off(Ue,Je){this._emitter.removeListener(Ue,Je)}attachMediaElement(Ue){if(this._mediaSource)throw new pe("MediaSource has been attached to an HTMLMediaElement!");let Je=this._mediaSource=new window.MediaSource;Je.addEventListener("sourceopen",this.e.onSourceOpen),Je.addEventListener("sourceended",this.e.onSourceEnded),Je.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=Ue,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),Ue.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let Ue=this._mediaSource;for(let Je in this._sourceBuffers){let nt=this._pendingSegments[Je];nt.splice(0,nt.length),this._pendingSegments[Je]=null,this._pendingRemoveRanges[Je]=null,this._lastInitSegments[Je]=null;let Pt=this._sourceBuffers[Je];if(Pt){if(Ue.readyState!=="closed"){try{Ue.removeSourceBuffer(Pt)}catch(Nt){xe.e(this.TAG,Nt.message)}Pt.removeEventListener("error",this.e.onSourceBufferError),Pt.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Je]=null,this._sourceBuffers[Je]=null}}if(Ue.readyState==="open")try{Ue.endOfStream()}catch(Je){xe.e(this.TAG,Je.message)}Ue.removeEventListener("sourceopen",this.e.onSourceOpen),Ue.removeEventListener("sourceended",this.e.onSourceEnded),Ue.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(Ue,Je){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(Ue),this._pendingSegments[Ue.type].push(Ue);return}let nt=Ue,Pt=`${nt.container}`;nt.codec&&nt.codec.length>0&&(Pt+=`;codecs=${nt.codec}`);let Nt=!1;if(xe.v(this.TAG,"Received Initialization Segment, mimeType: "+Pt),this._lastInitSegments[nt.type]=nt,Pt!==this._mimeTypes[nt.type]){if(this._mimeTypes[nt.type])xe.v(this.TAG,`Notice: ${nt.type} mimeType changed, origin: ${this._mimeTypes[nt.type]}, target: ${Pt}`);else{Nt=!0;try{let sn=this._sourceBuffers[nt.type]=this._mediaSource.addSourceBuffer(Pt);sn.addEventListener("error",this.e.onSourceBufferError),sn.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(sn){xe.e(this.TAG,sn.message),this._emitter.emit(rr.ERROR,{code:sn.code,msg:sn.message});return}}this._mimeTypes[nt.type]=Pt}Je||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(Ue){let Je=Ue;this._pendingSegments[Je.type].push(Je),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let nt=this._sourceBuffers[Je.type];nt&&!nt.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(Ue){for(let Je in this._sourceBuffers){if(!this._sourceBuffers[Je])continue;let nt=this._sourceBuffers[Je];if(this._mediaSource.readyState==="open")try{nt.abort()}catch(Nt){xe.e(this.TAG,Nt.message)}this._idrList.clear();let Pt=this._pendingSegments[Je];if(Pt.splice(0,Pt.length),this._mediaSource.readyState!=="closed"){for(let Nt=0;Nt<nt.buffered.length;Nt++){let sn=nt.buffered.start(Nt),Kt=nt.buffered.end(Nt);this._pendingRemoveRanges[Je].push({start:sn,end:Kt})}if(nt.updating||this._doRemoveRanges(),re.safari){let Nt=this._lastInitSegments[Je];Nt&&(this._pendingSegments[Je].push(Nt),nt.updating||this._doAppendSegments())}}}}endOfStream(){let Ue=this._mediaSource,Je=this._sourceBuffers;if(!Ue||Ue.readyState!=="open"){Ue&&Ue.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Je.video&&Je.video.updating||Je.audio&&Je.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,Ue.endOfStream())}getNearestKeyframe(Ue){return this._idrList.getLastSyncPointBeforeDts(Ue)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let Ue=this._mediaElement.currentTime;for(let Je in this._sourceBuffers){let nt=this._sourceBuffers[Je];if(nt){let Pt=nt.buffered;if(Pt.length>=1&&Ue-Pt.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let Ue=this._mediaElement.currentTime;for(let Je in this._sourceBuffers){let nt=this._sourceBuffers[Je];if(nt){let Pt=nt.buffered,Nt=!1;for(let sn=0;sn<Pt.length;sn++){let Kt=Pt.start(sn),_n=Pt.end(sn);if(Kt<=Ue&&Ue<_n+3){if(Ue-Kt>=this._config.autoCleanupMaxBackwardDuration){Nt=!0;let zn=Ue-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Je].push({start:Kt,end:zn})}}else _n<Ue&&(Nt=!0,this._pendingRemoveRanges[Je].push({start:Kt,end:_n}))}Nt&&!nt.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let Ue=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||Ue.video&&Ue.video.updating||Ue.audio&&Ue.audio.updating)return;let Je=this._mediaSource.duration,nt=this._pendingMediaDuration;nt>0&&(isNaN(Je)||nt>Je)&&(xe.v(this.TAG,`Update MediaSource duration from ${Je} to ${nt}`),this._mediaSource.duration=nt),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let Ue in this._pendingRemoveRanges){if(!this._sourceBuffers[Ue]||this._sourceBuffers[Ue].updating)continue;let Je=this._sourceBuffers[Ue],nt=this._pendingRemoveRanges[Ue];for(;nt.length&&!Je.updating;){let Pt=nt.shift();Je.remove(Pt.start,Pt.end)}}}_doAppendSegments(){let Ue=this._pendingSegments;for(let Je in Ue)if(!(!this._sourceBuffers[Je]||this._sourceBuffers[Je].updating)&&Ue[Je].length>0){let nt=Ue[Je].shift();if(nt.timestampOffset){let Pt=this._sourceBuffers[Je].timestampOffset,Nt=nt.timestampOffset/1e3;Math.abs(Pt-Nt)>.1&&(xe.v(this.TAG,`Update MPEG audio timestampOffset from ${Pt} to ${Nt}`),this._sourceBuffers[Je].timestampOffset=Nt),delete nt.timestampOffset}if(!nt.data||nt.data.byteLength===0)continue;try{this._sourceBuffers[Je].appendBuffer(nt.data),this._isBufferFull=!1,Je==="video"&&nt.hasOwnProperty("info")&&this._idrList.appendArray(nt.info.syncPoints)}catch(Pt){this._pendingSegments[Je].unshift(nt),Pt.code===22?(this._isBufferFull||this._emitter.emit(rr.BUFFER_FULL),this._isBufferFull=!0):(xe.e(this.TAG,Pt.message),this._emitter.emit(rr.ERROR,{code:Pt.code,msg:Pt.message}))}}}_onSourceOpen(){if(xe.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let Ue=this._pendingSourceBufferInit;for(;Ue.length;){let Je=Ue.shift();this.appendInitSegment(Je,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(rr.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 Ue=this._pendingSegments;return Ue.video.length>0||Ue.audio.length>0}_hasPendingRemoveRanges(){let Ue=this._pendingRemoveRanges;return Ue.video.length>0||Ue.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(rr.UPDATE_END)}_onSourceBufferError(Ue){xe.e(this.TAG,`SourceBuffer Error: ${Ue}`)}}var wr=vr;const Oi={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Zi={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 pr{constructor(Ue,Je){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(Le()),this._config=Rt(),typeof Je=="object"&&Object.assign(this._config,Je),Ue.type.toLowerCase()!=="flv")throw new de("FlvPlayer requires an flv MediaDataSource input!");Ue.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=Ue,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(Ue,Je){Ue===yt.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):Ue===yt.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ue,Je)}off(Ue,Je){this._emitter.removeListener(Ue,Je)}attachMediaElement(Ue){if(this._mediaElement=Ue,Ue.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),Ue.addEventListener("seeking",this.e.onvSeeking),Ue.addEventListener("canplay",this.e.onvCanPlay),Ue.addEventListener("stalled",this.e.onvStalled),Ue.addEventListener("progress",this.e.onvProgress),this._msectl=new wr(this._config),this._msectl.on(rr.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(rr.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(rr.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(rr.ERROR,Je=>{this._emitter.emit(yt.ERROR,Oi.MEDIA_ERROR,Zi.MEDIA_MSE_ERROR,Je)}),this._msectl.attachMediaElement(Ue),this._pendingSeekTime!=null)try{Ue.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Je){}}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 Wi(this._mediaDataSource,this._config),this._transmuxer.on(pn.INIT_SEGMENT,(Ue,Je)=>{this._msectl.appendInitSegment(Je)}),this._transmuxer.on(pn.MEDIA_SEGMENT,(Ue,Je)=>{if(this._msectl.appendMediaSegment(Je),this._config.lazyLoad&&!this._config.isLive){let nt=this._mediaElement.currentTime;Je.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(pn.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(yt.LOADING_COMPLETE)}),this._transmuxer.on(pn.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(yt.RECOVERED_EARLY_EOF)}),this._transmuxer.on(pn.IO_ERROR,(Ue,Je)=>{this._emitter.emit(yt.ERROR,Oi.NETWORK_ERROR,Ue,Je)}),this._transmuxer.on(pn.DEMUX_ERROR,(Ue,Je)=>{this._emitter.emit(yt.ERROR,Oi.MEDIA_ERROR,Ue,{code:-1,msg:Je})}),this._transmuxer.on(pn.MEDIA_INFO,Ue=>{this._mediaInfo=Ue,this._emitter.emit(yt.MEDIA_INFO,Object.assign({},Ue))}),this._transmuxer.on(pn.METADATA_ARRIVED,Ue=>{this._emitter.emit(yt.METADATA_ARRIVED,Ue)}),this._transmuxer.on(pn.SCRIPTDATA_ARRIVED,Ue=>{this._emitter.emit(yt.SCRIPTDATA_ARRIVED,Ue)}),this._transmuxer.on(pn.STATISTICS_INFO,Ue=>{this._statisticsInfo=this._fillStatisticsInfo(Ue),this._emitter.emit(yt.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(pn.RECOMMEND_SEEKPOINT,Ue=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ue/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(Ue){this._mediaElement.volume=Ue}get muted(){return this._mediaElement.muted}set muted(Ue){this._mediaElement.muted=Ue}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ue){this._mediaElement?this._internalSeek(Ue):this._pendingSeekTime=Ue}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(Ue){if(Ue.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return Ue;let Je=!0,nt=0,Pt=0;if(this._mediaElement.getVideoPlaybackQuality){let Nt=this._mediaElement.getVideoPlaybackQuality();nt=Nt.totalVideoFrames,Pt=Nt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(nt=this._mediaElement.webkitDecodedFrameCount,Pt=this._mediaElement.webkitDroppedFrameCount):Je=!1;return Je&&(Ue.decodedFrames=nt,Ue.droppedFrames=Pt),Ue}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let Ue=this._mediaElement.buffered,Je=this._mediaElement.currentTime,nt=0,Pt=0;for(let Nt=0;Nt<Ue.length;Nt++){let sn=Ue.start(Nt),Kt=Ue.end(Nt);if(sn<=Je&&Je<Kt){nt=sn,Pt=Kt;break}}Pt>=Je+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 Ue=this._mediaElement.currentTime,Je=this._mediaElement.buffered,nt=!1;for(let Pt=0;Pt<Je.length;Pt++){let Nt=Je.start(Pt),sn=Je.end(Pt);if(Ue>=Nt&&Ue<sn){Ue>=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(Ue){let Je=this._mediaElement.buffered;for(let nt=0;nt<Je.length;nt++){let Pt=Je.start(nt),Nt=Je.end(nt);if(Ue>=Pt&&Ue<Nt)return!0}return!1}_internalSeek(Ue){let Je=this._isTimepointBuffered(Ue),nt=!1,Pt=0;if(Ue<1&&this._mediaElement.buffered.length>0){let Nt=this._mediaElement.buffered.start(0);(Nt<1&&Ue<Nt||re.safari)&&(nt=!0,Pt=re.safari?.1:Nt)}if(nt)this._requestSetTime=!0,this._mediaElement.currentTime=Pt;else if(Je){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=Ue;else{let Nt=this._msectl.getNearestKeyframe(Math.floor(Ue*1e3));this._requestSetTime=!0,Nt!=null?this._mediaElement.currentTime=Nt.dts/1e3:this._mediaElement.currentTime=Ue}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ue),this._transmuxer.seek(Math.floor(Ue*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ue)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let Ue=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(Ue)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ue),this._transmuxer.seek(Math.floor(Ue*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ue))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(Ue){let Je=this._mediaElement;if(Ue||!this._receivedCanPlay||Je.readyState<2){let nt=Je.buffered;nt.length>0&&Je.currentTime<nt.start(0)&&(xe.w(this.TAG,`Playback seems stuck at ${Je.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(Ue){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(Ue){let Je=this._mediaElement.currentTime,nt=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Je<1&&nt.length>0){let Pt=nt.start(0);if(Pt<1&&Je<Pt||re.safari){this._requestSetTime=!0,this._mediaElement.currentTime=re.safari?.1:Pt;return}}if(this._isTimepointBuffered(Je)){if(this._alwaysSeekKeyframe){let Pt=this._msectl.getNearestKeyframe(Math.floor(Je*1e3));Pt!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=Pt.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:Je,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(Ue){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(Ue){this._checkAndResumeStuckPlayback(!0)}_onvProgress(Ue){this._checkAndResumeStuckPlayback()}}var et=pr;class ai{constructor(Ue,Je){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(Le()),this._config=Rt(),typeof Je=="object"&&Object.assign(this._config,Je),Ue.type.toLowerCase()==="flv")throw new de("NativePlayer does't support flv MediaDataSource input!");if(Ue.hasOwnProperty("segments"))throw new de(`NativePlayer(${Ue.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=Ue,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ue,Je){Ue===yt.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.MEDIA_INFO,this.mediaInfo)}):Ue===yt.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(yt.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ue,Je)}off(Ue,Je){this._emitter.removeListener(Ue,Je)}attachMediaElement(Ue){if(this._mediaElement=Ue,Ue.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{Ue.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Je){}}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(Ue){this._mediaElement.volume=Ue}get muted(){return this._mediaElement.muted}set muted(Ue){this._mediaElement.muted=Ue}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ue){this._mediaElement?this._mediaElement.currentTime=Ue:this._pendingSeekTime=Ue}get mediaInfo(){let Je={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(Je.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(Je.width=this._mediaElement.videoWidth,Je.height=this._mediaElement.videoHeight)),Je}get statisticsInfo(){let Ue={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return Ue;let Je=!0,nt=0,Pt=0;if(this._mediaElement.getVideoPlaybackQuality){let Nt=this._mediaElement.getVideoPlaybackQuality();nt=Nt.totalVideoFrames,Pt=Nt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(nt=this._mediaElement.webkitDecodedFrameCount,Pt=this._mediaElement.webkitDroppedFrameCount):Je=!1;return Je&&(Ue.decodedFrames=nt,Ue.droppedFrames=Pt),Ue}_onvLoadedMetadata(Ue){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 ti=ai;Se.install();function Ii($n,Ue){let Je=$n;if(Je==null||typeof Je!="object")throw new de("MediaDataSource must be an javascript object!");if(!Je.hasOwnProperty("type"))throw new de("MediaDataSource must has type field to indicate video file type!");switch(Je.type){case"flv":return new et(Je,Ue);default:return new ti(Je,Ue)}}function gr(){return ot.supportMSEH264Playback()}function hr(){return ot.getFeatureList()}let or={};or.createPlayer=Ii,or.isSupported=gr,or.getFeatureList=hr,or.BaseLoader=ee,or.LoaderStatus=fe,or.LoaderErrors=ue,or.Events=yt,or.ErrorTypes=Oi,or.ErrorDetails=Zi,or.FlvPlayer=et,or.NativePlayer=ti,or.LoggingControl=xt,Object.defineProperty(or,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var po=or},93125:function(Sn,ln,Ie){(function(ke){if(1)window.OSS=ke(),Sn.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,ht){return ot[ht]||ot[ht.toLowerCase()]}function we(ot,ht){var yt=Oe.parse(ot);if(!yt.protocol){var _t=ht?"https://":"http://";yt=Oe.parse(_t+ot)}if(yt.protocol!=="http:"&&yt.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return yt}function pe(ot,ht,yt){var _t=yt?"https://":"http://",xt=ht?"-internal.aliyuncs.com":".aliyuncs.com";return ot.substr(0,14)==="vpc100-oss-cn-"&&(xt=".aliyuncs.com"),Oe.parse(_t+ot+xt)}function de(){return document&&document.location&&document.location.protocol==="https:"}function ge(ot,ht){if(!(this instanceof ge))return new ge(ot,ht);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=vt,this.agent=this.options.agent||Rt),this.ctx=ht,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"),De=Se("merge-descriptors"),Oe=Se("url"),Ze=Se("is-type-of"),qe=Se("platform"),Xe=Se("utility"),vt=Se("urllib"),gt=Se("./version"),kt=Se("dateformat"),at=Se("bowser"),bt=Se("../common/signUtils"),ct=Se("../common/utils"),Rt=new Ae;Be.exports=ge,ge.initOptions=function(ot){if(!ot||!ot.accessKeyId||!ot.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var ht=de(),yt={region:"oss-cn-hangzhou",internal:!1,secure:ht,bucket:null,endpoint:null,cname:!1};if((0,z.default)(ot).forEach(function(_t){ot[_t]!==void 0&&(yt[_t]=ot[_t])}),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;De(ut,Se("./object")),De(ut,Se("./managed_upload")),De(ut,Se("../common/multipart")),De(ut,Se("../common/thunkpool.js")),ge.Wrapper=Se("./wrapper"),ut.signature=function(ot){return oe("authorization stringToSign: %s",ot),bt.computeSignature(this.options.accessKeySecret,ot)},ut.authorization=function(ot,ht,yt,_t){var xt=bt.buildCanonicalString(ot.toUpperCase(),ht,{headers:_t,parameters:yt});return bt.authorization(this.options.accessKeyId,this.options.accessKeySecret,xt)},ut.createRequest=function(ot){var ht={"x-oss-date":kt(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(ht["x-oss-security-token"]=this.options.stsToken),le(ot.headers).to(ht),ye(ht,"Content-Type")||(ot.mime===me.default_type&&(ot.mime=""),ot.mime&&ot.mime.indexOf("/")>0?ht["Content-Type"]=ot.mime:ht["Content-Type"]=me.getType(ot.mime||ae.extname(ot.object||""))||"application/octet-stream"),ot.content&&(ht["Content-Md5"]=re.createHash("md5").update(new xe(ot.content,"utf8")).digest("base64"),ht["Content-Length"]||(ht["Content-Length"]=ot.content.length));var yt=this._getResource(ot);ht.authorization=this.authorization(ot.method,yt,ot.subres,ht);var _t=this._getReqUrl(ot);oe("request %s %s, with headers %j, !!stream: %s",ot.method,_t,ht,!!ot.stream);var xt=ot.timeout||this.options.timeout;return{url:_t,params:{agent:this.agent,method:ot.method,content:ot.content,stream:ot.stream,headers:ht,timeout:xt,writeStream:ot.writeStream,customResponse:ot.customResponse,ctx:ot.ctx||this.ctx}}},ut.request=ue.default.mark(function ot(ht){var yt,_t,xt,Ut;return ue.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return yt=this.createRequest(ht),_t=void 0,xt=void 0,Ht.prev=3,Ht.next=6,this.urllib.request(yt.url,yt.params);case 6:_t=Ht.sent,oe("response %s %s, got %s, headers: %j",ht.method,yt.url,_t.status,_t.headers),Ht.next=13;break;case 10:Ht.prev=10,Ht.t0=Ht.catch(3),xt=Ht.t0;case 13:if(Ut=void 0,!_t||!ht.successStatuses||ht.successStatuses.indexOf(_t.status)!==-1){Ht.next=26;break}return Ht.next=17,this.requestError(_t);case 17:if(Ut=Ht.sent,Ut.code!=="RequestTimeTooSkewed"){Ht.next=23;break}return this.options.amendTimeSkewed=+new Date(Ut.serverTime)-new Date,Ht.next=22,this.request(ht);case 22:return Ht.abrupt("return",Ht.sent);case 23:Ut.params=ht,Ht.next=30;break;case 26:if(!xt){Ht.next=30;break}return Ht.next=29,this.requestError(xt);case 29:Ut=Ht.sent;case 30:if(!Ut){Ht.next=32;break}throw Ut;case 32:if(!ht.xmlResponse){Ht.next=36;break}return Ht.next=35,this.parseXML(_t.data);case 35:_t.data=Ht.sent;case 36:return Ht.abrupt("return",_t);case 37:case"end":return Ht.stop()}},ot,this,[[3,10]])}),ut._getResource=function(ot){var ht="/";return ot.bucket&&(ht+=ot.bucket+"/"),ot.object&&(ht+=ot.object),ht},ut._isIP=function(ot){return ct._isIP(ot)},ut._escape=function(ot){return Xe.encodeURIComponent(ot).replace(/%2F/g,"/")},ut._getReqUrl=function(ot){var ht={};le(this.options.endpoint).to(ht);var yt=this._isIP(ht.hostname),_t=this.options.cname;!ot.bucket||_t||yt||(ht.host=ot.bucket+"."+ht.host);var xt="/";ot.bucket&&yt&&(xt+=ot.bucket+"/"),ot.object&&(xt+=this._escape(ot.object).replace(/\+/g,"%2B")),ht.pathname=xt;var Ut={};if(ot.query&&De(Ut,ot.query),ot.subres){var Ht={};Ze.string(ot.subres)?Ht[ot.subres]="":Ze.array(ot.subres)?ot.subres.forEach(function(dn){Ht[dn]=""}):Ht=ot.subres,De(Ut,Ht)}return ht.query=Ut,Oe.format(ht)},ut._getUserAgent=function(){var ot=Ce&&Ce.browser?"js":"nodejs",ht="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(ht+" "+yt)},ut._checkUserAgent=function(ot){return ot.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},ut.checkBrowserAndVersion=function(ot,ht){return at.name===ot&&at.version.split(".")[0]===ht},ut.parseXML=function(ot){return function(ht){xe.isBuffer(ot)&&(ot=ot.toString()),ve.parseString(ot,{explicitRoot:!1,explicitArray:!1},ht)}},ut.requestError=ue.default.mark(function ot(ht){var yt,_t,xt,Ut;return ue.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(yt=null,ht.data&&ht.data.length){Ht.next=5;break}ht.status===-1||ht.status===-2?(yt=new Error(ht.message),yt.name=ht.name,yt.status=ht.status,yt.code=ht.name):(ht.status===404?(yt=new Error("Object not exists"),yt.name="NoSuchKeyError",yt.status=404,yt.code="NoSuchKey"):ht.status===412?(yt=new Error("Pre condition failed"),yt.name="PreconditionFailedError",yt.status=412,yt.code="PreconditionFailed"):(yt=new Error("Unknow error, status: "+ht.status),yt.name="UnknowError",yt.status=ht.status),yt.requestId=ht.headers["x-oss-request-id"],yt.host=""),Ht.next=30;break;case 5:return _t=String(ht.data),oe("request response error data: %s",_t),xt=void 0,Ht.prev=8,Ht.next=11,this.parseXML(_t)||{};case 11:xt=Ht.sent,Ht.next=21;break;case 14:return Ht.prev=14,Ht.t0=Ht.catch(8),oe(_t),Ht.t0.message+=`
raw xml: `+_t,Ht.t0.status=ht.status,Ht.t0.requestId=ht.headers["x-oss-request-id"],Ht.abrupt("return",Ht.t0);case 21:Ut=xt.Message||"unknow request error, status: "+ht.status,xt.Condition&&(Ut+=" (condition: "+xt.Condition+")"),yt=new Error(Ut),yt.name=xt.Code?xt.Code+"Error":"UnknowError",yt.status=ht.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),Ht.abrupt("return",yt);case 32:case"end":return Ht.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,De,Oe,Ze,qe,Xe,vt,gt,kt;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(!((De=at.sent)<Ae)){at.next=25;break}return Oe=this._createStream(ve,0,De),Pe.contentLength=De,at.next=18,this.putStream(me,Oe,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(Xe=at.sent,vt=Xe.uploadId,gt=this._getPartSize(De,Pe.partSize),kt={file:ve,name:me,fileSize:De,partSize:gt,uploadId:vt,doneParts:[]},!Pe||!Pe.progress){at.next=36;break}return at.next=36,Pe.progress(0,kt,Xe.res);case 36:return at.next=38,this._resumeMultipart(kt,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,De,Oe,Ze,qe,Xe,vt,gt,kt,at,bt,ct,Rt,ut,ot,ht,yt,_t,xt,Ut;return de.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(!this.isCancel()){Ht.next=2;break}throw this._makeCancelEvent();case 2:if(Pe=me.file,Ae=me.fileSize,De=me.partSize,Oe=me.uploadId,Ze=me.doneParts,qe=me.name,Xe=[],Ze.length>0&&z(Ze).to(Xe),vt=this._divideParts(Ae,De),gt=vt.length,kt=!1,at=de.default.mark(function dn(Ft,fn){var It,Xt,tn;return de.default.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:if(Ft.isCancel()){lt.next=21;break}return lt.prev=1,It=vt[fn-1],Xt={stream:Ft._createStream(Pe,It.start,It.end),size:It.end-It.start},lt.next=6,Ft._uploadPart(qe,Oe,fn,Xt);case 6:if(tn=lt.sent,Ft.isCancel()||kt){lt.next=13;break}if(me.doneParts.push({number:fn,etag:tn.res.headers.etag}),Xe.push({number:fn,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),Ft.isCancel()){lt.next=21;break}throw Ft.cancel(),lt.t0.partNum=fn,lt.t0;case 21:case"end":return lt.stop()}},dn,this,[[1,15]])}),bt=(0,we.default)(new Array(gt),function(dn,Ft){return Ft+1}),ct=Xe.map(function(dn){return dn.number}),Rt=bt.filter(function(dn){return ct.indexOf(dn)<0}),ut=5,ot=ve.parallel||ut,!this.checkBrowserAndVersion("Internet Explorer","10")&&ot!==1){Ht.next=26;break}ht=0;case 16:if(!(ht<Rt.length)){Ht.next=24;break}if(!this.isCancel()){Ht.next=19;break}throw this._makeCancelEvent();case 19:return Ht.next=21,at(this,Rt[ht]);case 21:ht++,Ht.next=16;break;case 24:Ht.next=40;break;case 26:for(yt=[],_t=0;_t<Rt.length;_t++)yt.push(at(this,Rt[_t]));return Ht.next=30,this._thunkPool(yt,ot);case 30:if(xt=Ht.sent,kt=!0,!(xt&&xt.length>0)){Ht.next=37;break}throw this.resetCancelFlag(),Ut=xt[0],Ut.message="Failed to upload some parts with error: "+Ut.toString()+" part_num: "+Ut.partNum,Ut;case 37:if(!this.isCancel()){Ht.next=40;break}throw yt=null,this._makeCancelEvent();case 40:return Ht.next=42,this.completeMultipartUpload(qe,Oe,Xe,ve);case 42:return Ht.abrupt("return",Ht.sent);case 43:case"end":return Ht.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 De=me*Ae,Oe=Math.min(De+me,le);Pe.push({start:De,end:Oe})}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 De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Ae=Ae||{},Ae.position===void 0&&(Ae.position="0"),Ae.subres={append:"",position:Ae.position},Ae.method="POST",Oe.next=6,this.put(ve,Pe,Ae);case 6:return De=Oe.sent,De.nextAppendPosition=De.res.headers["x-oss-next-append-position"],Oe.abrupt("return",De);case 9:case"end":return Oe.stop()}},me,this)}),le.put=we.default.mark(function me(ve,Pe,Ae){var De,Oe,Ze,qe,Xe,vt;return we.default.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:if(De=void 0,Ae=Ae||{},!fe.buffer(Pe)){gt.next=6;break}De=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),Oe=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,Oe,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=De,qe.successStatuses=[200],gt.next=28,this.request(qe);case 28:return Xe=gt.sent,vt={name:ve,url:this._objectUrl(ve),res:Xe.res},qe.headers&&qe.headers["x-oss-callback"]&&(vt.data=JSON.parse(Xe.data.toString())),gt.abrupt("return",vt);case 32:case"end":return gt.stop()}},me,this)}),le.putStream=we.default.mark(function me(ve,Pe,Ae){var De,Oe,Ze,qe;return we.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.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),De=Ae.method||"PUT",Oe=this._objectRequestParams(De,ve,Ae),re.encodeCallback(Oe,Ae),Oe.mime=Ae.mime,Oe.stream=Pe,Oe.successStatuses=[200],Xe.next=12,this.request(Oe);case 12:return Ze=Xe.sent,qe={name:ve,url:this._objectUrl(ve),res:Ze.res},Oe.headers&&Oe.headers["x-oss-callback"]&&(qe.data=JSON.parse(Ze.data.toString())),Xe.abrupt("return",qe);case 16:case"end":return Xe.stop()}},me,this)}),le.head=we.default.mark(function me(ve,Pe){var Ae,De,Oe;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 De=Ze.sent,Oe={meta:null,res:De.res,status:De.status},De.status===200&&(0,be.default)(De.headers).forEach(function(qe){qe.indexOf("x-oss-meta-")===0&&(Oe.meta||(Oe.meta={}),Oe.meta[qe.substring(11)]=De.headers[qe])}),Ze.abrupt("return",Oe);case 8:case"end":return Ze.stop()}},me,this)}),le.get=we.default.mark(function me(ve,Pe,Ae){var De,Oe,Ze,qe;return we.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return De=null,Oe=!1,fe.writableStream(Pe)?De=Pe:fe.string(Pe)?(De=ge.createWriteStream(Pe),Oe=!0):Ae=Pe,Ae=Ae||{},Ae.process&&(Ae.subres=Ae.subres||{},Ae.subres["x-oss-process"]=Ae.process),Ze=void 0,Xe.prev=6,qe=this._objectRequestParams("GET",ve,Ae),qe.writeStream=De,qe.successStatuses=[200,206,304],Xe.next=12,this.request(qe);case 12:Ze=Xe.sent,Oe&&De.destroy(),Xe.next=24;break;case 16:if(Xe.prev=16,Xe.t0=Xe.catch(6),!Oe){Xe.next=23;break}return De.destroy(),pe("get error: %s, delete the exists file %s",Xe.t0,Pe),Xe.next=23,this._deleteFileSafe(Pe);case 23:throw Xe.t0;case 24:return Xe.abrupt("return",{res:Ze.res,content:Ze.data});case 25:case"end":return Xe.stop()}},me,this,[[6,16]])}),le.getStream=we.default.mark(function me(ve,Pe){var Ae,De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Pe=Pe||{},Ae=this._objectRequestParams("GET",ve,Pe),Ae.customResponse=!0,Ae.successStatuses=[200,206,304],Oe.next=6,this.request(Ae);case 6:return De=Oe.sent,Oe.abrupt("return",{stream:De.res,res:{status:De.status,headers:De.headers}});case 8:case"end":return Oe.stop()}},me,this)}),le.delete=we.default.mark(function me(ve,Pe){var Ae,De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Ae=this._objectRequestParams("DELETE",ve,Pe),Ae.successStatuses=[204],Oe.next=4,this.request(Ae);case 4:return De=Oe.sent,Oe.abrupt("return",{res:De.res});case 6:case"end":return Oe.stop()}},me,this)}),le.deleteMulti=we.default.mark(function me(ve,Pe){var Ae,De,Oe,Ze,qe,Xe;return we.default.wrap(function(vt){for(;;)switch(vt.prev=vt.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>
`,De=0;De<ve.length;De++)Ae+=" <Object><Key>"+de.escape(this._objectName(ve[De]))+`</Key></Object>
`;return Ae+="</Delete>",pe("delete multi objects: %s",Ae),Pe.subres="delete",Oe=this._objectRequestParams("POST","",Pe),Oe.mime="xml",Oe.content=Ae,Oe.xmlResponse=!0,Oe.successStatuses=[200],vt.next=14,this.request(Oe);case 14:return Ze=vt.sent,qe=Ze.data,Xe=qe&&qe.Deleted||null,Xe&&(Array.isArray(Xe)||(Xe=[Xe]),Xe=Xe.map(function(gt){return gt.Key})),vt.abrupt("return",{res:Ze.res,deleted:Xe});case 19:case"end":return vt.stop()}},me,this)}),le.copy=we.default.mark(function me(ve,Pe,Ae){var De,Oe,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(Xe){Ae.headers["x-oss-copy-source-"+Xe.toLowerCase()]=Ae.headers[Xe]}),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,De=this._objectRequestParams("PUT",ve,Ae),De.xmlResponse=!0,De.successStatuses=[200,304],qe.next=12,this.request(De);case 12:return Oe=qe.sent,Ze=Oe.data,Ze&&(Ze={etag:Ze.ETag,lastModified:Ze.LastModified}),qe.abrupt("return",{data:Ze,res:Oe.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(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,this.copy(ve,ve,{meta:Pe||{},timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx});case 2:return De.abrupt("return",De.sent);case 3:case"end":return De.stop()}},me,this)}),le.list=we.default.mark(function me(ve,Pe){var Ae,De,Oe,Ze,qe;return we.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Ae=this._objectRequestParams("GET","",Pe),Ae.query=ve,Ae.xmlResponse=!0,Ae.successStatuses=[200],Xe.next=6,this.request(Ae);case 6:return De=Xe.sent,Oe=De.data.Contents,Ze=this,Oe&&(Array.isArray(Oe)||(Oe=[Oe]),Oe=Oe.map(function(vt){return{name:vt.Key,url:Ze._objectUrl(vt.Key),lastModified:vt.LastModified,etag:vt.ETag,type:vt.Type,size:Number(vt.Size),storageClass:vt.StorageClass,owner:{id:vt.Owner.ID,displayName:vt.Owner.DisplayName}}})),qe=De.data.CommonPrefixes||null,qe&&(Array.isArray(qe)||(qe=[qe]),qe=qe.map(function(vt){return vt.Prefix})),Xe.abrupt("return",{res:De.res,objects:Oe,prefixes:qe,nextMarker:De.data.NextMarker||null,isTruncated:De.data.IsTruncated==="true"});case 13:case"end":return Xe.stop()}},me,this)}),le.putACL=we.default.mark(function me(ve,Pe,Ae){var De,Oe;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),De=this._objectRequestParams("PUT",ve,Ae),De.successStatuses=[200],Ze.next=9,this.request(De);case 9:return Oe=Ze.sent,Ze.abrupt("return",{res:Oe.res});case 11:case"end":return Ze.stop()}},me,this)}),le.getACL=we.default.mark(function me(ve,Pe){var Ae,De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.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,Oe.next=8,this.request(Ae);case 8:return De=Oe.sent,Oe.abrupt("return",{acl:De.data.AccessControlList.Grant,owner:{id:De.data.Owner.ID,displayName:De.data.Owner.DisplayName},res:De.res});case 10:case"end":return Oe.stop()}},me,this)}),le.restore=we.default.mark(function me(ve,Pe){var Ae,De;return we.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Pe=Pe||{},Pe.subres="restore",Ae=this._objectRequestParams("POST",ve,Pe),Ae.successStatuses=[202],Oe.next=6,this.request(Ae);case 6:return De=Oe.sent,Oe.abrupt("return",{res:De.res});case 8:case"end":return Oe.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},De=this._getResource(Ae);this.options.stsToken&&(ve["security-token"]=this.options.stsToken);var Oe=ae._signatureForURL(this.options.accessKeySecret,ve,De,Pe),Ze=ue.parse(this._getReqUrl(Ae));return Ze.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Pe,Signature:Oe.Signature},ee(Oe.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,De){return Ae.number-De.number}).filter(function(Ae,De,Oe){return!De||Ae.number!==Oe[De-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 Oe;return xe.default.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:Oe=void 0;case 1:if(ee.isCancel()){Ze.next=9;break}return Ze.next=4,Pe.next();case 4:return Oe=Ze.sent,Ze.next=7,Oe();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(Oe){console.error(Oe.stack)}for(var ve=xe.default.mark(le),Pe=new ye,Ae=0,De=0;De<re;De++)be(le).catch(me);return function(Oe,Ze){return function(qe){Pe.push(xe.default.mark(function Xe(){return xe.default.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return vt.prev=0,vt.t0=qe,vt.next=4,Oe;case 4:vt.t1=vt.sent,(0,vt.t0)(null,vt.t1),vt.next=11;break;case 8:vt.prev=8,vt.t2=vt.catch(0),qe(vt.t2);case 11:case"end":return vt.stop()}},Xe,this,[[0,8]])}),Ze)}}}var ee=this,z=0,oe=[];return new we(function(re){function ae(Ae){return xe.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,ve(de[Ae]);case 2:fe(de,re);case 3:case"end":return De.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,De=ve>0?me-4:me,Oe=0;Oe<De;Oe+=4)ae=fe[re.charCodeAt(Oe)]<<18|fe[re.charCodeAt(Oe+1)]<<12|fe[re.charCodeAt(Oe+2)]<<6|fe[re.charCodeAt(Oe+3)],Pe[Ae++]=ae>>16&255,Pe[Ae++]=ae>>8&255,Pe[Ae++]=255&ae;return ve===2&&(ae=fe[re.charCodeAt(Oe)]<<2|fe[re.charCodeAt(Oe+1)]>>4,Pe[Ae++]=255&ae),ve===1&&(ae=fe[re.charCodeAt(Oe)]<<10|fe[re.charCodeAt(Oe+1)]<<4|fe[re.charCodeAt(Oe+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 ht=fe.match(ot);return ht&&ht.length>1&&ht[1]||""}function ee(ot){var ht=fe.match(ot);return ht&&ht.length>1&&ht[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),De=/tizen/i.test(fe),Oe=/(web|hpw)os/i.test(fe),Ze=/windows phone/i.test(fe),qe=(/SamsungBrowser/i.test(fe),!Ze&&/windows/i.test(fe)),Xe=!oe&&!Pe&&/macintosh/i.test(fe),vt=!ae&&!Ae&&!De&&!Oe&&/linux/i.test(fe),gt=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),kt=ue(/version\/(\d+(\.\d+)?)/i),at=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),bt=!at&&/[^-]mobi/i.test(fe),ct=/xbox/i.test(fe);/opera/i.test(fe)?z={name:"Opera",opera:de,version:kt||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)||kt}:/SamsungBrowser/i.test(fe)?z={name:"Samsung Internet for Android",samsungBrowser:de,version:kt||ue(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(fe)?z={name:"Opera Coast",coast:de,version:kt||ue(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(fe)?z={name:"Yandex Browser",yandexbrowser:de,version:kt||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)||kt}: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:kt||ue(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Oe?(z={name:"WebOS",osname:"WebOS",webos:de,version:kt||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)}:De?z={name:"Tizen",osname:"Tizen",tizen:de,version:ue(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||kt}:/qupzilla/i.test(fe)?z={name:"QupZilla",qupzilla:de,version:ue(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||kt}:/chromium/i.test(fe)?z={name:"Chromium",chromium:de,version:ue(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||kt}:/chrome|crios|crmo/i.test(fe)?z={name:"Chrome",chrome:de,version:ue(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:ae?z={name:"Android",version:kt}:/safari|applewebkit/i.test(fe)?(z={name:"Safari",safari:de},kt&&(z.version=kt)):oe?(z={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},kt&&(z.version=kt)):z=/googlebot/i.test(fe)?{name:"Googlebot",googlebot:de,version:ue(/googlebot\/(\d+(\.\d+))/i)||kt}:{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&&kt&&(z.version=kt)):!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"):Xe?(z.mac=de,z.osname="macOS"):ct?(z.xbox=de,z.osname="Xbox"):qe?(z.windows=de,z.osname="Windows"):vt&&(z.linux=de,z.osname="Linux"):(z.android=de,z.osname="Android");var Rt="";z.windows?Rt=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?Rt=ue(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):z.mac?(Rt=ue(/Mac OS X (\d+([_\.\s]\d+)*)/i),Rt=Rt.replace(/[_\s]/g,".")):oe?(Rt=ue(/os (\d+([_\s]\d+)*) like mac os x/i),Rt=Rt.replace(/[_\s]/g,".")):ae?Rt=ue(/android[ \/-](\d+(\.\d+)*)/i):z.webos?Rt=ue(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):z.blackberry?Rt=ue(/rim\stablet\sos\s(\d+(\.\d+)*)/i):z.bada?Rt=ue(/bada\/(\d+(\.\d+)*)/i):z.tizen&&(Rt=ue(/tizen[\/\s](\d+(\.\d+)*)/i)),Rt&&(z.osversion=Rt);var ut=!z.windows&&Rt.split(".")[0];return at||me||oe=="ipad"||ae&&(ut==3||ut>=4&&!bt)||z.silk?z.tablet=de:(bt||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(je,Re){if(xe()<Re)throw new RangeError("Invalid typed array length");return ye.TYPED_ARRAY_SUPPORT?(je=new Uint8Array(Re),je.__proto__=ye.prototype):(je===null&&(je=new ye(Re)),je.length=Re),je}function ye(je,Re,Qe){if(!(ye.TYPED_ARRAY_SUPPORT||this instanceof ye))return new ye(je,Re,Qe);if(typeof je=="number"){if(typeof Re=="string")throw new Error("If encoding is specified then the first argument must be a string");return ge(this,je)}return we(this,je,Re,Qe)}function we(je,Re,Qe,Ve){if(typeof Re=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Re instanceof ArrayBuffer?ee(je,Re,Qe,Ve):typeof Re=="string"?fe(je,Re,Qe):z(je,Re)}function pe(je){if(typeof je!="number")throw new TypeError('"size" argument must be a number');if(je<0)throw new RangeError('"size" argument must not be negative')}function de(je,Re,Qe,Ve){return pe(Re),Re<=0?be(je,Re):Qe!==void 0?typeof Ve=="string"?be(je,Re).fill(Qe,Ve):be(je,Re).fill(Qe):be(je,Re)}function ge(je,Re){if(pe(Re),je=be(je,Re<0?0:0|oe(Re)),!ye.TYPED_ARRAY_SUPPORT)for(var Qe=0;Qe<Re;++Qe)je[Qe]=0;return je}function fe(je,Re,Qe){if(typeof Qe=="string"&&Qe!==""||(Qe="utf8"),!ye.isEncoding(Qe))throw new TypeError('"encoding" must be a valid string encoding');var Ve=0|ae(Re,Qe);je=be(je,Ve);var We=je.write(Re,Qe);return We!==Ve&&(je=je.slice(0,We)),je}function ue(je,Re){var Qe=Re.length<0?0:0|oe(Re.length);je=be(je,Qe);for(var Ve=0;Ve<Qe;Ve+=1)je[Ve]=255&Re[Ve];return je}function ee(je,Re,Qe,Ve){if(Re.byteLength,Qe<0||Re.byteLength<Qe)throw new RangeError("'offset' is out of bounds");if(Re.byteLength<Qe+(Ve||0))throw new RangeError("'length' is out of bounds");return Re=Qe===void 0&&Ve===void 0?new Uint8Array(Re):Ve===void 0?new Uint8Array(Re,Qe):new Uint8Array(Re,Qe,Ve),ye.TYPED_ARRAY_SUPPORT?(je=Re,je.__proto__=ye.prototype):je=ue(je,Re),je}function z(je,Re){if(ye.isBuffer(Re)){var Qe=0|oe(Re.length);return je=be(je,Qe),je.length===0||Re.copy(je,0,0,Qe),je}if(Re){if(typeof ArrayBuffer!="undefined"&&Re.buffer instanceof ArrayBuffer||"length"in Re)return typeof Re.length!="number"||He(Re.length)?be(je,0):ue(je,Re);if(Re.type==="Buffer"&&dt(Re.data))return ue(je,Re.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(je){if(je>=xe())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+xe().toString(16)+" bytes");return 0|je}function re(je){return+je!=je&&(je=0),ye.alloc(+je)}function ae(je,Re){if(ye.isBuffer(je))return je.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(je)||je instanceof ArrayBuffer))return je.byteLength;typeof je!="string"&&(je=""+je);var Qe=je.length;if(Qe===0)return 0;for(var Ve=!1;;)switch(Re){case"ascii":case"latin1":case"binary":return Qe;case"utf8":case"utf-8":case void 0:return fn(je).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Qe;case"hex":return Qe>>>1;case"base64":return tn(je).length;default:if(Ve)return fn(je).length;Re=(""+Re).toLowerCase(),Ve=!0}}function le(je,Re,Qe){var Ve=!1;if((Re===void 0||Re<0)&&(Re=0),Re>this.length||((Qe===void 0||Qe>this.length)&&(Qe=this.length),Qe<=0)||(Qe>>>=0,Re>>>=0,Qe<=Re))return"";for(je||(je="utf8");;)switch(je){case"hex":return ct(this,Re,Qe);case"utf8":case"utf-8":return gt(this,Re,Qe);case"ascii":return at(this,Re,Qe);case"latin1":case"binary":return bt(this,Re,Qe);case"base64":return vt(this,Re,Qe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Rt(this,Re,Qe);default:if(Ve)throw new TypeError("Unknown encoding: "+je);je=(je+"").toLowerCase(),Ve=!0}}function me(je,Re,Qe){var Ve=je[Re];je[Re]=je[Qe],je[Qe]=Ve}function ve(je,Re,Qe,Ve,We){if(je.length===0)return-1;if(typeof Qe=="string"?(Ve=Qe,Qe=0):Qe>2147483647?Qe=2147483647:Qe<-2147483648&&(Qe=-2147483648),Qe=+Qe,isNaN(Qe)&&(Qe=We?0:je.length-1),Qe<0&&(Qe=je.length+Qe),Qe>=je.length){if(We)return-1;Qe=je.length-1}else if(Qe<0){if(!We)return-1;Qe=0}if(typeof Re=="string"&&(Re=ye.from(Re,Ve)),ye.isBuffer(Re))return Re.length===0?-1:Pe(je,Re,Qe,Ve,We);if(typeof Re=="number")return Re&=255,ye.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?We?Uint8Array.prototype.indexOf.call(je,Re,Qe):Uint8Array.prototype.lastIndexOf.call(je,Re,Qe):Pe(je,[Re],Qe,Ve,We);throw new TypeError("val must be string, number or Buffer")}function Pe(je,Re,Qe,Ve,We){function pt(un,Kn){return Mt===1?un[Kn]:un.readUInt16BE(Kn*Mt)}var Mt=1,Qt=je.length,qt=Re.length;if(Ve!==void 0&&((Ve=String(Ve).toLowerCase())==="ucs2"||Ve==="ucs-2"||Ve==="utf16le"||Ve==="utf-16le")){if(je.length<2||Re.length<2)return-1;Mt=2,Qt/=2,qt/=2,Qe/=2}var Bt;if(We){var $t=-1;for(Bt=Qe;Bt<Qt;Bt++)if(pt(je,Bt)===pt(Re,$t===-1?0:Bt-$t)){if($t===-1&&($t=Bt),Bt-$t+1===qt)return $t*Mt}else $t!==-1&&(Bt-=Bt-$t),$t=-1}else for(Qe+qt>Qt&&(Qe=Qt-qt),Bt=Qe;Bt>=0;Bt--){for(var Cn=!0,mn=0;mn<qt;mn++)if(pt(je,Bt+mn)!==pt(Re,mn)){Cn=!1;break}if(Cn)return Bt}return-1}function Ae(je,Re,Qe,Ve){Qe=Number(Qe)||0;var We=je.length-Qe;Ve?(Ve=Number(Ve))>We&&(Ve=We):Ve=We;var pt=Re.length;if(pt%2!=0)throw new TypeError("Invalid hex string");Ve>pt/2&&(Ve=pt/2);for(var Mt=0;Mt<Ve;++Mt){var Qt=parseInt(Re.substr(2*Mt,2),16);if(isNaN(Qt))return Mt;je[Qe+Mt]=Qt}return Mt}function De(je,Re,Qe,Ve){return lt(fn(Re,je.length-Qe),je,Qe,Ve)}function Oe(je,Re,Qe,Ve){return lt(It(Re),je,Qe,Ve)}function Ze(je,Re,Qe,Ve){return Oe(je,Re,Qe,Ve)}function qe(je,Re,Qe,Ve){return lt(tn(Re),je,Qe,Ve)}function Xe(je,Re,Qe,Ve){return lt(Xt(Re,je.length-Qe),je,Qe,Ve)}function vt(je,Re,Qe){return Re===0&&Qe===je.length?ze.fromByteArray(je):ze.fromByteArray(je.slice(Re,Qe))}function gt(je,Re,Qe){Qe=Math.min(je.length,Qe);for(var Ve=[],We=Re;We<Qe;){var pt=je[We],Mt=null,Qt=pt>239?4:pt>223?3:pt>191?2:1;if(We+Qt<=Qe){var qt,Bt,$t,Cn;switch(Qt){case 1:pt<128&&(Mt=pt);break;case 2:qt=je[We+1],(192&qt)==128&&(Cn=(31&pt)<<6|63&qt)>127&&(Mt=Cn);break;case 3:qt=je[We+1],Bt=je[We+2],(192&qt)==128&&(192&Bt)==128&&(Cn=(15&pt)<<12|(63&qt)<<6|63&Bt)>2047&&(Cn<55296||Cn>57343)&&(Mt=Cn);break;case 4:qt=je[We+1],Bt=je[We+2],$t=je[We+3],(192&qt)==128&&(192&Bt)==128&&(192&$t)==128&&(Cn=(15&pt)<<18|(63&qt)<<12|(63&Bt)<<6|63&$t)>65535&&Cn<1114112&&(Mt=Cn)}}Mt===null?(Mt=65533,Qt=1):Mt>65535&&(Mt-=65536,Ve.push(Mt>>>10&1023|55296),Mt=56320|1023&Mt),Ve.push(Mt),We+=Qt}return kt(Ve)}function kt(je){var Re=je.length;if(Re<=tt)return String.fromCharCode.apply(String,je);for(var Qe="",Ve=0;Ve<Re;)Qe+=String.fromCharCode.apply(String,je.slice(Ve,Ve+=tt));return Qe}function at(je,Re,Qe){var Ve="";Qe=Math.min(je.length,Qe);for(var We=Re;We<Qe;++We)Ve+=String.fromCharCode(127&je[We]);return Ve}function bt(je,Re,Qe){var Ve="";Qe=Math.min(je.length,Qe);for(var We=Re;We<Qe;++We)Ve+=String.fromCharCode(je[We]);return Ve}function ct(je,Re,Qe){var Ve=je.length;(!Re||Re<0)&&(Re=0),(!Qe||Qe<0||Qe>Ve)&&(Qe=Ve);for(var We="",pt=Re;pt<Qe;++pt)We+=Ft(je[pt]);return We}function Rt(je,Re,Qe){for(var Ve=je.slice(Re,Qe),We="",pt=0;pt<Ve.length;pt+=2)We+=String.fromCharCode(Ve[pt]+256*Ve[pt+1]);return We}function ut(je,Re,Qe){if(je%1!=0||je<0)throw new RangeError("offset is not uint");if(je+Re>Qe)throw new RangeError("Trying to access beyond buffer length")}function ot(je,Re,Qe,Ve,We,pt){if(!ye.isBuffer(je))throw new TypeError('"buffer" argument must be a Buffer instance');if(Re>We||Re<pt)throw new RangeError('"value" argument is out of bounds');if(Qe+Ve>je.length)throw new RangeError("Index out of range")}function ht(je,Re,Qe,Ve){Re<0&&(Re=65535+Re+1);for(var We=0,pt=Math.min(je.length-Qe,2);We<pt;++We)je[Qe+We]=(Re&255<<8*(Ve?We:1-We))>>>8*(Ve?We:1-We)}function yt(je,Re,Qe,Ve){Re<0&&(Re=4294967295+Re+1);for(var We=0,pt=Math.min(je.length-Qe,4);We<pt;++We)je[Qe+We]=Re>>>8*(Ve?We:3-We)&255}function _t(je,Re,Qe,Ve,We,pt){if(Qe+Ve>je.length)throw new RangeError("Index out of range");if(Qe<0)throw new RangeError("Index out of range")}function xt(je,Re,Qe,Ve,We){return We||_t(je,Re,Qe,4,34028234663852886e22,-34028234663852886e22),it.write(je,Re,Qe,Ve,23,4),Qe+4}function Ut(je,Re,Qe,Ve,We){return We||_t(je,Re,Qe,8,17976931348623157e292,-17976931348623157e292),it.write(je,Re,Qe,Ve,52,8),Qe+8}function Ht(je){if(je=dn(je).replace(Ke,""),je.length<2)return"";for(;je.length%4!=0;)je+="=";return je}function dn(je){return je.trim?je.trim():je.replace(/^\s+|\s+$/g,"")}function Ft(je){return je<16?"0"+je.toString(16):je.toString(16)}function fn(je,Re){Re=Re||1/0;for(var Qe,Ve=je.length,We=null,pt=[],Mt=0;Mt<Ve;++Mt){if((Qe=je.charCodeAt(Mt))>55295&&Qe<57344){if(!We){if(Qe>56319){(Re-=3)>-1&&pt.push(239,191,189);continue}if(Mt+1===Ve){(Re-=3)>-1&&pt.push(239,191,189);continue}We=Qe;continue}if(Qe<56320){(Re-=3)>-1&&pt.push(239,191,189),We=Qe;continue}Qe=65536+(We-55296<<10|Qe-56320)}else We&&(Re-=3)>-1&&pt.push(239,191,189);if(We=null,Qe<128){if((Re-=1)<0)break;pt.push(Qe)}else if(Qe<2048){if((Re-=2)<0)break;pt.push(Qe>>6|192,63&Qe|128)}else if(Qe<65536){if((Re-=3)<0)break;pt.push(Qe>>12|224,Qe>>6&63|128,63&Qe|128)}else{if(!(Qe<1114112))throw new Error("Invalid code point");if((Re-=4)<0)break;pt.push(Qe>>18|240,Qe>>12&63|128,Qe>>6&63|128,63&Qe|128)}}return pt}function It(je){for(var Re=[],Qe=0;Qe<je.length;++Qe)Re.push(255&je.charCodeAt(Qe));return Re}function Xt(je,Re){for(var Qe,Ve,We,pt=[],Mt=0;Mt<je.length&&!((Re-=2)<0);++Mt)Qe=je.charCodeAt(Mt),Ve=Qe>>8,We=Qe%256,pt.push(We),pt.push(Ve);return pt}function tn(je){return ze.toByteArray(Ht(je))}function lt(je,Re,Qe,Ve){for(var We=0;We<Ve&&!(We+Qe>=Re.length||We>=je.length);++We)Re[We+Qe]=je[We];return We}function He(je){return je!==je}var ze=Se("base64-js"),it=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 je=new Uint8Array(1);return je.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},je.foo()===42&&typeof je.subarray=="function"&&je.subarray(1,1).byteLength===0}catch(Re){return!1}}(),Le.kMaxLength=xe(),ye.poolSize=8192,ye._augment=function(je){return je.__proto__=ye.prototype,je},ye.from=function(je,Re,Qe){return we(null,je,Re,Qe)},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(je,Re,Qe){return de(null,je,Re,Qe)},ye.allocUnsafe=function(je){return ge(null,je)},ye.allocUnsafeSlow=function(je){return ge(null,je)},ye.isBuffer=function(je){return!(je==null||!je._isBuffer)},ye.compare=function(je,Re){if(!ye.isBuffer(je)||!ye.isBuffer(Re))throw new TypeError("Arguments must be Buffers");if(je===Re)return 0;for(var Qe=je.length,Ve=Re.length,We=0,pt=Math.min(Qe,Ve);We<pt;++We)if(je[We]!==Re[We]){Qe=je[We],Ve=Re[We];break}return Qe<Ve?-1:Ve<Qe?1:0},ye.isEncoding=function(je){switch(String(je).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(je,Re){if(!dt(je))throw new TypeError('"list" argument must be an Array of Buffers');if(je.length===0)return ye.alloc(0);var Qe;if(Re===void 0)for(Re=0,Qe=0;Qe<je.length;++Qe)Re+=je[Qe].length;var Ve=ye.allocUnsafe(Re),We=0;for(Qe=0;Qe<je.length;++Qe){var pt=je[Qe];if(!ye.isBuffer(pt))throw new TypeError('"list" argument must be an Array of Buffers');pt.copy(Ve,We),We+=pt.length}return Ve},ye.byteLength=ae,ye.prototype._isBuffer=!0,ye.prototype.swap16=function(){var je=this.length;if(je%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Re=0;Re<je;Re+=2)me(this,Re,Re+1);return this},ye.prototype.swap32=function(){var je=this.length;if(je%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Re=0;Re<je;Re+=4)me(this,Re,Re+3),me(this,Re+1,Re+2);return this},ye.prototype.swap64=function(){var je=this.length;if(je%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Re=0;Re<je;Re+=8)me(this,Re,Re+7),me(this,Re+1,Re+6),me(this,Re+2,Re+5),me(this,Re+3,Re+4);return this},ye.prototype.toString=function(){var je=0|this.length;return je===0?"":arguments.length===0?gt(this,0,je):le.apply(this,arguments)},ye.prototype.equals=function(je){if(!ye.isBuffer(je))throw new TypeError("Argument must be a Buffer");return this===je||ye.compare(this,je)===0},ye.prototype.inspect=function(){var je="",Re=Le.INSPECT_MAX_BYTES;return this.length>0&&(je=this.toString("hex",0,Re).match(/.{2}/g).join(" "),this.length>Re&&(je+=" ... ")),"<Buffer "+je+">"},ye.prototype.compare=function(je,Re,Qe,Ve,We){if(!ye.isBuffer(je))throw new TypeError("Argument must be a Buffer");if(Re===void 0&&(Re=0),Qe===void 0&&(Qe=je?je.length:0),Ve===void 0&&(Ve=0),We===void 0&&(We=this.length),Re<0||Qe>je.length||Ve<0||We>this.length)throw new RangeError("out of range index");if(Ve>=We&&Re>=Qe)return 0;if(Ve>=We)return-1;if(Re>=Qe)return 1;if(Re>>>=0,Qe>>>=0,Ve>>>=0,We>>>=0,this===je)return 0;for(var pt=We-Ve,Mt=Qe-Re,Qt=Math.min(pt,Mt),qt=this.slice(Ve,We),Bt=je.slice(Re,Qe),$t=0;$t<Qt;++$t)if(qt[$t]!==Bt[$t]){pt=qt[$t],Mt=Bt[$t];break}return pt<Mt?-1:Mt<pt?1:0},ye.prototype.includes=function(je,Re,Qe){return this.indexOf(je,Re,Qe)!==-1},ye.prototype.indexOf=function(je,Re,Qe){return ve(this,je,Re,Qe,!0)},ye.prototype.lastIndexOf=function(je,Re,Qe){return ve(this,je,Re,Qe,!1)},ye.prototype.write=function(je,Re,Qe,Ve){if(Re===void 0)Ve="utf8",Qe=this.length,Re=0;else if(Qe===void 0&&typeof Re=="string")Ve=Re,Qe=this.length,Re=0;else{if(!isFinite(Re))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Re|=0,isFinite(Qe)?(Qe|=0,Ve===void 0&&(Ve="utf8")):(Ve=Qe,Qe=void 0)}var We=this.length-Re;if((Qe===void 0||Qe>We)&&(Qe=We),je.length>0&&(Qe<0||Re<0)||Re>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ve||(Ve="utf8");for(var pt=!1;;)switch(Ve){case"hex":return Ae(this,je,Re,Qe);case"utf8":case"utf-8":return De(this,je,Re,Qe);case"ascii":return Oe(this,je,Re,Qe);case"latin1":case"binary":return Ze(this,je,Re,Qe);case"base64":return qe(this,je,Re,Qe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xe(this,je,Re,Qe);default:if(pt)throw new TypeError("Unknown encoding: "+Ve);Ve=(""+Ve).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(je,Re){var Qe=this.length;je=~~je,Re=Re===void 0?Qe:~~Re,je<0?(je+=Qe)<0&&(je=0):je>Qe&&(je=Qe),Re<0?(Re+=Qe)<0&&(Re=0):Re>Qe&&(Re=Qe),Re<je&&(Re=je);var Ve;if(ye.TYPED_ARRAY_SUPPORT)Ve=this.subarray(je,Re),Ve.__proto__=ye.prototype;else{var We=Re-je;Ve=new ye(We,void 0);for(var pt=0;pt<We;++pt)Ve[pt]=this[pt+je]}return Ve},ye.prototype.readUIntLE=function(je,Re,Qe){je|=0,Re|=0,Qe||ut(je,Re,this.length);for(var Ve=this[je],We=1,pt=0;++pt<Re&&(We*=256);)Ve+=this[je+pt]*We;return Ve},ye.prototype.readUIntBE=function(je,Re,Qe){je|=0,Re|=0,Qe||ut(je,Re,this.length);for(var Ve=this[je+--Re],We=1;Re>0&&(We*=256);)Ve+=this[je+--Re]*We;return Ve},ye.prototype.readUInt8=function(je,Re){return Re||ut(je,1,this.length),this[je]},ye.prototype.readUInt16LE=function(je,Re){return Re||ut(je,2,this.length),this[je]|this[je+1]<<8},ye.prototype.readUInt16BE=function(je,Re){return Re||ut(je,2,this.length),this[je]<<8|this[je+1]},ye.prototype.readUInt32LE=function(je,Re){return Re||ut(je,4,this.length),(this[je]|this[je+1]<<8|this[je+2]<<16)+16777216*this[je+3]},ye.prototype.readUInt32BE=function(je,Re){return Re||ut(je,4,this.length),16777216*this[je]+(this[je+1]<<16|this[je+2]<<8|this[je+3])},ye.prototype.readIntLE=function(je,Re,Qe){je|=0,Re|=0,Qe||ut(je,Re,this.length);for(var Ve=this[je],We=1,pt=0;++pt<Re&&(We*=256);)Ve+=this[je+pt]*We;return We*=128,Ve>=We&&(Ve-=Math.pow(2,8*Re)),Ve},ye.prototype.readIntBE=function(je,Re,Qe){je|=0,Re|=0,Qe||ut(je,Re,this.length);for(var Ve=Re,We=1,pt=this[je+--Ve];Ve>0&&(We*=256);)pt+=this[je+--Ve]*We;return We*=128,pt>=We&&(pt-=Math.pow(2,8*Re)),pt},ye.prototype.readInt8=function(je,Re){return Re||ut(je,1,this.length),128&this[je]?-1*(255-this[je]+1):this[je]},ye.prototype.readInt16LE=function(je,Re){Re||ut(je,2,this.length);var Qe=this[je]|this[je+1]<<8;return 32768&Qe?4294901760|Qe:Qe},ye.prototype.readInt16BE=function(je,Re){Re||ut(je,2,this.length);var Qe=this[je+1]|this[je]<<8;return 32768&Qe?4294901760|Qe:Qe},ye.prototype.readInt32LE=function(je,Re){return Re||ut(je,4,this.length),this[je]|this[je+1]<<8|this[je+2]<<16|this[je+3]<<24},ye.prototype.readInt32BE=function(je,Re){return Re||ut(je,4,this.length),this[je]<<24|this[je+1]<<16|this[je+2]<<8|this[je+3]},ye.prototype.readFloatLE=function(je,Re){return Re||ut(je,4,this.length),it.read(this,je,!0,23,4)},ye.prototype.readFloatBE=function(je,Re){return Re||ut(je,4,this.length),it.read(this,je,!1,23,4)},ye.prototype.readDoubleLE=function(je,Re){return Re||ut(je,8,this.length),it.read(this,je,!0,52,8)},ye.prototype.readDoubleBE=function(je,Re){return Re||ut(je,8,this.length),it.read(this,je,!1,52,8)},ye.prototype.writeUIntLE=function(je,Re,Qe,Ve){je=+je,Re|=0,Qe|=0,!Ve&&ot(this,je,Re,Qe,Math.pow(2,8*Qe)-1,0);var We=1,pt=0;for(this[Re]=255&je;++pt<Qe&&(We*=256);)this[Re+pt]=je/We&255;return Re+Qe},ye.prototype.writeUIntBE=function(je,Re,Qe,Ve){je=+je,Re|=0,Qe|=0,!Ve&&ot(this,je,Re,Qe,Math.pow(2,8*Qe)-1,0);var We=Qe-1,pt=1;for(this[Re+We]=255&je;--We>=0&&(pt*=256);)this[Re+We]=je/pt&255;return Re+Qe},ye.prototype.writeUInt8=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,1,255,0),ye.TYPED_ARRAY_SUPPORT||(je=Math.floor(je)),this[Re]=255&je,Re+1},ye.prototype.writeUInt16LE=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[Re]=255&je,this[Re+1]=je>>>8):ht(this,je,Re,!0),Re+2},ye.prototype.writeUInt16BE=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,2,65535,0),ye.TYPED_ARRAY_SUPPORT?(this[Re]=je>>>8,this[Re+1]=255&je):ht(this,je,Re,!1),Re+2},ye.prototype.writeUInt32LE=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[Re+3]=je>>>24,this[Re+2]=je>>>16,this[Re+1]=je>>>8,this[Re]=255&je):yt(this,je,Re,!0),Re+4},ye.prototype.writeUInt32BE=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,4,4294967295,0),ye.TYPED_ARRAY_SUPPORT?(this[Re]=je>>>24,this[Re+1]=je>>>16,this[Re+2]=je>>>8,this[Re+3]=255&je):yt(this,je,Re,!1),Re+4},ye.prototype.writeIntLE=function(je,Re,Qe,Ve){if(je=+je,Re|=0,!Ve){var We=Math.pow(2,8*Qe-1);ot(this,je,Re,Qe,We-1,-We)}var pt=0,Mt=1,Qt=0;for(this[Re]=255&je;++pt<Qe&&(Mt*=256);)je<0&&Qt===0&&this[Re+pt-1]!==0&&(Qt=1),this[Re+pt]=(je/Mt>>0)-Qt&255;return Re+Qe},ye.prototype.writeIntBE=function(je,Re,Qe,Ve){if(je=+je,Re|=0,!Ve){var We=Math.pow(2,8*Qe-1);ot(this,je,Re,Qe,We-1,-We)}var pt=Qe-1,Mt=1,Qt=0;for(this[Re+pt]=255&je;--pt>=0&&(Mt*=256);)je<0&&Qt===0&&this[Re+pt+1]!==0&&(Qt=1),this[Re+pt]=(je/Mt>>0)-Qt&255;return Re+Qe},ye.prototype.writeInt8=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,1,127,-128),ye.TYPED_ARRAY_SUPPORT||(je=Math.floor(je)),je<0&&(je=255+je+1),this[Re]=255&je,Re+1},ye.prototype.writeInt16LE=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[Re]=255&je,this[Re+1]=je>>>8):ht(this,je,Re,!0),Re+2},ye.prototype.writeInt16BE=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,2,32767,-32768),ye.TYPED_ARRAY_SUPPORT?(this[Re]=je>>>8,this[Re+1]=255&je):ht(this,je,Re,!1),Re+2},ye.prototype.writeInt32LE=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,4,2147483647,-2147483648),ye.TYPED_ARRAY_SUPPORT?(this[Re]=255&je,this[Re+1]=je>>>8,this[Re+2]=je>>>16,this[Re+3]=je>>>24):yt(this,je,Re,!0),Re+4},ye.prototype.writeInt32BE=function(je,Re,Qe){return je=+je,Re|=0,Qe||ot(this,je,Re,4,2147483647,-2147483648),je<0&&(je=4294967295+je+1),ye.TYPED_ARRAY_SUPPORT?(this[Re]=je>>>24,this[Re+1]=je>>>16,this[Re+2]=je>>>8,this[Re+3]=255&je):yt(this,je,Re,!1),Re+4},ye.prototype.writeFloatLE=function(je,Re,Qe){return xt(this,je,Re,!0,Qe)},ye.prototype.writeFloatBE=function(je,Re,Qe){return xt(this,je,Re,!1,Qe)},ye.prototype.writeDoubleLE=function(je,Re,Qe){return Ut(this,je,Re,!0,Qe)},ye.prototype.writeDoubleBE=function(je,Re,Qe){return Ut(this,je,Re,!1,Qe)},ye.prototype.copy=function(je,Re,Qe,Ve){if(Qe||(Qe=0),Ve||Ve===0||(Ve=this.length),Re>=je.length&&(Re=je.length),Re||(Re=0),Ve>0&&Ve<Qe&&(Ve=Qe),Ve===Qe||je.length===0||this.length===0)return 0;if(Re<0)throw new RangeError("targetStart out of bounds");if(Qe<0||Qe>=this.length)throw new RangeError("sourceStart out of bounds");if(Ve<0)throw new RangeError("sourceEnd out of bounds");Ve>this.length&&(Ve=this.length),je.length-Re<Ve-Qe&&(Ve=je.length-Re+Qe);var We,pt=Ve-Qe;if(this===je&&Qe<Re&&Re<Ve)for(We=pt-1;We>=0;--We)je[We+Re]=this[We+Qe];else if(pt<1e3||!ye.TYPED_ARRAY_SUPPORT)for(We=0;We<pt;++We)je[We+Re]=this[We+Qe];else Uint8Array.prototype.set.call(je,this.subarray(Qe,Qe+pt),Re);return pt},ye.prototype.fill=function(je,Re,Qe,Ve){if(typeof je=="string"){if(typeof Re=="string"?(Ve=Re,Re=0,Qe=this.length):typeof Qe=="string"&&(Ve=Qe,Qe=this.length),je.length===1){var We=je.charCodeAt(0);We<256&&(je=We)}if(Ve!==void 0&&typeof Ve!="string")throw new TypeError("encoding must be a string");if(typeof Ve=="string"&&!ye.isEncoding(Ve))throw new TypeError("Unknown encoding: "+Ve)}else typeof je=="number"&&(je&=255);if(Re<0||this.length<Re||this.length<Qe)throw new RangeError("Out of range index");if(Qe<=Re)return this;Re>>>=0,Qe=Qe===void 0?this.length:Qe>>>0,je||(je=0);var pt;if(typeof je=="number")for(pt=Re;pt<Qe;++pt)this[pt]=je;else{var Mt=ye.isBuffer(je)?je:fn(new ye(je,Ve).toString()),Qt=Mt.length;for(pt=0;pt<Qe-Re;++pt)this[pt+Re]=Mt[pt%Qt]}return this};var Ke=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof Ie.g!="undefined"?Ie.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(De){return ae(De)}ve(Ae)}function me(Pe){var Ae;try{Ae=ee.throw(Pe)}catch(De){return ae(De)}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,De=re?Ce:ae?Ce[ge]:(Ce[ge]||{}).prototype;re&&(fe=ge);for(ue in fe)(ee=!oe&&De&&De[ue]!==void 0)&&we(Pe,ue)||(z=ee?De[ue]:fe[ue],Pe[ue]=re&&typeof De[ue]!="function"?fe[ue]:me&&ee?be(z,Ce):ve&&De[ue]==z?function(Oe){var Ze=function(qe,Xe,vt){if(this instanceof Oe){switch(arguments.length){case 0:return new Oe;case 1:return new Oe(qe);case 2:return new Oe(qe,Xe)}return new Oe(qe,Xe,vt)}return Oe.apply(this,arguments)};return Ze.prototype=Oe.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),De=0;if(typeof Pe!="function")throw TypeError(ue+" is not iterable!");if(be(Pe)){for(ae=we(ue.length);ae>De;De++)if((ve=ee?Ae(ye(le=ue[De])[0],le[1]):Ae(ue[De]))===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,De,Oe=function(ct){if(!ue&&ct in vt)return vt[ct];switch(ct){case"keys":case"values":return function(){return new re(this,ct)}}return function(){return new re(this,ct)}},Ze=oe+" Iterator",qe=le=="values",Xe=!1,vt=z.prototype,gt=vt[fe]||vt["@@iterator"]||le&&vt[le],kt=gt||Oe(le),at=le?qe?Oe("entries"):kt:void 0,bt=oe=="Array"&&vt.entries||gt;if(bt&&(De=ge(bt.call(new z)))!==Object.prototype&&De.next&&(de(De,Ze,!0),Ce||typeof De[fe]=="function"||ye(De,fe,ee)),qe&&gt&&gt.name!=="values"&&(Xe=!0,kt=function(){return gt.call(this)}),Ce&&!ve||!ue&&!Xe&&vt[fe]||ye(vt,fe,kt),we[oe]=kt,we[Ze]=ee,le)if(Pe={values:qe?kt:Oe("values"),keys:me?kt:Oe("keys"),entries:at},ve)for(Ae in Pe)Ae in vt||be(vt,Ae,Pe[Ae]);else xe(xe.P+xe.F*(ue||Xe),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"),De=pe.TypeError,Oe=pe.process,Ze=Oe&&Oe.versions,qe=Ze&&Ze.v8||"",Xe=pe.Promise,vt=ge(Oe)=="process",gt=function(){},kt=xe=me.f,at=!!function(){try{var _t=Xe.resolve(1),xt=(_t.constructor={})[Se("./_wks")("species")]=function(Ut){Ut(gt,gt)};return(vt||typeof PromiseRejectionEvent=="function")&&_t.then(gt)instanceof xt&&qe.indexOf("6.6")!==0&&Pe.indexOf("Chrome/66")===-1}catch(Ut){}}(),bt=function(_t){var xt;return!(!ue(_t)||typeof(xt=_t.then)!="function")&&xt},ct=function(_t,xt){if(!_t._n){_t._n=!0;var Ut=_t._c;le(function(){for(var Ht=_t._v,dn=_t._s==1,Ft=0;Ut.length>Ft;)(function(fn){var It,Xt,tn,lt=dn?fn.ok:fn.fail,He=fn.resolve,ze=fn.reject,it=fn.domain;try{lt?(dn||(_t._h==2&&ot(_t),_t._h=1),lt===!0?It=Ht:(it&&it.enter(),It=lt(Ht),it&&(it.exit(),tn=!0)),It===fn.promise?ze(De("Promise-chain cycle")):(Xt=bt(It))?Xt.call(It,He,ze):He(It)):ze(Ht)}catch(dt){it&&!tn&&it.exit(),ze(dt)}})(Ut[Ft++]);_t._c=[],_t._n=!1,xt&&!_t._h&&Rt(_t)})}},Rt=function(_t){ae.call(pe,function(){var xt,Ut,Ht,dn=_t._v,Ft=ut(_t);if(Ft&&(xt=ve(function(){vt?Oe.emit("unhandledRejection",dn,_t):(Ut=pe.onunhandledrejection)?Ut({promise:_t,reason:dn}):(Ht=pe.console)&&Ht.error&&Ht.error("Unhandled promise rejection",dn)}),_t._h=vt||ut(_t)?2:1),_t._a=void 0,Ft&&xt.e)throw xt.v})},ut=function(_t){return _t._h!==1&&(_t._a||_t._c).length===0},ot=function(_t){ae.call(pe,function(){var xt;vt?Oe.emit("rejectionHandled",_t):(xt=pe.onrejectionhandled)&&xt({promise:_t,reason:_t._v})})},ht=function(_t){var xt=this;xt._d||(xt._d=!0,xt=xt._w||xt,xt._v=_t,xt._s=2,xt._a||(xt._a=xt._c.slice()),ct(xt,!0))},yt=function(_t){var xt,Ut=this;if(!Ut._d){Ut._d=!0,Ut=Ut._w||Ut;try{if(Ut===_t)throw De("Promise can't be resolved itself");(xt=bt(_t))?le(function(){var Ht={_w:Ut,_d:!1};try{xt.call(_t,de(yt,Ht,1),de(ht,Ht,1))}catch(dn){ht.call(Ht,dn)}}):(Ut._v=_t,Ut._s=1,ct(Ut,!1))}catch(Ht){ht.call({_w:Ut,_d:!1},Ht)}}};at||(Xe=function(_t){z(this,Xe,"Promise","_h"),ee(_t),Ce.call(this);try{_t(de(yt,this,1),de(ht,this,1))}catch(xt){ht.call(this,xt)}},Ce=function(_t){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")(Xe.prototype,{then:function(_t,xt){var Ut=kt(re(this,Xe));return Ut.ok=typeof _t!="function"||_t,Ut.fail=typeof xt=="function"&&xt,Ut.domain=vt?Oe.domain:void 0,this._c.push(Ut),this._a&&this._a.push(Ut),this._s&&ct(this,!1),Ut.promise},catch:function(_t){return this.then(void 0,_t)}}),be=function(){var _t=new Ce;this.promise=_t,this.resolve=de(yt,_t,1),this.reject=de(ht,_t,1)},me.f=kt=function(_t){return _t===Xe||_t===ye?new be(_t):xe(_t)}),fe(fe.G+fe.W+fe.F*!at,{Promise:Xe}),Se("./_set-to-string-tag")(Xe,"Promise"),Se("./_set-species")("Promise"),ye=Se("./_core").Promise,fe(fe.S+fe.F*!at,"Promise",{reject:function(_t){var xt=kt(this);return(0,xt.reject)(_t),xt.promise}}),fe(fe.S+fe.F*(we||!at),"Promise",{resolve:function(_t){return Ae(we&&this===ye?Xe:this,_t)}}),fe(fe.S+fe.F*!(at&&Se("./_iter-detect")(function(_t){Xe.all(_t).catch(gt)})),"Promise",{all:function(_t){var xt=this,Ut=kt(xt),Ht=Ut.resolve,dn=Ut.reject,Ft=ve(function(){var fn=[],It=0,Xt=1;oe(_t,!1,function(tn){var lt=It++,He=!1;fn.push(void 0),Xt++,xt.resolve(tn).then(function(ze){He||(He=!0,fn[lt]=ze,--Xt||Ht(fn))},dn)}),--Xt||Ht(fn)});return Ft.e&&dn(Ft.v),Ut.promise},race:function(_t){var xt=this,Ut=kt(xt),Ht=Ut.reject,dn=ve(function(){oe(_t,!1,function(Ft){xt.resolve(Ft).then(Ut.resolve,Ht)})});return dn.e&&Ht(dn.v),Ut.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"),De=Se("./_object-create"),Oe=Se("./_object-gopn-ext"),Ze=Se("./_object-gopd"),qe=Se("./_object-dp"),Xe=Se("./_object-keys"),vt=Ze.f,gt=qe.f,kt=Oe.f,at=Ce.Symbol,bt=Ce.JSON,ct=bt&&bt.stringify,Rt=ee("_hidden"),ut=ee("toPrimitive"),ot={}.propertyIsEnumerable,ht=ge("symbol-registry"),yt=ge("symbols"),_t=ge("op-symbols"),xt=Object.prototype,Ut=typeof at=="function",Ht=Ce.QObject,dn=!Ht||!Ht.prototype||!Ht.prototype.findChild,Ft=be&&de(function(){return De(gt({},"a",{get:function(){return gt(this,"a",{value:7}).a}})).a!=7})?function(Qe,Ve,We){var pt=vt(xt,Ve);pt&&delete xt[Ve],gt(Qe,Ve,We),pt&&Qe!==xt&&gt(xt,Ve,pt)}:gt,fn=function(Qe){var Ve=yt[Qe]=De(at.prototype);return Ve._k=Qe,Ve},It=Ut&&typeof at.iterator=="symbol"?function(Qe){return typeof Qe=="symbol"}:function(Qe){return Qe instanceof at},Xt=function(Qe,Ve,We){return Qe===xt&&Xt(_t,Ve,We),le(Qe),Ve=Pe(Ve,!0),le(We),xe(yt,Ve)?(We.enumerable?(xe(Qe,Rt)&&Qe[Rt][Ve]&&(Qe[Rt][Ve]=!1),We=De(We,{enumerable:Ae(0,!1)})):(xe(Qe,Rt)||gt(Qe,Rt,Ae(1,{})),Qe[Rt][Ve]=!0),Ft(Qe,Ve,We)):gt(Qe,Ve,We)},tn=function(Qe,Ve){le(Qe);for(var We,pt=re(Ve=ve(Ve)),Mt=0,Qt=pt.length;Qt>Mt;)Xt(Qe,We=pt[Mt++],Ve[We]);return Qe},lt=function(Qe,Ve){return Ve===void 0?De(Qe):tn(De(Qe),Ve)},He=function(Qe){var Ve=ot.call(this,Qe=Pe(Qe,!0));return!(this===xt&&xe(yt,Qe)&&!xe(_t,Qe))&&(!(Ve||!xe(this,Qe)||!xe(yt,Qe)||xe(this,Rt)&&this[Rt][Qe])||Ve)},ze=function(Qe,Ve){if(Qe=ve(Qe),Ve=Pe(Ve,!0),Qe!==xt||!xe(yt,Ve)||xe(_t,Ve)){var We=vt(Qe,Ve);return!We||!xe(yt,Ve)||xe(Qe,Rt)&&Qe[Rt][Ve]||(We.enumerable=!0),We}},it=function(Qe){for(var Ve,We=kt(ve(Qe)),pt=[],Mt=0;We.length>Mt;)xe(yt,Ve=We[Mt++])||Ve==Rt||Ve==pe||pt.push(Ve);return pt},dt=function(Qe){for(var Ve,We=Qe===xt,pt=kt(We?_t:ve(Qe)),Mt=[],Qt=0;pt.length>Qt;)!xe(yt,Ve=pt[Qt++])||We&&!xe(xt,Ve)||Mt.push(yt[Ve]);return Mt};Ut||(at=function(){if(this instanceof at)throw TypeError("Symbol is not a constructor!");var Qe=ue(arguments.length>0?arguments[0]:void 0),Ve=function(We){this===xt&&Ve.call(_t,We),xe(this,Rt)&&xe(this[Rt],Qe)&&(this[Rt][Qe]=!1),Ft(this,Qe,Ae(1,We))};return be&&dn&&Ft(xt,Qe,{configurable:!0,set:Ve}),fn(Qe)},we(at.prototype,"toString",function(){return this._k}),Ze.f=ze,qe.f=Xt,Se("./_object-gopn").f=Oe.f=it,Se("./_object-pie").f=He,Se("./_object-gops").f=dt,be&&!Se("./_library")&&we(xt,"propertyIsEnumerable",He,!0),z.f=function(Qe){return fn(ee(Qe))}),ye(ye.G+ye.W+ye.F*!Ut,{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 je=Xe(ee.store),Re=0;je.length>Re;)oe(je[Re++]);ye(ye.S+ye.F*!Ut,"Symbol",{for:function(Qe){return xe(ht,Qe+="")?ht[Qe]:ht[Qe]=at(Qe)},keyFor:function(Qe){if(!It(Qe))throw TypeError(Qe+" is not a symbol!");for(var Ve in ht)if(ht[Ve]===Qe)return Ve},useSetter:function(){dn=!0},useSimple:function(){dn=!1}}),ye(ye.S+ye.F*!Ut,"Object",{create:lt,defineProperty:Xt,defineProperties:tn,getOwnPropertyDescriptor:ze,getOwnPropertyNames:it,getOwnPropertySymbols:dt}),bt&&ye(ye.S+ye.F*(!Ut||de(function(){var Qe=at();return ct([Qe])!="[null]"||ct({a:Qe})!="{}"||ct(Object(Qe))!="{}"})),"JSON",{stringify:function(Qe){for(var Ve,We,pt=[Qe],Mt=1;arguments.length>Mt;)pt.push(arguments[Mt++]);if(We=Ve=pt[1],(me(Ve)||Qe!==void 0)&&!It(Qe))return ae(Ve)||(Ve=function(Qt,qt){if(typeof We=="function"&&(qt=We.call(this,Qt,qt)),!It(qt))return qt}),pt[1]=Ve,ct.apply(bt,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"](),De=z[me+"FullYear"](),Oe=z[me+"Hours"](),Ze=z[me+"Minutes"](),qe=z[me+"Seconds"](),Xe=z[me+"Milliseconds"](),vt=re?0:z.getTimezoneOffset(),gt=we(z),kt=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(De).slice(2),yyyy:De,h:Oe%12||12,hh:ye(Oe%12||12),H:Oe,HH:ye(Oe),M:Ze,MM:ye(Ze),s:qe,ss:ye(qe),l:ye(Xe,3),L:ye(Math.round(Xe/10)),t:Oe<12?"a":"p",tt:Oe<12?"am":"pm",T:Oe<12?"A":"P",TT:Oe<12?"AM":"PM",Z:ae?"GMT":re?"UTC":(String(z).match(ue)||[""]).pop().replace(ee,""),o:(vt>0?"-":"+")+ye(100*Math.floor(Math.abs(vt)/60)+Math.abs(vt)%60,4),S:["th","st","nd","rd"][ve%10>3?0:(ve%100-ve%10!=10)*ve%10],W:gt,N:kt};return oe.replace(fe,function(bt){return bt in at?at[bt]:bt.slice(1,bt.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="&quot;";break;case 38:pe="&amp;";break;case 39:pe="&#39;";break;case 60:pe="&lt;";break;case 62:pe="&gt;";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,Xe,vt){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 Xe&&vt&&/^Win/i.test(qe)&&!/^Windows Phone /i.test(qe)&&(gt=gt[/[\d.]+$/.exec(qe)])&&(qe="Windows "+gt),qe=String(qe),Xe&&vt&&(qe=qe.replace(RegExp(Xe,"i"),vt)),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,Xe){var vt=-1,gt=qe?qe.length:0;if(typeof gt=="number"&&gt>-1&&gt<=ve)for(;++vt<gt;)Xe(qe[vt],vt,qe);else pe(qe,Xe)}function we(qe){return qe=ee(qe),/^(?:webOS|i(?:OS|P))/.test(qe)?qe:xe(qe)}function pe(qe,Xe){for(var vt in qe)De.call(qe,vt)&&Xe(qe[vt],vt,qe)}function de(qe){return qe==null?xe(qe):Oe.call(qe).slice(8,-1)}function ge(qe,Xe){var vt=qe!=null?typeof qe[Xe]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(vt)||vt=="object"&&!qe[Xe])}function fe(qe){return String(qe).replace(/([ -])(?!$)/g,"$1?")}function ue(qe,Xe){var vt=null;return ye(qe,function(gt,kt){vt=Xe(vt,gt,kt,qe)}),vt}function ee(qe){return String(qe).replace(/^ +| +$/g,"")}function z(qe){function Xe(Qe){return ue(Qe,function(Ve,We){var pt=We.pattern||fe(We);return!Ve&&(Ve=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))&&((Ve=String(We.label&&!RegExp(pt,"i").test(We.label)?We.label:Ve).split("/"))[1]&&!/[\d.]+/.test(Ve[0])&&(Ve[0]+=" "+Ve[1]),We=We.label||We,Ve=we(Ve[0].replace(RegExp(pt,"i"),We).replace(RegExp("; *(?:"+We+"[_-])?","i")," ").replace(RegExp("("+We+")[-_.]?(\\w)","i"),"$1 $2"))),Ve})}function vt(){return this.description||""}var gt=re,kt=qe&&typeof qe=="object"&&de(qe)!="String";kt&&(gt=qe,qe=null);var at=gt.navigator||{},bt=at.userAgent||"";qe||(qe=bt);var ct,Rt,ut=kt?!!at.likeChrome:/\bChrome\b/.test(qe)&&!/internal|\n/i.test(Oe.toString()),ot=kt?"Object":"ScriptBridgingProxyObject",ht=kt?"Object":"Environment",yt=kt&&gt.java?"JavaPackage":de(gt.java),_t=kt?"Object":"RuntimeObject",xt=/\bJava/.test(yt)&&gt.java,Ut=xt&&de(gt.environment)==ht,Ht=xt?"a":"\u4F2A",dn=xt?"b":"\u5C3E",Ft=gt.document||{},fn=gt.operamini||gt.opera,It=Pe.test(It=kt&&fn?fn["[[Class]]"]:de(fn))?It:fn=null,Xt=qe,tn=[],lt=null,He=qe==bt,ze=He&&fn&&typeof fn.version=="function"&&fn.version(),it=function(Qe){return ue(Qe,function(Ve,We){return Ve||RegExp("\\b"+(We.pattern||fe(We))+"\\b","i").exec(qe)&&(We.label||We)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),dt=function(Qe){return ue(Qe,function(Ve,We){return Ve||RegExp("\\b"+(We.pattern||fe(We))+"\\b","i").exec(qe)&&(We.label||We)})}(["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=Xe([{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(Qe){return ue(Qe,function(Ve,We,pt){return Ve||(We[tt]||We[/^[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}}),je=function(Qe){return ue(Qe,function(Ve,We){var pt=We.pattern||fe(We);return!Ve&&(Ve=RegExp("\\b"+pt+"(?:/[\\d.]+|[ \\w.]*)","i").exec(qe))&&(Ve=be(Ve,pt,We.label||We)),Ve})}(["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(it&&(it=[it]),Ke&&!tt&&(tt=Xe([Ke])),(ct=/\bGoogle TV\b/.exec(tt))&&(tt=ct[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)?(ct=z(qe.replace(/like iPhone OS/,"")),Ke=ct.manufacturer,tt=ct.product):/^iP/.test(tt)?(dt||(dt="Safari"),je="iOS"+((ct=/ OS ([\d_]+)/i.exec(qe))?" "+ct[1].replace(/_/g,"."):"")):dt!="Konqueror"||/buntu/i.test(je)?Ke&&Ke!="Google"&&(/Chrome/.test(dt)&&!/\bMobile Safari\b/i.test(qe)||/\bVita\b/.test(tt))||/\bAndroid\b/.test(je)&&/^Chrome/.test(dt)&&/\bVersion\//i.test(qe)?(dt="Android Browser",je=/\bAndroid\b/.test(je)?je:"Android"):dt=="Silk"?(/\bMobi/i.test(qe)||(je="Android",tn.unshift("desktop mode")),/Accelerated *= *true/i.test(qe)&&tn.unshift("accelerated")):dt=="PaleMoon"&&(ct=/\bFirefox\/([\d.]+)\b/.exec(qe))?tn.push("identifying as Firefox "+ct[1]):dt=="Firefox"&&(ct=/\b(Mobile|Tablet|TV)\b/i.exec(qe))?(je||(je="Firefox OS"),tt||(tt=ct[1])):!dt||(ct=!/\bMinefield\b/i.test(qe)&&/\b(?:Firefox|Safari)\b/.exec(dt))?(dt&&!tt&&/[\/,]|^[^(]+?\)/.test(qe.slice(qe.indexOf(ct+"/")+8))&&(dt=null),(ct=tt||Ke||je)&&(tt||Ke||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(je))&&(dt=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(je)?je:ct)+" Browser")):dt=="Electron"&&(ct=(/\bChrome\/([\d.]+)\b/.exec(qe)||0)[1])&&tn.push("Chromium "+ct):je="Kubuntu",ze||(ze=function(Qe){return ue(Qe,function(Ve,We){return Ve||(RegExp(We+"(?:-[\\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)"])),(ct=it=="iCab"&&parseFloat(ze)>3&&"WebKit"||/\bOpera\b/.test(dt)&&(/\bOPR\b/.test(qe)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(qe)&&!/^(?:Trident|EdgeHTML)$/.test(it)&&"WebKit"||!it&&/\bMSIE\b/i.test(qe)&&(je=="Mac OS"?"Tasman":"Trident")||it=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(dt)&&"NetFront")&&(it=[ct]),dt=="IE"&&(ct=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(qe)||0)[1])?(dt+=" Mobile",je="Windows Phone "+(/\+$/.test(ct)?ct:ct+".x"),tn.unshift("desktop mode")):/\bWPDesktop\b/i.test(qe)?(dt="IE Mobile",je="Windows Phone 8.x",tn.unshift("desktop mode"),ze||(ze=(/\brv:([\d.]+)/.exec(qe)||0)[1])):dt!="IE"&&it=="Trident"&&(ct=/\brv:([\d.]+)/.exec(qe))&&(dt&&tn.push("identifying as "+dt+(ze?" "+ze:"")),dt="IE",ze=ct[1]),He){if(ge(gt,"global"))if(xt&&(ct=xt.lang.System,Xt=ct.getProperty("os.arch"),je=je||ct.getProperty("os.name")+" "+ct.getProperty("os.version")),Ut){try{ze=gt.require("ringo/engine").version.join("."),dt="RingoJS"}catch(Qe){(ct=gt.system)&&ct.global.system==gt.system&&(dt="Narwhal",je||(je=ct[0].os||null))}dt||(dt="Rhino")}else typeof gt.process=="object"&&!gt.process.browser&&(ct=gt.process)&&(typeof ct.versions=="object"&&(typeof ct.versions.electron=="string"?(tn.push("Node "+ct.versions.node),dt="Electron",ze=ct.versions.electron):typeof ct.versions.nw=="string"&&(tn.push("Chromium "+ze,"Node "+ct.versions.node),dt="NW.js",ze=ct.versions.nw)),dt||(dt="Node.js",Xt=ct.arch,je=ct.platform,ze=/[\d.]+/.exec(ct.version),ze=ze?ze[0]:null));else de(ct=gt.runtime)==ot?(dt="Adobe AIR",je=ct.flash.system.Capabilities.os):de(ct=gt.phantom)==_t?(dt="PhantomJS",ze=(ct=ct.version||null)&&ct.major+"."+ct.minor+"."+ct.patch):typeof Ft.documentMode=="number"&&(ct=/\bTrident\/(\d+)/i.exec(qe))?(ze=[ze,Ft.documentMode],(ct=+ct[1]+4)!=ze[1]&&(tn.push("IE "+ze[1]+" mode"),it&&(it[1]=""),ze[1]=ct),ze=dt=="IE"?String(ze[1].toFixed(1)):ze[0]):typeof Ft.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(dt)&&(tn.push("masking as "+dt+" "+ze),dt="IE",ze="11.0",it=["Trident"],je="Windows");je=je&&we(je)}if(ze&&(ct=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ze)||/(?:alpha|beta)(?: ?\d)?/i.exec(qe+";"+(He&&at.appMinorVersion))||/\bMinefield\b/i.test(qe)&&"a")&&(lt=/b/i.test(ct)?"beta":"alpha",ze=ze.replace(RegExp(ct+"\\+?$"),"")+(lt=="beta"?dn:Ht)+(/\d+\+?/.exec(ct)||"")),dt=="Fennec"||dt=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(je))dt="Firefox Mobile";else if(dt=="Maxthon"&&ze)ze=ze.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(tt))tt=="Xbox 360"&&(je=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))||je!="Windows CE"&&!/Mobi/i.test(qe))if(dt=="IE"&&He)try{gt.external===null&&tn.unshift("platform preview")}catch(Qe){tn.unshift("embedded")}else(/\bBlackBerry\b/.test(tt)||/\bBB10\b/.test(qe))&&(ct=(RegExp(tt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(qe)||0)[1]||ze)?(ct=[ct,/BB10/.test(qe)],je=(ct[1]?(tt=null,Ke="BlackBerry"):"Device Software")+" "+ct[0],ze=null):this!=pe&&tt!="Wii"&&(He&&fn||/Opera/.test(dt)&&/\b(?:MSIE|Firefox)\b/i.test(qe)||dt=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(je)||dt=="IE"&&(je&&!/^Win/.test(je)&&ze>5.5||/\bWindows XP\b/.test(je)&&ze>8||ze==8&&!/\bTrident\b/.test(qe)))&&!Pe.test(ct=z.call(pe,qe.replace(Pe,"")+";"))&&ct.name&&(ct="ing as "+ct.name+((ct=ct.version)?" "+ct:""),Pe.test(dt)?(/\bIE\b/.test(ct)&&je=="Mac OS"&&(je=null),ct="identify"+ct):(ct="mask"+ct,dt=It?we(It.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(ct)&&(je=null),He||(ze=null)),it=["Presto"],tn.push(ct));else dt+=" Mobile";(ct=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(qe)||0)[1])&&(ct=[parseFloat(ct.replace(/\.(\d)$/,".0$1")),ct],dt=="Safari"&&ct[1].slice(-1)=="+"?(dt="WebKit Nightly",lt="alpha",ze=ct[1].slice(0,-1)):ze!=ct[1]&&ze!=(ct[2]=(/\bSafari\/([\d.]+\+?)/i.exec(qe)||0)[1])||(ze=null),ct[1]=(/\bChrome\/([\d.]+)/i.exec(qe)||0)[1],ct[0]==537.36&&ct[2]==537.36&&parseFloat(ct[1])>=28&&it=="WebKit"&&(it=["Blink"]),He&&(ut||ct[1])?(it&&(it[1]="like Chrome"),ct=ct[1]||(ct=ct[0],ct<530?1:ct<532?2:ct<532.05?3:ct<533?4:ct<534.03?5:ct<534.07?6:ct<534.1?7:ct<534.13?8:ct<534.16?9:ct<534.24?10:ct<534.3?11:ct<535.01?12:ct<535.02?"13+":ct<535.07?15:ct<535.11?16:ct<535.19?17:ct<536.05?18:ct<536.1?19:ct<537.01?20:ct<537.11?"21+":ct<537.13?23:ct<537.18?24:ct<537.24?25:ct<537.36?26:it!="Blink"?"27":"28")):(it&&(it[1]="like Safari"),ct=ct[0],ct=ct<400?1:ct<500?2:ct<526?3:ct<533?4:ct<534?"4+":ct<535?5:ct<537?6:ct<538?7:ct<601?8:"8"),it&&(it[1]+=" "+(ct+=typeof ct=="number"?".x":/[.+]/.test(ct)?"":"+")),dt=="Safari"&&(!ze||parseInt(ze)>45)&&(ze=ct)),dt=="Opera"&&(ct=/\bzbov|zvav$/.exec(je))?(dt+=" ",tn.unshift("desktop mode"),ct=="zvav"?(dt+="Mini",ze=null):dt+="Mobile",je=je.replace(RegExp(" *"+ct+"$"),"")):dt=="Safari"&&/\bChrome\b/.exec(it&&it[1])&&(tn.unshift("desktop mode"),dt="Chrome Mobile",ze=null,/\bOS X\b/.test(je)?(Ke="Apple",je="iOS 4.3+"):je=null),ze&&ze.indexOf(ct=/[\d.]+$/.exec(je))==0&&qe.indexOf("/"+ct+"-")>-1&&(je=ee(je.replace(ct,""))),it&&!/\b(?:Avant|Nook)\b/.test(dt)&&(/Browser|Lunascape|Maxthon/.test(dt)||dt!="Safari"&&/^iOS/.test(je)&&/\bSafari\b/.test(it[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(dt)&&it[1])&&(ct=it[it.length-1])&&tn.push(ct),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),je&&(ct=/ ([\d.+]+)$/.exec(je),Rt=ct&&je.charAt(je.length-ct[0].length-1)=="/",je={architecture:32,family:ct&&!Rt?je.replace(ct[0],""):je,version:ct?ct[1]:null,toString:function(){var Qe=this.version;return this.family+(Qe&&!Rt?" "+Qe:"")+(this.architecture==64?" 64-bit":"")}}),(ct=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Xt))&&!/\bi686\b/i.test(Xt)?(je&&(je.architecture=64,je.family=je.family.replace(RegExp(" *"+ct),"")),dt&&(/\bWOW64\b/i.test(qe)||He&&/\w(?:86|32)$/.test(at.cpuClass||at.platform)&&!/\bWin64; x64\b/i.test(qe))&&tn.unshift("32-bit")):je&&/^OS X/.test(je.family)&&dt=="Chrome"&&parseFloat(ze)>=39&&(je.architecture=64),qe||(qe=null);var Re={};return Re.description=qe,Re.layout=it&&it[0],Re.manufacturer=Ke,Re.name=dt,Re.prerelease=lt,Re.product=tt,Re.ua=qe,Re.version=dt&&ze,Re.os=je||{architecture:null,family:null,version:null,toString:function(){return"null"}},Re.parse=z,Re.toString=vt,Re.version&&tn.unshift(ze),Re.name&&tn.unshift(dt),je&&dt&&(je!=String(je).split(" ")[0]||je!=dt.split(" ")[0]&&!tt)&&tn.push(tt?"("+je+")":"on "+je),tn.length&&(Re.description=tn.join(" ")),Re}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,De=Ae.hasOwnProperty,Oe=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,Xe){ae[Xe]=qe}):re.platform=Ze}).call(this)}).call(this,typeof Ie.g!="undefined"?Ie.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(Rt[yt])}function ye(yt,_t){for(var xt=yt.length,Ut=[];xt--;)Ut[xt]=_t(yt[xt]);return Ut}function we(yt,_t){var xt=yt.split("@"),Ut="";return xt.length>1&&(Ut=xt[0]+"@",yt=xt[1]),yt=yt.replace(ct,"."),Ut+ye(yt.split("."),_t).join(".")}function pe(yt){for(var _t,xt,Ut=[],Ht=0,dn=yt.length;Ht<dn;)_t=yt.charCodeAt(Ht++),_t>=55296&&_t<=56319&&Ht<dn?(xt=yt.charCodeAt(Ht++),(64512&xt)==56320?Ut.push(((1023&_t)<<10)+(1023&xt)+65536):(Ut.push(_t),Ht--)):Ut.push(_t);return Ut}function de(yt){return ye(yt,function(_t){var xt="";return _t>65535&&(_t-=65536,xt+=ht(_t>>>10&1023|55296),_t=56320|1023&_t),xt+=ht(_t)}).join("")}function ge(yt){return yt-48<10?yt-22:yt-65<26?yt-65:yt-97<26?yt-97:De}function fe(yt,_t){return yt+22+75*(yt<26)-((_t!=0)<<5)}function ue(yt,_t,xt){var Ut=0;for(yt=xt?ot(yt/Xe):yt>>1,yt+=ot(yt/_t);yt>ut*Ze>>1;Ut+=De)yt=ot(yt/ut);return ot(Ut+(ut+1)*yt/(yt+qe))}function ee(yt){var _t,xt,Ut,Ht,dn,Ft,fn,It,Xt,tn,lt=[],He=yt.length,ze=0,it=gt,dt=vt;for(xt=yt.lastIndexOf(kt),xt<0&&(xt=0),Ut=0;Ut<xt;++Ut)yt.charCodeAt(Ut)>=128&&be("not-basic"),lt.push(yt.charCodeAt(Ut));for(Ht=xt>0?xt+1:0;Ht<He;){for(dn=ze,Ft=1,fn=De;Ht>=He&&be("invalid-input"),It=ge(yt.charCodeAt(Ht++)),(It>=De||It>ot((Ae-ze)/Ft))&&be("overflow"),ze+=It*Ft,Xt=fn<=dt?Oe:fn>=dt+Ze?Ze:fn-dt,!(It<Xt);fn+=De)tn=De-Xt,Ft>ot(Ae/tn)&&be("overflow"),Ft*=tn;_t=lt.length+1,dt=ue(ze-dn,_t,dn==0),ot(ze/_t)>Ae-it&&be("overflow"),it+=ot(ze/_t),ze%=_t,lt.splice(ze++,0,it)}return de(lt)}function z(yt){var _t,xt,Ut,Ht,dn,Ft,fn,It,Xt,tn,lt,He,ze,it,dt,tt=[];for(yt=pe(yt),He=yt.length,_t=gt,xt=0,dn=vt,Ft=0;Ft<He;++Ft)(lt=yt[Ft])<128&&tt.push(ht(lt));for(Ut=Ht=tt.length,Ht&&tt.push(kt);Ut<He;){for(fn=Ae,Ft=0;Ft<He;++Ft)(lt=yt[Ft])>=_t&&lt<fn&&(fn=lt);for(ze=Ut+1,fn-_t>ot((Ae-xt)/ze)&&be("overflow"),xt+=(fn-_t)*ze,_t=fn,Ft=0;Ft<He;++Ft)if(lt=yt[Ft],lt<_t&&++xt>Ae&&be("overflow"),lt==_t){for(It=xt,Xt=De;tn=Xt<=dn?Oe:Xt>=dn+Ze?Ze:Xt-dn,!(It<tn);Xt+=De)dt=It-tn,it=De-tn,tt.push(ht(fe(tn+dt%it,0))),It=ot(dt/it);tt.push(ht(fe(It,0))),dn=ue(xt,ze,Ut==Ht),xt=0,++Ut}++xt,++_t}return tt.join("")}function oe(yt){return we(yt,function(_t){return at.test(_t)?ee(_t.slice(4).toLowerCase()):_t})}function re(yt){return we(yt,function(_t){return bt.test(_t)?"xn--"+z(_t):_t})}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,De=36,Oe=1,Ze=26,qe=38,Xe=700,vt=72,gt=128,kt="-",at=/^xn--/,bt=/[^\x20-\x7E]/,ct=/[\x2E\u3002\uFF0E\uFF61]/g,Rt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ut=De-Oe,ot=Math.floor,ht=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 Ie.g!="undefined"?Ie.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(He){return xt.from(He)}function ye(He){return xt.isBuffer(He)||He instanceof Ut}function we(He,ze,it){if(typeof He.prependListener=="function")return He.prependListener(ze,it);He._events&&He._events[ze]?ht(He._events[ze])?He._events[ze].unshift(it):He._events[ze]=[it,He._events[ze]]:He.on(ze,it)}function pe(He,ze){ot=ot||Se("./_stream_duplex"),He=He||{};var it=ze instanceof ot;this.objectMode=!!He.objectMode,it&&(this.objectMode=this.objectMode||!!He.readableObjectMode);var dt=He.highWaterMark,tt=He.readableHighWaterMark,Ke=this.objectMode?16:16384;this.highWaterMark=dt||dt===0?dt:it&&(tt||tt===0)?tt:Ke,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new It,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=He.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,He.encoding&&(fn||(fn=Se("string_decoder/").StringDecoder),this.decoder=new fn(He.encoding),this.encoding=He.encoding)}function de(He){if(ot=ot||Se("./_stream_duplex"),!(this instanceof de))return new de(He);this._readableState=new pe(He,this),this.readable=!0,He&&(typeof He.read=="function"&&(this._read=He.read),typeof He.destroy=="function"&&(this._destroy=He.destroy)),_t.call(this)}function ge(He,ze,it,dt,tt){var Ke=He._readableState;if(ze===null)Ke.reading=!1,re(He,Ke);else{var je;tt||(je=ue(Ke,ze)),je?He.emit("error",je):Ke.objectMode||ze&&ze.length>0?(typeof ze=="string"||Ke.objectMode||(0,Rt.default)(ze)===xt.prototype||(ze=be(ze)),dt?Ke.endEmitted?He.emit("error",new Error("stream.unshift() after end event")):fe(He,Ke,ze,!0):Ke.ended?He.emit("error",new Error("stream.push() after EOF")):(Ke.reading=!1,Ke.decoder&&!it?(ze=Ke.decoder.write(ze),Ke.objectMode||ze.length!==0?fe(He,Ke,ze,!1):me(He,Ke)):fe(He,Ke,ze,!1))):dt||(Ke.reading=!1)}return ee(Ke)}function fe(He,ze,it,dt){ze.flowing&&ze.length===0&&!ze.sync?(He.emit("data",it),He.read(0)):(ze.length+=ze.objectMode?1:it.length,dt?ze.buffer.unshift(it):ze.buffer.push(it),ze.needReadable&&ae(He)),me(He,ze)}function ue(He,ze){var it;return ye(ze)||typeof ze=="string"||ze===void 0||He.objectMode||(it=new TypeError("Invalid non-string/buffer chunk")),it}function ee(He){return!He.ended&&(He.needReadable||He.length<He.highWaterMark||He.length===0)}function z(He){return He>=lt?He=lt:(He--,He|=He>>>1,He|=He>>>2,He|=He>>>4,He|=He>>>8,He|=He>>>16,He++),He}function oe(He,ze){return He<=0||ze.length===0&&ze.ended?0:ze.objectMode?1:He!==He?ze.flowing&&ze.length?ze.buffer.head.data.length:ze.length:(He>ze.highWaterMark&&(ze.highWaterMark=z(He)),He<=ze.length?He:ze.ended?ze.length:(ze.needReadable=!0,0))}function re(He,ze){if(!ze.ended){if(ze.decoder){var it=ze.decoder.end();it&&it.length&&(ze.buffer.push(it),ze.length+=ze.objectMode?1:it.length)}ze.ended=!0,ae(He)}}function ae(He){var ze=He._readableState;ze.needReadable=!1,ze.emittedReadable||(Ft("emitReadable",ze.flowing),ze.emittedReadable=!0,ze.sync?ut.nextTick(le,He):le(He))}function le(He){Ft("emit readable"),He.emit("readable"),Ze(He)}function me(He,ze){ze.readingMore||(ze.readingMore=!0,ut.nextTick(ve,He,ze))}function ve(He,ze){for(var it=ze.length;!ze.reading&&!ze.flowing&&!ze.ended&&ze.length<ze.highWaterMark&&(Ft("maybeReadMore read 0"),He.read(0),it!==ze.length);)it=ze.length;ze.readingMore=!1}function Pe(He){return function(){var ze=He._readableState;Ft("pipeOnDrain",ze.awaitDrain),ze.awaitDrain&&ze.awaitDrain--,ze.awaitDrain===0&&yt(He,"data")&&(ze.flowing=!0,Ze(He))}}function Ae(He){Ft("readable nexttick read 0"),He.read(0)}function De(He,ze){ze.resumeScheduled||(ze.resumeScheduled=!0,ut.nextTick(Oe,He,ze))}function Oe(He,ze){ze.reading||(Ft("resume read 0"),He.read(0)),ze.resumeScheduled=!1,ze.awaitDrain=0,He.emit("resume"),Ze(He),ze.flowing&&!ze.reading&&He.read(0)}function Ze(He){var ze=He._readableState;for(Ft("flow",ze.flowing);ze.flowing&&He.read()!==null;);}function qe(He,ze){if(ze.length===0)return null;var it;return ze.objectMode?it=ze.buffer.shift():!He||He>=ze.length?(it=ze.decoder?ze.buffer.join(""):ze.buffer.length===1?ze.buffer.head.data:ze.buffer.concat(ze.length),ze.buffer.clear()):it=Xe(He,ze.buffer,ze.decoder),it}function Xe(He,ze,it){var dt;return He<ze.head.data.length?(dt=ze.head.data.slice(0,He),ze.head.data=ze.head.data.slice(He)):dt=He===ze.head.data.length?ze.shift():it?vt(He,ze):gt(He,ze),dt}function vt(He,ze){var it=ze.head,dt=1,tt=it.data;for(He-=tt.length;it=it.next;){var Ke=it.data,je=He>Ke.length?Ke.length:He;if(je===Ke.length?tt+=Ke:tt+=Ke.slice(0,He),(He-=je)===0){je===Ke.length?(++dt,it.next?ze.head=it.next:ze.head=ze.tail=null):(ze.head=it,it.data=Ke.slice(je));break}++dt}return ze.length-=dt,tt}function gt(He,ze){var it=xt.allocUnsafe(He),dt=ze.head,tt=1;for(dt.data.copy(it),He-=dt.data.length;dt=dt.next;){var Ke=dt.data,je=He>Ke.length?Ke.length:He;if(Ke.copy(it,it.length-He,0,je),(He-=je)===0){je===Ke.length?(++tt,dt.next?ze.head=dt.next:ze.head=ze.tail=null):(ze.head=dt,dt.data=Ke.slice(je));break}++tt}return ze.length-=tt,it}function kt(He){var ze=He._readableState;if(ze.length>0)throw new Error('"endReadable()" called on non-empty stream');ze.endEmitted||(ze.ended=!0,ut.nextTick(at,ze,He))}function at(He,ze){He.endEmitted||He.length!==0||(He.endEmitted=!0,ze.readable=!1,ze.emit("end"))}function bt(He,ze){for(var it=0,dt=He.length;it<dt;it++)if(He[it]===ze)return it;return-1}var ct=Se("babel-runtime/core-js/object/get-prototype-of"),Rt=function(He){return He&&He.__esModule?He:{default:He}}(ct),ut=Se("process-nextick-args");Be.exports=de;var ot,ht=Se("isarray");de.ReadableState=pe;var yt=(Se("events").EventEmitter,function(He,ze){return He.listeners(ze).length}),_t=Se("./internal/streams/stream"),xt=Se("safe-buffer").Buffer,Ut=xe.Uint8Array||function(){},Ht=Se("core-util-is");Ht.inherits=Se("inherits");var dn=Se("util"),Ft=void 0;Ft=dn&&dn.debuglog?dn.debuglog("stream"):function(){};var fn,It=Se("./internal/streams/BufferList"),Xt=Se("./internal/streams/destroy");Ht.inherits(de,_t);var tn=["error","close","destroy","pause","resume"];Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(He){this._readableState&&(this._readableState.destroyed=He)}}),de.prototype.destroy=Xt.destroy,de.prototype._undestroy=Xt.undestroy,de.prototype._destroy=function(He,ze){this.push(null),ze(He)},de.prototype.push=function(He,ze){var it,dt=this._readableState;return dt.objectMode?it=!0:typeof He=="string"&&(ze=ze||dt.defaultEncoding,ze!==dt.encoding&&(He=xt.from(He,ze),ze=""),it=!0),ge(this,He,ze,!1,it)},de.prototype.unshift=function(He){return ge(this,He,null,!0,!1)},de.prototype.isPaused=function(){return this._readableState.flowing===!1},de.prototype.setEncoding=function(He){return fn||(fn=Se("string_decoder/").StringDecoder),this._readableState.decoder=new fn(He),this._readableState.encoding=He,this};var lt=8388608;de.prototype.read=function(He){Ft("read",He),He=parseInt(He,10);var ze=this._readableState,it=He;if(He!==0&&(ze.emittedReadable=!1),He===0&&ze.needReadable&&(ze.length>=ze.highWaterMark||ze.ended))return Ft("read: emitReadable",ze.length,ze.ended),ze.length===0&&ze.ended?kt(this):ae(this),null;if((He=oe(He,ze))===0&&ze.ended)return ze.length===0&&kt(this),null;var dt=ze.needReadable;Ft("need readable",dt),(ze.length===0||ze.length-He<ze.highWaterMark)&&(dt=!0,Ft("length less than watermark",dt)),ze.ended||ze.reading?(dt=!1,Ft("reading or ended",dt)):dt&&(Ft("do read"),ze.reading=!0,ze.sync=!0,ze.length===0&&(ze.needReadable=!0),this._read(ze.highWaterMark),ze.sync=!1,ze.reading||(He=oe(it,ze)));var tt;return tt=He>0?qe(He,ze):null,tt===null?(ze.needReadable=!0,He=0):ze.length-=He,ze.length===0&&(ze.ended||(ze.needReadable=!0),it!==He&&ze.ended&&kt(this)),tt!==null&&this.emit("data",tt),tt},de.prototype._read=function(He){this.emit("error",new Error("_read() is not implemented"))},de.prototype.pipe=function(He,ze){function it(Cn,mn){Ft("onunpipe"),Cn===We&&mn&&mn.hasUnpiped===!1&&(mn.hasUnpiped=!0,tt())}function dt(){Ft("onend"),He.end()}function tt(){Ft("cleanup"),He.removeListener("close",Re),He.removeListener("finish",Qe),He.removeListener("drain",qt),He.removeListener("error",je),He.removeListener("unpipe",it),We.removeListener("end",dt),We.removeListener("end",Ve),We.removeListener("data",Ke),Bt=!0,!pt.awaitDrain||He._writableState&&!He._writableState.needDrain||qt()}function Ke(Cn){Ft("ondata"),$t=!1,He.write(Cn)!==!1||$t||((pt.pipesCount===1&&pt.pipes===He||pt.pipesCount>1&&bt(pt.pipes,He)!==-1)&&!Bt&&(Ft("false write response, pause",We._readableState.awaitDrain),We._readableState.awaitDrain++,$t=!0),We.pause())}function je(Cn){Ft("onerror",Cn),Ve(),He.removeListener("error",je),yt(He,"error")===0&&He.emit("error",Cn)}function Re(){He.removeListener("finish",Qe),Ve()}function Qe(){Ft("onfinish"),He.removeListener("close",Re),Ve()}function Ve(){Ft("unpipe"),We.unpipe(He)}var We=this,pt=this._readableState;switch(pt.pipesCount){case 0:pt.pipes=He;break;case 1:pt.pipes=[pt.pipes,He];break;default:pt.pipes.push(He)}pt.pipesCount+=1,Ft("pipe count=%d opts=%j",pt.pipesCount,ze);var Mt=(!ze||ze.end!==!1)&&He!==Ce.stdout&&He!==Ce.stderr,Qt=Mt?dt:Ve;pt.endEmitted?ut.nextTick(Qt):We.once("end",Qt),He.on("unpipe",it);var qt=Pe(We);He.on("drain",qt);var Bt=!1,$t=!1;return We.on("data",Ke),we(He,"error",je),He.once("close",Re),He.once("finish",Qe),He.emit("pipe",We),pt.flowing||(Ft("pipe resume"),We.resume()),He},de.prototype.unpipe=function(He){var ze=this._readableState,it={hasUnpiped:!1};if(ze.pipesCount===0)return this;if(ze.pipesCount===1)return He&&He!==ze.pipes?this:(He||(He=ze.pipes),ze.pipes=null,ze.pipesCount=0,ze.flowing=!1,He&&He.emit("unpipe",this,it),this);if(!He){var dt=ze.pipes,tt=ze.pipesCount;ze.pipes=null,ze.pipesCount=0,ze.flowing=!1;for(var Ke=0;Ke<tt;Ke++)dt[Ke].emit("unpipe",this,it);return this}var je=bt(ze.pipes,He);return je===-1?this:(ze.pipes.splice(je,1),ze.pipesCount-=1,ze.pipesCount===1&&(ze.pipes=ze.pipes[0]),He.emit("unpipe",this,it),this)},de.prototype.on=function(He,ze){var it=_t.prototype.on.call(this,He,ze);if(He==="data")this._readableState.flowing!==!1&&this.resume();else if(He==="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 it},de.prototype.addListener=de.prototype.on,de.prototype.resume=function(){var He=this._readableState;return He.flowing||(Ft("resume"),He.flowing=!0,De(this,He)),this},de.prototype.pause=function(){return Ft("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ft("pause"),this._readableState.flowing=!1,this.emit("pause")),this},de.prototype.wrap=function(He){var ze=this,it=this._readableState,dt=!1;He.on("end",function(){if(Ft("wrapped end"),it.decoder&&!it.ended){var je=it.decoder.end();je&&je.length&&ze.push(je)}ze.push(null)}),He.on("data",function(je){Ft("wrapped data"),it.decoder&&(je=it.decoder.write(je)),(!it.objectMode||je!=null)&&(it.objectMode||je&&je.length)&&(ze.push(je)||(dt=!0,He.pause()))});for(var tt in He)this[tt]===void 0&&typeof He[tt]=="function"&&(this[tt]=function(je){return function(){return He[je].apply(He,arguments)}}(tt));for(var Ke=0;Ke<tn.length;Ke++)He.on(tn[Ke],this.emit.bind(this,tn[Ke]));return this._read=function(je){Ft("wrapped _read",je),dt&&(dt=!1,He.resume())},this},Object.defineProperty(de.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),de._fromList=qe}).call(this,Se("_process"),typeof Ie.g!="undefined"?Ie.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(Xt){return Xt&&Xt.__esModule?Xt:{default:Xt}}function ye(Xt){var tn=this;this.next=null,this.entry=null,this.finish=function(){vt(tn,Xt)}}function we(Xt){return dn.from(Xt)}function pe(Xt){return dn.isBuffer(Xt)||Xt instanceof Ft}function de(){}function ge(Xt,tn){yt=yt||Se("./_stream_duplex"),Xt=Xt||{};var lt=tn instanceof yt;this.objectMode=!!Xt.objectMode,lt&&(this.objectMode=this.objectMode||!!Xt.writableObjectMode);var He=Xt.highWaterMark,ze=Xt.writableHighWaterMark,it=this.objectMode?16:16384;this.highWaterMark=He||He===0?He:lt&&(ze||ze===0)?ze:it,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=Xt.decodeStrings===!1;this.decodeStrings=!dt,this.defaultEncoding=Xt.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(Xt){if(yt=yt||Se("./_stream_duplex"),!(It.call(fe,this)||this instanceof yt))return new fe(Xt);this._writableState=new ge(Xt,this),this.writable=!0,Xt&&(typeof Xt.write=="function"&&(this._write=Xt.write),typeof Xt.writev=="function"&&(this._writev=Xt.writev),typeof Xt.destroy=="function"&&(this._destroy=Xt.destroy),typeof Xt.final=="function"&&(this._final=Xt.final)),Ht.call(this)}function ue(Xt,tn){var lt=new Error("write after end");Xt.emit("error",lt),ht.nextTick(tn,lt)}function ee(Xt,tn,lt,He){var ze=!0,it=!1;return lt===null?it=new TypeError("May not write null values to stream"):typeof lt=="string"||lt===void 0||tn.objectMode||(it=new TypeError("Invalid non-string/buffer chunk")),it&&(Xt.emit("error",it),ht.nextTick(He,it),ze=!1),ze}function z(Xt,tn,lt){return Xt.objectMode||Xt.decodeStrings===!1||typeof tn!="string"||(tn=dn.from(tn,lt)),tn}function oe(Xt,tn,lt,He,ze,it){if(!lt){var dt=z(tn,He,ze);He!==dt&&(lt=!0,ze="buffer",He=dt)}var tt=tn.objectMode?1:He.length;tn.length+=tt;var Ke=tn.length<tn.highWaterMark;if(Ke||(tn.needDrain=!0),tn.writing||tn.corked){var je=tn.lastBufferedRequest;tn.lastBufferedRequest={chunk:He,encoding:ze,isBuf:lt,callback:it,next:null},je?je.next=tn.lastBufferedRequest:tn.bufferedRequest=tn.lastBufferedRequest,tn.bufferedRequestCount+=1}else re(Xt,tn,!1,tt,He,ze,it);return Ke}function re(Xt,tn,lt,He,ze,it,dt){tn.writelen=He,tn.writecb=dt,tn.writing=!0,tn.sync=!0,lt?Xt._writev(ze,tn.onwrite):Xt._write(ze,it,tn.onwrite),tn.sync=!1}function ae(Xt,tn,lt,He,ze){--tn.pendingcb,lt?(ht.nextTick(ze,He),ht.nextTick(qe,Xt,tn),Xt._writableState.errorEmitted=!0,Xt.emit("error",He)):(ze(He),Xt._writableState.errorEmitted=!0,Xt.emit("error",He),qe(Xt,tn))}function le(Xt){Xt.writing=!1,Xt.writecb=null,Xt.length-=Xt.writelen,Xt.writelen=0}function me(Xt,tn){var lt=Xt._writableState,He=lt.sync,ze=lt.writecb;if(le(lt),tn)ae(Xt,lt,He,tn,ze);else{var it=De(lt);it||lt.corked||lt.bufferProcessing||!lt.bufferedRequest||Ae(Xt,lt),He?_t(ve,Xt,lt,it,ze):ve(Xt,lt,it,ze)}}function ve(Xt,tn,lt,He){lt||Pe(Xt,tn),tn.pendingcb--,He(),qe(Xt,tn)}function Pe(Xt,tn){tn.length===0&&tn.needDrain&&(tn.needDrain=!1,Xt.emit("drain"))}function Ae(Xt,tn){tn.bufferProcessing=!0;var lt=tn.bufferedRequest;if(Xt._writev&&lt&&lt.next){var He=tn.bufferedRequestCount,ze=new Array(He),it=tn.corkedRequestsFree;it.entry=lt;for(var dt=0,tt=!0;lt;)ze[dt]=lt,lt.isBuf||(tt=!1),lt=lt.next,dt+=1;ze.allBuffers=tt,re(Xt,tn,!0,tn.length,ze,"",it.finish),tn.pendingcb++,tn.lastBufferedRequest=null,it.next?(tn.corkedRequestsFree=it.next,it.next=null):tn.corkedRequestsFree=new ye(tn),tn.bufferedRequestCount=0}else{for(;lt;){var Ke=lt.chunk,je=lt.encoding,Re=lt.callback;if(re(Xt,tn,!1,tn.objectMode?1:Ke.length,Ke,je,Re),lt=lt.next,tn.bufferedRequestCount--,tn.writing)break}lt===null&&(tn.lastBufferedRequest=null)}tn.bufferedRequest=lt,tn.bufferProcessing=!1}function De(Xt){return Xt.ending&&Xt.length===0&&Xt.bufferedRequest===null&&!Xt.finished&&!Xt.writing}function Oe(Xt,tn){Xt._final(function(lt){tn.pendingcb--,lt&&Xt.emit("error",lt),tn.prefinished=!0,Xt.emit("prefinish"),qe(Xt,tn)})}function Ze(Xt,tn){tn.prefinished||tn.finalCalled||(typeof Xt._final=="function"?(tn.pendingcb++,tn.finalCalled=!0,ht.nextTick(Oe,Xt,tn)):(tn.prefinished=!0,Xt.emit("prefinish")))}function qe(Xt,tn){var lt=De(tn);return lt&&(Ze(Xt,tn),tn.pendingcb===0&&(tn.finished=!0,Xt.emit("finish"))),lt}function Xe(Xt,tn,lt){tn.ending=!0,qe(Xt,tn),lt&&(tn.finished?ht.nextTick(lt):Xt.once("finish",lt)),tn.ended=!0,Xt.writable=!1}function vt(Xt,tn,lt){var He=Xt.entry;for(Xt.entry=null;He;){var ze=He.callback;tn.pendingcb--,ze(lt),He=He.next}tn.corkedRequestsFree?tn.corkedRequestsFree.next=Xt:tn.corkedRequestsFree=Xt}var gt=Se("babel-runtime/core-js/object/define-property"),kt=be(gt),at=Se("babel-runtime/core-js/symbol/has-instance"),bt=be(at),ct=Se("babel-runtime/core-js/symbol"),Rt=be(ct),ut=Se("babel-runtime/core-js/set-immediate"),ot=be(ut),ht=Se("process-nextick-args");Be.exports=fe;var yt,_t=!Ce.browser&&["v0.10","v0.9."].indexOf(Ce.version.slice(0,5))>-1?ot.default:ht.nextTick;fe.WritableState=ge;var xt=Se("core-util-is");xt.inherits=Se("inherits");var Ut={deprecate:Se("util-deprecate")},Ht=Se("./internal/streams/stream"),dn=Se("safe-buffer").Buffer,Ft=xe.Uint8Array||function(){},fn=Se("./internal/streams/destroy");xt.inherits(fe,Ht),ge.prototype.getBuffer=function(){for(var Xt=this.bufferedRequest,tn=[];Xt;)tn.push(Xt),Xt=Xt.next;return tn},function(){try{Object.defineProperty(ge.prototype,"buffer",{get:Ut.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Xt){}}();var It;typeof Rt.default=="function"&&bt.default&&typeof Function.prototype[bt.default]=="function"?(It=Function.prototype[bt.default],(0,kt.default)(fe,bt.default,{value:function(Xt){return!!It.call(this,Xt)||this===fe&&Xt&&Xt._writableState instanceof ge}})):It=function(Xt){return Xt instanceof this},fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},fe.prototype.write=function(Xt,tn,lt){var He=this._writableState,ze=!1,it=!He.objectMode&&pe(Xt);return it&&!dn.isBuffer(Xt)&&(Xt=we(Xt)),typeof tn=="function"&&(lt=tn,tn=null),it?tn="buffer":tn||(tn=He.defaultEncoding),typeof lt!="function"&&(lt=de),He.ended?ue(this,lt):(it||ee(this,He,Xt,lt))&&(He.pendingcb++,ze=oe(this,He,it,Xt,tn,lt)),ze},fe.prototype.cork=function(){this._writableState.corked++},fe.prototype.uncork=function(){var Xt=this._writableState;Xt.corked&&(Xt.corked--,Xt.writing||Xt.corked||Xt.finished||Xt.bufferProcessing||!Xt.bufferedRequest||Ae(this,Xt))},fe.prototype.setDefaultEncoding=function(Xt){if(typeof Xt=="string"&&(Xt=Xt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Xt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Xt);return this._writableState.defaultEncoding=Xt,this},Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),fe.prototype._write=function(Xt,tn,lt){lt(new Error("_write() is not implemented"))},fe.prototype._writev=null,fe.prototype.end=function(Xt,tn,lt){var He=this._writableState;typeof Xt=="function"?(lt=Xt,Xt=null,tn=null):typeof tn=="function"&&(lt=tn,tn=null),Xt!=null&&this.write(Xt,tn),He.corked&&(He.corked=1,this.uncork()),He.ending||He.finished||Xe(this,He,lt)},Object.defineProperty(fe.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Xt){this._writableState&&(this._writableState.destroyed=Xt)}}),fe.prototype.destroy=fn.destroy,fe.prototype._undestroy=fn.undestroy,fe.prototype._destroy=function(Xt,tn){this.end(),tn(Xt)}}).call(this,Se("_process"),typeof Ie.g!="undefined"?Ie.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,ht,yt,_t){var xt=ht&&ht.prototype instanceof ye?ht:ye,Ut=Object.create(xt.prototype),Ht=new oe(_t||[]);return Ut._invoke=fe(ot,yt,Ht),Ut}function be(ot,ht,yt){try{return{type:"normal",arg:ot.call(ht,yt)}}catch(_t){return{type:"throw",arg:_t}}}function ye(){}function we(){}function pe(){}function de(ot){["next","throw","return"].forEach(function(ht){ot[ht]=function(yt){return this._invoke(ht,yt)}})}function ge(ot){function ht(xt,Ut,Ht,dn){var Ft=be(ot[xt],ot,Ut);if(Ft.type!=="throw"){var fn=Ft.arg,It=fn.value;return It&&typeof It=="object"&&ve.call(It,"__await")?Promise.resolve(It.__await).then(function(Xt){ht("next",Xt,Ht,dn)},function(Xt){ht("throw",Xt,Ht,dn)}):Promise.resolve(It).then(function(Xt){fn.value=Xt,Ht(fn)},dn)}dn(Ft.arg)}function yt(xt,Ut){function Ht(){return new Promise(function(dn,Ft){ht(xt,Ut,dn,Ft)})}return _t=_t?_t.then(Ht,Ht):Ht()}var _t;this._invoke=yt}function fe(ot,ht,yt){var _t=Xe;return function(xt,Ut){if(_t===gt)throw new Error("Generator is already running");if(_t===kt){if(xt==="throw")throw Ut;return ae()}for(yt.method=xt,yt.arg=Ut;;){var Ht=yt.delegate;if(Ht){var dn=ue(Ht,yt);if(dn){if(dn===at)continue;return dn}}if(yt.method==="next")yt.sent=yt._sent=yt.arg;else if(yt.method==="throw"){if(_t===Xe)throw _t=kt,yt.arg;yt.dispatchException(yt.arg)}else yt.method==="return"&&yt.abrupt("return",yt.arg);_t=gt;var Ft=be(ot,ht,yt);if(Ft.type==="normal"){if(_t=yt.done?kt:vt,Ft.arg===at)continue;return{value:Ft.arg,done:yt.done}}Ft.type==="throw"&&(_t=kt,yt.method="throw",yt.arg=Ft.arg)}}}function ue(ot,ht){var yt=ot.iterator[ht.method];if(yt===le){if(ht.delegate=null,ht.method==="throw"){if(ot.iterator.return&&(ht.method="return",ht.arg=le,ue(ot,ht),ht.method==="throw"))return at;ht.method="throw",ht.arg=new TypeError("The iterator does not provide a 'throw' method")}return at}var _t=be(yt,ot.iterator,ht.arg);if(_t.type==="throw")return ht.method="throw",ht.arg=_t.arg,ht.delegate=null,at;var xt=_t.arg;return xt?xt.done?(ht[ot.resultName]=xt.value,ht.next=ot.nextLoc,ht.method!=="return"&&(ht.method="next",ht.arg=le),ht.delegate=null,at):xt:(ht.method="throw",ht.arg=new TypeError("iterator result is not an object"),ht.delegate=null,at)}function ee(ot){var ht={tryLoc:ot[0]};1 in ot&&(ht.catchLoc=ot[1]),2 in ot&&(ht.finallyLoc=ot[2],ht.afterLoc=ot[3]),this.tryEntries.push(ht)}function z(ot){var ht=ot.completion||{};ht.type="normal",delete ht.arg,ot.completion=ht}function oe(ot){this.tryEntries=[{tryLoc:"root"}],ot.forEach(ee,this),this.reset(!0)}function re(ot){if(ot){var ht=ot[Ae];if(ht)return ht.call(ot);if(typeof ot.next=="function")return ot;if(!isNaN(ot.length)){var yt=-1,_t=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 _t.next=_t}}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",De=Pe.asyncIterator||"@@asyncIterator",Oe=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 Xe="suspendedStart",vt="suspendedYield",gt="executing",kt="completed",at={},bt={};bt[Ae]=function(){return this};var ct=Object.getPrototypeOf,Rt=ct&&ct(ct(re([])));Rt&&Rt!==me&&ve.call(Rt,Ae)&&(bt=Rt);var ut=pe.prototype=ye.prototype=Object.create(bt);we.prototype=ut.constructor=pe,pe.constructor=we,pe[Oe]=we.displayName="GeneratorFunction",qe.isGeneratorFunction=function(ot){var ht=typeof ot=="function"&&ot.constructor;return!!ht&&(ht===we||(ht.displayName||ht.name)==="GeneratorFunction")},qe.mark=function(ot){return Object.setPrototypeOf?Object.setPrototypeOf(ot,pe):(ot.__proto__=pe,Oe in ot||(ot[Oe]="GeneratorFunction")),ot.prototype=Object.create(ut),ot},qe.awrap=function(ot){return{__await:ot}},de(ge.prototype),ge.prototype[De]=function(){return this},qe.AsyncIterator=ge,qe.async=function(ot,ht,yt,_t){var xt=new ge(xe(ot,ht,yt,_t));return qe.isGeneratorFunction(ht)?xt:xt.next().then(function(Ut){return Ut.done?Ut.value:xt.next()})},de(ut),ut[Oe]="Generator",ut[Ae]=function(){return this},ut.toString=function(){return"[object Generator]"},qe.keys=function(ot){var ht=[];for(var yt in ot)ht.push(yt);return ht.reverse(),function _t(){for(;ht.length;){var xt=ht.pop();if(xt in ot)return _t.value=xt,_t.done=!1,_t}return _t.done=!0,_t}},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 ht in this)ht.charAt(0)==="t"&&ve.call(this,ht)&&!isNaN(+ht.slice(1))&&(this[ht]=le)},stop:function(){this.done=!0;var ot=this.tryEntries[0],ht=ot.completion;if(ht.type==="throw")throw ht.arg;return this.rval},dispatchException:function(ot){function ht(Ft,fn){return Ut.type="throw",Ut.arg=ot,yt.next=Ft,fn&&(yt.method="next",yt.arg=le),!!fn}if(this.done)throw ot;for(var yt=this,_t=this.tryEntries.length-1;_t>=0;--_t){var xt=this.tryEntries[_t],Ut=xt.completion;if(xt.tryLoc==="root")return ht("end");if(xt.tryLoc<=this.prev){var Ht=ve.call(xt,"catchLoc"),dn=ve.call(xt,"finallyLoc");if(Ht&&dn){if(this.prev<xt.catchLoc)return ht(xt.catchLoc,!0);if(this.prev<xt.finallyLoc)return ht(xt.finallyLoc)}else if(Ht){if(this.prev<xt.catchLoc)return ht(xt.catchLoc,!0)}else{if(!dn)throw new Error("try statement without catch or finally");if(this.prev<xt.finallyLoc)return ht(xt.finallyLoc)}}}},abrupt:function(ot,ht){for(var yt=this.tryEntries.length-1;yt>=0;--yt){var _t=this.tryEntries[yt];if(_t.tryLoc<=this.prev&&ve.call(_t,"finallyLoc")&&this.prev<_t.finallyLoc){var xt=_t;break}}xt&&(ot==="break"||ot==="continue")&&xt.tryLoc<=ht&&ht<=xt.finallyLoc&&(xt=null);var Ut=xt?xt.completion:{};return Ut.type=ot,Ut.arg=ht,xt?(this.method="next",this.next=xt.finallyLoc,at):this.complete(Ut)},complete:function(ot,ht){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"&&ht&&(this.next=ht),at},finish:function(ot){for(var ht=this.tryEntries.length-1;ht>=0;--ht){var yt=this.tryEntries[ht];if(yt.finallyLoc===ot)return this.complete(yt.completion,yt.afterLoc),z(yt),at}},catch:function(ot){for(var ht=this.tryEntries.length-1;ht>=0;--ht){var yt=this.tryEntries[ht];if(yt.tryLoc===ot){var _t=yt.completion;if(_t.type==="throw"){var xt=_t.arg;z(yt)}return xt}}throw new Error("illegal catch attempt")},delegateYield:function(ot,ht,yt){return this.delegate={iterator:re(ot),resultName:ht,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(Ve,We){if(!(this instanceof le))return new le(Ve,We);var pt=this;ve(pt),pt.q=pt.c="",pt.bufferCheckPosition=ae.MAX_BUFFER_LENGTH,pt.opt=We||{},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=!!Ve,pt.noscript=!(!Ve&&!pt.opt.noscript),pt.state=Re.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)(it)),pt.trackPosition=pt.opt.position!==!1,pt.trackPosition&&(pt.position=pt.line=pt.column=0),gt(pt,"onready")}function me(Ve){for(var We=Math.max(ae.MAX_BUFFER_LENGTH,10),pt=0,Mt=0,Qt=fn.length;Mt<Qt;Mt++){var qt=Ve[fn[Mt]].length;if(qt>We)switch(fn[Mt]){case"textNode":at(Ve);break;case"cdata":kt(Ve,"oncdata",Ve.cdata),Ve.cdata="";break;case"script":kt(Ve,"onscript",Ve.script),Ve.script="";break;default:ct(Ve,"Max buffer length exceeded: "+fn[Mt])}pt=Math.max(pt,qt)}var Bt=ae.MAX_BUFFER_LENGTH-pt;Ve.bufferCheckPosition=Bt+Ve.position}function ve(Ve){for(var We=0,pt=fn.length;We<pt;We++)Ve[fn[We]]=""}function Pe(Ve){at(Ve),Ve.cdata!==""&&(kt(Ve,"oncdata",Ve.cdata),Ve.cdata=""),Ve.script!==""&&(kt(Ve,"onscript",Ve.script),Ve.script="")}function Ae(Ve,We){return new De(Ve,We)}function De(Ve,We){if(!(this instanceof De))return new De(Ve,We);It.apply(this),this._parser=new le(Ve,We),this.writable=!0,this.readable=!0;var pt=this;this._parser.onend=function(){pt.emit("end")},this._parser.onerror=function(Mt){pt.emit("error",Mt),pt._parser.error=null},this._decoder=null,Xt.forEach(function(Mt){(0,ue.default)(pt,"on"+Mt,{get:function(){return pt._parser["on"+Mt]},set:function(Qt){if(!Qt)return pt.removeAllListeners(Mt),pt._parser["on"+Mt]=Qt,Qt;pt.on(Mt,Qt)},enumerable:!0,configurable:!1})})}function Oe(Ve){return Ve===" "||Ve===`
`||Ve==="\r"||Ve===" "}function Ze(Ve){return Ve==='"'||Ve==="'"}function qe(Ve){return Ve===">"||Oe(Ve)}function Xe(Ve,We){return Ve.test(We)}function vt(Ve,We){return!Xe(Ve,We)}function gt(Ve,We,pt){Ve[We]&&Ve[We](pt)}function kt(Ve,We,pt){Ve.textNode&&at(Ve),gt(Ve,We,pt)}function at(Ve){Ve.textNode=bt(Ve.opt,Ve.textNode),Ve.textNode&&gt(Ve,"ontext",Ve.textNode),Ve.textNode=""}function bt(Ve,We){return Ve.trim&&(We=We.trim()),Ve.normalize&&(We=We.replace(/\s+/g," ")),We}function ct(Ve,We){return at(Ve),Ve.trackPosition&&(We+=`
Line: `+Ve.line+`
Column: `+Ve.column+`
Char: `+Ve.c),We=new Error(We),Ve.error=We,gt(Ve,"onerror",We),Ve}function Rt(Ve){return Ve.sawRoot&&!Ve.closedRoot&&ut(Ve,"Unclosed root tag"),Ve.state!==Re.BEGIN&&Ve.state!==Re.BEGIN_WHITESPACE&&Ve.state!==Re.TEXT&&ct(Ve,"Unexpected end"),at(Ve),Ve.c="",Ve.closed=!0,gt(Ve,"onend"),le.call(Ve,Ve.strict,Ve.opt),Ve}function ut(Ve,We){if((Ve===void 0?"undefined":(0,ge.default)(Ve))!=="object"||!(Ve instanceof le))throw new Error("bad call to strictFail");Ve.strict&&ct(Ve,We)}function ot(Ve){Ve.strict||(Ve.tagName=Ve.tagName[Ve.looseCase]());var We=Ve.tags[Ve.tags.length-1]||Ve,pt=Ve.tag={name:Ve.tagName,attributes:{}};Ve.opt.xmlns&&(pt.ns=We.ns),Ve.attribList.length=0,kt(Ve,"onopentagstart",pt)}function ht(Ve,We){var pt=Ve.indexOf(":"),Mt=pt<0?["",Ve]:Ve.split(":"),Qt=Mt[0],qt=Mt[1];return We&&Ve==="xmlns"&&(Qt="xmlns",qt=""),{prefix:Qt,local:qt}}function yt(Ve){if(Ve.strict||(Ve.attribName=Ve.attribName[Ve.looseCase]()),Ve.attribList.indexOf(Ve.attribName)!==-1||Ve.tag.attributes.hasOwnProperty(Ve.attribName))return void(Ve.attribName=Ve.attribValue="");if(Ve.opt.xmlns){var We=ht(Ve.attribName,!0),pt=We.prefix,Mt=We.local;if(pt==="xmlns")if(Mt==="xml"&&Ve.attribValue!==He)ut(Ve,"xml: prefix must be bound to "+He+`
Actual: `+Ve.attribValue);else if(Mt==="xmlns"&&Ve.attribValue!==ze)ut(Ve,"xmlns: prefix must be bound to "+ze+`
Actual: `+Ve.attribValue);else{var Qt=Ve.tag,qt=Ve.tags[Ve.tags.length-1]||Ve;Qt.ns===qt.ns&&(Qt.ns=(0,re.default)(qt.ns)),Qt.ns[Mt]=Ve.attribValue}Ve.attribList.push([Ve.attribName,Ve.attribValue])}else Ve.tag.attributes[Ve.attribName]=Ve.attribValue,kt(Ve,"onattribute",{name:Ve.attribName,value:Ve.attribValue});Ve.attribName=Ve.attribValue=""}function _t(Ve,We){if(Ve.opt.xmlns){var pt=Ve.tag,Mt=ht(Ve.tagName);pt.prefix=Mt.prefix,pt.local=Mt.local,pt.uri=pt.ns[Mt.prefix]||"",pt.prefix&&!pt.uri&&(ut(Ve,"Unbound namespace prefix: "+(0,pe.default)(Ve.tagName)),pt.uri=Mt.prefix);var Qt=Ve.tags[Ve.tags.length-1]||Ve;pt.ns&&Qt.ns!==pt.ns&&(0,z.default)(pt.ns).forEach(function(Ai){kt(Ve,"onopennamespace",{prefix:Ai,uri:pt.ns[Ai]})});for(var qt=0,Bt=Ve.attribList.length;qt<Bt;qt++){var $t=Ve.attribList[qt],Cn=$t[0],mn=$t[1],un=ht(Cn,!0),Kn=un.prefix,pn=un.local,Hn=Kn===""?"":pt.ns[Kn]||"",Qn={name:Cn,value:mn,prefix:Kn,local:pn,uri:Hn};Kn&&Kn!=="xmlns"&&!Hn&&(ut(Ve,"Unbound namespace prefix: "+(0,pe.default)(Kn)),Qn.uri=Kn),Ve.tag.attributes[Cn]=Qn,kt(Ve,"onattribute",Qn)}Ve.attribList.length=0}Ve.tag.isSelfClosing=!!We,Ve.sawRoot=!0,Ve.tags.push(Ve.tag),kt(Ve,"onopentag",Ve.tag),We||(Ve.noscript||Ve.tagName.toLowerCase()!=="script"?Ve.state=Re.TEXT:Ve.state=Re.SCRIPT,Ve.tag=null,Ve.tagName=""),Ve.attribName=Ve.attribValue="",Ve.attribList.length=0}function xt(Ve){if(!Ve.tagName)return ut(Ve,"Weird empty close tag."),Ve.textNode+="</>",void(Ve.state=Re.TEXT);if(Ve.script){if(Ve.tagName!=="script")return Ve.script+="</"+Ve.tagName+">",Ve.tagName="",void(Ve.state=Re.SCRIPT);kt(Ve,"onscript",Ve.script),Ve.script=""}var We=Ve.tags.length,pt=Ve.tagName;Ve.strict||(pt=pt[Ve.looseCase]());for(var Mt=pt;We--&&Ve.tags[We].name!==Mt;)ut(Ve,"Unexpected close tag");if(We<0)return ut(Ve,"Unmatched closing tag: "+Ve.tagName),Ve.textNode+="</"+Ve.tagName+">",void(Ve.state=Re.TEXT);Ve.tagName=pt;for(var Qt=Ve.tags.length;Qt-- >We;){var qt=Ve.tag=Ve.tags.pop();Ve.tagName=Ve.tag.name,kt(Ve,"onclosetag",Ve.tagName);var Bt={};for(var $t in qt.ns)Bt[$t]=qt.ns[$t];var Cn=Ve.tags[Ve.tags.length-1]||Ve;Ve.opt.xmlns&&qt.ns!==Cn.ns&&(0,z.default)(qt.ns).forEach(function(mn){var un=qt.ns[mn];kt(Ve,"onclosenamespace",{prefix:mn,uri:un})})}We===0&&(Ve.closedRoot=!0),Ve.tagName=Ve.attribValue=Ve.attribName="",Ve.attribList.length=0,Ve.state=Re.TEXT}function Ut(Ve){var We,pt=Ve.entity,Mt=pt.toLowerCase(),Qt="";return Ve.ENTITIES[pt]?Ve.ENTITIES[pt]:Ve.ENTITIES[Mt]?Ve.ENTITIES[Mt]:(pt=Mt,pt.charAt(0)==="#"&&(pt.charAt(1)==="x"?(pt=pt.slice(2),We=parseInt(pt,16),Qt=We.toString(16)):(pt=pt.slice(1),We=parseInt(pt,10),Qt=We.toString(10))),pt=pt.replace(/^0+/,""),isNaN(We)||Qt.toLowerCase()!==pt?(ut(Ve,"Invalid character entity"),"&"+Ve.entity+";"):(0,ye.default)(We))}function Ht(Ve,We){We==="<"?(Ve.state=Re.OPEN_WAKA,Ve.startTagPosition=Ve.position):Oe(We)||(ut(Ve,"Non-whitespace before first tag."),Ve.textNode=We,Ve.state=Re.TEXT)}function dn(Ve,We){var pt="";return We<Ve.length&&(pt=Ve.charAt(We)),pt}function Ft(Ve){var We=this;if(this.error)throw this.error;if(We.closed)return ct(We,"Cannot write after close. Assign an onready handler.");if(Ve===null)return Rt(We);(Ve===void 0?"undefined":(0,ge.default)(Ve))==="object"&&(Ve=Ve.toString());for(var pt=0,Mt="";Mt=dn(Ve,pt++),We.c=Mt,!!Mt;)switch(We.trackPosition&&(We.position++,Mt===`
`?(We.line++,We.column=0):We.column++),We.state){case Re.BEGIN:if(We.state=Re.BEGIN_WHITESPACE,Mt==="\uFEFF")continue;Ht(We,Mt);continue;case Re.BEGIN_WHITESPACE:Ht(We,Mt);continue;case Re.TEXT:if(We.sawRoot&&!We.closedRoot){for(var Qt=pt-1;Mt&&Mt!=="<"&&Mt!=="&";)(Mt=dn(Ve,pt++))&&We.trackPosition&&(We.position++,Mt===`
`?(We.line++,We.column=0):We.column++);We.textNode+=Ve.substring(Qt,pt-1)}Mt!=="<"||We.sawRoot&&We.closedRoot&&!We.strict?(Oe(Mt)||We.sawRoot&&!We.closedRoot||ut(We,"Text data outside of root node."),Mt==="&"?We.state=Re.TEXT_ENTITY:We.textNode+=Mt):(We.state=Re.OPEN_WAKA,We.startTagPosition=We.position);continue;case Re.SCRIPT:Mt==="<"?We.state=Re.SCRIPT_ENDING:We.script+=Mt;continue;case Re.SCRIPT_ENDING:Mt==="/"?We.state=Re.CLOSE_TAG:(We.script+="<"+Mt,We.state=Re.SCRIPT);continue;case Re.OPEN_WAKA:if(Mt==="!")We.state=Re.SGML_DECL,We.sgmlDecl="";else if(!Oe(Mt))if(Xe(dt,Mt))We.state=Re.OPEN_TAG,We.tagName=Mt;else if(Mt==="/")We.state=Re.CLOSE_TAG,We.tagName="";else if(Mt==="?")We.state=Re.PROC_INST,We.procInstName=We.procInstBody="";else{if(ut(We,"Unencoded <"),We.startTagPosition+1<We.position){var qt=We.position-We.startTagPosition;Mt=new Array(qt).join(" ")+Mt}We.textNode+="<"+Mt,We.state=Re.TEXT}continue;case Re.SGML_DECL:(We.sgmlDecl+Mt).toUpperCase()===tn?(kt(We,"onopencdata"),We.state=Re.CDATA,We.sgmlDecl="",We.cdata=""):We.sgmlDecl+Mt==="--"?(We.state=Re.COMMENT,We.comment="",We.sgmlDecl=""):(We.sgmlDecl+Mt).toUpperCase()===lt?(We.state=Re.DOCTYPE,(We.doctype||We.sawRoot)&&ut(We,"Inappropriately located doctype declaration"),We.doctype="",We.sgmlDecl=""):Mt===">"?(kt(We,"onsgmldeclaration",We.sgmlDecl),We.sgmlDecl="",We.state=Re.TEXT):(Ze(Mt)&&(We.state=Re.SGML_DECL_QUOTED),We.sgmlDecl+=Mt);continue;case Re.SGML_DECL_QUOTED:Mt===We.q&&(We.state=Re.SGML_DECL,We.q=""),We.sgmlDecl+=Mt;continue;case Re.DOCTYPE:Mt===">"?(We.state=Re.TEXT,kt(We,"ondoctype",We.doctype),We.doctype=!0):(We.doctype+=Mt,Mt==="["?We.state=Re.DOCTYPE_DTD:Ze(Mt)&&(We.state=Re.DOCTYPE_QUOTED,We.q=Mt));continue;case Re.DOCTYPE_QUOTED:We.doctype+=Mt,Mt===We.q&&(We.q="",We.state=Re.DOCTYPE);continue;case Re.DOCTYPE_DTD:We.doctype+=Mt,Mt==="]"?We.state=Re.DOCTYPE:Ze(Mt)&&(We.state=Re.DOCTYPE_DTD_QUOTED,We.q=Mt);continue;case Re.DOCTYPE_DTD_QUOTED:We.doctype+=Mt,Mt===We.q&&(We.state=Re.DOCTYPE_DTD,We.q="");continue;case Re.COMMENT:Mt==="-"?We.state=Re.COMMENT_ENDING:We.comment+=Mt;continue;case Re.COMMENT_ENDING:Mt==="-"?(We.state=Re.COMMENT_ENDED,We.comment=bt(We.opt,We.comment),We.comment&&kt(We,"oncomment",We.comment),We.comment=""):(We.comment+="-"+Mt,We.state=Re.COMMENT);continue;case Re.COMMENT_ENDED:Mt!==">"?(ut(We,"Malformed comment"),We.comment+="--"+Mt,We.state=Re.COMMENT):We.state=Re.TEXT;continue;case Re.CDATA:Mt==="]"?We.state=Re.CDATA_ENDING:We.cdata+=Mt;continue;case Re.CDATA_ENDING:Mt==="]"?We.state=Re.CDATA_ENDING_2:(We.cdata+="]"+Mt,We.state=Re.CDATA);continue;case Re.CDATA_ENDING_2:Mt===">"?(We.cdata&&kt(We,"oncdata",We.cdata),kt(We,"onclosecdata"),We.cdata="",We.state=Re.TEXT):Mt==="]"?We.cdata+="]":(We.cdata+="]]"+Mt,We.state=Re.CDATA);continue;case Re.PROC_INST:Mt==="?"?We.state=Re.PROC_INST_ENDING:Oe(Mt)?We.state=Re.PROC_INST_BODY:We.procInstName+=Mt;continue;case Re.PROC_INST_BODY:if(!We.procInstBody&&Oe(Mt))continue;Mt==="?"?We.state=Re.PROC_INST_ENDING:We.procInstBody+=Mt;continue;case Re.PROC_INST_ENDING:Mt===">"?(kt(We,"onprocessinginstruction",{name:We.procInstName,body:We.procInstBody}),We.procInstName=We.procInstBody="",We.state=Re.TEXT):(We.procInstBody+="?"+Mt,We.state=Re.PROC_INST_BODY);continue;case Re.OPEN_TAG:Xe(tt,Mt)?We.tagName+=Mt:(ot(We),Mt===">"?_t(We):Mt==="/"?We.state=Re.OPEN_TAG_SLASH:(Oe(Mt)||ut(We,"Invalid character in tag name"),We.state=Re.ATTRIB));continue;case Re.OPEN_TAG_SLASH:Mt===">"?(_t(We,!0),xt(We)):(ut(We,"Forward-slash in opening tag not followed by >"),We.state=Re.ATTRIB);continue;case Re.ATTRIB:if(Oe(Mt))continue;Mt===">"?_t(We):Mt==="/"?We.state=Re.OPEN_TAG_SLASH:Xe(dt,Mt)?(We.attribName=Mt,We.attribValue="",We.state=Re.ATTRIB_NAME):ut(We,"Invalid attribute name");continue;case Re.ATTRIB_NAME:Mt==="="?We.state=Re.ATTRIB_VALUE:Mt===">"?(ut(We,"Attribute without value"),We.attribValue=We.attribName,yt(We),_t(We)):Oe(Mt)?We.state=Re.ATTRIB_NAME_SAW_WHITE:Xe(tt,Mt)?We.attribName+=Mt:ut(We,"Invalid attribute name");continue;case Re.ATTRIB_NAME_SAW_WHITE:if(Mt==="=")We.state=Re.ATTRIB_VALUE;else{if(Oe(Mt))continue;ut(We,"Attribute without value"),We.tag.attributes[We.attribName]="",We.attribValue="",kt(We,"onattribute",{name:We.attribName,value:""}),We.attribName="",Mt===">"?_t(We):Xe(dt,Mt)?(We.attribName=Mt,We.state=Re.ATTRIB_NAME):(ut(We,"Invalid attribute name"),We.state=Re.ATTRIB)}continue;case Re.ATTRIB_VALUE:if(Oe(Mt))continue;Ze(Mt)?(We.q=Mt,We.state=Re.ATTRIB_VALUE_QUOTED):(ut(We,"Unquoted attribute value"),We.state=Re.ATTRIB_VALUE_UNQUOTED,We.attribValue=Mt);continue;case Re.ATTRIB_VALUE_QUOTED:if(Mt!==We.q){Mt==="&"?We.state=Re.ATTRIB_VALUE_ENTITY_Q:We.attribValue+=Mt;continue}yt(We),We.q="",We.state=Re.ATTRIB_VALUE_CLOSED;continue;case Re.ATTRIB_VALUE_CLOSED:Oe(Mt)?We.state=Re.ATTRIB:Mt===">"?_t(We):Mt==="/"?We.state=Re.OPEN_TAG_SLASH:Xe(dt,Mt)?(ut(We,"No whitespace between attributes"),We.attribName=Mt,We.attribValue="",We.state=Re.ATTRIB_NAME):ut(We,"Invalid attribute name");continue;case Re.ATTRIB_VALUE_UNQUOTED:if(!qe(Mt)){Mt==="&"?We.state=Re.ATTRIB_VALUE_ENTITY_U:We.attribValue+=Mt;continue}yt(We),Mt===">"?_t(We):We.state=Re.ATTRIB;continue;case Re.CLOSE_TAG:if(We.tagName)Mt===">"?xt(We):Xe(tt,Mt)?We.tagName+=Mt:We.script?(We.script+="</"+We.tagName,We.tagName="",We.state=Re.SCRIPT):(Oe(Mt)||ut(We,"Invalid tagname in closing tag"),We.state=Re.CLOSE_TAG_SAW_WHITE);else{if(Oe(Mt))continue;vt(dt,Mt)?We.script?(We.script+="</"+Mt,We.state=Re.SCRIPT):ut(We,"Invalid tagname in closing tag."):We.tagName=Mt}continue;case Re.CLOSE_TAG_SAW_WHITE:if(Oe(Mt))continue;Mt===">"?xt(We):ut(We,"Invalid characters in closing tag");continue;case Re.TEXT_ENTITY:case Re.ATTRIB_VALUE_ENTITY_Q:case Re.ATTRIB_VALUE_ENTITY_U:var Bt,$t;switch(We.state){case Re.TEXT_ENTITY:Bt=Re.TEXT,$t="textNode";break;case Re.ATTRIB_VALUE_ENTITY_Q:Bt=Re.ATTRIB_VALUE_QUOTED,$t="attribValue";break;case Re.ATTRIB_VALUE_ENTITY_U:Bt=Re.ATTRIB_VALUE_UNQUOTED,$t="attribValue"}Mt===";"?(We[$t]+=Ut(We),We.entity="",We.state=Bt):Xe(We.entity.length?je:Ke,Mt)?We.entity+=Mt:(ut(We,"Invalid character in entity name"),We[$t]+="&"+We.entity+Mt,We.entity="",We.state=Bt);continue;default:throw new Error(We,"Unknown state: "+We.state)}return We.position>=We.bufferCheckPosition&&me(We),We}ae.parser=function(Ve,We){return new le(Ve,We)},ae.SAXParser=le,ae.SAXStream=De,ae.createStream=Ae,ae.MAX_BUFFER_LENGTH=65536;var fn=["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(Ve){function We(){}return We.prototype=Ve,new We}),z.default||(Object.keys=function(Ve){var We=[];for(var pt in Ve)Ve.hasOwnProperty(pt)&&We.push(pt);return We}),le.prototype={end:function(){Rt(this)},write:Ft,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){Pe(this)}};var It;try{It=Se("stream").Stream}catch(Ve){It=function(){}}var Xt=ae.EVENTS.filter(function(Ve){return Ve!=="error"&&Ve!=="end"});De.prototype=(0,re.default)(It.prototype,{constructor:{value:De}}),De.prototype.write=function(Ve){if(typeof Ce=="function"&&typeof Ce.isBuffer=="function"&&Ce.isBuffer(Ve)){if(!this._decoder){var We=Se("string_decoder").StringDecoder;this._decoder=new We("utf8")}Ve=this._decoder.write(Ve)}return this._parser.write(Ve.toString()),this.emit("data",Ve),!0},De.prototype.end=function(Ve){return Ve&&Ve.length&&this.write(Ve),this._parser.end(),!0},De.prototype.on=function(Ve,We){var pt=this;return pt._parser["on"+Ve]||Xt.indexOf(Ve)===-1||(pt._parser["on"+Ve]=function(){var Mt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Mt.splice(0,0,Ve),pt.emit.apply(pt,Mt)}),It.prototype.on.call(pt,Ve,We)};var tn="[CDATA[",lt="DOCTYPE",He="http://www.w3.org/XML/1998/namespace",ze="http://www.w3.org/2000/xmlns/",it={xml:He,xmlns:ze},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]/,je=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Re=0;ae.STATE={BEGIN:Re++,BEGIN_WHITESPACE:Re++,TEXT:Re++,TEXT_ENTITY:Re++,OPEN_WAKA:Re++,SGML_DECL:Re++,SGML_DECL_QUOTED:Re++,DOCTYPE:Re++,DOCTYPE_QUOTED:Re++,DOCTYPE_DTD:Re++,DOCTYPE_DTD_QUOTED:Re++,COMMENT_STARTING:Re++,COMMENT:Re++,COMMENT_ENDING:Re++,COMMENT_ENDED:Re++,CDATA:Re++,CDATA_ENDING:Re++,CDATA_ENDING_2:Re++,PROC_INST:Re++,PROC_INST_BODY:Re++,PROC_INST_ENDING:Re++,OPEN_TAG:Re++,OPEN_TAG_SLASH:Re++,ATTRIB:Re++,ATTRIB_NAME:Re++,ATTRIB_NAME_SAW_WHITE:Re++,ATTRIB_VALUE:Re++,ATTRIB_VALUE_QUOTED:Re++,ATTRIB_VALUE_CLOSED:Re++,ATTRIB_VALUE_UNQUOTED:Re++,ATTRIB_VALUE_ENTITY_Q:Re++,ATTRIB_VALUE_ENTITY_U:Re++,CLOSE_TAG:Re++,CLOSE_TAG_SAW_WHITE:Re++,SCRIPT:Re++,SCRIPT_ENDING:Re++},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(Ve){var We=ae.ENTITIES[Ve],pt=typeof We=="number"?String.fromCharCode(We):We;ae.ENTITIES[Ve]=pt});for(var Qe in ae.STATE)ae.STATE[ae.STATE[Qe]]=Qe;Re=ae.STATE,ye.default||function(){var Ve=String.fromCharCode,We=Math.floor,pt=function(){var Mt,Qt,qt=[],Bt=-1,$t=arguments.length;if(!$t)return"";for(var Cn="";++Bt<$t;){var mn=Number(arguments[Bt]);if(!isFinite(mn)||mn<0||mn>1114111||We(mn)!==mn)throw RangeError("Invalid code point: "+mn);mn<=65535?qt.push(mn):(mn-=65536,Mt=55296+(mn>>10),Qt=mn%1024+56320,qt.push(Mt,Qt)),(Bt+1===$t||qt.length>16384)&&(Cn+=Ve.apply(null,qt),qt.length=0)}return Cn};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 Ie.g!="undefined"?Ie.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 Ie.g!="undefined"?Ie.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(De){ve.setHeader(De,me.headers[De])});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(Xe){return z(Xe)}),{type:(Pe["content-type"]||{}).value||""}):be.concat(me._body).toString());var De=[];if((0,de.default)(Pe).forEach(function(Xe){var vt=Pe[Xe].name,gt=Pe[Xe].value;Array.isArray(gt)?gt.forEach(function(kt){De.push([vt,kt])}):De.push([vt,gt])}),me._mode==="fetch"){var Oe=null;if(ge.abortController){var Ze=new AbortController;Oe=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:De,body:Ae||void 0,mode:"cors",credentials:ve.withCredentials?"include":"same-origin",signal:Oe}).then(function(Xe){me._fetchResponse=Xe,me._connect()},function(Xe){xe.clearTimeout(me._fetchTimer),me._destroyed||me.emit("error",Xe)})}else{var qe=me._xhr=new xe.XMLHttpRequest;try{qe.open(me._opts.method,me._opts.url,!0)}catch(Xe){return void Ce.nextTick(function(){me.emit("error",Xe)})}"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")}),De.forEach(function(Xe){qe.setRequestHeader(Xe[0],Xe[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(Xe){return void Ce.nextTick(function(){me.emit("error",Xe)})}}}},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 Ie.g!="undefined"?Ie.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,De){ae.headers[De.toLowerCase()]=Ae,ae.rawHeaders.push(De,Ae)}),pe.writableStream){var le=new WritableStream({write:function(Ae){return new we.default(function(De,Oe){ae._destroyed?Oe():ae.push(new be(Ae))?De():ae._resumeFetch=De})},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(De){if(!ae._destroyed){if(De.done)return xe.clearTimeout(re),void ae.push(null);ae.push(new be(De.value)),Ae()}}).catch(function(De){xe.clearTimeout(re),ae._destroyed||ae.emit("error",De)})})()}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 De=Ae.match(/^([^:]+):\s*(.*)/);if(De){var Oe=De[1].toLowerCase();Oe==="set-cookie"?(ae.headers[Oe]===void 0&&(ae.headers[Oe]=[]),ae.headers[Oe].push(De[2])):ae.headers[Oe]!==void 0?ae.headers[Oe]+=", "+De[2]:ae.headers[Oe]=De[2],ae.rawHeaders.push(De[1],De[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 Ie.g!="undefined"?Ie.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 De=Pe.length-1;if(De<Ae)return 0;var Oe=ye(Pe[De]);return Oe>=0?(Oe>0&&(ve.lastNeed=Oe-1),Oe):--De<Ae||Oe===-2?0:(Oe=ye(Pe[De]))>=0?(Oe>0&&(ve.lastNeed=Oe-2),Oe):--De<Ae||Oe===-2?0:(Oe=ye(Pe[De]),Oe>=0?(Oe>0&&(Oe===2?Oe=0:ve.lastNeed=Oe-3),Oe):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 De=ve.length-(Ae-this.lastNeed);return ve.copy(this.lastChar,0,De),ve.toString("utf8",Pe,De)}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 De=Ae.charCodeAt(Ae.length-1);if(De>=55296&&De<=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(Oe,Ze,qe){if(Oe&&de.isObject(Oe)&&Oe instanceof Ce)return Oe;var Xe=new Ce;return Xe.parse(Oe,Ze,qe),Xe}function be(Oe){return de.isString(Oe)&&(Oe=xe(Oe)),Oe instanceof Ce?Oe.format():Ce.prototype.format.call(Oe)}function ye(Oe,Ze){return xe(Oe,!1,!0).resolve(Ze)}function we(Oe,Ze){return Oe?xe(Oe,!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},De=Se("querystring");Ce.prototype.parse=function(Oe,Ze,qe){if(!de.isString(Oe))throw new TypeError("Parameter 'url' must be a string, not "+typeof Oe);var Xe=Oe.indexOf("?"),vt=Xe!==-1&&Xe<Oe.indexOf("#")?"?":"#",gt=Oe.split(vt),kt=/\\/g;gt[0]=gt[0].replace(kt,"/"),Oe=gt.join(vt);var at=Oe;if(at=at.trim(),!qe&&Oe.split("#").length===1){var bt=ue.exec(at);if(bt)return this.path=at,this.href=at,this.pathname=bt[1],bt[2]?(this.search=bt[2],this.query=Ze?De.parse(this.search.substr(1)):this.search.substr(1)):Ze&&(this.search="",this.query={}),this}var ct=ge.exec(at);if(ct){ct=ct[0];var Rt=ct.toLowerCase();this.protocol=Rt,at=at.substr(ct.length)}if(qe||ct||at.match(/^\/\/[^@\/]+@[^@\/]+/)){var ut=at.substr(0,2)==="//";!ut||ct&&Pe[ct]||(at=at.substr(2),this.slashes=!0)}if(!Pe[ct]&&(ut||ct&&!Ae[ct])){for(var ot=-1,ht=0;ht<ae.length;ht++){var yt=at.indexOf(ae[ht]);yt!==-1&&(ot===-1||yt<ot)&&(ot=yt)}var _t,xt;xt=ot===-1?at.lastIndexOf("@"):at.lastIndexOf("@",ot),xt!==-1&&(_t=at.slice(0,xt),at=at.slice(xt+1),this.auth=decodeURIComponent(_t)),ot=-1;for(var ht=0;ht<re.length;ht++){var yt=at.indexOf(re[ht]);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 Ut=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Ut)for(var Ht=this.hostname.split(/\./),ht=0,dn=Ht.length;ht<dn;ht++){var Ft=Ht[ht];if(Ft&&!Ft.match(le)){for(var fn="",It=0,Xt=Ft.length;It<Xt;It++)Ft.charCodeAt(It)>127?fn+="x":fn+=Ft[It];if(!fn.match(le)){var tn=Ht.slice(0,ht),lt=Ht.slice(ht+1),He=Ft.match(me);He&&(tn.push(He[1]),lt.unshift(He[2])),lt.length&&(at="/"+lt.join(".")+at),this.hostname=tn.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Ut||(this.hostname=pe.toASCII(this.hostname));var ze=this.port?":"+this.port:"",it=this.hostname||"";this.host=it+ze,this.href+=this.host,Ut&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),at[0]!=="/"&&(at="/"+at))}if(!ve[Rt])for(var ht=0,dn=oe.length;ht<dn;ht++){var dt=oe[ht];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 je=at.indexOf("?");if(je!==-1?(this.search=at.substr(je),this.query=at.substr(je+1),Ze&&(this.query=De.parse(this.query)),at=at.slice(0,je)):Ze&&(this.search="",this.query={}),at&&(this.pathname=at),Ae[Rt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ze=this.pathname||"",Re=this.search||"";this.path=ze+Re}return this.href=this.format(),this},Ce.prototype.format=function(){var Oe=this.auth||"";Oe&&(Oe=encodeURIComponent(Oe),Oe=Oe.replace(/%3A/i,":"),Oe+="@");var Ze=this.protocol||"",qe=this.pathname||"",Xe=this.hash||"",vt=!1,gt="";this.host?vt=Oe+this.host:this.hostname&&(vt=Oe+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(vt+=":"+this.port)),this.query&&de.isObject(this.query)&&Object.keys(this.query).length&&(gt=De.stringify(this.query));var kt=this.search||gt&&"?"+gt||"";return Ze&&Ze.substr(-1)!==":"&&(Ze+=":"),this.slashes||(!Ze||Ae[Ze])&&vt!==!1?(vt="//"+(vt||""),qe&&qe.charAt(0)!=="/"&&(qe="/"+qe)):vt||(vt=""),Xe&&Xe.charAt(0)!=="#"&&(Xe="#"+Xe),kt&&kt.charAt(0)!=="?"&&(kt="?"+kt),qe=qe.replace(/[?#]/g,function(at){return encodeURIComponent(at)}),kt=kt.replace("#","%23"),Ze+vt+qe+kt+Xe},Ce.prototype.resolve=function(Oe){return this.resolveObject(xe(Oe,!1,!0)).format()},Ce.prototype.resolveObject=function(Oe){if(de.isString(Oe)){var Ze=new Ce;Ze.parse(Oe,!1,!0),Oe=Ze}for(var qe=new Ce,Xe=Object.keys(this),vt=0;vt<Xe.length;vt++){var gt=Xe[vt];qe[gt]=this[gt]}if(qe.hash=Oe.hash,Oe.href==="")return qe.href=qe.format(),qe;if(Oe.slashes&&!Oe.protocol){for(var kt=Object.keys(Oe),at=0;at<kt.length;at++){var bt=kt[at];bt!=="protocol"&&(qe[bt]=Oe[bt])}return Ae[qe.protocol]&&qe.hostname&&!qe.pathname&&(qe.path=qe.pathname="/"),qe.href=qe.format(),qe}if(Oe.protocol&&Oe.protocol!==qe.protocol){if(!Ae[Oe.protocol]){for(var ct=Object.keys(Oe),Rt=0;Rt<ct.length;Rt++){var ut=ct[Rt];qe[ut]=Oe[ut]}return qe.href=qe.format(),qe}if(qe.protocol=Oe.protocol,Oe.host||Pe[Oe.protocol])qe.pathname=Oe.pathname;else{for(var dn=(Oe.pathname||"").split("/");dn.length&&!(Oe.host=dn.shift()););Oe.host||(Oe.host=""),Oe.hostname||(Oe.hostname=""),dn[0]!==""&&dn.unshift(""),dn.length<2&&dn.unshift(""),qe.pathname=dn.join("/")}if(qe.search=Oe.search,qe.query=Oe.query,qe.host=Oe.host||"",qe.auth=Oe.auth,qe.hostname=Oe.hostname||Oe.host,qe.port=Oe.port,qe.pathname||qe.search){var ot=qe.pathname||"",ht=qe.search||"";qe.path=ot+ht}return qe.slashes=qe.slashes||Oe.slashes,qe.href=qe.format(),qe}var yt=qe.pathname&&qe.pathname.charAt(0)==="/",_t=Oe.host||Oe.pathname&&Oe.pathname.charAt(0)==="/",xt=_t||yt||qe.host&&Oe.pathname,Ut=xt,Ht=qe.pathname&&qe.pathname.split("/")||[],dn=Oe.pathname&&Oe.pathname.split("/")||[],Ft=qe.protocol&&!Ae[qe.protocol];if(Ft&&(qe.hostname="",qe.port=null,qe.host&&(Ht[0]===""?Ht[0]=qe.host:Ht.unshift(qe.host)),qe.host="",Oe.protocol&&(Oe.hostname=null,Oe.port=null,Oe.host&&(dn[0]===""?dn[0]=Oe.host:dn.unshift(Oe.host)),Oe.host=null),xt=xt&&(dn[0]===""||Ht[0]==="")),_t)qe.host=Oe.host||Oe.host===""?Oe.host:qe.host,qe.hostname=Oe.hostname||Oe.hostname===""?Oe.hostname:qe.hostname,qe.search=Oe.search,qe.query=Oe.query,Ht=dn;else if(dn.length)Ht||(Ht=[]),Ht.pop(),Ht=Ht.concat(dn),qe.search=Oe.search,qe.query=Oe.query;else if(!de.isNullOrUndefined(Oe.search)){if(Ft){qe.hostname=qe.host=Ht.shift();var fn=!!(qe.host&&qe.host.indexOf("@")>0)&&qe.host.split("@");fn&&(qe.auth=fn.shift(),qe.host=qe.hostname=fn.shift())}return qe.search=Oe.search,qe.query=Oe.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(!Ht.length)return qe.pathname=null,qe.search?qe.path="/"+qe.search:qe.path=null,qe.href=qe.format(),qe;for(var It=Ht.slice(-1)[0],Xt=(qe.host||Oe.host||Ht.length>1)&&(It==="."||It==="..")||It==="",tn=0,lt=Ht.length;lt>=0;lt--)It=Ht[lt],It==="."?Ht.splice(lt,1):It===".."?(Ht.splice(lt,1),tn++):tn&&(Ht.splice(lt,1),tn--);if(!xt&&!Ut)for(;tn--;tn)Ht.unshift("..");!xt||Ht[0]===""||Ht[0]&&Ht[0].charAt(0)==="/"||Ht.unshift(""),Xt&&Ht.join("/").substr(-1)!=="/"&&Ht.push("");var He=Ht[0]===""||Ht[0]&&Ht[0].charAt(0)==="/";if(Ft){qe.hostname=qe.host=He?"":Ht.length?Ht.shift():"";var fn=!!(qe.host&&qe.host.indexOf("@")>0)&&qe.host.split("@");fn&&(qe.auth=fn.shift(),qe.host=qe.hostname=fn.shift())}return xt=xt||qe.host&&Ht.length,xt&&!He&&Ht.unshift(""),Ht.length?qe.pathname=Ht.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=Oe.auth||qe.auth,qe.slashes=qe.slashes||Oe.slashes,qe.href=qe.format(),qe},Ce.prototype.parseHost=function(){var Oe=this.host,Ze=fe.exec(Oe);Ze&&(Ze=Ze[0],Ze!==":"&&(this.port=Ze.substr(1)),Oe=Oe.substr(0,Oe.length-Ze.length)),Oe&&(this.hostname=Oe)}},{"./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 Ie.g!="undefined"?Ie.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(ht,yt){var _t={seen:[],stylize:we};return arguments.length>=3&&(_t.depth=arguments[2]),arguments.length>=4&&(_t.colors=arguments[3]),re(yt)?_t.showHidden=yt:yt&&Le._extend(_t,yt),Ae(_t.showHidden)&&(_t.showHidden=!1),Ae(_t.depth)&&(_t.depth=2),Ae(_t.colors)&&(_t.colors=!1),Ae(_t.customInspect)&&(_t.customInspect=!0),_t.colors&&(_t.stylize=ye),de(_t,ht,_t.depth)}function ye(ht,yt){var _t=be.styles[yt];return _t?"\x1B["+be.colors[_t][0]+"m"+ht+"\x1B["+be.colors[_t][1]+"m":ht}function we(ht,yt){return ht}function pe(ht){var yt={};return ht.forEach(function(_t,xt){yt[_t]=!0}),yt}function de(ht,yt,_t){if(ht.customInspect&&yt&&Xe(yt.inspect)&&yt.inspect!==Le.inspect&&(!yt.constructor||yt.constructor.prototype!==yt)){var xt=yt.inspect(_t,ht);return ve(xt)||(xt=de(ht,xt,_t)),xt}var Ut=ge(ht,yt);if(Ut)return Ut;var Ht=Object.keys(yt),dn=pe(Ht);if(ht.showHidden&&(Ht=Object.getOwnPropertyNames(yt)),qe(yt)&&(Ht.indexOf("message")>=0||Ht.indexOf("description")>=0))return fe(yt);if(Ht.length===0){if(Xe(yt)){var Ft=yt.name?": "+yt.name:"";return ht.stylize("[Function"+Ft+"]","special")}if(De(yt))return ht.stylize(RegExp.prototype.toString.call(yt),"regexp");if(Ze(yt))return ht.stylize(Date.prototype.toString.call(yt),"date");if(qe(yt))return fe(yt)}var fn="",It=!1,Xt=["{","}"];if(oe(yt)&&(It=!0,Xt=["[","]"]),Xe(yt)&&(fn=" [Function"+(yt.name?": "+yt.name:"")+"]"),De(yt)&&(fn=" "+RegExp.prototype.toString.call(yt)),Ze(yt)&&(fn=" "+Date.prototype.toUTCString.call(yt)),qe(yt)&&(fn=" "+fe(yt)),Ht.length===0&&(!It||yt.length==0))return Xt[0]+fn+Xt[1];if(_t<0)return De(yt)?ht.stylize(RegExp.prototype.toString.call(yt),"regexp"):ht.stylize("[Object]","special");ht.seen.push(yt);var tn;return tn=It?ue(ht,yt,_t,dn,Ht):Ht.map(function(lt){return ee(ht,yt,_t,dn,lt,It)}),ht.seen.pop(),z(tn,fn,Xt)}function ge(ht,yt){if(Ae(yt))return ht.stylize("undefined","undefined");if(ve(yt)){var _t="'"+JSON.stringify(yt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ht.stylize(_t,"string")}return me(yt)?ht.stylize(""+yt,"number"):re(yt)?ht.stylize(""+yt,"boolean"):ae(yt)?ht.stylize("null","null"):void 0}function fe(ht){return"["+Error.prototype.toString.call(ht)+"]"}function ue(ht,yt,_t,xt,Ut){for(var Ht=[],dn=0,Ft=yt.length;dn<Ft;++dn)bt(yt,String(dn))?Ht.push(ee(ht,yt,_t,xt,String(dn),!0)):Ht.push("");return Ut.forEach(function(fn){fn.match(/^\d+$/)||Ht.push(ee(ht,yt,_t,xt,fn,!0))}),Ht}function ee(ht,yt,_t,xt,Ut,Ht){var dn,Ft,fn;if(fn=Object.getOwnPropertyDescriptor(yt,Ut)||{value:yt[Ut]},fn.get?Ft=fn.set?ht.stylize("[Getter/Setter]","special"):ht.stylize("[Getter]","special"):fn.set&&(Ft=ht.stylize("[Setter]","special")),bt(xt,Ut)||(dn="["+Ut+"]"),Ft||(ht.seen.indexOf(fn.value)<0?(Ft=ae(_t)?de(ht,fn.value,null):de(ht,fn.value,_t-1),Ft.indexOf(`
`)>-1&&(Ft=Ht?Ft.split(`
`).map(function(It){return" "+It}).join(`
`).substr(2):`
`+Ft.split(`
`).map(function(It){return" "+It}).join(`
`))):Ft=ht.stylize("[Circular]","special")),Ae(dn)){if(Ht&&Ut.match(/^\d+$/))return Ft;dn=JSON.stringify(""+Ut),dn.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(dn=dn.substr(1,dn.length-2),dn=ht.stylize(dn,"name")):(dn=dn.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),dn=ht.stylize(dn,"string"))}return dn+": "+Ft}function z(ht,yt,_t){var xt=0;return ht.reduce(function(Ut,Ht){return xt++,Ht.indexOf(`
`)>=0&&xt++,Ut+Ht.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?_t[0]+(yt===""?"":yt+`
`)+" "+ht.join(`,
`)+" "+_t[1]:_t[0]+yt+" "+ht.join(", ")+" "+_t[1]}function oe(ht){return Array.isArray(ht)}function re(ht){return typeof ht=="boolean"}function ae(ht){return ht===null}function le(ht){return ht==null}function me(ht){return typeof ht=="number"}function ve(ht){return typeof ht=="string"}function Pe(ht){return typeof ht=="symbol"}function Ae(ht){return ht===void 0}function De(ht){return Oe(ht)&&gt(ht)==="[object RegExp]"}function Oe(ht){return typeof ht=="object"&&ht!==null}function Ze(ht){return Oe(ht)&&gt(ht)==="[object Date]"}function qe(ht){return Oe(ht)&&(gt(ht)==="[object Error]"||ht instanceof Error)}function Xe(ht){return typeof ht=="function"}function vt(ht){return ht===null||typeof ht=="boolean"||typeof ht=="number"||typeof ht=="string"||typeof ht=="symbol"||ht===void 0}function gt(ht){return Object.prototype.toString.call(ht)}function kt(ht){return ht<10?"0"+ht.toString(10):ht.toString(10)}function at(){var ht=new Date,yt=[kt(ht.getHours()),kt(ht.getMinutes()),kt(ht.getSeconds())].join(":");return[ht.getDate(),ot[ht.getMonth()],yt].join(" ")}function bt(ht,yt){return Object.prototype.hasOwnProperty.call(ht,yt)}var ct=/%[sdj%]/g;Le.format=function(ht){if(!ve(ht)){for(var yt=[],_t=0;_t<arguments.length;_t++)yt.push(be(arguments[_t]));return yt.join(" ")}for(var _t=1,xt=arguments,Ut=xt.length,Ht=String(ht).replace(ct,function(fn){if(fn==="%%")return"%";if(_t>=Ut)return fn;switch(fn){case"%s":return String(xt[_t++]);case"%d":return Number(xt[_t++]);case"%j":try{return JSON.stringify(xt[_t++])}catch(It){return"[Circular]"}default:return fn}}),dn=xt[_t];_t<Ut;dn=xt[++_t])ae(dn)||!Oe(dn)?Ht+=" "+dn:Ht+=" "+be(dn);return Ht},Le.deprecate=function(ht,yt){function _t(){if(!xt){if(Ce.throwDeprecation)throw new Error(yt);Ce.traceDeprecation?console.trace(yt):console.error(yt),xt=!0}return ht.apply(this,arguments)}if(Ae(xe.process))return function(){return Le.deprecate(ht,yt).apply(this,arguments)};if(Ce.noDeprecation===!0)return ht;var xt=!1;return _t};var Rt,ut={};Le.debuglog=function(ht){if(Ae(Rt)&&(Rt=Ce.env.NODE_DEBUG||""),ht=ht.toUpperCase(),!ut[ht])if(new RegExp("\\b"+ht+"\\b","i").test(Rt)){var yt=Ce.pid;ut[ht]=function(){var _t=Le.format.apply(Le,arguments);console.error("%s %d: %s",ht,yt,_t)}}else ut[ht]=function(){};return ut[ht]},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=De,Le.isObject=Oe,Le.isDate=Ze,Le.isError=qe,Le.isFunction=Xe,Le.isPrimitive=vt,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(ht,yt){if(!yt||!Oe(yt))return ht;for(var _t=Object.keys(yt),xt=_t.length;xt--;)ht[_t[xt]]=yt[_t[xt]];return ht}}).call(this,Se("_process"),typeof Ie.g!="undefined"?Ie.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,De){var Oe,Ze,qe,Xe,vt,gt;if((De===void 0?"undefined":(0,be.default)(De))!=="object")Pe.options.cdata&&fe(De)?Ae.raw(ue(De)):Ae.txt(De);else if(Array.isArray(De)){for(Xe in De)if(ee.call(De,Xe)){Ze=De[Xe];for(vt in Ze)qe=Ze[vt],Ae=le(Ae.ele(vt),qe).up()}}else for(vt in De)if(ee.call(De,vt))if(Ze=De[vt],vt===re){if((Ze===void 0?"undefined":(0,be.default)(Ze))==="object")for(Oe in Ze)gt=Ze[Oe],Ae=Ae.att(Oe,gt)}else if(vt===ae)Ae=Pe.options.cdata&&fe(Ze)?Ae.raw(ue(Ze)):Ae.txt(Ze);else if(Array.isArray(Ze))for(Xe in Ze)ee.call(Ze,Xe)&&(qe=Ze[Xe],Ae=typeof qe=="string"?Pe.options.cdata&&fe(qe)?Ae.ele(vt).raw(ue(qe)).up():Ae.ele(vt,qe).up():le(Ae.ele(vt),qe).up());else(Ze===void 0?"undefined":(0,be.default)(Ze))==="object"?Ae=le(Ae.ele(vt),Ze).up():typeof Ze=="string"&&Pe.options.cdata&&fe(Ze)?Ae=Ae.ele(vt).raw(ue(Ze)).up():(Ze==null&&(Ze=""),Ae=Ae.ele(vt,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 De(){this.constructor=Pe}for(var Oe in Ae)ve.call(Ae,Oe)&&(Pe[Oe]=Ae[Oe]);return De.prototype=Ae.prototype,Pe.prototype=new De,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,De){var Oe,Ze,qe;for(Oe=0,Ze=Pe.length;Oe<Ze;Oe++)qe=Pe[Oe],Ae=qe(Ae,De);return Ae},Le.Parser=function(Pe){function Ae(De){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 Oe,Ze,qe;if(!(this instanceof Le.Parser))return new Le.Parser(De);this.options={},Ze=fe[.2];for(Oe in Ze)ve.call(Ze,Oe)&&(qe=Ze[Oe],this.options[Oe]=qe);for(Oe in De)ve.call(De,Oe)&&(qe=De[Oe],this.options[Oe]=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 De,Oe;try{return this.remaining.length<=this.options.chunkSize?(De=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(De),this.saxParser.close()):(De=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(De),ae(this.processAsync))}catch(Ze){if(Oe=Ze,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(Oe)}},Ae.prototype.assignOrPush=function(De,Oe,Ze){return Oe in De?(De[Oe]instanceof Array||(De[Oe]=[De[Oe]]),De[Oe].push(Ze)):this.options.explicitArray?De[Oe]=[Ze]:De[Oe]=Ze},Ae.prototype.reset=function(){var De,Oe,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(Xe){return function(vt){if(Xe.saxParser.resume(),!Xe.saxParser.errThrown)return Xe.saxParser.errThrown=!0,Xe.emit("error",vt)}}(this),this.saxParser.onend=function(Xe){return function(){if(!Xe.saxParser.ended)return Xe.saxParser.ended=!0,Xe.emit("end",Xe.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,qe=[],De=this.options.attrkey,Oe=this.options.charkey,this.saxParser.onopentag=function(Xe){return function(vt){var gt,kt,at,bt,ct;if(at={},at[Oe]="",!Xe.options.ignoreAttrs){ct=vt.attributes;for(gt in ct)ve.call(ct,gt)&&(De in at||Xe.options.mergeAttrs||(at[De]={}),kt=Xe.options.attrValueProcessors?z(Xe.options.attrValueProcessors,vt.attributes[gt],gt):vt.attributes[gt],bt=Xe.options.attrNameProcessors?z(Xe.options.attrNameProcessors,gt):gt,Xe.options.mergeAttrs?Xe.assignOrPush(at,bt,kt):at[De][bt]=kt)}return at["#name"]=Xe.options.tagNameProcessors?z(Xe.options.tagNameProcessors,vt.name):vt.name,Xe.options.xmlns&&(at[Xe.options.xmlnskey]={uri:vt.uri,local:vt.local}),qe.push(at)}}(this),this.saxParser.onclosetag=function(Xe){return function(){var vt,gt,kt,at,bt,ct,Rt,ut,ot,ht;if(ct=qe.pop(),bt=ct["#name"],Xe.options.explicitChildren&&Xe.options.preserveChildrenOrder||delete ct["#name"],ct.cdata===!0&&(vt=ct.cdata,delete ct.cdata),ot=qe[qe.length-1],ct[Oe].match(/^\s*$/)&&!vt?(gt=ct[Oe],delete ct[Oe]):(Xe.options.trim&&(ct[Oe]=ct[Oe].trim()),Xe.options.normalize&&(ct[Oe]=ct[Oe].replace(/\s{2,}/g," ").trim()),ct[Oe]=Xe.options.valueProcessors?z(Xe.options.valueProcessors,ct[Oe],bt):ct[Oe],(0,we.default)(ct).length===1&&Oe in ct&&!Xe.EXPLICIT_CHARKEY&&(ct=ct[Oe])),ee(ct)&&(ct=Xe.options.emptyTag!==""?Xe.options.emptyTag:gt),Xe.options.validator!=null&&(ht="/"+function(){var yt,_t,xt;for(xt=[],yt=0,_t=qe.length;yt<_t;yt++)at=qe[yt],xt.push(at["#name"]);return xt}().concat(bt).join("/"),function(){var yt;try{ct=Xe.options.validator(ht,ot&&ot[bt],ct)}catch(_t){return yt=_t,Xe.emit("error",yt)}}()),Xe.options.explicitChildren&&!Xe.options.mergeAttrs&&(ct===void 0?"undefined":(0,de.default)(ct))==="object")if(Xe.options.preserveChildrenOrder){if(ot){ot[Xe.options.childkey]=ot[Xe.options.childkey]||[],Rt={};for(kt in ct)ve.call(ct,kt)&&(Rt[kt]=ct[kt]);ot[Xe.options.childkey].push(Rt),delete ct["#name"],(0,we.default)(ct).length===1&&Oe in ct&&!Xe.EXPLICIT_CHARKEY&&(ct=ct[Oe])}}else at={},Xe.options.attrkey in ct&&(at[Xe.options.attrkey]=ct[Xe.options.attrkey],delete ct[Xe.options.attrkey]),!Xe.options.charsAsChildren&&Xe.options.charkey in ct&&(at[Xe.options.charkey]=ct[Xe.options.charkey],delete ct[Xe.options.charkey]),(0,be.default)(ct).length>0&&(at[Xe.options.childkey]=ct),ct=at;return qe.length>0?Xe.assignOrPush(ot,bt,ct):(Xe.options.explicitRoot&&(ut=ct,ct={},ct[bt]=ut),Xe.resultObject=ct,Xe.saxParser.ended=!0,Xe.emit("end",Xe.resultObject))}}(this),Ze=function(Xe){return function(vt){var gt,kt;if(kt=qe[qe.length-1])return kt[Oe]+=vt,Xe.options.explicitChildren&&Xe.options.preserveChildrenOrder&&Xe.options.charsAsChildren&&(Xe.options.includeWhiteChars||vt.replace(/\\n/g,"").trim()!=="")&&(kt[Xe.options.childkey]=kt[Xe.options.childkey]||[],gt={"#name":"__text__"},gt[Oe]=vt,Xe.options.normalize&&(gt[Oe]=gt[Oe].replace(/\s{2,}/g," ").trim()),kt[Xe.options.childkey].push(gt)),kt}}(this),this.saxParser.ontext=Ze,this.saxParser.oncdata=function(Xe){return function(vt){var gt;if(gt=Ze(vt))return gt.cdata=!0}}()},Ae.prototype.parseString=function(De,Oe){var Ze;Oe!=null&&typeof Oe=="function"&&(this.on("end",function(qe){return this.reset(),Oe(null,qe)}),this.on("error",function(qe){return this.reset(),Oe(qe)}));try{return De=De.toString(),De.trim()===""?(this.emit("end",null),!0):(De=ge.stripBOM(De),this.options.async?(this.remaining=De,ae(this.processAsync),this.saxParser):this.saxParser.write(De).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,De){var Oe,Ze,qe;return De!=null?(typeof De=="function"&&(Oe=De),(Ae===void 0?"undefined":(0,de.default)(Ae))==="object"&&(Ze=Ae)):(typeof Ae=="function"&&(Oe=Ae),Ze={}),qe=new Le.Parser(Ze),qe.parseString(Pe,Oe)}}).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,De;if(De=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)&&(De[me]=Pe[me]);return De},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 De(Oe,Ze,qe){var Xe;Oe||(Oe={}),Oe.writer?ve(Oe.writer)&&(Xe=Oe.writer,Oe.writer=new oe(Xe)):Oe.writer=new oe(Oe),this.options=Oe,this.writer=Oe.writer,this.stringify=new re(Oe),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 De.prototype.node=function(Oe,Ze,qe){var Xe;if(Oe==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(),Oe=Oe.valueOf(),Ze==null&&(Ze={}),Ze=Ze.valueOf(),me(Ze)||(Xe=[Ze,qe],qe=Xe[0],Ze=Xe[1]),this.currentNode=new ue(this,Oe,Ze),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,qe!=null&&this.text(qe),this},De.prototype.element=function(Oe,Ze,qe){return this.currentNode&&this.currentNode instanceof fe?this.dtdElement.apply(this,arguments):this.node(Oe,Ze,qe)},De.prototype.attribute=function(Oe,Ze){var qe,Xe;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(Oe!=null&&(Oe=Oe.valueOf()),me(Oe))for(qe in Oe)Ae.call(Oe,qe)&&(Xe=Oe[qe],this.attribute(qe,Xe));else le(Ze)&&(Ze=Ze.apply()),this.options.skipNullAttributes&&Ze==null||(this.currentNode.attributes[Oe]=new Ce(this,Oe,Ze));return this},De.prototype.text=function(Oe){var Ze;return this.openCurrent(),Ze=new ae(this,Oe),this.onData(this.writer.text(Ze,this.currentLevel+1)),this},De.prototype.cdata=function(Oe){var Ze;return this.openCurrent(),Ze=new xe(this,Oe),this.onData(this.writer.cdata(Ze,this.currentLevel+1)),this},De.prototype.comment=function(Oe){var Ze;return this.openCurrent(),Ze=new be(this,Oe),this.onData(this.writer.comment(Ze,this.currentLevel+1)),this},De.prototype.raw=function(Oe){var Ze;return this.openCurrent(),Ze=new z(this,Oe),this.onData(this.writer.raw(Ze,this.currentLevel+1)),this},De.prototype.instruction=function(Oe,Ze){var qe,Xe,vt,gt,kt;if(this.openCurrent(),Oe!=null&&(Oe=Oe.valueOf()),Ze!=null&&(Ze=Ze.valueOf()),Array.isArray(Oe))for(qe=0,gt=Oe.length;qe<gt;qe++)Xe=Oe[qe],this.instruction(Xe);else if(me(Oe))for(Xe in Oe)Ae.call(Oe,Xe)&&(vt=Oe[Xe],this.instruction(Xe,vt));else le(Ze)&&(Ze=Ze.apply()),kt=new ee(this,Oe,Ze),this.onData(this.writer.processingInstruction(kt,this.currentLevel+1));return this},De.prototype.declaration=function(Oe,Ze,qe){var Xe;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Xe=new ge(this,Oe,Ze,qe),this.onData(this.writer.declaration(Xe,this.currentLevel+1)),this},De.prototype.doctype=function(Oe,Ze,qe){if(this.openCurrent(),Oe==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=Oe,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},De.prototype.dtdElement=function(Oe,Ze){var qe;return this.openCurrent(),qe=new we(this,Oe,Ze),this.onData(this.writer.dtdElement(qe,this.currentLevel+1)),this},De.prototype.attList=function(Oe,Ze,qe,Xe,vt){var gt;return this.openCurrent(),gt=new ye(this,Oe,Ze,qe,Xe,vt),this.onData(this.writer.dtdAttList(gt,this.currentLevel+1)),this},De.prototype.entity=function(Oe,Ze){var qe;return this.openCurrent(),qe=new pe(this,!1,Oe,Ze),this.onData(this.writer.dtdEntity(qe,this.currentLevel+1)),this},De.prototype.pEntity=function(Oe,Ze){var qe;return this.openCurrent(),qe=new pe(this,!0,Oe,Ze),this.onData(this.writer.dtdEntity(qe,this.currentLevel+1)),this},De.prototype.notation=function(Oe,Ze){var qe;return this.openCurrent(),qe=new de(this,Oe,Ze),this.onData(this.writer.dtdNotation(qe,this.currentLevel+1)),this},De.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},De.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},De.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},De.prototype.openNode=function(Oe){if(!Oe.isOpen)return!this.root&&this.currentLevel===0&&Oe instanceof ue&&(this.root=Oe),this.onData(this.writer.openNode(Oe,this.currentLevel)),Oe.isOpen=!0},De.prototype.closeNode=function(Oe){if(!Oe.isClosed)return this.onData(this.writer.closeNode(Oe,this.currentLevel)),Oe.isClosed=!0},De.prototype.onData=function(Oe){return this.documentStarted=!0,this.onDataCallback(Oe)},De.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},De.prototype.ele=function(){return this.element.apply(this,arguments)},De.prototype.nod=function(Oe,Ze,qe){return this.node(Oe,Ze,qe)},De.prototype.txt=function(Oe){return this.text(Oe)},De.prototype.dat=function(Oe){return this.cdata(Oe)},De.prototype.com=function(Oe){return this.comment(Oe)},De.prototype.ins=function(Oe,Ze){return this.instruction(Oe,Ze)},De.prototype.dec=function(Oe,Ze,qe){return this.declaration(Oe,Ze,qe)},De.prototype.dtd=function(Oe,Ze,qe){return this.doctype(Oe,Ze,qe)},De.prototype.e=function(Oe,Ze,qe){return this.element(Oe,Ze,qe)},De.prototype.n=function(Oe,Ze,qe){return this.node(Oe,Ze,qe)},De.prototype.t=function(Oe){return this.text(Oe)},De.prototype.d=function(Oe){return this.cdata(Oe)},De.prototype.c=function(Oe){return this.comment(Oe)},De.prototype.r=function(Oe){return this.raw(Oe)},De.prototype.i=function(Oe,Ze){return this.instruction(Oe,Ze)},De.prototype.att=function(){return this.currentNode&&this.currentNode instanceof fe?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.a=function(){return this.currentNode&&this.currentNode instanceof fe?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.ent=function(Oe,Ze){return this.entity(Oe,Ze)},De.prototype.pent=function(Oe,Ze){return this.pEntity(Oe,Ze)},De.prototype.not=function(Oe,Ze){return this.notation(Oe,Ze)},De}()}).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,De,Oe,Ze,qe,Xe,vt,gt;if(Ze=null,le==null&&(le={}),le=le.valueOf(),ee(le)||(vt=[le,me],me=vt[0],le=vt[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(Oe in ae)if(oe.call(ae,Oe))if(gt=ae[Oe],ue(gt)&&(gt=gt.apply()),ee(gt)&&fe(gt)&&(gt=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&Oe.indexOf(this.stringify.convertAttKey)===0)Ze=this.attribute(Oe.substr(this.stringify.convertAttKey.length),gt);else if(!this.options.separateArrayItems&&Array.isArray(gt))for(De=0,Xe=gt.length;De<Xe;De++)Pe=gt[De],ve={},ve[Oe]=Pe,Ze=this.element(ve);else ee(gt)?(Ze=this.element(Oe),Ze.element(gt)):Ze=this.element(Oe,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,De;if(ae!=null&&(ae=ae.valueOf()),le!=null&&(le=le.valueOf()),Array.isArray(ae))for(Ae=0,De=ae.length;Ae<De;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,De,Oe,Ze,qe,Xe,vt;for(ve=this.document(),Pe=new ye(ve,ae,le),Xe=ve.children,Ae=De=0,Ze=Xe.length;De<Ze;Ae=++De)if((me=Xe[Ae])instanceof ye)return ve.children[Ae]=Pe,Pe;for(vt=ve.children,Ae=Oe=0,qe=vt.length;Oe<qe;Ae=++Oe)if(me=vt[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,De,Oe,Ze,qe,Xe,vt;for(qe=ve.children,Ae=0,Oe=qe.length;Ae<Oe;Ae++)Pe=qe[Ae],Pe.isLastRootNode=!1;for(ve.children[ve.children.length-1].isLastRootNode=!0,Xe=ve.children,vt=[],De=0,Ze=Xe.length;De<Ze;De++)switch(Pe=Xe[De],!1){case!(Pe instanceof de):vt.push(this.declaration(Pe));break;case!(Pe instanceof ge):vt.push(this.docType(Pe));break;case!(Pe instanceof xe):vt.push(this.comment(Pe));break;case!(Pe instanceof ue):vt.push(this.processingInstruction(Pe));break;default:vt.push(this.element(Pe))}return vt},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,De,Oe,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,De=0,Oe=Ze.length;De<Oe;De++)switch(Ae=Ze[De],!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,De,Oe,Ze,qe,Xe,vt,gt;Pe||(Pe=0),gt=this.space(Pe),this.stream.write(gt+"<"+ve.name),Xe=ve.attributes;for(qe in Xe)ae.call(Xe,qe)&&(Ae=Xe[qe],this.attribute(Ae));if(ve.children.length===0||ve.children.every(function(kt){return kt.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),vt=ve.children,Oe=0,Ze=vt.length;Oe<Ze;Oe++)switch(De=vt[Oe],!1){case!(De instanceof Ce):this.cdata(De,Pe+1);break;case!(De instanceof xe):this.comment(De,Pe+1);break;case!(De instanceof fe):this.element(De,Pe+1);break;case!(De instanceof ee):this.raw(De,Pe+1);break;case!(De instanceof z):this.text(De,Pe+1);break;case!(De instanceof ue):this.processingInstruction(De,Pe+1);break;default:throw new Error("Unknown XML node type: "+De.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,De,Oe,Ze;for(this.textispresent=!1,Oe="",Ze=ve.children,Ae=0,De=Ze.length;Ae<De;Ae++)Pe=Ze[Ae],Oe+=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&&Oe.slice(-this.newline.length)===this.newline&&(Oe=Oe.slice(0,-this.newline.length)),Oe},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,De,Oe,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,De=0,Oe=qe.length;De<Oe;De++)Ae=qe[De],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,De,Oe,Ze,qe,Xe,vt,gt,kt,at,bt,ct,Rt;Pe||(Pe=0),Rt=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),ct=this.space(Pe),gt="",gt+=ct+"<"+ve.name,kt=ve.attributes;for(vt in kt)ae.call(kt,vt)&&(Ae=kt[vt],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,Oe=0,qe=at.length;Oe<qe;Oe++)if(De=at[Oe],De.value!=null){this.textispresent++,Rt=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,ct=this.space(Pe)),gt+=">"+this.newline,bt=ve.children,Ze=0,Xe=bt.length;Ze<Xe;Ze++)De=bt[Ze],gt+=function(){switch(!1){case!(De instanceof Ce):return this.cdata(De,Pe+1);case!(De instanceof xe):return this.comment(De,Pe+1);case!(De instanceof fe):return this.element(De,Pe+1);case!(De instanceof ee):return this.raw(De,Pe+1);case!(De instanceof z):return this.text(De,Pe+1);case!(De instanceof ue):return this.processingInstruction(De,Pe+1);default:throw new Error("Unknown XML node type: "+De.constructor.name)}}.call(this);Rt&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),gt+=ct+"</"+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,De,Oe,Ze;if(Pe||(Pe=0),ve instanceof fe){Oe=this.space(Pe)+"<"+ve.name,Ze=ve.attributes;for(De in Ze)ae.call(Ze,De)&&(Ae=Ze[De],Oe+=this.attribute(Ae));return Oe+=(ve.children?">":"/>")+this.newline}return Oe=this.space(Pe)+"<!DOCTYPE "+ve.rootNodeName,ve.pubID&&ve.sysID?Oe+=' PUBLIC "'+ve.pubID+'" "'+ve.sysID+'"':ve.sysID&&(Oe+=' SYSTEM "'+ve.sysID+'"'),Oe+=(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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},be.prototype.attEscape=function(ye){var we;return we=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ye.replace(we,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},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,De=0;De<80;De++){fe[De]=De<16?de[ae+De]:we(fe[De-3]^fe[De-8]^fe[De-14]^fe[De-16],1);var Oe=ye(ye(we(ue,5),xe(De,ee,z,oe)),ye(ye(re,fe[De]),be(De)));re=oe,oe=z,z=we(ee,30),ee=ue,ue=Oe}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,De,Oe,Ze,qe,Xe,vt=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),kt=new Array(64);z[oe>>5]|=128<<24-oe%32,z[15+(oe+64>>9<<4)]=oe;for(var Oe=0;Oe<z.length;Oe+=16){re=gt[0],ae=gt[1],le=gt[2],me=gt[3],ve=gt[4],Pe=gt[5],Ae=gt[6],De=gt[7];for(var Ze=0;Ze<64;Ze++)kt[Ze]=Ze<16?z[Ze+Oe]:xe(xe(xe(ue(kt[Ze-2]),kt[Ze-7]),fe(kt[Ze-15])),kt[Ze-16]),qe=xe(xe(xe(xe(De,ge(ve)),we(ve,Pe,Ae)),vt[Ze]),kt[Ze]),Xe=xe(de(re),pe(re,ae,le)),De=Ae,Ae=Pe,Pe=ve,ve=xe(me,qe),me=le,le=ae,ae=re,re=xe(qe,Xe);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(De,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 De=new Error("Cannot find module '"+ve+"'");throw De.code="MODULE_NOT_FOUND",De}var Oe=oe[ve]={exports:{}};z[ve][0].call(Oe.exports,function(Ze){var qe=z[ve][1][Ze];return ae(qe||Ze)},Oe,Oe.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 De=Pe[Ae];if(!me&&De in this._types)throw new Error('Attempt to change mapping for "'+De+'" extension from "'+this._types[De]+'" to "'+ve+'". Pass `force=true` to allow this, otherwise remove "'+De+'" from the list of extensions for "'+ve+'".');this._types[De]=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 Ie.g!="undefined"?Ie.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(De){return De&&De.__esModule?De:{default:De}}function ye(De,Oe){return De===void 0?Oe:De}function we(De,Oe){return function(Ze,qe,Xe){if(Ze)return Oe(Ze);De({data:qe,status:Xe.statusCode,headers:Xe.headers,res:Xe})}}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(De,Oe,Ze){return arguments.length===2&&typeof Oe=="function"&&(Ze=Oe,Oe=null),typeof Ze=="function"?Le.requestWithCallback(De,Oe,Ze):(pe||(pe=Se("any-promise")),new pe(function(qe,Xe){Le.requestWithCallback(De,Oe,we(qe,Xe))}))},Le.requestWithCallback=function(De,Oe,Ze){function qe(){tt&&(clearTimeout(tt),tt=null)}function Xe(){Ke&&(clearTimeout(Ke),Ke=null)}function vt(un,Kn,pn){if(Xe(),!Ze)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),ut,Ce.pid,Ft.method,De),void(un&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),ut,Ce.pid,un.name,un.message,un.stack));var Hn=Ze;Ze=null;var Qn={};if(pn&&(We=pn.statusCode,Qn=pn.headers),We===401&&Qn["www-authenticate"]&&(!Oe.headers||!Oe.headers.Authorization)&&Oe.digestAuth){var Ai=Qn["www-authenticate"];if(Ai.indexOf("Digest ")>=0)return ae("Request#%d %s: got digest auth header WWW-Authenticate: %s",ut,De,Ai),Oe.headers=Oe.headers||{},Oe.headers.Authorization=digestAuthHeader(Ft.method,Ft.path,Ai,Oe.digestAuth),ae("Request#%d %s: auth with digest header: %s",ut,De,Oe.headers.Authorization),pn.headers["set-cookie"]&&(Oe.headers.Cookie=pn.headers["set-cookie"].join(";")),Le.requestWithCallback(De,Oe,Hn)}var ei=Date.now()-yt;qt&&(qt.contentDownload=ei),ae("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",ei,Ve,We,Ft.method,Ft.host,Ft.path,Qe,qt);var ki={status:We,statusCode:We,headers:Qn,size:Ve,aborted:pt,rt:ei,keepAliveSocket:Qe,data:Kn,requestUrls:Oe.requestUrls,timing:qt,remoteAddress:Mt,remotePort:Qt};if(un){var Wi="";Ht&&typeof Ht.getCurrentStatus=="function"&&(Wi=", agent status: "+(0,ge.default)(Ht.getCurrentStatus())),un.message+=", "+Ft.method+" "+De+" "+We+" (connected: "+Re+", keepalive socket: "+Qe+Wi+`)
headers: `+(0,ge.default)(Qn),un.data=Kn,un.path=Ft.path,un.status=We,un.headers=Qn,un.res=ki}Hn(un,Kn,Oe.streaming?pn:ki),Oe.emitter&&(ot.url=De,ot.socket=mn&&mn.connection,ot.options=Ft,ot.size=it,Oe.emitter.emit("response",{requestId:ut,error:un,ctx:Oe.ctx,req:ot,res:ki}))}function gt(un){var Kn=null;if(Oe.followRedirect&&statuses.redirect[un.statusCode]){Oe._followRedirectCount=(Oe._followRedirectCount||0)+1;var pn=un.headers.location;if(pn){if(!(Oe._followRedirectCount>Oe.maxRedirects)){var Hn=Oe.formatRedirectUrl?Oe.formatRedirectUrl(De,pn):z.resolve(De,pn);ae("Request#%d %s: `redirected` from %s to %s",ut,Ft.path,De,Hn),Xe(),Oe.headers&&Oe.headers.Host&&Pe.test(pn)&&(Oe.headers.Host=null);var Qn=Ze;return Ze=null,Le.requestWithCallback(Hn,Oe,Qn),{redirect:!0,error:null}}Kn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),Kn.name="MaxRedirectError"}else Kn=new Error("Got statusCode "+un.statusCode+" but cannot resolve next location from headers"),Kn.name="FollowRedirectError"}return{redirect:!1,error:Kn}}function kt(un,Kn,pn){return pn(null,Kn,un.headers["content-encoding"])}function at(un){if(qt&&(qt.waiting=Date.now()-yt),ae("Request#%d %s `req response` event emit: status %d, headers: %j",ut,De,un.statusCode,un.headers),Oe.streaming){var Kn=gt(un);return Kn.redirect?void un.resume():Kn.error?(un.resume(),vt(Kn.error,null,un)):vt(null,null,un)}if(un.on("close",function(){ae("Request#%d %s: `res close` event emit, total size %d",ut,De,Ve)}),un.on("error",function(){ae("Request#%d %s: `res error` event emit, total size %d",ut,De,Ve)}),un.on("aborted",function(){pt=!0,ae("Request#%d %s: `res aborted` event emit, total size %d",ut,De,Ve)}),Bt){var Kn=gt(un);return Kn.redirect?void un.resume():Kn.error?(un.resume(),Bt.end(),vt(Kn.error,null,un)):(Oe.consumeWriteStream===!1?un.on("end",vt.bind(null,null,null,un)):isNode010||isNode012?first([[Bt,"close"],[un,"aborted"]],function(Qn,Ai,ei){ae("Request#%d %s: writeStream or res %s event emitted",ut,De,ei),vt(je||null,null,un)}):Bt.on("close",function(){ae("Request#%d %s: writeStream close event emitted",ut,De),vt(je||null,null,un)}),un.pipe(Bt))}var pn=[];un.on("data",function(Hn){ae("Request#%d %s: `res data` event emit, size %d",ut,De,Hn.length),Ve+=Hn.length,pn.push(Hn)}),un.on("end",function(){var Hn=xe.concat(pn,Ve);if(ae("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",ut,De,Ve,un._dumped),je)return vt(je,Hn,un);var Qn=gt(un);if(Qn.error)return vt(Qn.error,Hn,un);Qn.redirect||kt(un,Hn,function(Ai,ei,ki){if(Ai)return vt(Ai,Hn,un);if(!ki&&Ae.indexOf(Oe.dataType)>=0){try{ei=decodeBodyByCharset(ei,un)}catch(Ui){return ae("decodeBodyByCharset error: %s",Ui),vt(null,ei,un)}if(Oe.dataType==="json")if(Ve===0)ei=null;else{var Wi=parseJSON(ei,dn);Wi.error?Ai=Wi.error:ei=Wi.data}}pt&&ae("Request#%d %s: Remote socket was terminated before `response.end()` was called",ut,De),vt(Ai,ei,un)})})}function bt(){ae("Response timer ticking, timeout: %d",Cn),Ke=setTimeout(function(){Ke=null;var un="Response timeout for "+Cn+"ms";je=new Error(un),je.name="ResponseTimeoutError",je.requestId=ut,ae("ResponseTimeout: Request#%d %s %s: %s, connected: %s",ut,De,je.name,un,Re),ct()},Cn)}function ct(){ae("Request#%d %s abort, connected: %s",ut,De,Re),mn.socket||(je.noSocket=!0,vt(je)),mn.abort()}if(!De||typeof De!="string"&&(De===void 0?"undefined":(0,ue.default)(De))!=="object"){var Rt=ee.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(Rt)}arguments.length===2&&typeof Oe=="function"&&(Ze=Oe,Oe=null),Oe=Oe||{},me>=ve&&(me=0);var ut=++me;Oe.requestUrls=Oe.requestUrls||[];var ot={requestId:ut,url:De,args:Oe,ctx:Oe.ctx};Oe.emitter&&Oe.emitter.emit("request",ot),Oe.timeout=Oe.timeout||Le.TIMEOUTS,Oe.maxRedirects=Oe.maxRedirects||10,Oe.streaming=Oe.streaming||Oe.customResponse;var ht,yt=Date.now();typeof De=="string"?(Pe.test(De)||(De="http://"+De),ht=z.parse(De)):ht=De;var _t=(Oe.type||Oe.method||ht.method||"GET").toUpperCase(),xt=ht.port||80,Ut=oe,Ht=ye(Oe.agent,Le.agent),dn=Oe.fixJSONCtlChars;ht.protocol==="https:"&&(Ut=re,Ht=ye(Oe.httpsAgent,Le.httpsAgent),ht.port||(xt=443));var Ft={host:ht.hostname||ht.host||"localhost",path:ht.path||"/",method:_t,port:xt,agent:Ht,headers:Oe.headers||{},lookup:Oe.lookup};Array.isArray(Oe.timeout)?Ft.requestTimeout=Oe.timeout[Oe.timeout.length-1]:Oe.timeout!==void 0&&(Ft.requestTimeout=Oe.timeout);for(var fn=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],It=0;It<fn.length;It++){var Xt=fn[It];Oe.hasOwnProperty(Xt)&&(Ft[Xt]=Oe[Xt])}Ft.rejectUnauthorized!==!1||Ft.hasOwnProperty("secureOptions")||(Ft.secureOptions=Se("constants").SSL_OP_NO_TLSv1_2);var tn=Oe.auth||ht.auth;tn&&(Ft.auth=tn);var lt=Oe.content||Oe.data,He=_t==="GET"||_t==="HEAD"||Oe.dataAsQueryString;if(!Oe.content&&lt&&typeof lt!="string"&&!xe.isBuffer(lt))if(He)lt=Oe.nestedQuerystring?qs.stringify(lt):querystring.stringify(lt);else{var ze=Ft.headers["Content-Type"]||Ft.headers["content-type"];ze||(ze=Oe.contentType==="json"?"application/json":"application/x-www-form-urlencoded",Ft.headers["Content-Type"]=ze),lt=parseContentType(ze).type==="application/json"?(0,ge.default)(lt):Oe.nestedQuerystring?qs.stringify(lt):querystring.stringify(lt)}He&&lt&&(Ft.path+=(ht.query?"&":"?")+lt,lt=null);var it=0;if(lt){var dt=lt.length;xe.isBuffer(lt)||(dt=xe.byteLength(lt)),it=Ft.headers["Content-Length"]=dt}Oe.dataType==="json"&&(Ft.headers.Accept="application/json"),typeof Oe.beforeRequest=="function"&&Oe.beforeRequest(Ft);var tt=null,Ke=null,je=null,Re=!1,Qe=!1,Ve=0,We=-1,pt=!1,Mt="",Qt="",qt=null;Oe.timing&&(qt={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),Ft.headers["User-Agent"]||Ft.headers["user-agent"]||(Ft.headers["User-Agent"]=navigator.userAgent),Oe.gzip&&(Ft.headers["Accept-Encoding"]||Ft.headers["accept-encoding"]||(Ft.headers["Accept-Encoding"]="gzip"));var Bt=Oe.writeStream;ae("Request#%d %s %s with headers %j, options.path: %s",ut,_t,De,Ft.headers,Ft.path),Oe.requestUrls.push(De);var $t,Cn;Array.isArray(Oe.timeout)?($t=le(Oe.timeout[0]),Cn=le(Oe.timeout[1])):$t=Cn=le(Oe.timeout),ae("ConnectTimeout: %d, ResponseTimeout: %d",$t,Cn);var mn;try{mn=Ut.request(Ft,at)}catch(un){return vt(un)}return typeof window=="undefined"?function(){ae("Connect timer ticking, timeout: %d",$t),tt=setTimeout(function(){tt=null,We===-1&&(We=-2);var un="Connect timeout for "+$t+"ms",Kn="ConnectionTimeoutError";mn.socket||(Kn="SocketAssignTimeoutError",un+=", working sockets is full"),je=new Error(un),je.name=Kn,je.requestId=ut,ae("ConnectTimeout: Request#%d %s %s: %s, connected: %s",ut,De,je.name,un,Re),ct()},$t)}():mn.on("requestTimeout",function(){We===-1&&(We=-2);var un="Connect timeout for "+$t+"ms";je=new Error(un),je.name="ConnectionTimeoutError",je.requestId=ut,ct()}),qt&&mn.on("finish",function(){qt.requestSent=Date.now()-yt}),mn.once("socket",function(un){qt&&(qt.queuing=Date.now()-yt),isNode010&&un.socket&&(un=un.socket);var Kn=un.readyState;if(Kn==="opening")return un.once("lookup",function(pn,Hn,Qn){ae("Request#%d %s lookup: %s, %s, %s",ut,De,pn,Hn,Qn),qt&&(qt.dnslookup=Date.now()-yt),Hn&&(Mt=Hn)}),void un.once("connect",function(){qt&&(qt.connected=Date.now()-yt),qe(),bt(),ae("Request#%d %s new socket connected",ut,De),Re=!0,Mt||(Mt=un.remoteAddress),Qt=un.remotePort});ae("Request#%d %s reuse socket connected, readyState: %s",ut,De,Kn),Re=!0,Qe=!0,Mt||(Mt=un.remoteAddress),Qt=un.remotePort,qe(),bt()}),mn.on("error",function(un){un.name!=="Error"&&un.name!=="TypeError"||(un.name=Re?"ResponseError":"RequestError"),un.message+=' (req "error")',ae("Request#%d %s `req error` event emit, %s: %s",ut,De,un.name,un.message),vt(je||un)}),Bt&&Bt.once("error",function(un){un.message+=' (writeStream "error")',je=un,ae("Request#%d %s `writeStream error` event emit, %s: %s",ut,De,un.name,un.message),ct()}),Oe.stream?(Oe.stream.pipe(mn),Oe.stream.once("error",function(un){un.message+=' (stream "error")',je=un,ae("Request#%d %s `readStream error` event emit, %s: %s",ut,De,un.name,un.message),ct()})):mn.end(lt),mn.requestId=ut,mn}}).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,De=987654321,Oe=4294967295;return function(){De=36969*(65535&De)+(De>>16)&Oe,Ae=18e3*(65535&Ae)+(Ae>>16)&Oe;var Ze=(De<<16)+Ae&Oe;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 De=Ae*ve,Oe=Ce.min(4*De,me);if(De){for(var Ze=0;Ze<De;Ze+=ve)this._doProcessBlock(le,Ze);var qe=le.splice(0,De);ae.sigBytes-=Oe}return new de.init(qe,Oe)},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],De=oe[re+2],Oe=oe[re+3],Ze=oe[re+4],qe=oe[re+5],Xe=oe[re+6],vt=oe[re+7],gt=oe[re+8],kt=oe[re+9],at=oe[re+10],bt=oe[re+11],ct=oe[re+12],Rt=oe[re+13],ut=oe[re+14],ot=oe[re+15],ht=ve[0],yt=ve[1],_t=ve[2],xt=ve[3];ht=xe(ht,yt,_t,xt,Pe,7,ee[0]),xt=xe(xt,ht,yt,_t,Ae,12,ee[1]),_t=xe(_t,xt,ht,yt,De,17,ee[2]),yt=xe(yt,_t,xt,ht,Oe,22,ee[3]),ht=xe(ht,yt,_t,xt,Ze,7,ee[4]),xt=xe(xt,ht,yt,_t,qe,12,ee[5]),_t=xe(_t,xt,ht,yt,Xe,17,ee[6]),yt=xe(yt,_t,xt,ht,vt,22,ee[7]),ht=xe(ht,yt,_t,xt,gt,7,ee[8]),xt=xe(xt,ht,yt,_t,kt,12,ee[9]),_t=xe(_t,xt,ht,yt,at,17,ee[10]),yt=xe(yt,_t,xt,ht,bt,22,ee[11]),ht=xe(ht,yt,_t,xt,ct,7,ee[12]),xt=xe(xt,ht,yt,_t,Rt,12,ee[13]),_t=xe(_t,xt,ht,yt,ut,17,ee[14]),yt=xe(yt,_t,xt,ht,ot,22,ee[15]),ht=be(ht,yt,_t,xt,Ae,5,ee[16]),xt=be(xt,ht,yt,_t,Xe,9,ee[17]),_t=be(_t,xt,ht,yt,bt,14,ee[18]),yt=be(yt,_t,xt,ht,Pe,20,ee[19]),ht=be(ht,yt,_t,xt,qe,5,ee[20]),xt=be(xt,ht,yt,_t,at,9,ee[21]),_t=be(_t,xt,ht,yt,ot,14,ee[22]),yt=be(yt,_t,xt,ht,Ze,20,ee[23]),ht=be(ht,yt,_t,xt,kt,5,ee[24]),xt=be(xt,ht,yt,_t,ut,9,ee[25]),_t=be(_t,xt,ht,yt,Oe,14,ee[26]),yt=be(yt,_t,xt,ht,gt,20,ee[27]),ht=be(ht,yt,_t,xt,Rt,5,ee[28]),xt=be(xt,ht,yt,_t,De,9,ee[29]),_t=be(_t,xt,ht,yt,vt,14,ee[30]),yt=be(yt,_t,xt,ht,ct,20,ee[31]),ht=ye(ht,yt,_t,xt,qe,4,ee[32]),xt=ye(xt,ht,yt,_t,gt,11,ee[33]),_t=ye(_t,xt,ht,yt,bt,16,ee[34]),yt=ye(yt,_t,xt,ht,ut,23,ee[35]),ht=ye(ht,yt,_t,xt,Ae,4,ee[36]),xt=ye(xt,ht,yt,_t,Ze,11,ee[37]),_t=ye(_t,xt,ht,yt,vt,16,ee[38]),yt=ye(yt,_t,xt,ht,at,23,ee[39]),ht=ye(ht,yt,_t,xt,Rt,4,ee[40]),xt=ye(xt,ht,yt,_t,Pe,11,ee[41]),_t=ye(_t,xt,ht,yt,Oe,16,ee[42]),yt=ye(yt,_t,xt,ht,Xe,23,ee[43]),ht=ye(ht,yt,_t,xt,kt,4,ee[44]),xt=ye(xt,ht,yt,_t,ct,11,ee[45]),_t=ye(_t,xt,ht,yt,ot,16,ee[46]),yt=ye(yt,_t,xt,ht,De,23,ee[47]),ht=we(ht,yt,_t,xt,Pe,6,ee[48]),xt=we(xt,ht,yt,_t,vt,10,ee[49]),_t=we(_t,xt,ht,yt,ut,15,ee[50]),yt=we(yt,_t,xt,ht,qe,21,ee[51]),ht=we(ht,yt,_t,xt,ct,6,ee[52]),xt=we(xt,ht,yt,_t,Oe,10,ee[53]),_t=we(_t,xt,ht,yt,at,15,ee[54]),yt=we(yt,_t,xt,ht,Ae,21,ee[55]),ht=we(ht,yt,_t,xt,gt,6,ee[56]),xt=we(xt,ht,yt,_t,ot,10,ee[57]),_t=we(_t,xt,ht,yt,Xe,15,ee[58]),yt=we(yt,_t,xt,ht,Rt,21,ee[59]),ht=we(ht,yt,_t,xt,Ze,6,ee[60]),xt=we(xt,ht,yt,_t,bt,10,ee[61]),_t=we(_t,xt,ht,yt,De,15,ee[62]),yt=we(yt,_t,xt,ht,kt,21,ee[63]),ve[0]=ve[0]+ht|0,ve[1]=ve[1]+yt|0,ve[2]=ve[2]+_t|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,De=0;De<4;De++){var Oe=Ae[De];Ae[De]=16711935&(Oe<<8|Oe>>>24)|4278255360&(Oe<<24|Oe>>>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/),De=fe.match(/Kindle\/([\d.]+)/),Oe=fe.match(/Silk\/([\d._]+)/),Ze=fe.match(/(BlackBerry).*Version\/([\d.]+)/),qe=fe.match(/(BB10).*Version\/([\d.]+)/),Xe=fe.match(/(RIM\sTablet\sOS)\s([\d.]+)/),vt=fe.match(/PlayBook/),gt=fe.match(/Chrome\/([\d.]+)/)||fe.match(/CriOS\/([\d.]+)/),kt=fe.match(/Firefox\/([\d.]+)/),at=fe.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),bt=fe.match(/MSIE\s([\d.]+)/)||fe.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),ct=!gt&&fe.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),Rt=ct||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]),Xe&&(de.rimtabletos=!0,de.version=Xe[2]),vt&&(ge.playbook=!0),De&&(de.kindle=!0,de.version=De[1]),Oe&&(ge.silk=!0,ge.version=Oe[1]),!Oe&&de.android&&fe.match(/Kindle Fire/)&&(ge.silk=!0),gt&&(ge.chrome=!0,ge.version=gt[1]),kt&&(ge.firefox=!0,ge.version=kt[1]),at&&(de.firefoxos=!0,de.version=at[1]),bt&&(ge.ie=!0,ge.version=bt[1]),Rt&&(oe||de.ios||ve||z)&&(ge.safari=!0,de.ios||(ge.version=Rt[1])),ct&&(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||vt||z&&!fe.match(/Mobile/)||kt&&fe.match(/Tablet/)||bt&&!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.]+)/)||kt&&fe.match(/Mobile/)||bt&&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,Sn.exports=AliyunUpload},function(ke,Se,Be){"use strict";function Le(qe){return qe&&qe.__esModule?qe:{default:qe}}function Ce(qe,Xe){if(!(qe instanceof Xe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(Se,"__esModule",{value:!0});var xe=function(){function qe(Xe,vt){for(var gt=0;gt<vt.length;gt++){var kt=vt[gt];kt.enumerable=kt.enumerable||!1,kt.configurable=!0,"value"in kt&&(kt.writable=!0),Object.defineProperty(Xe,kt.key,kt)}}return function(Xe,vt,gt){return vt&&qe(Xe.prototype,vt),gt&&qe(Xe,gt),Xe}}(),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),De=Be(32),Oe=Le(De),Ze=(Be(2),function(){function qe(Xe){Ce(this,qe),this.options=Xe,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(Xe,vt,gt,kt){return this._retryCount=0,!(gt&&!kt||!gt&&kt)&&!(Xe&&!vt||!Xe&&vt)&&(this._ossCreditor.accessKeyId=Xe,this._ossCreditor.accessKeySecret=vt,this._ossCreditor.securityToken=gt,this._ossCreditor.expireTime=kt,!0)}},{key:"addFile",value:function(Xe,vt,gt,kt,at,bt){if(!Xe)return!1;if(Xe.size==0)try{this.options.onUploadFailed({file:Xe},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(ot){console.log(ot)}for(var ct=(this.options,0);ct<this._uploadList.length;ct++)if(this._uploadList[ct].file==Xe)return!1;var Rt=new Object;if(Rt.file=Xe,Rt._endpoint=vt,Rt._bucket=gt,Rt._object=kt,Rt.state=be.UPLOADSTATE.INIT,Rt.isImage=re.default.isImage(Xe.name),!Rt.isImage&&this.options.enableUploadProgress){var ut=this;Oe.default.getMd5(Xe,function(ot){Rt.fileHash=ot;var ht=ut._getCheckoutpoint(Rt);ut.options.localCheckpoint||ht||ut._getCheckoutpointFromCloud(Rt,function(yt){if(yt.UploadPoint){var _t=JSON.parse(yt.UploadPoint);_t.loaded!=1&&(Rt.checkpoint=_t.checkpoint,Rt.loaded=_t.loaded,Rt.videoId=yt.VideoId,ut._saveCheckoutpoint(Rt,_t.checkpoint))}},function(yt){try{if((yt=JSON.parse(yt))&&yt.Code=="InvalidParameter"&&yt.Message.indexOf("UserId")>0){ut._invalidUserId=!0;var _t=yt.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(_t)}}catch(xt){console.log(xt)}})})}at&&(Rt.videoInfo=at?JSON.parse(at).Vod:{},Rt.userData=ge.default.encode(at)),Rt.ri=le.default.create(),this._uploadList.push(Rt),this._reportLog("20001",Rt,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(Rt)}catch(ot){console.log(ot)}return!0}},{key:"deleteFile",value:function(Xe){return!!this.cancelFile(Xe)&&(this._uploadList.splice(Xe,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(Xe){if(this.options,Xe<0||Xe>=this._uploadList.length)return!1;var vt=this._uploadList[Xe];if(Xe==this._curIndex&&vt.state==be.UPLOADSTATE.UPLOADING){vt.state=be.UPLOADSTATE.CANCELED;var gt=this._getCheckoutpoint(vt);gt&&gt.checkpoint&&(gt=gt.checkpoint),gt&&this._ossUpload.abort(vt),this._removeCheckoutpoint(vt),this.nextUpload()}else vt.state!=be.UPLOADSTATE.SUCCESS&&(vt.state=be.UPLOADSTATE.CANCELED);return this._reportLog("20008",vt),!0}},{key:"resumeFile",value:function(Xe){if(this.options,Xe<0||Xe>=this._uploadList.length)return!1;var vt=this._uploadList[Xe];return vt.state==be.UPLOADSTATE.CANCELED&&(vt.state=be.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(Xe){return this._getCheckoutpoint({file:Xe})}},{key:"startUpload",value:function(Xe){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 vt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(vt),this._state=be.VODSTATE.START}},{key:"nextUpload",value:function(){var Xe=this.options;if(this._state==be.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var vt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(vt)}else{this._state=be.VODSTATE.END;try{Xe.onUploadEnd&&Xe.onUploadEnd(vt)}catch(gt){console.log(gt)}}}},{key:"clear",value:function(Xe){for(var vt=this.options,gt=0,kt=0;kt<this._uploadList.length;kt++)vt.uploadList[kt].state==be.UPLOADSTATE.SUCCESS&&gt++,this._uploadList[kt].state==Xe&&(vt.uploadList.splice(kt,1),kt--);vt.onClear&&vt.onClear(vt.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 Xe=this._uploadList[this._curIndex];this._state=be.VODSTATE.STOP,Xe.state=be.UPLOADSTATE.STOPED,this._changeState(Xe,be.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(Xe){var vt=this;if(!Xe)return!1;var gt=JSON.parse(ge.default.decode(Xe));return!!(gt.AccessKeyId&&gt.AccessKeySecret&&gt.SecurityToken&&gt.Expiration)&&vt.resumeUploadWithToken(gt.AccessKeyId,gt.AccessKeySecret,gt.SecurityToken,gt.Expiration)}},{key:"resumeUploadWithToken",value:function(Xe,vt,gt,kt){if(this.options,!(Xe&&vt&&gt&&kt)||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(Xe,vt,gt,kt),this._state=be.VODSTATE.START,this._ossUpload=null,this._uploadCore(at,at.retry),at.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Xe,vt,gt){if(this._curIndex==-1||this._state!=be.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var kt=this._uploadList[this._curIndex];kt.object?this._refreshSTSTokenUpload(kt,Xe,vt,gt):this.setSTSToken(kt,Xe,vt,gt)}}},{key:"setSTSTokenDirectlyUpload",value:function(Xe,vt,gt,kt,at){if(!(vt&&gt&&kt&&at))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var bt=Xe;this.init(vt,gt,kt,at),bt.endpoint=bt._endpoint,bt.bucket=bt._bucket,bt.object=bt._object,this._ossUpload=null,this._uploadCore(bt,Xe.retry),Xe.retry=!1}},{key:"setSTSToken",value:function(Xe,vt,gt,kt){if(!vt||!gt||!kt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var at=Xe.videoInfo,bt={accessKeyId:vt,securityToken:kt,accessKeySecret:gt,fileName:Xe.file.name,title:at.Title,requestId:Xe.ri,region:this.options.region};at.ImageType&&(bt.imageType=at.ImageType),at.ImageExt&&(bt.imageExt=at.ImageExt),at.FileSize&&(bt.fileSize=at.FileSize),at.Description&&(bt.description=at.Description),at.CateId&&(bt.cateId=at.CateId),at.Tags&&(bt.tags=at.Tags),at.TemplateGroupId&&(bt.templateGroupId=at.TemplateGroupId),at.StorageLocation&&(bt.storageLocation=at.StorageLocation),at.CoverURL&&(bt.coverUrl=at.CoverURL),at.TransCodeMode&&(bt.transCodeMode=at.TransCodeMode),at.UserData&&(bt.userData=at.UserData);var ct=this,Rt="getUploadAuth";Xe.videoId?(bt.videoId=Xe.videoId,Rt="refreshUploadAuth"):Xe.isImage&&(Rt="getImageUploadAuth"),ve.default[Rt](bt,function(ut){Xe.videoId=ut.VideoId?ut.VideoId:Xe.videoId,ct.setUploadAuthAndAddress(Xe,ut.UploadAuth,ut.UploadAddress),ct._state=be.VODSTATE.START},function(ut){ct._error(Xe,{name:ut.Code,code:ut.Code,message:ut.Message,requestId:ut.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Xe,vt,gt,kt){if(!Xe||!vt||!gt)return!1;var at=JSON.parse(ge.default.decode(vt));if(!(at.AccessKeyId&&at.AccessKeySecret&&at.SecurityToken&&at.Expiration))return console.error("uploadauth is invalid"),!1;var bt={},ct=Xe;if(gt){if(bt=JSON.parse(ge.default.decode(gt)),!bt.Endpoint||!bt.Bucket||!bt.FileName)return console.error("uploadAddress is invalid"),!1}else bt.Endpoint=ct.endpoint,bt.Bucket=ct.bucket,bt.FileName=ct.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),ct.endpoint=ct._endpoint?ct._endpoint:bt.Endpoint,ct.bucket=ct._bucket?ct._bucket:bt.Bucket,ct.object=ct._object?ct._object:bt.FileName,ct.region=this.options.region,kt&&(ct.videoId=kt),this._ossUpload=null,this._uploadCore(ct,Xe.retry),Xe.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Xe,vt,gt,kt){if(!vt||!gt||!kt)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var at={accessKeyId:vt,securityToken:kt,accessKeySecret:gt,videoId:Xe.object,requestId:Xe.ri,region:this.options.region},bt=this,ct="refreshUploadAuth";Xe.isImage&&(ct="getImageUploadAuth"),ve.default[ct](at,function(Rt){bt.setUploadAuthAndAddress(Xe,Rt.UploadAuth,UploadAddress),bt._state=be.VODSTATE.START},function(Rt){bt._error(Xe,{name:Rt.Code,code:Rt.Code,message:Rt.Message,requestId:Rt.RequestId})})}},{key:"_upload",value:function(Xe){var vt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],gt=this.options;if(Xe.retry=vt,gt.onUploadstarted&&!vt)try{var kt=this._getCheckoutpoint(Xe);kt&&kt.state!=be.UPLOADSTATE.UPLOADING&&(Xe.checkpoint=kt,Xe.videoId=kt.videoId),gt.onUploadstarted(Xe)}catch(at){console.log(at)}}},{key:"_uploadCore",value:function(Xe){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(Xe.state=be.UPLOADSTATE.UPLOADING,!this._ossUpload){Xe.endpoint=Xe.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var vt=this;this._ossUpload=new pe.default({bucket:Xe.bucket,endpoint:Xe.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){vt._error.call(vt,ut,ot)},oncomplete:function(ut,ot){vt._complete.call(vt,ut,ot)},onprogress:function(ut,ot,ht){vt._progress.call(vt,ut,ot,ht)}})}var gt=re.default.getFileType(Xe.file.name),kt=this._getCheckoutpoint(Xe),at="",bt="";kt&&kt.checkpoint&&(bt=kt.state,at=kt.videoId,kt=kt.checkpoint),kt&&at==Xe.videoId&&bt!=be.UPLOADSTATE.UPLOADING&&(kt.file=Xe.file,Xe.checkpoint=kt,kt.uploadId);var ct=this._adjustPartSize(Xe);this._reportLog("20002",Xe,{ft:gt,fs:Xe.file.size,bu:Xe.bucket,ok:Xe.object,vid:Xe.videoId||"",fn:Xe.file.name,fw:null,fh:null,ps:ct});var Rt={headers:{"x-oss-notification":Xe.userData?Xe.userData:""},partSize:ct,parallel:this.options.parallel};this._ossUpload.upload(Xe,Rt)}},{key:"_findUploadIndex",value:function(){for(var Xe=-1,vt=0;vt<this._uploadList.length;vt++)if(this._uploadList[vt].state==be.UPLOADSTATE.INIT){Xe=vt;break}return Xe}},{key:"_error",value:function(Xe,vt){if(vt.name=="cancel")try{this.options.onUploadCanceled(Xe,vt)}catch(kt){console.log(kt)}else{if(vt.message.indexOf("InvalidAccessKeyIdError")>0||vt.name=="SignatureDoesNotMatchError"||vt.code=="SecurityTokenExpired"||vt.code=="InvalidSecurityToken.Expired"||vt.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=be.VODSTATE.EXPIRE,Xe.state=be.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(Xe,vt)}catch(kt){console.log(kt)}}return}if((vt.name=="RequestTimeoutError"||vt.name=="ConnectionTimeout"||vt.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var gt=this;return setTimeout(function(){gt._uploadCore(Xe,!0)},1e3*gt._retryDuration),void this._retryCount++}vt.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Xe),this._handleError(Xe,vt)}}},{key:"_handleError",value:function(Xe,vt){var gt=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],kt=be.UPLOADSTATE.FAIlURE;if(Xe.state!=be.UPLOADSTATE.CANCELED&&(Xe.state=be.UPLOADSTATE.FAIlURE,this._state=be.VODSTATE.FAILURE,this.options.onUploadFailed&&vt&&vt.code&&vt.message))try{this.options.onUploadFailed(Xe,vt.code,vt.message)}catch(bt){console.log(bt)}if(gt&&this._changeState(Xe,kt),this._reportLog("20006",Xe,{code:vt.name,message:vt.message,requestId:vt.requestId,fs:Xe.file.size,bu:Xe.bucket,ok:Xe.object,fn:Xe.file.name}),this._reportLog("20004",Xe,{requestId:vt.requestId,fs:Xe.file.size,bu:Xe.bucket,ok:Xe.object,fn:Xe.file.name}),Xe.ri=le.default.create(),this._findUploadIndex()!=-1){var at=this;this._state=be.VODSTATE.START,setTimeout(function(){at.nextUpload()},100)}}},{key:"_complete",value:function(Xe,vt){if(Xe.state=be.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Xe)}catch(at){console.log(at)}var gt=0;vt&&vt.res&&vt.res.headers&&(gt=vt.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Xe);var kt=this;setTimeout(function(){kt.nextUpload()},100),this._retryCount=0,this._reportLog("20003",Xe,{requestId:gt})}},{key:"_progress",value:function(Xe,vt,gt){if(this.options.onUploadProgress)try{Xe.loaded=vt.loaded,this.options.onUploadProgress(Xe,vt.total,vt.loaded)}catch(ot){console.log(ot)}var kt=vt.checkpoint,at=0;kt&&(Xe.checkpoint=kt,this._saveCheckoutpoint(Xe,kt,be.UPLOADSTATE.UPLOADING),at=kt.uploadId),this._retryCount=0;var bt=this._getPortNumber(kt),ct=0;if(gt&&gt.headers&&(ct=gt.headers["x-oss-request-id"]),vt.loaded!=0&&this._reportLog("20007",Xe,{pn:bt,requestId:ct}),vt.loaded!=1&&this._reportLog("20005",Xe,{UploadId:at,pn:bt+1,pr:Xe.retry?1:0,fs:Xe.file.size,bu:Xe.bucket,ok:Xe.object,fn:Xe.file.name}),!this._invalidUserId&&!Xe.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var Rt={file:Xe.file,checkpoint:vt,userId:this.options.userId,videoId:Xe.videoId,region:this.options.region,fileHash:Xe.fileHash};try{var ut=this;Ae.default.upload(Rt,function(){},function(ot){if((ot=JSON.parse(ot))&&ot.Code=="InvalidParameter"&&ot.Message.indexOf("UserId")>0){ut._invalidUserId=!0;var ht=ot.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ht)}})}catch(ot){console.log(ot)}}}},{key:"_getPortNumber",value:function(Xe){if(Xe){var vt=Xe.doneParts;if(vt&&vt.length>0)return vt[vt.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(Xe){var vt=this._getCheckoutpointKey(Xe);ue.default.remove(vt)}},{key:"_getCheckoutpoint",value:function(Xe){var vt=this._getCheckoutpointKey(Xe),gt=ue.default.get(vt);if(gt)try{return JSON.parse(gt)}catch(kt){}return""}},{key:"_saveCheckoutpoint",value:function(Xe,vt,gt){if(vt){var kt=this._getCheckoutpointKey(Xe),at=Xe.file,bt={fileName:at.name,lastModified:at.lastModified,size:at.size,object:Xe.object,videoId:Xe.videoId,bucket:Xe.bucket,endpoint:Xe.endpoint,checkpoint:vt,loaded:Xe.loaded,state:gt};ue.default.set(kt,JSON.stringify(bt))}}},{key:"_changeState",value:function(Xe,vt){var gt=this._getCheckoutpoint(Xe);gt&&((this._onbeforeunload=!0)&&(vt=be.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Xe,gt.checkpoint,vt))}},{key:"_getCheckoutpointKey",value:function(Xe){return"upload_"+Xe.file.lastModified+"_"+Xe.file.name+"_"+Xe.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Xe,vt,gt){var kt={userId:this.options.userId,uploadInfoList:[{FileName:Xe.file.name,FileSize:Xe.file.size,FileCreateTime:Xe.file.lastModified,FileHash:Xe.fileHash}],region:this.options.region};Ae.default.get(kt,function(at){vt(at)},gt)}},{key:"_reportLog",value:function(Xe,vt,gt){gt||(gt={}),gt.ri=vt.ri,this._ut&&(gt.ut=this._ut),this._log.log(Xe,gt)}},{key:"_initEvent",value:function(){var Xe=this;window&&(window.onbeforeunload=function(vt){if(Xe._onbeforeunload=!0,Xe._curIndex!=-1&&Xe._uploadList.length>Xe._curIndex){var gt=Xe._uploadList[Xe._curIndex];Xe._changeState(gt,be.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Xe=0;Xe<this._uploadList.length;Xe++){var vt=this._uploadList[Xe];vt.state!=be.UPLOADSTATE.FAIlURE&&vt.state!=be.UPLOADSTATE.STOPED||(vt.state=be.UPLOADSTATE.INIT)}this._state=be.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(Xe){return Xe.file.size/this.options.partSize>1e4?Xe.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,je){if(Ce()<je)throw new RangeError("Invalid typed array length");return be.TYPED_ARRAY_SUPPORT?(Ke=new Uint8Array(je),Ke.__proto__=be.prototype):(Ke===null&&(Ke=new be(je)),Ke.length=je),Ke}function be(Ke,je,Re){if(!(be.TYPED_ARRAY_SUPPORT||this instanceof be))return new be(Ke,je,Re);if(typeof Ke=="number"){if(typeof je=="string")throw new Error("If encoding is specified then the first argument must be a string");return de(this,Ke)}return ye(this,Ke,je,Re)}function ye(Ke,je,Re,Qe){if(typeof je=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&je instanceof ArrayBuffer?ue(Ke,je,Re,Qe):typeof je=="string"?ge(Ke,je,Re):ee(Ke,je)}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,je,Re,Qe){return we(je),je<=0?xe(Ke,je):Re!==void 0?typeof Qe=="string"?xe(Ke,je).fill(Re,Qe):xe(Ke,je).fill(Re):xe(Ke,je)}function de(Ke,je){if(we(je),Ke=xe(Ke,je<0?0:0|z(je)),!be.TYPED_ARRAY_SUPPORT)for(var Re=0;Re<je;++Re)Ke[Re]=0;return Ke}function ge(Ke,je,Re){if(typeof Re=="string"&&Re!==""||(Re="utf8"),!be.isEncoding(Re))throw new TypeError('"encoding" must be a valid string encoding');var Qe=0|re(je,Re);Ke=xe(Ke,Qe);var Ve=Ke.write(je,Re);return Ve!==Qe&&(Ke=Ke.slice(0,Ve)),Ke}function fe(Ke,je){var Re=je.length<0?0:0|z(je.length);Ke=xe(Ke,Re);for(var Qe=0;Qe<Re;Qe+=1)Ke[Qe]=255&je[Qe];return Ke}function ue(Ke,je,Re,Qe){if(je.byteLength,Re<0||je.byteLength<Re)throw new RangeError("'offset' is out of bounds");if(je.byteLength<Re+(Qe||0))throw new RangeError("'length' is out of bounds");return je=Re===void 0&&Qe===void 0?new Uint8Array(je):Qe===void 0?new Uint8Array(je,Re):new Uint8Array(je,Re,Qe),be.TYPED_ARRAY_SUPPORT?(Ke=je,Ke.__proto__=be.prototype):Ke=fe(Ke,je),Ke}function ee(Ke,je){if(be.isBuffer(je)){var Re=0|z(je.length);return Ke=xe(Ke,Re),Ke.length===0||je.copy(Ke,0,0,Re),Ke}if(je){if(typeof ArrayBuffer!="undefined"&&je.buffer instanceof ArrayBuffer||"length"in je)return typeof je.length!="number"||lt(je.length)?xe(Ke,0):fe(Ke,je);if(je.type==="Buffer"&&it(je.data))return fe(Ke,je.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,je){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 Re=Ke.length;if(Re===0)return 0;for(var Qe=!1;;)switch(je){case"ascii":case"latin1":case"binary":return Re;case"utf8":case"utf-8":case void 0:return Ft(Ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Re;case"hex":return Re>>>1;case"base64":return Xt(Ke).length;default:if(Qe)return Ft(Ke).length;je=(""+je).toLowerCase(),Qe=!0}}function ae(Ke,je,Re){var Qe=!1;if((je===void 0||je<0)&&(je=0),je>this.length||((Re===void 0||Re>this.length)&&(Re=this.length),Re<=0)||(Re>>>=0,je>>>=0,Re<=je))return"";for(Ke||(Ke="utf8");;)switch(Ke){case"hex":return bt(this,je,Re);case"utf8":case"utf-8":return vt(this,je,Re);case"ascii":return kt(this,je,Re);case"latin1":case"binary":return at(this,je,Re);case"base64":return Xe(this,je,Re);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ct(this,je,Re);default:if(Qe)throw new TypeError("Unknown encoding: "+Ke);Ke=(Ke+"").toLowerCase(),Qe=!0}}function le(Ke,je,Re){var Qe=Ke[je];Ke[je]=Ke[Re],Ke[Re]=Qe}function me(Ke,je,Re,Qe,Ve){if(Ke.length===0)return-1;if(typeof Re=="string"?(Qe=Re,Re=0):Re>2147483647?Re=2147483647:Re<-2147483648&&(Re=-2147483648),Re=+Re,isNaN(Re)&&(Re=Ve?0:Ke.length-1),Re<0&&(Re=Ke.length+Re),Re>=Ke.length){if(Ve)return-1;Re=Ke.length-1}else if(Re<0){if(!Ve)return-1;Re=0}if(typeof je=="string"&&(je=be.from(je,Qe)),be.isBuffer(je))return je.length===0?-1:ve(Ke,je,Re,Qe,Ve);if(typeof je=="number")return je&=255,be.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Ve?Uint8Array.prototype.indexOf.call(Ke,je,Re):Uint8Array.prototype.lastIndexOf.call(Ke,je,Re):ve(Ke,[je],Re,Qe,Ve);throw new TypeError("val must be string, number or Buffer")}function ve(Ke,je,Re,Qe,Ve){function We(mn,un){return pt===1?mn[un]:mn.readUInt16BE(un*pt)}var pt=1,Mt=Ke.length,Qt=je.length;if(Qe!==void 0&&((Qe=String(Qe).toLowerCase())==="ucs2"||Qe==="ucs-2"||Qe==="utf16le"||Qe==="utf-16le")){if(Ke.length<2||je.length<2)return-1;pt=2,Mt/=2,Qt/=2,Re/=2}var qt;if(Ve){var Bt=-1;for(qt=Re;qt<Mt;qt++)if(We(Ke,qt)===We(je,Bt===-1?0:qt-Bt)){if(Bt===-1&&(Bt=qt),qt-Bt+1===Qt)return Bt*pt}else Bt!==-1&&(qt-=qt-Bt),Bt=-1}else for(Re+Qt>Mt&&(Re=Mt-Qt),qt=Re;qt>=0;qt--){for(var $t=!0,Cn=0;Cn<Qt;Cn++)if(We(Ke,qt+Cn)!==We(je,Cn)){$t=!1;break}if($t)return qt}return-1}function Pe(Ke,je,Re,Qe){Re=Number(Re)||0;var Ve=Ke.length-Re;Qe?(Qe=Number(Qe))>Ve&&(Qe=Ve):Qe=Ve;var We=je.length;if(We%2!=0)throw new TypeError("Invalid hex string");Qe>We/2&&(Qe=We/2);for(var pt=0;pt<Qe;++pt){var Mt=parseInt(je.substr(2*pt,2),16);if(isNaN(Mt))return pt;Ke[Re+pt]=Mt}return pt}function Ae(Ke,je,Re,Qe){return tn(Ft(je,Ke.length-Re),Ke,Re,Qe)}function De(Ke,je,Re,Qe){return tn(fn(je),Ke,Re,Qe)}function Oe(Ke,je,Re,Qe){return De(Ke,je,Re,Qe)}function Ze(Ke,je,Re,Qe){return tn(Xt(je),Ke,Re,Qe)}function qe(Ke,je,Re,Qe){return tn(It(je,Ke.length-Re),Ke,Re,Qe)}function Xe(Ke,je,Re){return je===0&&Re===Ke.length?He.fromByteArray(Ke):He.fromByteArray(Ke.slice(je,Re))}function vt(Ke,je,Re){Re=Math.min(Ke.length,Re);for(var Qe=[],Ve=je;Ve<Re;){var We=Ke[Ve],pt=null,Mt=We>239?4:We>223?3:We>191?2:1;if(Ve+Mt<=Re){var Qt,qt,Bt,$t;switch(Mt){case 1:We<128&&(pt=We);break;case 2:Qt=Ke[Ve+1],(192&Qt)==128&&($t=(31&We)<<6|63&Qt)>127&&(pt=$t);break;case 3:Qt=Ke[Ve+1],qt=Ke[Ve+2],(192&Qt)==128&&(192&qt)==128&&($t=(15&We)<<12|(63&Qt)<<6|63&qt)>2047&&($t<55296||$t>57343)&&(pt=$t);break;case 4:Qt=Ke[Ve+1],qt=Ke[Ve+2],Bt=Ke[Ve+3],(192&Qt)==128&&(192&qt)==128&&(192&Bt)==128&&($t=(15&We)<<18|(63&Qt)<<12|(63&qt)<<6|63&Bt)>65535&&$t<1114112&&(pt=$t)}}pt===null?(pt=65533,Mt=1):pt>65535&&(pt-=65536,Qe.push(pt>>>10&1023|55296),pt=56320|1023&pt),Qe.push(pt),Ve+=Mt}return gt(Qe)}function gt(Ke){var je=Ke.length;if(je<=dt)return String.fromCharCode.apply(String,Ke);for(var Re="",Qe=0;Qe<je;)Re+=String.fromCharCode.apply(String,Ke.slice(Qe,Qe+=dt));return Re}function kt(Ke,je,Re){var Qe="";Re=Math.min(Ke.length,Re);for(var Ve=je;Ve<Re;++Ve)Qe+=String.fromCharCode(127&Ke[Ve]);return Qe}function at(Ke,je,Re){var Qe="";Re=Math.min(Ke.length,Re);for(var Ve=je;Ve<Re;++Ve)Qe+=String.fromCharCode(Ke[Ve]);return Qe}function bt(Ke,je,Re){var Qe=Ke.length;(!je||je<0)&&(je=0),(!Re||Re<0||Re>Qe)&&(Re=Qe);for(var Ve="",We=je;We<Re;++We)Ve+=dn(Ke[We]);return Ve}function ct(Ke,je,Re){for(var Qe=Ke.slice(je,Re),Ve="",We=0;We<Qe.length;We+=2)Ve+=String.fromCharCode(Qe[We]+256*Qe[We+1]);return Ve}function Rt(Ke,je,Re){if(Ke%1!=0||Ke<0)throw new RangeError("offset is not uint");if(Ke+je>Re)throw new RangeError("Trying to access beyond buffer length")}function ut(Ke,je,Re,Qe,Ve,We){if(!be.isBuffer(Ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(je>Ve||je<We)throw new RangeError('"value" argument is out of bounds');if(Re+Qe>Ke.length)throw new RangeError("Index out of range")}function ot(Ke,je,Re,Qe){je<0&&(je=65535+je+1);for(var Ve=0,We=Math.min(Ke.length-Re,2);Ve<We;++Ve)Ke[Re+Ve]=(je&255<<8*(Qe?Ve:1-Ve))>>>8*(Qe?Ve:1-Ve)}function ht(Ke,je,Re,Qe){je<0&&(je=4294967295+je+1);for(var Ve=0,We=Math.min(Ke.length-Re,4);Ve<We;++Ve)Ke[Re+Ve]=je>>>8*(Qe?Ve:3-Ve)&255}function yt(Ke,je,Re,Qe,Ve,We){if(Re+Qe>Ke.length)throw new RangeError("Index out of range");if(Re<0)throw new RangeError("Index out of range")}function _t(Ke,je,Re,Qe,Ve){return Ve||yt(Ke,je,Re,4,34028234663852886e22,-34028234663852886e22),ze.write(Ke,je,Re,Qe,23,4),Re+4}function xt(Ke,je,Re,Qe,Ve){return Ve||yt(Ke,je,Re,8,17976931348623157e292,-17976931348623157e292),ze.write(Ke,je,Re,Qe,52,8),Re+8}function Ut(Ke){if(Ke=Ht(Ke).replace(tt,""),Ke.length<2)return"";for(;Ke.length%4!=0;)Ke+="=";return Ke}function Ht(Ke){return Ke.trim?Ke.trim():Ke.replace(/^\s+|\s+$/g,"")}function dn(Ke){return Ke<16?"0"+Ke.toString(16):Ke.toString(16)}function Ft(Ke,je){je=je||1/0;for(var Re,Qe=Ke.length,Ve=null,We=[],pt=0;pt<Qe;++pt){if((Re=Ke.charCodeAt(pt))>55295&&Re<57344){if(!Ve){if(Re>56319){(je-=3)>-1&&We.push(239,191,189);continue}if(pt+1===Qe){(je-=3)>-1&&We.push(239,191,189);continue}Ve=Re;continue}if(Re<56320){(je-=3)>-1&&We.push(239,191,189),Ve=Re;continue}Re=65536+(Ve-55296<<10|Re-56320)}else Ve&&(je-=3)>-1&&We.push(239,191,189);if(Ve=null,Re<128){if((je-=1)<0)break;We.push(Re)}else if(Re<2048){if((je-=2)<0)break;We.push(Re>>6|192,63&Re|128)}else if(Re<65536){if((je-=3)<0)break;We.push(Re>>12|224,Re>>6&63|128,63&Re|128)}else{if(!(Re<1114112))throw new Error("Invalid code point");if((je-=4)<0)break;We.push(Re>>18|240,Re>>12&63|128,Re>>6&63|128,63&Re|128)}}return We}function fn(Ke){for(var je=[],Re=0;Re<Ke.length;++Re)je.push(255&Ke.charCodeAt(Re));return je}function It(Ke,je){for(var Re,Qe,Ve,We=[],pt=0;pt<Ke.length&&!((je-=2)<0);++pt)Re=Ke.charCodeAt(pt),Qe=Re>>8,Ve=Re%256,We.push(Ve),We.push(Qe);return We}function Xt(Ke){return He.toByteArray(Ut(Ke))}function tn(Ke,je,Re,Qe){for(var Ve=0;Ve<Qe&&!(Ve+Re>=je.length||Ve>=Ke.length);++Ve)je[Ve+Re]=Ke[Ve];return Ve}function lt(Ke){return Ke!==Ke}var He=Be(21),ze=Be(22),it=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(je){return!1}}(),Se.kMaxLength=Ce(),be.poolSize=8192,be._augment=function(Ke){return Ke.__proto__=be.prototype,Ke},be.from=function(Ke,je,Re){return ye(null,Ke,je,Re)},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,je,Re){return pe(null,Ke,je,Re)},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,je){if(!be.isBuffer(Ke)||!be.isBuffer(je))throw new TypeError("Arguments must be Buffers");if(Ke===je)return 0;for(var Re=Ke.length,Qe=je.length,Ve=0,We=Math.min(Re,Qe);Ve<We;++Ve)if(Ke[Ve]!==je[Ve]){Re=Ke[Ve],Qe=je[Ve];break}return Re<Qe?-1:Qe<Re?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,je){if(!it(Ke))throw new TypeError('"list" argument must be an Array of Buffers');if(Ke.length===0)return be.alloc(0);var Re;if(je===void 0)for(je=0,Re=0;Re<Ke.length;++Re)je+=Ke[Re].length;var Qe=be.allocUnsafe(je),Ve=0;for(Re=0;Re<Ke.length;++Re){var We=Ke[Re];if(!be.isBuffer(We))throw new TypeError('"list" argument must be an Array of Buffers');We.copy(Qe,Ve),Ve+=We.length}return Qe},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 je=0;je<Ke;je+=2)le(this,je,je+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 je=0;je<Ke;je+=4)le(this,je,je+3),le(this,je+1,je+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 je=0;je<Ke;je+=8)le(this,je,je+7),le(this,je+1,je+6),le(this,je+2,je+5),le(this,je+3,je+4);return this},be.prototype.toString=function(){var Ke=0|this.length;return Ke===0?"":arguments.length===0?vt(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="",je=Se.INSPECT_MAX_BYTES;return this.length>0&&(Ke=this.toString("hex",0,je).match(/.{2}/g).join(" "),this.length>je&&(Ke+=" ... ")),"<Buffer "+Ke+">"},be.prototype.compare=function(Ke,je,Re,Qe,Ve){if(!be.isBuffer(Ke))throw new TypeError("Argument must be a Buffer");if(je===void 0&&(je=0),Re===void 0&&(Re=Ke?Ke.length:0),Qe===void 0&&(Qe=0),Ve===void 0&&(Ve=this.length),je<0||Re>Ke.length||Qe<0||Ve>this.length)throw new RangeError("out of range index");if(Qe>=Ve&&je>=Re)return 0;if(Qe>=Ve)return-1;if(je>=Re)return 1;if(je>>>=0,Re>>>=0,Qe>>>=0,Ve>>>=0,this===Ke)return 0;for(var We=Ve-Qe,pt=Re-je,Mt=Math.min(We,pt),Qt=this.slice(Qe,Ve),qt=Ke.slice(je,Re),Bt=0;Bt<Mt;++Bt)if(Qt[Bt]!==qt[Bt]){We=Qt[Bt],pt=qt[Bt];break}return We<pt?-1:pt<We?1:0},be.prototype.includes=function(Ke,je,Re){return this.indexOf(Ke,je,Re)!==-1},be.prototype.indexOf=function(Ke,je,Re){return me(this,Ke,je,Re,!0)},be.prototype.lastIndexOf=function(Ke,je,Re){return me(this,Ke,je,Re,!1)},be.prototype.write=function(Ke,je,Re,Qe){if(je===void 0)Qe="utf8",Re=this.length,je=0;else if(Re===void 0&&typeof je=="string")Qe=je,Re=this.length,je=0;else{if(!isFinite(je))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");je|=0,isFinite(Re)?(Re|=0,Qe===void 0&&(Qe="utf8")):(Qe=Re,Re=void 0)}var Ve=this.length-je;if((Re===void 0||Re>Ve)&&(Re=Ve),Ke.length>0&&(Re<0||je<0)||je>this.length)throw new RangeError("Attempt to write outside buffer bounds");Qe||(Qe="utf8");for(var We=!1;;)switch(Qe){case"hex":return Pe(this,Ke,je,Re);case"utf8":case"utf-8":return Ae(this,Ke,je,Re);case"ascii":return De(this,Ke,je,Re);case"latin1":case"binary":return Oe(this,Ke,je,Re);case"base64":return Ze(this,Ke,je,Re);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qe(this,Ke,je,Re);default:if(We)throw new TypeError("Unknown encoding: "+Qe);Qe=(""+Qe).toLowerCase(),We=!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,je){var Re=this.length;Ke=~~Ke,je=je===void 0?Re:~~je,Ke<0?(Ke+=Re)<0&&(Ke=0):Ke>Re&&(Ke=Re),je<0?(je+=Re)<0&&(je=0):je>Re&&(je=Re),je<Ke&&(je=Ke);var Qe;if(be.TYPED_ARRAY_SUPPORT)Qe=this.subarray(Ke,je),Qe.__proto__=be.prototype;else{var Ve=je-Ke;Qe=new be(Ve,void 0);for(var We=0;We<Ve;++We)Qe[We]=this[We+Ke]}return Qe},be.prototype.readUIntLE=function(Ke,je,Re){Ke|=0,je|=0,Re||Rt(Ke,je,this.length);for(var Qe=this[Ke],Ve=1,We=0;++We<je&&(Ve*=256);)Qe+=this[Ke+We]*Ve;return Qe},be.prototype.readUIntBE=function(Ke,je,Re){Ke|=0,je|=0,Re||Rt(Ke,je,this.length);for(var Qe=this[Ke+--je],Ve=1;je>0&&(Ve*=256);)Qe+=this[Ke+--je]*Ve;return Qe},be.prototype.readUInt8=function(Ke,je){return je||Rt(Ke,1,this.length),this[Ke]},be.prototype.readUInt16LE=function(Ke,je){return je||Rt(Ke,2,this.length),this[Ke]|this[Ke+1]<<8},be.prototype.readUInt16BE=function(Ke,je){return je||Rt(Ke,2,this.length),this[Ke]<<8|this[Ke+1]},be.prototype.readUInt32LE=function(Ke,je){return je||Rt(Ke,4,this.length),(this[Ke]|this[Ke+1]<<8|this[Ke+2]<<16)+16777216*this[Ke+3]},be.prototype.readUInt32BE=function(Ke,je){return je||Rt(Ke,4,this.length),16777216*this[Ke]+(this[Ke+1]<<16|this[Ke+2]<<8|this[Ke+3])},be.prototype.readIntLE=function(Ke,je,Re){Ke|=0,je|=0,Re||Rt(Ke,je,this.length);for(var Qe=this[Ke],Ve=1,We=0;++We<je&&(Ve*=256);)Qe+=this[Ke+We]*Ve;return Ve*=128,Qe>=Ve&&(Qe-=Math.pow(2,8*je)),Qe},be.prototype.readIntBE=function(Ke,je,Re){Ke|=0,je|=0,Re||Rt(Ke,je,this.length);for(var Qe=je,Ve=1,We=this[Ke+--Qe];Qe>0&&(Ve*=256);)We+=this[Ke+--Qe]*Ve;return Ve*=128,We>=Ve&&(We-=Math.pow(2,8*je)),We},be.prototype.readInt8=function(Ke,je){return je||Rt(Ke,1,this.length),128&this[Ke]?-1*(255-this[Ke]+1):this[Ke]},be.prototype.readInt16LE=function(Ke,je){je||Rt(Ke,2,this.length);var Re=this[Ke]|this[Ke+1]<<8;return 32768&Re?4294901760|Re:Re},be.prototype.readInt16BE=function(Ke,je){je||Rt(Ke,2,this.length);var Re=this[Ke+1]|this[Ke]<<8;return 32768&Re?4294901760|Re:Re},be.prototype.readInt32LE=function(Ke,je){return je||Rt(Ke,4,this.length),this[Ke]|this[Ke+1]<<8|this[Ke+2]<<16|this[Ke+3]<<24},be.prototype.readInt32BE=function(Ke,je){return je||Rt(Ke,4,this.length),this[Ke]<<24|this[Ke+1]<<16|this[Ke+2]<<8|this[Ke+3]},be.prototype.readFloatLE=function(Ke,je){return je||Rt(Ke,4,this.length),ze.read(this,Ke,!0,23,4)},be.prototype.readFloatBE=function(Ke,je){return je||Rt(Ke,4,this.length),ze.read(this,Ke,!1,23,4)},be.prototype.readDoubleLE=function(Ke,je){return je||Rt(Ke,8,this.length),ze.read(this,Ke,!0,52,8)},be.prototype.readDoubleBE=function(Ke,je){return je||Rt(Ke,8,this.length),ze.read(this,Ke,!1,52,8)},be.prototype.writeUIntLE=function(Ke,je,Re,Qe){Ke=+Ke,je|=0,Re|=0,!Qe&&ut(this,Ke,je,Re,Math.pow(2,8*Re)-1,0);var Ve=1,We=0;for(this[je]=255&Ke;++We<Re&&(Ve*=256);)this[je+We]=Ke/Ve&255;return je+Re},be.prototype.writeUIntBE=function(Ke,je,Re,Qe){Ke=+Ke,je|=0,Re|=0,!Qe&&ut(this,Ke,je,Re,Math.pow(2,8*Re)-1,0);var Ve=Re-1,We=1;for(this[je+Ve]=255&Ke;--Ve>=0&&(We*=256);)this[je+Ve]=Ke/We&255;return je+Re},be.prototype.writeUInt8=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,1,255,0),be.TYPED_ARRAY_SUPPORT||(Ke=Math.floor(Ke)),this[je]=255&Ke,je+1},be.prototype.writeUInt16LE=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[je]=255&Ke,this[je+1]=Ke>>>8):ot(this,Ke,je,!0),je+2},be.prototype.writeUInt16BE=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,2,65535,0),be.TYPED_ARRAY_SUPPORT?(this[je]=Ke>>>8,this[je+1]=255&Ke):ot(this,Ke,je,!1),je+2},be.prototype.writeUInt32LE=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[je+3]=Ke>>>24,this[je+2]=Ke>>>16,this[je+1]=Ke>>>8,this[je]=255&Ke):ht(this,Ke,je,!0),je+4},be.prototype.writeUInt32BE=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,4,4294967295,0),be.TYPED_ARRAY_SUPPORT?(this[je]=Ke>>>24,this[je+1]=Ke>>>16,this[je+2]=Ke>>>8,this[je+3]=255&Ke):ht(this,Ke,je,!1),je+4},be.prototype.writeIntLE=function(Ke,je,Re,Qe){if(Ke=+Ke,je|=0,!Qe){var Ve=Math.pow(2,8*Re-1);ut(this,Ke,je,Re,Ve-1,-Ve)}var We=0,pt=1,Mt=0;for(this[je]=255&Ke;++We<Re&&(pt*=256);)Ke<0&&Mt===0&&this[je+We-1]!==0&&(Mt=1),this[je+We]=(Ke/pt>>0)-Mt&255;return je+Re},be.prototype.writeIntBE=function(Ke,je,Re,Qe){if(Ke=+Ke,je|=0,!Qe){var Ve=Math.pow(2,8*Re-1);ut(this,Ke,je,Re,Ve-1,-Ve)}var We=Re-1,pt=1,Mt=0;for(this[je+We]=255&Ke;--We>=0&&(pt*=256);)Ke<0&&Mt===0&&this[je+We+1]!==0&&(Mt=1),this[je+We]=(Ke/pt>>0)-Mt&255;return je+Re},be.prototype.writeInt8=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,1,127,-128),be.TYPED_ARRAY_SUPPORT||(Ke=Math.floor(Ke)),Ke<0&&(Ke=255+Ke+1),this[je]=255&Ke,je+1},be.prototype.writeInt16LE=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[je]=255&Ke,this[je+1]=Ke>>>8):ot(this,Ke,je,!0),je+2},be.prototype.writeInt16BE=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,2,32767,-32768),be.TYPED_ARRAY_SUPPORT?(this[je]=Ke>>>8,this[je+1]=255&Ke):ot(this,Ke,je,!1),je+2},be.prototype.writeInt32LE=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,4,2147483647,-2147483648),be.TYPED_ARRAY_SUPPORT?(this[je]=255&Ke,this[je+1]=Ke>>>8,this[je+2]=Ke>>>16,this[je+3]=Ke>>>24):ht(this,Ke,je,!0),je+4},be.prototype.writeInt32BE=function(Ke,je,Re){return Ke=+Ke,je|=0,Re||ut(this,Ke,je,4,2147483647,-2147483648),Ke<0&&(Ke=4294967295+Ke+1),be.TYPED_ARRAY_SUPPORT?(this[je]=Ke>>>24,this[je+1]=Ke>>>16,this[je+2]=Ke>>>8,this[je+3]=255&Ke):ht(this,Ke,je,!1),je+4},be.prototype.writeFloatLE=function(Ke,je,Re){return _t(this,Ke,je,!0,Re)},be.prototype.writeFloatBE=function(Ke,je,Re){return _t(this,Ke,je,!1,Re)},be.prototype.writeDoubleLE=function(Ke,je,Re){return xt(this,Ke,je,!0,Re)},be.prototype.writeDoubleBE=function(Ke,je,Re){return xt(this,Ke,je,!1,Re)},be.prototype.copy=function(Ke,je,Re,Qe){if(Re||(Re=0),Qe||Qe===0||(Qe=this.length),je>=Ke.length&&(je=Ke.length),je||(je=0),Qe>0&&Qe<Re&&(Qe=Re),Qe===Re||Ke.length===0||this.length===0)return 0;if(je<0)throw new RangeError("targetStart out of bounds");if(Re<0||Re>=this.length)throw new RangeError("sourceStart out of bounds");if(Qe<0)throw new RangeError("sourceEnd out of bounds");Qe>this.length&&(Qe=this.length),Ke.length-je<Qe-Re&&(Qe=Ke.length-je+Re);var Ve,We=Qe-Re;if(this===Ke&&Re<je&&je<Qe)for(Ve=We-1;Ve>=0;--Ve)Ke[Ve+je]=this[Ve+Re];else if(We<1e3||!be.TYPED_ARRAY_SUPPORT)for(Ve=0;Ve<We;++Ve)Ke[Ve+je]=this[Ve+Re];else Uint8Array.prototype.set.call(Ke,this.subarray(Re,Re+We),je);return We},be.prototype.fill=function(Ke,je,Re,Qe){if(typeof Ke=="string"){if(typeof je=="string"?(Qe=je,je=0,Re=this.length):typeof Re=="string"&&(Qe=Re,Re=this.length),Ke.length===1){var Ve=Ke.charCodeAt(0);Ve<256&&(Ke=Ve)}if(Qe!==void 0&&typeof Qe!="string")throw new TypeError("encoding must be a string");if(typeof Qe=="string"&&!be.isEncoding(Qe))throw new TypeError("Unknown encoding: "+Qe)}else typeof Ke=="number"&&(Ke&=255);if(je<0||this.length<je||this.length<Re)throw new RangeError("Out of range index");if(Re<=je)return this;je>>>=0,Re=Re===void 0?this.length:Re>>>0,Ke||(Ke=0);var We;if(typeof Ke=="number")for(We=je;We<Re;++We)this[We]=Ke;else{var pt=be.isBuffer(Ke)?Ke:Ft(new be(Ke,Qe).toString()),Mt=pt.length;for(We=0;We<Re-je;++We)this[We+je]=pt[We%Mt]}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,De){for(var Oe=0;Oe<De.length;Oe++){var Ze=De[Oe];Ze.enumerable=Ze.enumerable||!1,Ze.configurable=!0,"value"in Ze&&(Ze.writable=!0),Object.defineProperty(Ae,Ze.key,Ze)}}return function(Ae,De,Oe){return De&&Pe(Ae.prototype,De),Oe&&Pe(Ae,Oe),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,De,Oe){var Ze=Ae+"|f#Ylm&^1TppeRhLg|"+Oe;return De&&(Ze=Ae+"|"+De+"|f#Ylm&^1TppeRhLg|"+Oe),ae(me.parse(Ze)).toString(le)}},{key:"upload",value:function(Ae,De,Oe){var Ze=z.default.ISODateString(new Date),qe=Math.floor(new Date().valueOf()/1e3),Xe=ge.default.getClientId();Xe=ge.default.setClientId(Xe);var vt=Pe.getAuthInfo(Ae.userId,Xe,qe),gt=re.default.randomUUID(),kt={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:vt,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};Xe&&(kt.ClientId=Xe);var at=re.default.makeUTF8sort(kt,"=","&")+"&Signature="+re.default.aliyunEncodeURI(re.default.makeChangeSiga(kt,Ae.accessKeySecret)),bt="https://vod."+Ae.region+".aliyuncs.com/?"+at;ye.default.get(bt,function(ct){De&&De()},function(ct){ct&&(Oe(ct),console.log(ct))})}},{key:"get",value:function(Ae,De,Oe){var Ze=z.default.ISODateString(new Date),qe=Math.floor(new Date().valueOf()/1e3),Xe=ge.default.getClientId(),vt=Pe.getAuthInfo(Ae.userId,Xe,qe),gt=re.default.randomUUID(),kt={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:vt,UserId:Ae.userId,UploadInfoList:JSON.stringify(Ae.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:gt};Xe&&(kt.ClientId=Xe);var at=re.default.makeUTF8sort(kt,"=","&")+"&Signature="+re.default.aliyunEncodeURI(re.default.makeChangeSiga(kt,Ae.accessKeySecret)),bt="https://vod."+Ae.region+".aliyuncs.com/?"+at;ye.default.get(bt,function(ct){var Rt={},ut=Xe;ct=ct?JSON.parse(ct):{},ct.UploadProgress&&ct.UploadProgress.UploadProgressList&&ct.UploadProgress.UploadProgressList.length>0&&(Rt=ct.UploadProgress.UploadProgressList[0],ut=Rt.ClientId),ge.default.setClientId(ut),De&&De(Rt)},function(ct){ct&&(Oe(ct),console.log(ct))})}}]),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(Sn,ln,Ie){(function(ke){ke(Ie(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(Sn,ln,Ie){(function(ke){ke(Ie(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,De,Oe=0;Oe<Pe.length;Oe++){var Ze=Pe[Oe],qe=Ze.head,Xe,vt=ee.getRange(qe,Be(qe.line,qe.ch+1));if(Ae&&!Ze.empty())Xe="surround";else if((ve||!Ae)&&vt==z)ve&&ue(ee,qe)?Xe="both":me.indexOf(z)>=0&&ee.getRange(qe,Be(qe.line,qe.ch+3))==z+z+z?Xe="skipThree":Xe="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;Xe="addFour"}else if(ve){var gt=qe.ch==0?" ":ee.getRange(Be(qe.line,qe.ch-1),qe);if(!ke.isWordChar(vt)&&gt!=z&&!ke.isWordChar(gt))Xe="both";else return ke.Pass}else if(Ae&&(vt.length===0||/\s/.test(vt)||le.indexOf(vt)>-1))Xe="both";else return ke.Pass;if(!De)De=Xe;else if(De!=Xe)return ke.Pass}var kt=ae%2?re.charAt(ae-1):z,at=ae%2?z:re.charAt(ae+1);ee.operation(function(){if(De=="skip")ee.execCommand("goCharRight");else if(De=="skipThree")for(var bt=0;bt<3;bt++)ee.execCommand("goCharRight");else if(De=="surround"){for(var ct=ee.getSelections(),bt=0;bt<ct.length;bt++)ct[bt]=kt+ct[bt]+at;ee.replaceSelections(ct,"around"),ct=ee.listSelections().slice();for(var bt=0;bt<ct.length;bt++)ct[bt]=de(ct[bt]);ee.setSelections(ct)}else De=="both"?(ee.replaceSelection(kt+at,null),ee.triggerElectric(kt+at),ee.execCommand("goCharLeft")):De=="addFour"&&(ee.replaceSelection(kt+kt+kt+kt,"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(Sn,ln,Ie){(function(ke){ke(Ie(89780),Ie(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 De=ve&&be(ve,Pe)>-1;de[fe]={indent:De,text:">"+(De?`
`:"")+"</"+ae+">",newPos:De?ke.Pos(ue.line+1,0):ke.Pos(ue.line,ue.ch+1)}}for(var Oe=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),!Oe&&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(Sn,ln,Ie){(function(ke){ke(Ie(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(Sn){(function(ln,Ie){Sn.exports=Ie()})(this,function(){"use strict";var ln=navigator.userAgent,Ie=navigator.platform,ke=/gecko\/\d/i.test(ln),Se=/MSIE \d/.test(ln),Be=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ln),Le=/Edge\/(\d+)/.exec(ln),Ce=Se||Be||Le,xe=Ce&&(Se?document.documentMode||6:+(Le||Be)[1]),be=!Le&&/WebKit\//.test(ln),ye=be&&/Qt\/\d+\.\d+/.test(ln),we=!Le&&/Chrome\//.test(ln),pe=/Opera\//.test(ln),de=/Apple Computer/.test(navigator.vendor),ge=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ln),fe=/PhantomJS/.test(ln),ue=!Le&&/AppleWebKit/.test(ln)&&/Mobile\/\w+/.test(ln),ee=/Android/.test(ln),z=ue||ee||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ln),oe=ue||/Mac/.test(Ie),re=/\bCrOS\b/.test(ln),ae=/win/i.test(Ie),le=pe&&ln.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 De(ie){for(var ce=ie.childNodes.length;ce>0;--ce)ie.removeChild(ie.firstChild);return ie}function Oe(ie,ce){return De(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 rt=0;rt<ce.length;++rt)Fe.appendChild(ce[rt]);return Fe}function qe(ie,ce,Te,Me){var Fe=Ze(ie,ce,Te,Me);return Fe.setAttribute("role","presentation"),Fe}var Xe;document.createRange?Xe=function(ie,ce,Te,Me){var Fe=document.createRange();return Fe.setEnd(Me||ie,Te),Fe.setStart(ie,ce),Fe}:Xe=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 vt(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 kt(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 bt=function(ie){ie.select()};ue?bt=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:Ce&&(bt=function(ie){try{ie.select()}catch(ce){}});function ct(ie){var ce=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ce)}}function Rt(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 rt=Me||0,mt=Fe||0;;){var Lt=ie.indexOf(" ",rt);if(Lt<0||Lt>=ce)return mt+(ce-rt);mt+=Lt-rt,mt+=Te-mt%Te,rt=Lt+1}}var ot=function(){this.id=null,this.f=null,this.time=0,this.handler=ct(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 ht(ie,ce){for(var Te=0;Te<ie.length;++Te)if(ie[Te]==ce)return Te;return-1}var yt=50,_t={toString:function(){return"CodeMirror.Pass"}},xt={scroll:!1},Ut={origin:"*mouse"},Ht={origin:"+move"};function dn(ie,ce,Te){for(var Me=0,Fe=0;;){var rt=ie.indexOf(" ",Me);rt==-1&&(rt=ie.length);var mt=rt-Me;if(rt==ie.length||Fe+mt>=ce)return Me+Math.min(mt,ce-Fe);if(Fe+=rt-Me,Fe+=Te-Fe%Te,Me=rt+1,Fe>=ce)return Me}}var Ft=[""];function fn(ie){for(;Ft.length<=ie;)Ft.push(It(Ft)+" ");return Ft[ie]}function It(ie){return ie[ie.length-1]}function Xt(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 He(ie,ce){var Te;return Object.create?Te=Object.create(ie):(lt.prototype=ie,Te=new lt),ce&&Rt(ce,Te),Te}var ze=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function it(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||ze.test(ie))}function dt(ie,ce){return ce?ce.source.indexOf("\\w")>-1&&it(ie)?!0:ce.test(ie):it(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 je(ie){return ie.charCodeAt(0)>=768&&Ke.test(ie)}function Re(ie,ce,Te){for(;(Te<0?ce>0:ce<ie.length)&&je(ie.charAt(ce));)ce+=Te;return ce}function Qe(ie,ce,Te){for(var Me=ce>Te?-1:1;;){if(ce==Te)return ce;var Fe=(ce+Te)/2,rt=Me<0?Math.ceil(Fe):Math.floor(Fe);if(rt==ce)return ie(rt)?ce:Te;ie(rt)?Te=rt:ce=rt+Me}}function Ve(ie,ce,Te,Me){if(!ie)return Me(ce,Te,"ltr",0);for(var Fe=!1,rt=0;rt<ie.length;++rt){var mt=ie[rt];(mt.from<Te&&mt.to>ce||ce==Te&&mt.to==ce)&&(Me(Math.max(mt.from,ce),Math.min(mt.to,Te),mt.level==1?"rtl":"ltr",rt),Fe=!0)}Fe||Me(ce,Te,"ltr")}var We=null;function pt(ie,ce,Te){var Me;We=null;for(var Fe=0;Fe<ie.length;++Fe){var rt=ie[Fe];if(rt.from<ce&&rt.to>ce)return Fe;rt.to==ce&&(rt.from!=rt.to&&Te=="before"?Me=Fe:We=Fe),rt.from==ce&&(rt.from!=rt.to&&Te!="before"?Me=Fe:We=Fe)}return Me!=null?Me:We}var Mt=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Te(jt){return jt<=247?ie.charAt(jt):1424<=jt&&jt<=1524?"R":1536<=jt&&jt<=1785?ce.charAt(jt-1536):1774<=jt&&jt<=2220?"r":8192<=jt&&jt<=8203?"w":jt==8204?"b":"L"}var Me=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Fe=/[stwN]/,rt=/[LRr]/,mt=/[Lb1n]/,Lt=/[1n]/;function Ct(jt,cn,Wt){this.level=jt,this.from=cn,this.to=Wt}return function(jt,cn){var Wt=cn=="ltr"?"L":"R";if(jt.length==0||cn=="ltr"&&!Me.test(jt))return!1;for(var Tn=jt.length,Ln=[],fi=0;fi<Tn;++fi)Ln.push(Te(jt.charCodeAt(fi)));for(var Si=0,Ni=Wt;Si<Tn;++Si){var Qi=Ln[Si];Qi=="m"?Ln[Si]=Ni:Ni=Qi}for(var Lr=0,ur=Wt;Lr<Tn;++Lr){var Ir=Ln[Lr];Ir=="1"&&ur=="r"?Ln[Lr]="n":rt.test(Ir)&&(ur=Ir,Ir=="r"&&(Ln[Lr]="R"))}for(var uo=1,ar=Ln[0];uo<Tn-1;++uo){var Bo=Ln[uo];Bo=="+"&&ar=="1"&&Ln[uo+1]=="1"?Ln[uo]="1":Bo==","&&ar==Ln[uo+1]&&(ar=="1"||ar=="n")&&(Ln[uo]=ar),ar=Bo}for(var Fs=0;Fs<Tn;++Fs){var La=Ln[Fs];if(La==",")Ln[Fs]="N";else if(La=="%"){var Xs=void 0;for(Xs=Fs+1;Xs<Tn&&Ln[Xs]=="%";++Xs);for(var Ml=Fs&&Ln[Fs-1]=="!"||Xs<Tn&&Ln[Xs]=="1"?"1":"N",al=Fs;al<Xs;++al)Ln[al]=Ml;Fs=Xs-1}}for(var wa=0,Bl=Wt;wa<Tn;++wa){var Ja=Ln[wa];Bl=="L"&&Ja=="1"?Ln[wa]="L":rt.test(Ja)&&(Bl=Ja)}for(var _a=0;_a<Tn;++_a)if(Fe.test(Ln[_a])){var os=void 0;for(os=_a+1;os<Tn&&Fe.test(Ln[os]);++os);for(var na=(_a?Ln[_a-1]:Wt)=="L",Ra=(os<Tn?Ln[os]:Wt)=="L",qa=na==Ra?na?"L":"R":Wt,Nu=_a;Nu<os;++Nu)Ln[Nu]=qa;_a=os-1}for(var Js=[],gu,la=0;la<Tn;)if(mt.test(Ln[la])){var Zd=la;for(++la;la<Tn&&mt.test(Ln[la]);++la);Js.push(new Ct(0,Zd,la))}else{var eu=la,jl=Js.length,kl=cn=="rtl"?1:0;for(++la;la<Tn&&Ln[la]!="L";++la);for(var Cs=eu;Cs<la;)if(Lt.test(Ln[Cs])){eu<Cs&&(Js.splice(jl,0,new Ct(1,eu,Cs)),jl+=kl);var Fa=Cs;for(++Cs;Cs<la&&Lt.test(Ln[Cs]);++Cs);Js.splice(jl,0,new Ct(2,Fa,Cs)),jl+=kl,eu=Cs}else++Cs;eu<la&&Js.splice(jl,0,new Ct(1,eu,la))}return cn=="ltr"&&(Js[0].level==1&&(gu=jt.match(/^\s+/))&&(Js[0].from=gu[0].length,Js.unshift(new Ct(0,0,gu[0].length))),It(Js).level==1&&(gu=jt.match(/\s+$/))&&(It(Js).to-=gu[0].length,Js.push(new Ct(0,Tn-gu[0].length,Tn)))),cn=="rtl"?Js.reverse():Js}}();function Qt(ie,ce){var Te=ie.order;return Te==null&&(Te=ie.order=Mt(ie.text,ce)),Te}var qt=[],Bt=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]||qt).concat(Te)}};function $t(ie,ce){return ie._handlers&&ie._handlers[ce]||qt}function Cn(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 rt=ht(Fe,Te);rt>-1&&(Me[ce]=Fe.slice(0,rt).concat(Fe.slice(rt+1)))}}}function mn(ie,ce){var Te=$t(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 un(ie,ce,Te){return typeof ce=="string"&&(ce={type:ce,preventDefault:function(){this.defaultPrevented=!0}}),mn(ie,Te||ce.type,ie,ce),ei(ce)||ce.codemirrorIgnore}function Kn(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)ht(Te,ce[Me])==-1&&Te.push(ce[Me])}function pn(ie,ce){return $t(ie,ce).length>0}function Hn(ie){ie.prototype.on=function(ce,Te){Bt(this,ce,Te)},ie.prototype.off=function(ce,Te){Cn(this,ce,Te)}}function Qn(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function Ai(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function ei(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function ki(ie){Qn(ie),Ai(ie)}function Wi(ie){return ie.target||ie.srcElement}function Ui(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 rr=function(){if(Ce&&xe<9)return!1;var ie=Ze("div");return"draggable"in ie||"dragDrop"in ie}(),vr;function wr(ie){if(vr==null){var ce=Ze("span","\u200B");Oe(ie,Ze("span",[ce,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(vr=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(Ce&&xe<8))}var Te=vr?Ze("span","\u200B"):Ze("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Te.setAttribute("cm-text",""),Te}var Oi;function Zi(ie){if(Oi!=null)return Oi;var ce=Oe(ie,document.createTextNode("A\u062EA")),Te=Xe(ce,0,1).getBoundingClientRect(),Me=Xe(ce,1,2).getBoundingClientRect();return De(ie),!Te||Te.left==Te.right?!1:Oi=Me.right-Te.right<3}var pr=`
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 rt=ie.slice(ce,ie.charAt(Fe-1)=="\r"?Fe-1:Fe),mt=rt.indexOf("\r");mt!=-1?(Te.push(rt.slice(0,mt)),ce+=mt+1):(Te.push(rt),ce=Fe+1)}return Te}:function(ie){return ie.split(/\r\n?|\n/)},et=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},ai=function(){var ie=Ze("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),ti=null;function Ii(ie){if(ti!=null)return ti;var ce=Oe(ie,Ze("span","x")),Te=ce.getBoundingClientRect(),Me=Xe(ce,0,1).getBoundingClientRect();return ti=Math.abs(Te.left-Me.left)>1}var gr={},hr={};function or(ie,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),gr[ie]=ce}function po(ie,ce){hr[ie]=ce}function $n(ie){if(typeof ie=="string"&&hr.hasOwnProperty(ie))ie=hr[ie];else if(ie&&typeof ie.name=="string"&&hr.hasOwnProperty(ie.name)){var ce=hr[ie.name];typeof ce=="string"&&(ce={name:ce}),ie=He(ce,ie),ie.name=ce.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return $n("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return $n("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Ue(ie,ce){ce=$n(ce);var Te=gr[ce.name];if(!Te)return Ue(ie,"text/plain");var Me=Te(ie,ce);if(Je.hasOwnProperty(ce.name)){var Fe=Je[ce.name];for(var rt in Fe)Fe.hasOwnProperty(rt)&&(Me.hasOwnProperty(rt)&&(Me["_"+rt]=Me[rt]),Me[rt]=Fe[rt])}if(Me.name=ce.name,ce.helperType&&(Me.helperType=ce.helperType),ce.modeProps)for(var mt in ce.modeProps)Me[mt]=ce.modeProps[mt];return Me}var Je={};function nt(ie,ce){var Te=Je.hasOwnProperty(ie)?Je[ie]:Je[ie]={};Rt(ce,Te)}function Pt(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 Kt=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};Kt.prototype.eol=function(){return this.pos>=this.string.length},Kt.prototype.sol=function(){return this.pos==this.lineStart},Kt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Kt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Kt.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},Kt.prototype.eatWhile=function(ie){for(var ce=this.pos;this.eat(ie););return this.pos>ce},Kt.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},Kt.prototype.skipToEnd=function(){this.pos=this.string.length},Kt.prototype.skipTo=function(ie){var ce=this.string.indexOf(ie,this.pos);if(ce>-1)return this.pos=ce,!0},Kt.prototype.backUp=function(ie){this.pos-=ie},Kt.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)},Kt.prototype.indentation=function(){return ut(this.string,null,this.tabSize)-(this.lineStart?ut(this.string,this.lineStart,this.tabSize):0)},Kt.prototype.match=function(ie,ce,Te){if(typeof ie=="string"){var Me=function(mt){return Te?mt.toLowerCase():mt},Fe=this.string.substr(this.pos,ie.length);if(Me(Fe)==Me(ie))return ce!==!1&&(this.pos+=ie.length),!0}else{var rt=this.string.slice(this.pos).match(ie);return rt&&rt.index>0?null:(rt&&ce!==!1&&(this.pos+=rt[0].length),rt)}},Kt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Kt.prototype.hideFirstChars=function(ie,ce){this.lineStart+=ie;try{return ce()}finally{this.lineStart-=ie}},Kt.prototype.lookAhead=function(ie){var ce=this.lineOracle;return ce&&ce.lookAhead(ie)},Kt.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],rt=Fe.chunkSize();if(ce<rt){Te=Fe;break}ce-=rt}return Te.lines[ce]}function zn(ie,ce,Te){var Me=[],Fe=ce.line;return ie.iter(ce.line,Te.line+1,function(rt){var mt=rt.text;Fe==Te.line&&(mt=mt.slice(0,Te.ch)),Fe==ce.line&&(mt=mt.slice(ce.ch)),Me.push(mt),++Fe}),Me}function _i(ie,ce,Te){var Me=[];return ie.iter(ce,Te,function(Fe){Me.push(Fe.text)}),Me}function Bi(ie,ce){var Te=ce-ie.height;if(Te)for(var Me=ie;Me;Me=Me.parent)Me.height+=Te}function wt(ie){if(ie.parent==null)return null;for(var ce=ie.parent,Te=ht(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 zt(ie,ce){var Te=ie.first;e:do{for(var Me=0;Me<ie.children.length;++Me){var Fe=ie.children[Me],rt=Fe.height;if(ce<rt){ie=Fe;continue e}ce-=rt,Te+=Fe.chunkSize()}return Te}while(!ie.lines);for(var mt=0;mt<ie.lines.length;++mt){var Lt=ie.lines[mt],Ct=Lt.height;if(ce<Ct)break;ce-=Ct}return Te+mt}function En(ie,ce){return ce>=ie.first&&ce<ie.first+ie.size}function bn(ie,ce){return String(ie.lineNumberFormatter(ce+ie.firstLineNumber))}function Yt(ie,ce,Te){if(Te===void 0&&(Te=null),!(this instanceof Yt))return new Yt(ie,ce,Te);this.line=ie,this.ch=ce,this.sticky=Te}function gn(ie,ce){return ie.line-ce.line||ie.ch-ce.ch}function yn(ie,ce){return ie.sticky==ce.sticky&&gn(ie,ce)==0}function vn(ie){return Yt(ie.line,ie.ch)}function jn(ie,ce){return gn(ie,ce)<0?ce:ie}function Un(ie,ce){return gn(ie,ce)<0?ie:ce}function Gn(ie,ce){return Math.max(ie.first,Math.min(ce,ie.first+ie.size-1))}function An(ie,ce){if(ce.line<ie.first)return Yt(ie.first,0);var Te=ie.first+ie.size-1;return ce.line>Te?Yt(Te,_n(ie,Te).text.length):Li(ce,_n(ie,ce.line).text.length)}function Li(ie,ce){var Te=ie.ch;return Te==null||Te>ce?Yt(ie.line,ce):Te<0?Yt(ie.line,0):ie}function xi(ie,ce){for(var Te=[],Me=0;Me<ce.length;Me++)Te[Me]=An(ie,ce[Me]);return Te}var bi=function(ie,ce){this.state=ie,this.lookAhead=ce},hn=function(ie,ce,Te,Me){this.state=ce,this.doc=ie,this.line=Te,this.maxLookAhead=Me||0,this.baseTokens=null,this.baseTokenPos=1};hn.prototype.lookAhead=function(ie){var ce=this.doc.getLine(this.line+ie);return ce!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ce},hn.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}},hn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},hn.fromSaved=function(ie,ce,Te){return ce instanceof bi?new hn(ie,Pt(ie.mode,ce.state),Te,ce.lookAhead):new hn(ie,Pt(ie.mode,ce),Te)},hn.prototype.save=function(ie){var ce=ie!==!1?Pt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new bi(ce,this.maxLookAhead):ce};function Vi(ie,ce,Te,Me){var Fe=[ie.state.modeGen],rt={};Ji(ie,ce.text,ie.doc.mode,Te,function(jt,cn){return Fe.push(jt,cn)},rt,Me);for(var mt=Te.state,Lt=function(jt){Te.baseTokens=Fe;var cn=ie.state.overlays[jt],Wt=1,Tn=0;Te.state=!0,Ji(ie,ce.text,cn.mode,Te,function(Ln,fi){for(var Si=Wt;Tn<Ln;){var Ni=Fe[Wt];Ni>Ln&&Fe.splice(Wt,1,Ln,Fe[Wt+1],Ni),Wt+=2,Tn=Math.min(Ln,Ni)}if(fi)if(cn.opaque)Fe.splice(Si,Wt-Si,Ln,"overlay "+fi),Wt=Si+2;else for(;Si<Wt;Si+=2){var Qi=Fe[Si+1];Fe[Si+1]=(Qi?Qi+" ":"")+"overlay "+fi}},rt),Te.state=mt,Te.baseTokens=null,Te.baseTokenPos=1},Ct=0;Ct<ie.state.overlays.length;++Ct)Lt(Ct);return{styles:Fe,classes:rt.bgClass||rt.textClass?rt:null}}function lr(ie,ce,Te){if(!ce.styles||ce.styles[0]!=ie.state.modeGen){var Me=Mr(ie,wt(ce)),Fe=ce.text.length>ie.options.maxHighlightLength&&Pt(ie.doc.mode,Me.state),rt=Vi(ie,ce,Me);Fe&&(Me.state=Fe),ce.stateAfter=Me.save(!Fe),ce.styles=rt.styles,rt.classes?ce.styleClasses=rt.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 Mr(ie,ce,Te){var Me=ie.doc,Fe=ie.display;if(!Me.mode.startState)return new hn(Me,!0,ce);var rt=cr(ie,ce,Te),mt=rt>Me.first&&_n(Me,rt-1).stateAfter,Lt=mt?hn.fromSaved(Me,mt,rt):new hn(Me,sn(Me.mode),rt);return Me.iter(rt,ce,function(Ct){xn(ie,Ct.text,Lt);var jt=Lt.line;Ct.stateAfter=jt==ce-1||jt%5==0||jt>=Fe.viewFrom&&jt<Fe.viewTo?Lt.save():null,Lt.nextLine()}),Te&&(Me.modeFrontier=Lt.line),Lt}function xn(ie,ce,Te,Me){var Fe=ie.doc.mode,rt=new Kt(ce,ie.options.tabSize,Te);for(rt.start=rt.pos=Me||0,ce==""&&Vn(Fe,Te.state);!rt.eol();)mi(Fe,rt,Te.state),rt.start=rt.pos}function Vn(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 mi(ie,ce,Te,Me){for(var Fe=0;Fe<10;Fe++){Me&&(Me[0]=Nt(ie,Te).mode);var rt=ie.token(ce,Te);if(ce.pos>ce.start)return rt}throw new Error("Mode "+ie.name+" failed to advance stream.")}var di=function(ie,ce,Te){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ce||null,this.state=Te};function gi(ie,ce,Te,Me){var Fe=ie.doc,rt=Fe.mode,mt;ce=An(Fe,ce);var Lt=_n(Fe,ce.line),Ct=Mr(ie,ce.line,Te),jt=new Kt(Lt.text,ie.options.tabSize,Ct),cn;for(Me&&(cn=[]);(Me||jt.pos<ce.ch)&&!jt.eol();)jt.start=jt.pos,mt=mi(rt,jt,Ct.state),Me&&cn.push(new di(jt,mt,Pt(Fe.mode,Ct.state)));return Me?cn:new di(jt,mt,Ct.state)}function Di(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 Ji(ie,ce,Te,Me,Fe,rt,mt){var Lt=Te.flattenSpans;Lt==null&&(Lt=ie.options.flattenSpans);var Ct=0,jt=null,cn=new Kt(ce,ie.options.tabSize,Me),Wt,Tn=ie.options.addModeClass&&[null];for(ce==""&&Di(Vn(Te,Me.state),rt);!cn.eol();){if(cn.pos>ie.options.maxHighlightLength?(Lt=!1,mt&&xn(ie,ce,Me,cn.pos),cn.pos=ce.length,Wt=null):Wt=Di(mi(Te,cn,Me.state,Tn),rt),Tn){var Ln=Tn[0].name;Ln&&(Wt="m-"+(Wt?Ln+" "+Wt:Ln))}if(!Lt||jt!=Wt){for(;Ct<cn.start;)Ct=Math.min(cn.start,Ct+5e3),Fe(Ct,jt);jt=Wt}cn.start=cn.pos}for(;Ct<cn.pos;){var fi=Math.min(cn.pos,Ct+5e3);Fe(fi,jt),Ct=fi}}function cr(ie,ce,Te){for(var Me,Fe,rt=ie.doc,mt=Te?-1:ce-(ie.doc.mode.innerMode?1e3:100),Lt=ce;Lt>mt;--Lt){if(Lt<=rt.first)return rt.first;var Ct=_n(rt,Lt-1),jt=Ct.stateAfter;if(jt&&(!Te||Lt+(jt instanceof bi?jt.lookAhead:0)<=rt.modeFrontier))return Lt;var cn=ut(Ct.text,null,ie.options.tabSize);(Fe==null||Me>cn)&&(Fe=Lt-1,Me=cn)}return Fe}function _r(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 bi)||Me+Fe.lookAhead<ce)){Te=Me+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,Te)}}var Rr=!1,Mn=!1;function Qr(){Rr=!0}function kn(){Mn=!0}function Ri(ie,ce,Te){this.marker=ie,this.from=ce,this.to=Te}function kr(ie,ce){if(ie)for(var Te=0;Te<ie.length;++Te){var Me=ie[Te];if(Me.marker==ce)return Me}}function mr(ie,ce){for(var Te,Me=0;Me<ie.length;++Me)ie[Me]!=ce&&(Te||(Te=[])).push(ie[Me]);return Te}function eo(ie,ce){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ce]):[ce],ce.marker.attachLine(ie)}function Tr(ie,ce,Te){var Me;if(ie)for(var Fe=0;Fe<ie.length;++Fe){var rt=ie[Fe],mt=rt.marker,Lt=rt.from==null||(mt.inclusiveLeft?rt.from<=ce:rt.from<ce);if(Lt||rt.from==ce&&mt.type=="bookmark"&&(!Te||!rt.marker.insertLeft)){var Ct=rt.to==null||(mt.inclusiveRight?rt.to>=ce:rt.to>ce);(Me||(Me=[])).push(new Ri(mt,rt.from,Ct?null:rt.to))}}return Me}function Sr(ie,ce,Te){var Me;if(ie)for(var Fe=0;Fe<ie.length;++Fe){var rt=ie[Fe],mt=rt.marker,Lt=rt.to==null||(mt.inclusiveRight?rt.to>=ce:rt.to>ce);if(Lt||rt.from==ce&&mt.type=="bookmark"&&(!Te||rt.marker.insertLeft)){var Ct=rt.from==null||(mt.inclusiveLeft?rt.from<=ce:rt.from<ce);(Me||(Me=[])).push(new Ri(mt,Ct?null:rt.from-ce,rt.to==null?null:rt.to-ce))}}return Me}function yo(ie,ce){if(ce.full)return null;var Te=En(ie,ce.from.line)&&_n(ie,ce.from.line).markedSpans,Me=En(ie,ce.to.line)&&_n(ie,ce.to.line).markedSpans;if(!Te&&!Me)return null;var Fe=ce.from.ch,rt=ce.to.ch,mt=gn(ce.from,ce.to)==0,Lt=Tr(Te,Fe,mt),Ct=Sr(Me,rt,mt),jt=ce.text.length==1,cn=It(ce.text).length+(jt?Fe:0);if(Lt)for(var Wt=0;Wt<Lt.length;++Wt){var Tn=Lt[Wt];if(Tn.to==null){var Ln=kr(Ct,Tn.marker);Ln?jt&&(Tn.to=Ln.to==null?null:Ln.to+cn):Tn.to=Fe}}if(Ct)for(var fi=0;fi<Ct.length;++fi){var Si=Ct[fi];if(Si.to!=null&&(Si.to+=cn),Si.from==null){var Ni=kr(Lt,Si.marker);Ni||(Si.from=cn,jt&&(Lt||(Lt=[])).push(Si))}else Si.from+=cn,jt&&(Lt||(Lt=[])).push(Si)}Lt&&(Lt=an(Lt)),Ct&&Ct!=Lt&&(Ct=an(Ct));var Qi=[Lt];if(!jt){var Lr=ce.text.length-2,ur;if(Lr>0&&Lt)for(var Ir=0;Ir<Lt.length;++Ir)Lt[Ir].to==null&&(ur||(ur=[])).push(new Ri(Lt[Ir].marker,null,null));for(var uo=0;uo<Lr;++uo)Qi.push(ur);Qi.push(Ct)}return Qi}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 On(ie,ce,Te){var Me=null;if(ie.iter(ce.line,Te.line+1,function(Ln){if(Ln.markedSpans)for(var fi=0;fi<Ln.markedSpans.length;++fi){var Si=Ln.markedSpans[fi].marker;Si.readOnly&&(!Me||ht(Me,Si)==-1)&&(Me||(Me=[])).push(Si)}}),!Me)return null;for(var Fe=[{from:ce,to:Te}],rt=0;rt<Me.length;++rt)for(var mt=Me[rt],Lt=mt.find(0),Ct=0;Ct<Fe.length;++Ct){var jt=Fe[Ct];if(!(gn(jt.to,Lt.from)<0||gn(jt.from,Lt.to)>0)){var cn=[Ct,1],Wt=gn(jt.from,Lt.from),Tn=gn(jt.to,Lt.to);(Wt<0||!mt.inclusiveLeft&&!Wt)&&cn.push({from:jt.from,to:Lt.from}),(Tn>0||!mt.inclusiveRight&&!Tn)&&cn.push({from:Lt.to,to:jt.to}),Fe.splice.apply(Fe,cn),Ct+=cn.length-3}}return Fe}function on(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 Wn(ie){return ie.inclusiveLeft?-1:0}function ii(ie){return ie.inclusiveRight?1:0}function Mi(ie,ce){var Te=ie.lines.length-ce.lines.length;if(Te!=0)return Te;var Me=ie.find(),Fe=ce.find(),rt=gn(Me.from,Fe.from)||Wn(ie)-Wn(ce);if(rt)return-rt;var mt=gn(Me.to,Fe.to)||ii(ie)-ii(ce);return mt||ce.id-ie.id}function vi(ie,ce){var Te=Mn&&ie.markedSpans,Me;if(Te)for(var Fe=void 0,rt=0;rt<Te.length;++rt)Fe=Te[rt],Fe.marker.collapsed&&(ce?Fe.from:Fe.to)==null&&(!Me||Mi(Me,Fe.marker)<0)&&(Me=Fe.marker);return Me}function hi(ie){return vi(ie,!0)}function Nn(ie){return vi(ie,!1)}function Yn(ie,ce){var Te=Mn&&ie.markedSpans,Me;if(Te)for(var Fe=0;Fe<Te.length;++Fe){var rt=Te[Fe];rt.marker.collapsed&&(rt.from==null||rt.from<ce)&&(rt.to==null||rt.to>ce)&&(!Me||Mi(Me,rt.marker)<0)&&(Me=rt.marker)}return Me}function qn(ie,ce,Te,Me,Fe){var rt=_n(ie,ce),mt=Mn&&rt.markedSpans;if(mt)for(var Lt=0;Lt<mt.length;++Lt){var Ct=mt[Lt];if(Ct.marker.collapsed){var jt=Ct.marker.find(0),cn=gn(jt.from,Te)||Wn(Ct.marker)-Wn(Fe),Wt=gn(jt.to,Me)||ii(Ct.marker)-ii(Fe);if(!(cn>=0&&Wt<=0||cn<=0&&Wt>=0)&&(cn<=0&&(Ct.marker.inclusiveRight&&Fe.inclusiveLeft?gn(jt.to,Te)>=0:gn(jt.to,Te)>0)||cn>=0&&(Ct.marker.inclusiveRight&&Fe.inclusiveLeft?gn(jt.from,Me)<=0:gn(jt.from,Me)<0)))return!0}}}function Bn(ie){for(var ce;ce=hi(ie);)ie=ce.find(-1,!0).line;return ie}function Jn(ie){for(var ce;ce=Nn(ie);)ie=ce.find(1,!0).line;return ie}function Ti(ie){for(var ce,Te;ce=Nn(ie);)ie=ce.find(1,!0).line,(Te||(Te=[])).push(ie);return Te}function ci(ie,ce){var Te=_n(ie,ce),Me=Bn(Te);return Te==Me?ce:wt(Me)}function ni(ie,ce){if(ce>ie.lastLine())return ce;var Te=_n(ie,ce),Me;if(!Pn(ie,Te))return ce;for(;Me=Nn(Te);)Te=Me.find(1,!0).line;return wt(Te)+1}function Pn(ie,ce){var Te=Mn&&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&&wi(ie,ce,Me))return!0}}}function wi(ie,ce,Te){if(Te.to==null){var Me=Te.marker.find(1,!0);return wi(ie,Me.line,kr(Me.line.markedSpans,Te.marker))}if(Te.marker.inclusiveRight&&Te.to==ce.text.length)return!0;for(var Fe=void 0,rt=0;rt<ce.markedSpans.length;++rt)if(Fe=ce.markedSpans[rt],Fe.marker.collapsed&&!Fe.marker.widgetNode&&Fe.from==Te.to&&(Fe.to==null||Fe.to!=Te.from)&&(Fe.marker.inclusiveLeft||Te.marker.inclusiveRight)&&wi(ie,ce,Fe))return!0}function ji(ie){ie=Bn(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 rt=Te.parent;rt;Te=rt,rt=Te.parent)for(var mt=0;mt<rt.children.length;++mt){var Lt=rt.children[mt];if(Lt==Te)break;ce+=Lt.height}return ce}function br(ie){if(ie.height==0)return 0;for(var ce=ie.text.length,Te,Me=ie;Te=hi(Me);){var Fe=Te.find(0,!0);Me=Fe.from.line,ce+=Fe.from.ch-Fe.to.ch}for(Me=ie;Te=Nn(Me);){var rt=Te.find(0,!0);ce-=Me.text.length-rt.from.ch,Me=rt.to.line,ce+=Me.text.length-rt.to.ch}return ce}function nr(ie){var ce=ie.display,Te=ie.doc;ce.maxLine=_n(Te,Te.first),ce.maxLineLength=br(ce.maxLine),ce.maxLineChanged=!0,Te.iter(function(Me){var Fe=br(Me);Fe>ce.maxLineLength&&(ce.maxLineLength=Fe,ce.maxLine=Me)})}var Zr=function(ie,ce,Te){this.text=ie,ft(this,ce),this.height=Te?Te(this):1};Zr.prototype.lineNo=function(){return wt(this)},Hn(Zr);function zr(ie,ce,Te,Me){ie.text=ce,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),on(ie),ft(ie,Te);var Fe=Me?Me(ie):1;Fe!=ie.height&&Bi(ie,Fe)}function Ur(ie){ie.parent=null,on(ie)}var to={},Jr={};function ko(ie,ce){if(!ie||/^\s*$/.test(ie))return null;var Te=ce.addModeClass?Jr:to;return Te[ie]||(Te[ie]=ie.replace(/\S+/g,"cm-$&"))}function rn(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 rt=Fe?ce.rest[Fe-1]:ce.line,mt=void 0;Me.pos=0,Me.addToken=Hr,Zi(ie.display.measure)&&(mt=Qt(rt,ie.doc.direction))&&(Me.addToken=yr(Me.addToken,mt)),Me.map=[];var Lt=ce!=ie.display.externalMeasured&&wt(rt);co(rt,Me,lr(ie,rt,Lt)),rt.styleClasses&&(rt.styleClasses.bgClass&&(Me.bgClass=at(rt.styleClasses.bgClass,Me.bgClass||"")),rt.styleClasses.textClass&&(Me.textClass=at(rt.styleClasses.textClass,Me.textClass||""))),Me.map.length==0&&Me.map.push(0,0,Me.content.appendChild(wr(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 Ct=Me.content.lastChild;(/\bcm-tab\b/.test(Ct.className)||Ct.querySelector&&Ct.querySelector(".cm-tab"))&&(Me.content.className="cm-tab-wrap-hack")}return mn(ie,"renderLine",ie,ce.line,Me.pre),Me.pre.className&&(Me.textClass=at(Me.pre.className,Me.textClass||"")),Me}function Kr(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 Hr(ie,ce,Te,Me,Fe,rt,mt){if(ce){var Lt=ie.splitSpaces?sr(ce,ie.trailingSpace):ce,Ct=ie.cm.state.specialChars,jt=!1,cn;if(!Ct.test(ce))ie.col+=ce.length,cn=document.createTextNode(Lt),ie.map.push(ie.pos,ie.pos+ce.length,cn),Ce&&xe<9&&(jt=!0),ie.pos+=ce.length;else{cn=document.createDocumentFragment();for(var Wt=0;;){Ct.lastIndex=Wt;var Tn=Ct.exec(ce),Ln=Tn?Tn.index-Wt:ce.length-Wt;if(Ln){var fi=document.createTextNode(Lt.slice(Wt,Wt+Ln));Ce&&xe<9?cn.appendChild(Ze("span",[fi])):cn.appendChild(fi),ie.map.push(ie.pos,ie.pos+Ln,fi),ie.col+=Ln,ie.pos+=Ln}if(!Tn)break;Wt+=Ln+1;var Si=void 0;if(Tn[0]==" "){var Ni=ie.cm.options.tabSize,Qi=Ni-ie.col%Ni;Si=cn.appendChild(Ze("span",fn(Qi),"cm-tab")),Si.setAttribute("role","presentation"),Si.setAttribute("cm-text"," "),ie.col+=Qi}else Tn[0]=="\r"||Tn[0]==`
`?(Si=cn.appendChild(Ze("span",Tn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Si.setAttribute("cm-text",Tn[0]),ie.col+=1):(Si=ie.cm.options.specialCharPlaceholder(Tn[0]),Si.setAttribute("cm-text",Tn[0]),Ce&&xe<9?cn.appendChild(Ze("span",[Si])):cn.appendChild(Si),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,Si),ie.pos++}}if(ie.trailingSpace=Lt.charCodeAt(ce.length-1)==32,Te||Me||Fe||jt||rt||mt){var Lr=Te||"";Me&&(Lr+=Me),Fe&&(Lr+=Fe);var ur=Ze("span",[cn],Lr,rt);if(mt)for(var Ir in mt)mt.hasOwnProperty(Ir)&&Ir!="style"&&Ir!="class"&&ur.setAttribute(Ir,mt[Ir]);return ie.content.appendChild(ur)}ie.content.appendChild(cn)}}function sr(ie,ce){if(ie.length>1&&!/ /.test(ie))return ie;for(var Te=ce,Me="",Fe=0;Fe<ie.length;Fe++){var rt=ie.charAt(Fe);rt==" "&&Te&&(Fe==ie.length-1||ie.charCodeAt(Fe+1)==32)&&(rt="\xA0"),Me+=rt,Te=rt==" "}return Me}function yr(ie,ce){return function(Te,Me,Fe,rt,mt,Lt,Ct){Fe=Fe?Fe+" cm-force-border":"cm-force-border";for(var jt=Te.pos,cn=jt+Me.length;;){for(var Wt=void 0,Tn=0;Tn<ce.length&&(Wt=ce[Tn],!(Wt.to>jt&&Wt.from<=jt));Tn++);if(Wt.to>=cn)return ie(Te,Me,Fe,rt,mt,Lt,Ct);ie(Te,Me.slice(0,Wt.to-jt),Fe,rt,null,Lt,Ct),rt=null,Me=Me.slice(Wt.to-jt),jt=Wt.to}}}function fr(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 co(ie,ce,Te){var Me=ie.markedSpans,Fe=ie.text,rt=0;if(!Me){for(var mt=1;mt<Te.length;mt+=2)ce.addToken(ce,Fe.slice(rt,rt=Te[mt]),ko(Te[mt+1],ce.cm.options));return}for(var Lt=Fe.length,Ct=0,jt=1,cn="",Wt,Tn,Ln=0,fi,Si,Ni,Qi,Lr;;){if(Ln==Ct){fi=Si=Ni=Tn="",Lr=null,Qi=null,Ln=1/0;for(var ur=[],Ir=void 0,uo=0;uo<Me.length;++uo){var ar=Me[uo],Bo=ar.marker;if(Bo.type=="bookmark"&&ar.from==Ct&&Bo.widgetNode)ur.push(Bo);else if(ar.from<=Ct&&(ar.to==null||ar.to>Ct||Bo.collapsed&&ar.to==Ct&&ar.from==Ct)){if(ar.to!=null&&ar.to!=Ct&&Ln>ar.to&&(Ln=ar.to,Si=""),Bo.className&&(fi+=" "+Bo.className),Bo.css&&(Tn=(Tn?Tn+";":"")+Bo.css),Bo.startStyle&&ar.from==Ct&&(Ni+=" "+Bo.startStyle),Bo.endStyle&&ar.to==Ln&&(Ir||(Ir=[])).push(Bo.endStyle,ar.to),Bo.title&&((Lr||(Lr={})).title=Bo.title),Bo.attributes)for(var Fs in Bo.attributes)(Lr||(Lr={}))[Fs]=Bo.attributes[Fs];Bo.collapsed&&(!Qi||Mi(Qi.marker,Bo)<0)&&(Qi=ar)}else ar.from>Ct&&Ln>ar.from&&(Ln=ar.from)}if(Ir)for(var La=0;La<Ir.length;La+=2)Ir[La+1]==Ln&&(Si+=" "+Ir[La]);if(!Qi||Qi.from==Ct)for(var Xs=0;Xs<ur.length;++Xs)fr(ce,0,ur[Xs]);if(Qi&&(Qi.from||0)==Ct){if(fr(ce,(Qi.to==null?Lt+1:Qi.to)-Ct,Qi.marker,Qi.from==null),Qi.to==null)return;Qi.to==Ct&&(Qi=!1)}}if(Ct>=Lt)break;for(var Ml=Math.min(Lt,Ln);;){if(cn){var al=Ct+cn.length;if(!Qi){var wa=al>Ml?cn.slice(0,Ml-Ct):cn;ce.addToken(ce,wa,Wt?Wt+fi:fi,Ni,Ct+wa.length==Ln?Si:"",Tn,Lr)}if(al>=Ml){cn=cn.slice(Ml-Ct),Ct=Ml;break}Ct=al,Ni=""}cn=Fe.slice(rt,rt=Te[jt++]),Wt=ko(Te[jt++],ce.cm.options)}}}function fo(ie,ce,Te){this.line=ce,this.rest=Ti(ce),this.size=this.rest?wt(It(this.rest))-Te+1:1,this.node=this.text=null,this.hidden=Pn(ie,ce)}function Er(ie,ce,Te){for(var Me=[],Fe,rt=ce;rt<Te;rt=Fe){var mt=new fo(ie.doc,_n(ie.doc,rt),rt);Fe=rt+mt.size,Me.push(mt)}return Me}var no=null;function Qs(ie){no?no.ops.push(ie):ie.ownsGroup=no={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 Aa(ie,ce){var Te=ie.ownsGroup;if(Te)try{us(Te)}finally{no=null,ce(Te)}}var oa=null;function $i(ie,ce){var Te=$t(ie,ce);if(Te.length){var Me=Array.prototype.slice.call(arguments,2),Fe;no?Fe=no.delayedCallbacks:oa?Fe=oa:(Fe=oa=[],setTimeout(ns,0));for(var rt=function(Lt){Fe.push(function(){return Te[Lt].apply(null,Me)})},mt=0;mt<Te.length;++mt)rt(mt)}}function ns(){var ie=oa;oa=null;for(var ce=0;ce<ie.length;++ce)ie[ce]()}function ss(ie,ce,Te,Me){for(var Fe=0;Fe<ce.changes.length;Fe++){var rt=ce.changes[Fe];rt=="text"?li(ie,ce):rt=="gutter"?Pr(ie,ce,Te,Me):rt=="class"?er(ie,ce):rt=="widget"&&jr(ie,ce,Me)}ce.changes=null}function zs(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 hs(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=zs(ce);ce.background=Me.insertBefore(Ze("div",null,Te),Me.firstChild),ie.display.input.setUneditable(ce.background)}}function Ms(ie,ce){var Te=ie.display.externalMeasured;return Te&&Te.line==ce.line?(ie.display.externalMeasured=null,ce.measure=Te.measure,Te.built):rn(ie,ce)}function li(ie,ce){var Te=ce.text.className,Me=Ms(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,er(ie,ce)):Te&&(ce.text.className=Te)}function er(ie,ce){hs(ie,ce),ce.line.wrapClass?zs(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 Pr(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=zs(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 rt=ce.line.gutterMarkers;if(ie.options.lineNumbers||rt){var mt=zs(ce),Lt=ce.gutter=Ze("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?Me.fixedPos:-Me.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(Lt),mt.insertBefore(Lt,ce.text),ce.line.gutterClass&&(Lt.className+=" "+ce.line.gutterClass),ie.options.lineNumbers&&(!rt||!rt["CodeMirror-linenumbers"])&&(ce.lineNumber=Lt.appendChild(Ze("div",bn(ie.options,Te),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Me.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),rt)for(var Ct=0;Ct<ie.display.gutterSpecs.length;++Ct){var jt=ie.display.gutterSpecs[Ct].className,cn=rt.hasOwnProperty(jt)&&rt[jt];cn&&Lt.appendChild(Ze("div",[cn],"CodeMirror-gutter-elt","left: "+Me.gutterLeft[jt]+"px; width: "+Me.gutterWidth[jt]+"px"))}}}function jr(ie,ce,Te){ce.alignable&&(ce.alignable=null);for(var Me=Pe("CodeMirror-linewidget"),Fe=ce.node.firstChild,rt=void 0;Fe;Fe=rt)rt=Fe.nextSibling,Me.test(Fe.className)&&ce.node.removeChild(Fe);jo(ie,ce,Te)}function $r(ie,ce,Te,Me){var Fe=Ms(ie,ce);return ce.text=ce.node=Fe.pre,Fe.bgClass&&(ce.bgClass=Fe.bgClass),Fe.textClass&&(ce.textClass=Fe.textClass),er(ie,ce),Pr(ie,ce,Te,Me),jo(ie,ce,Me),ce.node}function jo(ie,ce,Te){if(tr(ie,ce.line,ce,Te,!0),ce.rest)for(var Me=0;Me<ce.rest.length;Me++)tr(ie,ce.rest[Me],ce,Te,!1)}function tr(ie,ce,Te,Me,Fe){if(ce.widgets)for(var rt=zs(Te),mt=0,Lt=ce.widgets;mt<Lt.length;++mt){var Ct=Lt[mt],jt=Ze("div",[Ct.node],"CodeMirror-linewidget"+(Ct.className?" "+Ct.className:""));Ct.handleMouseEvents||jt.setAttribute("cm-ignore-events","true"),pa(Ct,jt,Te,Me),ie.display.input.setUneditable(jt),Fe&&Ct.above?rt.insertBefore(jt,Te.gutter||Te.text):rt.appendChild(jt),$i(Ct,"redraw")}}function pa(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 ps(ie){if(ie.height!=null)return ie.height;var ce=ie.doc.cm;if(!ce)return 0;if(!vt(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;"),Oe(ce.display.measure,Ze("div",[ie.node],null,Te))}return ie.height=ie.node.parentNode.offsetHeight}function cs(ie,ce){for(var Te=Wi(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 io(ie){return ie.lineSpace.offsetTop}function ws(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function ga(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ce=Oe(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 is(ie){return yt-ie.display.nativeBarWidth}function Pa(ie){return ie.display.scroller.clientWidth-is(ie)-ie.display.barWidth}function Sa(ie){return ie.display.scroller.clientHeight-is(ie)-ie.display.barHeight}function Na(ie,ce,Te){var Me=ie.options.lineWrapping,Fe=Me&&Pa(ie);if(!ce.measure.heights||Me&&ce.measure.width!=Fe){var rt=ce.measure.heights=[];if(Me){ce.measure.width=Fe;for(var mt=ce.text.firstChild.getClientRects(),Lt=0;Lt<mt.length-1;Lt++){var Ct=mt[Lt],jt=mt[Lt+1];Math.abs(Ct.bottom-jt.bottom)>2&&rt.push((Ct.bottom+jt.top)/2-Te.top)}}rt.push(Te.bottom-Te.top)}}function _s(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(wt(ie.rest[Fe])>Te)return{map:ie.measure.maps[Fe],cache:ie.measure.caches[Fe],before:!0}}function nl(ie,ce){ce=Bn(ce);var Te=wt(ce),Me=ie.display.externalMeasured=new fo(ie.doc,ce,Te);Me.lineN=Te;var Fe=Me.built=rn(ie,Me);return Me.text=Fe.pre,Oe(ie.display.lineMeasure,Fe.pre),Me}function Hu(ie,ce,Te,Me){return il(ie,Ol(ie,ce),Te,Me)}function fl(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 Ol(ie,ce){var Te=wt(ce),Me=fl(ie,Te);Me&&!Me.text?Me=null:Me&&Me.changes&&(ss(ie,Me,Te,bl(ie)),ie.curOp.forceUpdate=!0),Me||(Me=nl(ie,ce));var Fe=_s(Me,ce,Te);return{line:ce,view:Me,rect:null,map:Fe.map,cache:Fe.cache,before:Fe.before,hasHeights:!1}}function il(ie,ce,Te,Me,Fe){ce.before&&(Te=-1);var rt=Te+(Me||""),mt;return ce.cache.hasOwnProperty(rt)?mt=ce.cache[rt]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(Na(ie,ce.view,ce.rect),ce.hasHeights=!0),mt=As(ie,ce,Te,Me),mt.bogus||(ce.cache[rt]=mt)),{left:mt.left,right:mt.right,top:Fe?mt.rtop:mt.top,bottom:Fe?mt.rbottom:mt.bottom}}var Pu={left:0,right:0,top:0,bottom:0};function eh(ie,ce,Te){for(var Me,Fe,rt,mt,Lt,Ct,jt=0;jt<ie.length;jt+=3)if(Lt=ie[jt],Ct=ie[jt+1],ce<Lt?(Fe=0,rt=1,mt="left"):ce<Ct?(Fe=ce-Lt,rt=Fe+1):(jt==ie.length-3||ce==Ct&&ie[jt+3]>ce)&&(rt=Ct-Lt,Fe=rt-1,ce>=Ct&&(mt="right")),Fe!=null){if(Me=ie[jt+2],Lt==Ct&&Te==(Me.insertLeft?"left":"right")&&(mt=Te),Te=="left"&&Fe==0)for(;jt&&ie[jt-2]==ie[jt-3]&&ie[jt-1].insertLeft;)Me=ie[(jt-=3)+2],mt="left";if(Te=="right"&&Fe==Ct-Lt)for(;jt<ie.length-3&&ie[jt+3]==ie[jt+4]&&!ie[jt+5].insertLeft;)Me=ie[(jt+=3)+2],mt="right";break}return{node:Me,start:Fe,end:rt,collapse:mt,coverStart:Lt,coverEnd:Ct}}function lu(ie,ce){var Te=Pu;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 As(ie,ce,Te,Me){var Fe=eh(ce.map,Te,Me),rt=Fe.node,mt=Fe.start,Lt=Fe.end,Ct=Fe.collapse,jt;if(rt.nodeType==3){for(var cn=0;cn<4;cn++){for(;mt&&je(ce.line.text.charAt(Fe.coverStart+mt));)--mt;for(;Fe.coverStart+Lt<Fe.coverEnd&&je(ce.line.text.charAt(Fe.coverStart+Lt));)++Lt;if(Ce&&xe<9&&mt==0&&Lt==Fe.coverEnd-Fe.coverStart?jt=rt.parentNode.getBoundingClientRect():jt=lu(Xe(rt,mt,Lt).getClientRects(),Me),jt.left||jt.right||mt==0)break;Lt=mt,mt=mt-1,Ct="right"}Ce&&xe<11&&(jt=Gu(ie.display.measure,jt))}else{mt>0&&(Ct=Me="right");var Wt;ie.options.lineWrapping&&(Wt=rt.getClientRects()).length>1?jt=Wt[Me=="right"?Wt.length-1:0]:jt=rt.getBoundingClientRect()}if(Ce&&xe<9&&!mt&&(!jt||!jt.left&&!jt.right)){var Tn=rt.parentNode.getClientRects()[0];Tn?jt={left:Tn.left,right:Tn.left+rl(ie.display),top:Tn.top,bottom:Tn.bottom}:jt=Pu}for(var Ln=jt.top-ce.rect.top,fi=jt.bottom-ce.rect.top,Si=(Ln+fi)/2,Ni=ce.view.measure.heights,Qi=0;Qi<Ni.length-1&&!(Si<Ni[Qi]);Qi++);var Lr=Qi?Ni[Qi-1]:0,ur=Ni[Qi],Ir={left:(Ct=="right"?jt.right:jt.left)-ce.rect.left,right:(Ct=="left"?jt.left:jt.right)-ce.rect.left,top:Lr,bottom:ur};return!jt.left&&!jt.right&&(Ir.bogus=!0),ie.options.singleCursorHeightPerLine||(Ir.rtop=Ln,Ir.rbottom=fi),Ir}function Gu(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 uu(ie){ie.display.externalMeasure=null,De(ie.display.lineMeasure);for(var ce=0;ce<ie.display.view.length;ce++)th(ie.display.view[ce])}function hu(ie){uu(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function ua(){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 Os(ie){var ce=0;if(ie.widgets)for(var Te=0;Te<ie.widgets.length;++Te)ie.widgets[Te].above&&(ce+=ps(ie.widgets[Te]));return ce}function $s(ie,ce,Te,Me,Fe){if(!Fe){var rt=Os(ce);Te.top+=rt,Te.bottom+=rt}if(Me=="line")return Te;Me||(Me="local");var mt=ji(ce);if(Me=="local"?mt+=io(ie.display):mt-=ie.display.viewOffset,Me=="page"||Me=="window"){var Lt=ie.display.lineSpace.getBoundingClientRect();mt+=Lt.top+(Me=="window"?0:ma());var Ct=Lt.left+(Me=="window"?0:ua());Te.left+=Ct,Te.right+=Ct}return Te.top+=mt,Te.bottom+=mt,Te}function Il(ie,ce,Te){if(Te=="div")return ce;var Me=ce.left,Fe=ce.top;if(Te=="page")Me-=ua(),Fe-=ma();else if(Te=="local"||!Te){var rt=ie.display.sizer.getBoundingClientRect();Me+=rt.left,Fe+=rt.top}var mt=ie.display.lineSpace.getBoundingClientRect();return{left:Me-mt.left,top:Fe-mt.top}}function Ca(ie,ce,Te,Me,Fe){return Me||(Me=_n(ie.doc,ce.line)),$s(ie,Me,Hu(ie,Me,ce.ch,Fe),Te)}function Yo(ie,ce,Te,Me,Fe,rt){Me=Me||_n(ie.doc,ce.line),Fe||(Fe=Ol(ie,Me));function mt(fi,Si){var Ni=il(ie,Fe,fi,Si?"right":"left",rt);return Si?Ni.left=Ni.right:Ni.right=Ni.left,$s(ie,Me,Ni,Te)}var Lt=Qt(Me,ie.doc.direction),Ct=ce.ch,jt=ce.sticky;if(Ct>=Me.text.length?(Ct=Me.text.length,jt="before"):Ct<=0&&(Ct=0,jt="after"),!Lt)return mt(jt=="before"?Ct-1:Ct,jt=="before");function cn(fi,Si,Ni){var Qi=Lt[Si],Lr=Qi.level==1;return mt(Ni?fi-1:fi,Lr!=Ni)}var Wt=pt(Lt,Ct,jt),Tn=We,Ln=cn(Ct,Wt,jt=="before");return Tn!=null&&(Ln.other=cn(Ct,Tn,jt!="before")),Ln}function zo(ie,ce){var Te=0;ce=An(ie.doc,ce),ie.options.lineWrapping||(Te=rl(ie.display)*ce.ch);var Me=_n(ie.doc,ce.line),Fe=ji(Me)+io(ie.display);return{left:Te,right:Te,top:Fe,bottom:Fe+Me.height}}function wo(ie,ce,Te,Me,Fe){var rt=Yt(ie,ce,Te);return rt.xRel=Fe,Me&&(rt.outside=Me),rt}function Us(ie,ce,Te){var Me=ie.doc;if(Te+=ie.display.viewOffset,Te<0)return wo(Me.first,0,null,-1,-1);var Fe=zt(Me,Te),rt=Me.first+Me.size-1;if(Fe>rt)return wo(Me.first+Me.size-1,_n(Me,rt).text.length,null,1,1);ce<0&&(ce=0);for(var mt=_n(Me,Fe);;){var Lt=In(ie,mt,Fe,ce,Te),Ct=Yn(mt,Lt.ch+(Lt.xRel>0||Lt.outside>0?1:0));if(!Ct)return Lt;var jt=Ct.find(1);if(jt.line==Fe)return jt;mt=_n(Me,Fe=jt.line)}}function Fi(ie,ce,Te,Me){Me-=Os(ce);var Fe=ce.text.length,rt=Qe(function(mt){return il(ie,Te,mt-1).bottom<=Me},Fe,0);return Fe=Qe(function(mt){return il(ie,Te,mt).top>Me},rt,Fe),{begin:rt,end:Fe}}function Hs(ie,ce,Te,Me){Te||(Te=Ol(ie,ce));var Fe=$s(ie,ce,il(ie,Te,Me),"line").top;return Fi(ie,ce,Te,Fe)}function Zt(ie,ce,Te,Me){return ie.bottom<=Te?!1:ie.top>Te?!0:(Me?ie.left:ie.right)>ce}function In(ie,ce,Te,Me,Fe){Fe-=ji(ce);var rt=Ol(ie,ce),mt=Os(ce),Lt=0,Ct=ce.text.length,jt=!0,cn=Qt(ce,ie.doc.direction);if(cn){var Wt=(ie.options.lineWrapping?Kl:pl)(ie,ce,Te,rt,cn,Me,Fe);jt=Wt.level!=1,Lt=jt?Wt.from:Wt.to-1,Ct=jt?Wt.to:Wt.from-1}var Tn=null,Ln=null,fi=Qe(function(uo){var ar=il(ie,rt,uo);return ar.top+=mt,ar.bottom+=mt,Zt(ar,Me,Fe,!1)?(ar.top<=Fe&&ar.left<=Me&&(Tn=uo,Ln=ar),!0):!1},Lt,Ct),Si,Ni,Qi=!1;if(Ln){var Lr=Me-Ln.left<Ln.right-Me,ur=Lr==jt;fi=Tn+(ur?0:1),Ni=ur?"after":"before",Si=Lr?Ln.left:Ln.right}else{!jt&&(fi==Ct||fi==Lt)&&fi++,Ni=fi==0?"after":fi==ce.text.length?"before":il(ie,rt,fi-(jt?1:0)).bottom+mt<=Fe==jt?"after":"before";var Ir=Yo(ie,Yt(Te,fi,Ni),"line",ce,rt);Si=Ir.left,Qi=Fe<Ir.top?-1:Fe>=Ir.bottom?1:0}return fi=Re(ce.text,fi,1),wo(Te,fi,Ni,Qi,Me-Si)}function pl(ie,ce,Te,Me,Fe,rt,mt){var Lt=Qe(function(Wt){var Tn=Fe[Wt],Ln=Tn.level!=1;return Zt(Yo(ie,Yt(Te,Ln?Tn.to:Tn.from,Ln?"before":"after"),"line",ce,Me),rt,mt,!0)},0,Fe.length-1),Ct=Fe[Lt];if(Lt>0){var jt=Ct.level!=1,cn=Yo(ie,Yt(Te,jt?Ct.from:Ct.to,jt?"after":"before"),"line",ce,Me);Zt(cn,rt,mt,!0)&&cn.top>mt&&(Ct=Fe[Lt-1])}return Ct}function Kl(ie,ce,Te,Me,Fe,rt,mt){var Lt=Fi(ie,ce,Me,mt),Ct=Lt.begin,jt=Lt.end;/\s/.test(ce.text.charAt(jt-1))&&jt--;for(var cn=null,Wt=null,Tn=0;Tn<Fe.length;Tn++){var Ln=Fe[Tn];if(!(Ln.from>=jt||Ln.to<=Ct)){var fi=Ln.level!=1,Si=il(ie,Me,fi?Math.min(jt,Ln.to)-1:Math.max(Ct,Ln.from)).right,Ni=Si<rt?rt-Si+1e9:Si-rt;(!cn||Wt>Ni)&&(cn=Ln,Wt=Ni)}}return cn||(cn=Fe[Fe.length-1]),cn.from<Ct&&(cn={from:Ct,to:cn.to,level:cn.level}),cn.to>jt&&(cn={from:cn.from,to:jt,level:cn.level}),cn}var Ns;function sa(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(Ns==null){Ns=Ze("pre",null,"CodeMirror-line-like");for(var ce=0;ce<49;++ce)Ns.appendChild(document.createTextNode("x")),Ns.appendChild(Ze("br"));Ns.appendChild(document.createTextNode("x"))}Oe(ie.measure,Ns);var Te=Ns.offsetHeight/50;return Te>3&&(ie.cachedTextHeight=Te),De(ie.measure),Te||1}function rl(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ce=Ze("span","xxxxxxxxxx"),Te=Ze("pre",[ce],"CodeMirror-line-like");Oe(ie.measure,Te);var Me=ce.getBoundingClientRect(),Fe=(Me.right-Me.left)/10;return Fe>2&&(ie.cachedCharWidth=Fe),Fe||10}function bl(ie){for(var ce=ie.display,Te={},Me={},Fe=ce.gutters.clientLeft,rt=ce.gutters.firstChild,mt=0;rt;rt=rt.nextSibling,++mt){var Lt=ie.display.gutterSpecs[mt].className;Te[Lt]=rt.offsetLeft+rt.clientLeft+Fe,Me[Lt]=rt.clientWidth}return{fixedPos:Cu(ce),gutterTotalWidth:ce.gutters.offsetWidth,gutterLeft:Te,gutterWidth:Me,wrapperWidth:ce.wrapper.clientWidth}}function Cu(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function gs(ie){var ce=sa(ie.display),Te=ie.options.lineWrapping,Me=Te&&Math.max(5,ie.display.scroller.clientWidth/rl(ie.display)-3);return function(Fe){if(Pn(ie.doc,Fe))return 0;var rt=0;if(Fe.widgets)for(var mt=0;mt<Fe.widgets.length;mt++)Fe.widgets[mt].height&&(rt+=Fe.widgets[mt].height);return Te?rt+(Math.ceil(Fe.text.length/Me)||1)*ce:rt+ce}}function Fr(ie){var ce=ie.doc,Te=gs(ie);ce.iter(function(Me){var Fe=Te(Me);Fe!=Me.height&&Bi(Me,Fe)})}function va(ie,ce,Te,Me){var Fe=ie.display;if(!Te&&Wi(ce).getAttribute("cm-not-content")=="true")return null;var rt,mt,Lt=Fe.lineSpace.getBoundingClientRect();try{rt=ce.clientX-Lt.left,mt=ce.clientY-Lt.top}catch(Wt){return null}var Ct=Us(ie,rt,mt),jt;if(Me&&Ct.xRel>0&&(jt=_n(ie.doc,Ct.line).text).length==Ct.ch){var cn=ut(jt,jt.length,ie.options.tabSize)-jt.length;Ct=Yt(Ct.line,Math.max(0,Math.round((rt-ga(ie.display).left)/rl(ie.display))-cn))}return Ct}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 ms(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)Mn&&ci(ie.doc,ce)<Fe.viewTo&&bs(ie);else if(Te<=Fe.viewFrom)Mn&&ni(ie.doc,Te+Me)>Fe.viewFrom?bs(ie):(Fe.viewFrom+=Me,Fe.viewTo+=Me);else if(ce<=Fe.viewFrom&&Te>=Fe.viewTo)bs(ie);else if(ce<=Fe.viewFrom){var rt=Da(ie,Te,Te+Me,1);rt?(Fe.view=Fe.view.slice(rt.index),Fe.viewFrom=rt.lineN,Fe.viewTo+=Me):bs(ie)}else if(Te>=Fe.viewTo){var mt=Da(ie,ce,ce,-1);mt?(Fe.view=Fe.view.slice(0,mt.index),Fe.viewTo=mt.lineN):bs(ie)}else{var Lt=Da(ie,ce,ce,-1),Ct=Da(ie,Te,Te+Me,1);Lt&&Ct?(Fe.view=Fe.view.slice(0,Lt.index).concat(Er(ie,Lt.lineN,Ct.lineN)).concat(Fe.view.slice(Ct.index)),Fe.viewTo+=Me):bs(ie)}var jt=Fe.externalMeasured;jt&&(Te<jt.lineN?jt.lineN+=Me:ce<jt.lineN+jt.size&&(Fe.externalMeasured=null))}function ro(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 rt=Me.view[Is(ie,ce)];if(rt.node!=null){var mt=rt.changes||(rt.changes=[]);ht(mt,Te)==-1&&mt.push(Te)}}}function bs(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Da(ie,ce,Te,Me){var Fe=Is(ie,ce),rt,mt=ie.display.view;if(!Mn||Te==ie.doc.first+ie.doc.size)return{index:Fe,lineN:Te};for(var Lt=ie.display.viewFrom,Ct=0;Ct<Fe;Ct++)Lt+=mt[Ct].size;if(Lt!=ce){if(Me>0){if(Fe==mt.length-1)return null;rt=Lt+mt[Fe].size-ce,Fe++}else rt=Lt-ce;ce+=rt,Te+=rt}for(;ci(ie.doc,Te)!=Te;){if(Fe==(Me<0?0:mt.length-1))return null;Te+=Me*mt[Fe-(Me<0?1:0)].size,Fe+=Me}return{index:Fe,lineN:Te}}function Xo(ie,ce,Te){var Me=ie.display,Fe=Me.view;Fe.length==0||ce>=Me.viewTo||Te<=Me.viewFrom?(Me.view=Er(ie,ce,Te),Me.viewFrom=ce):(Me.viewFrom>ce?Me.view=Er(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(Er(ie,Me.viewTo,Te)):Me.viewTo>Te&&(Me.view=Me.view.slice(0,Is(ie,Te)))),Me.viewTo=Te}function Ka(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 ea(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function Eu(ie,ce){ce===void 0&&(ce=!0);for(var Te=ie.doc,Me={},Fe=Me.cursors=document.createDocumentFragment(),rt=Me.selection=document.createDocumentFragment(),mt=0;mt<Te.sel.ranges.length;mt++)if(!(!ce&&mt==Te.sel.primIndex)){var Lt=Te.sel.ranges[mt];if(!(Lt.from().line>=ie.display.viewTo||Lt.to().line<ie.display.viewFrom)){var Ct=Lt.empty();(Ct||ie.options.showCursorWhenSelecting)&&Io(ie,Lt.head,Fe),Ct||Ro(ie,Lt,rt)}}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 rt=Te.appendChild(Ze("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));rt.style.display="",rt.style.left=Me.other.left+"px",rt.style.top=Me.other.top+"px",rt.style.height=(Me.other.bottom-Me.other.top)*.85+"px"}}function ha(ie,ce){return ie.top-ce.top||ie.left-ce.left}function Ro(ie,ce,Te){var Me=ie.display,Fe=ie.doc,rt=document.createDocumentFragment(),mt=ga(ie.display),Lt=mt.left,Ct=Math.max(Me.sizerWidth,Pa(ie)-Me.sizer.offsetLeft)-mt.right,jt=Fe.direction=="ltr";function cn(ur,Ir,uo,ar){Ir<0&&(Ir=0),Ir=Math.round(Ir),ar=Math.round(ar),rt.appendChild(Ze("div",null,"CodeMirror-selected","position: absolute; left: "+ur+`px;
top: `+Ir+"px; width: "+(uo==null?Ct-ur:uo)+`px;
height: `+(ar-Ir)+"px"))}function Wt(ur,Ir,uo){var ar=_n(Fe,ur),Bo=ar.text.length,Fs,La;function Xs(wa,Bl){return Ca(ie,Yt(ur,wa),"div",ar,Bl)}function Ml(wa,Bl,Ja){var _a=Hs(ie,ar,null,wa),os=Bl=="ltr"==(Ja=="after")?"left":"right",na=Ja=="after"?_a.begin:_a.end-(/\s/.test(ar.text.charAt(_a.end-1))?2:1);return Xs(na,os)[os]}var al=Qt(ar,Fe.direction);return Ve(al,Ir||0,uo==null?Bo:uo,function(wa,Bl,Ja,_a){var os=Ja=="ltr",na=Xs(wa,os?"left":"right"),Ra=Xs(Bl-1,os?"right":"left"),qa=Ir==null&&wa==0,Nu=uo==null&&Bl==Bo,Js=_a==0,gu=!al||_a==al.length-1;if(Ra.top-na.top<=3){var la=(jt?qa:Nu)&&Js,Zd=(jt?Nu:qa)&&gu,eu=la?Lt:(os?na:Ra).left,jl=Zd?Ct:(os?Ra:na).right;cn(eu,na.top,jl-eu,na.bottom)}else{var kl,Cs,Fa,hh;os?(kl=jt&&qa&&Js?Lt:na.left,Cs=jt?Ct:Ml(wa,Ja,"before"),Fa=jt?Lt:Ml(Bl,Ja,"after"),hh=jt&&Nu&&gu?Ct:Ra.right):(kl=jt?Ml(wa,Ja,"before"):Lt,Cs=!jt&&qa&&Js?Ct:na.right,Fa=!jt&&Nu&&gu?Lt:Ra.left,hh=jt?Ml(Bl,Ja,"after"):Ct),cn(kl,na.top,Cs-kl,na.bottom),na.bottom<Ra.top&&cn(Lt,na.bottom,null,Ra.top),cn(Fa,Ra.top,hh-Fa,Ra.bottom)}(!Fs||ha(na,Fs)<0)&&(Fs=na),ha(Ra,Fs)<0&&(Fs=Ra),(!La||ha(na,La)<0)&&(La=na),ha(Ra,La)<0&&(La=Ra)}),{start:Fs,end:La}}var Tn=ce.from(),Ln=ce.to();if(Tn.line==Ln.line)Wt(Tn.line,Tn.ch,Ln.ch);else{var fi=_n(Fe,Tn.line),Si=_n(Fe,Ln.line),Ni=Bn(fi)==Bn(Si),Qi=Wt(Tn.line,Tn.ch,Ni?fi.text.length+1:null).end,Lr=Wt(Ln.line,Ni?0:null,Ln.ch).start;Ni&&(Qi.top<Lr.top-2?(cn(Qi.right,Qi.top,null,Qi.bottom),cn(Lt,Lr.top,Lr.left,Lr.bottom)):cn(Qi.right,Qi.top,Lr.left-Qi.right,Qi.bottom)),Qi.bottom<Lr.top&&cn(Lt,Qi.bottom,null,Lr.top)}Te.appendChild(rt)}function es(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 Jo(ie){ie.state.focused||(ie.display.input.focus(),No(ie))}function ds(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,nh(ie))},100)}function No(ie,ce){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(mn(ie,"focus",ie,ce),ie.state.focused=!0,kt(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()),es(ie))}function nh(ie,ce){ie.state.delayingBlurEvent||(ie.state.focused&&(mn(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],rt=ie.options.lineWrapping,mt=void 0,Lt=0;if(!Fe.hidden){if(Ce&&xe<8){var Ct=Fe.node.offsetTop+Fe.node.offsetHeight;mt=Ct-Te,Te=Ct}else{var jt=Fe.node.getBoundingClientRect();mt=jt.bottom-jt.top,!rt&&Fe.text.firstChild&&(Lt=Fe.text.firstChild.getBoundingClientRect().right-jt.left-1)}var cn=Fe.line.height-mt;if((cn>.005||cn<-.005)&&(Bi(Fe.line,mt),vc(Fe.line),Fe.rest))for(var Wt=0;Wt<Fe.rest.length;Wt++)vc(Fe.rest[Wt]);if(Lt>ie.display.sizerWidth){var Tn=Math.ceil(Lt/rl(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 bo(ie,ce,Te){var Me=Te&&Te.top!=null?Math.max(0,Te.top):ie.scroller.scrollTop;Me=Math.floor(Me-io(ie));var Fe=Te&&Te.bottom!=null?Te.bottom:Me+ie.wrapper.clientHeight,rt=zt(ce,Me),mt=zt(ce,Fe);if(Te&&Te.ensure){var Lt=Te.ensure.from.line,Ct=Te.ensure.to.line;Lt<rt?(rt=Lt,mt=zt(ce,ji(_n(ce,Lt))+ie.wrapper.clientHeight)):Math.min(Ct,ce.lastLine())>=mt&&(rt=zt(ce,ji(_n(ce,Ct))-ie.wrapper.clientHeight),mt=Ct)}return{from:rt,to:Math.max(mt,rt+1)}}function Gh(ie,ce){if(!un(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 rt=Ze("div","\u200B",null,`position: absolute;
top: `+(ce.top-Te.viewOffset-io(ie.display))+`px;
height: `+(ce.bottom-ce.top+is(ie)+Te.barHeight)+`px;
left: `+ce.left+"px; width: "+Math.max(2,ce.right-ce.left)+"px;");ie.display.lineSpace.appendChild(rt),rt.scrollIntoView(Fe),ie.display.lineSpace.removeChild(rt)}}}function Lu(ie,ce,Te,Me){Me==null&&(Me=0);var Fe;!ie.options.lineWrapping&&ce==Te&&(ce=ce.ch?Yt(ce.line,ce.sticky=="before"?ce.ch-1:ce.ch,"after"):ce,Te=ce.sticky=="before"?Yt(ce.line,ce.ch+1,"before"):ce);for(var rt=0;rt<5;rt++){var mt=!1,Lt=Yo(ie,ce),Ct=!Te||Te==ce?Lt:Yo(ie,Te);Fe={left:Math.min(Lt.left,Ct.left),top:Math.min(Lt.top,Ct.top)-Me,right:Math.max(Lt.left,Ct.left),bottom:Math.max(Lt.bottom,Ct.bottom)+Me};var jt=Wh(ie,Fe),cn=ie.doc.scrollTop,Wt=ie.doc.scrollLeft;if(jt.scrollTop!=null&&(Cl(ie,jt.scrollTop),Math.abs(ie.doc.scrollTop-cn)>1&&(mt=!0)),jt.scrollLeft!=null&&(Xl(ie,jt.scrollLeft),Math.abs(ie.doc.scrollLeft-Wt)>1&&(mt=!0)),!mt)break}return Fe}function ih(ie,ce){var Te=Wh(ie,ce);Te.scrollTop!=null&&Cl(ie,Te.scrollTop),Te.scrollLeft!=null&&Xl(ie,Te.scrollLeft)}function Wh(ie,ce){var Te=ie.display,Me=sa(ie.display);ce.top<0&&(ce.top=0);var Fe=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:Te.scroller.scrollTop,rt=Sa(ie),mt={};ce.bottom-ce.top>rt&&(ce.bottom=ce.top+rt);var Lt=ie.doc.height+ws(Te),Ct=ce.top<Me,jt=ce.bottom>Lt-Me;if(ce.top<Fe)mt.scrollTop=Ct?0:ce.top;else if(ce.bottom>Fe+rt){var cn=Math.min(ce.top,(jt?Lt:ce.bottom)-rt);cn!=Fe&&(mt.scrollTop=cn)}var Wt=ie.options.fixedGutter?0:Te.gutters.offsetWidth,Tn=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:Te.scroller.scrollLeft-Wt,Ln=Pa(ie)-Te.gutters.offsetWidth,fi=ce.right-ce.left>Ln;return fi&&(ce.right=ce.left+Ln),ce.left<10?mt.scrollLeft=0:ce.left<Tn?mt.scrollLeft=Math.max(0,ce.left+Wt-(fi?0:10)):ce.right>Ln+Tn-3&&(mt.scrollLeft=ce.right+(fi?0:10)-Ln),mt}function Ph(ie,ce){ce!=null&&(Pl(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ce)}function Yl(ie){Pl(ie);var ce=ie.getCursor();ie.curOp.scrollToPos={from:ce,to:ce,margin:ie.options.cursorScrollMargin}}function Yr(ie,ce,Te){(ce!=null||Te!=null)&&Pl(ie),ce!=null&&(ie.curOp.scrollLeft=ce),Te!=null&&(ie.curOp.scrollTop=Te)}function Ho(ie,ce){Pl(ie),ie.curOp.scrollToPos=ce}function Pl(ie){var ce=ie.curOp.scrollToPos;if(ce){ie.curOp.scrollToPos=null;var Te=zo(ie,ce.from),Me=zo(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});Yr(ie,Fe.scrollLeft,Fe.scrollTop)}function Cl(ie,ce){Math.abs(ie.doc.scrollTop-ce)<2||(ke||To(ie,{top:ce}),Eh(ie,ce,!0),ke&&To(ie),yi(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 Xl(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,Vo(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+ws(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+is(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),Bt(Me,"scroll",function(){Me.clientHeight&&ce(Me.scrollTop,"vertical")}),Bt(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 rt=ie.viewWidth-ie.barLeft-(Te?Me:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+rt)+"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(),rt=Te=="vert"?document.elementFromPoint(Fe.right-1,(Fe.top+Fe.bottom)/2):document.elementFromPoint((Fe.right+Fe.left)/2,Fe.bottom-1);rt!=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 Do=function(){};Do.prototype.update=function(){return{bottom:0,right:0}},Do.prototype.setScrollLeft=function(){},Do.prototype.setScrollTop=function(){},Do.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:Do};function cu(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),Bt(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"?Xl(ie,ce):Cl(ie,ce)},ie),ie.display.scrollbars.addClass&&kt(ie.display.wrapper,ie.display.scrollbars.addClass)}var Mu=0;function Ya(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:++Mu},Qs(ie.curOp)}function Jl(ie){var ce=ie.curOp;ce&&Aa(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 rt=0;rt<ce.length;rt++)Dt(ce[rt]);for(var mt=0;mt<ce.length;mt++)Vt(ce[mt])}function yp(ie){var ce=ie.cm,Te=ce.display;qi(ce),ie.updateMaxLine&&nr(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 Ci(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=Hu(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+is(ce)+ce.display.barWidth),ie.maxScrollLeft=Math.max(0,Te.sizer.offsetLeft+ie.adjustWidthTo-Pa(ce))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=Te.input.prepareSelection())}function Dt(ie){var ce=ie.cm;ie.adjustWidthTo!=null&&(ce.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ce.doc.scrollLeft&&Xl(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&&es(ce),ce.state.focused&&ie.updateInput&&ce.display.input.reset(ie.typing),Te&&Jo(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&&Xl(ce,ie.scrollLeft,!0,!0),ie.scrollToPos){var Fe=Lu(ce,An(Me,ie.scrollToPos.from),An(Me,ie.scrollToPos.to),ie.scrollToPos.margin);Gh(ce,Fe)}var rt=ie.maybeHiddenMarkers,mt=ie.maybeUnhiddenMarkers;if(rt)for(var Lt=0;Lt<rt.length;++Lt)rt[Lt].lines.length||mn(rt[Lt],"hide");if(mt)for(var Ct=0;Ct<mt.length;++Ct)mt[Ct].lines.length&&mn(mt[Ct],"unhide");Te.wrapper.offsetHeight&&(Me.scrollTop=ce.display.scroller.scrollTop),ie.changeObjs&&mn(ce,"changes",ce,ie.changeObjs),ie.update&&ie.update.finish()}function Jt(ie,ce){if(ie.curOp)return ce();Ya(ie);try{return ce()}finally{Jl(ie)}}function Hi(ie,ce){return function(){if(ie.curOp)return ce.apply(ie,arguments);Ya(ie);try{return ce.apply(ie,arguments)}finally{Jl(ie)}}}function Pi(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Ya(this);try{return ie.apply(this,arguments)}finally{Jl(this)}}}function si(ie){return function(){var ce=this.cm;if(!ce||ce.curOp)return ie.apply(this,arguments);Ya(ce);try{return ie.apply(this,arguments)}finally{Jl(ce)}}}function yi(ie,ce){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ce,ct(oi,ie))}function oi(ie){var ce=ie.doc;if(!(ce.highlightFrontier>=ie.display.viewTo)){var Te=+new Date+ie.options.workTime,Me=Mr(ie,ce.highlightFrontier),Fe=[];ce.iter(Me.line,Math.min(ce.first+ce.size,ie.display.viewTo+500),function(rt){if(Me.line>=ie.display.viewFrom){var mt=rt.styles,Lt=rt.text.length>ie.options.maxHighlightLength?Pt(ce.mode,Me.state):null,Ct=Vi(ie,rt,Me,!0);Lt&&(Me.state=Lt),rt.styles=Ct.styles;var jt=rt.styleClasses,cn=Ct.classes;cn?rt.styleClasses=cn:jt&&(rt.styleClasses=null);for(var Wt=!mt||mt.length!=rt.styles.length||jt!=cn&&(!jt||!cn||jt.bgClass!=cn.bgClass||jt.textClass!=cn.textClass),Tn=0;!Wt&&Tn<mt.length;++Tn)Wt=mt[Tn]!=rt.styles[Tn];Wt&&Fe.push(Me.line),rt.stateAfter=Me.save(),Me.nextLine()}else rt.text.length<=ie.options.maxHighlightLength&&xn(ie,rt.text,Me),rt.stateAfter=Me.line%5==0?Me.save():null,Me.nextLine();if(+new Date>Te)return yi(ie,ie.options.workDelay),!0}),ce.highlightFrontier=Me.line,ce.modeFrontier=Math.max(ce.modeFrontier,Me.line),Fe.length&&Jt(ie,function(){for(var rt=0;rt<Fe.length;rt++)ro(ie,Fe[rt],"text")})}}var Ci=function(ie,ce,Te){var Me=ie.display;this.viewport=ce,this.visible=bo(Me,ie.doc,ce),this.editorIsHidden=!Me.wrapper.offsetWidth,this.wrapperHeight=Me.wrapper.clientHeight,this.wrapperWidth=Me.wrapper.clientWidth,this.oldDisplayWidth=Pa(ie),this.force=Te,this.dims=bl(ie),this.events=[]};Ci.prototype.signal=function(ie,ce){pn(ie,ce)&&this.events.push(arguments)},Ci.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)mn.apply(null,this.events[ie])};function qi(ie){var ce=ie.display;!ce.scrollbarsClipped&&ce.scroller.offsetWidth&&(ce.nativeBarWidth=ce.scroller.offsetWidth-ce.scroller.clientWidth,ce.heightForcer.style.height=is(ie)+"px",ce.sizer.style.marginBottom=-ce.nativeBarWidth+"px",ce.sizer.style.borderRightWidth=is(ie)+"px",ce.scrollbarsClipped=!0)}function Po(ie){if(ie.hasFocus())return null;var ce=gt();if(!ce||!vt(ie.display.lineDiv,ce))return null;var Te={activeElt:ce};if(window.getSelection){var Me=window.getSelection();Me.anchorNode&&Me.extend&&vt(ie.display.lineDiv,Me.anchorNode)&&(Te.anchorNode=Me.anchorNode,Te.anchorOffset=Me.anchorOffset,Te.focusNode=Me.focusNode,Te.focusOffset=Me.focusOffset)}return Te}function Cr(ie){if(!(!ie||!ie.activeElt||ie.activeElt==gt())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&vt(document.body,ie.anchorNode)&&vt(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 bs(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&&Ka(ie)==0)return!1;Co(ie)&&(bs(ie),ce.dims=bl(ie));var Fe=Me.first+Me.size,rt=Math.max(ce.visible.from-ie.options.viewportMargin,Me.first),mt=Math.min(Fe,ce.visible.to+ie.options.viewportMargin);Te.viewFrom<rt&&rt-Te.viewFrom<20&&(rt=Math.max(Me.first,Te.viewFrom)),Te.viewTo>mt&&Te.viewTo-mt<20&&(mt=Math.min(Fe,Te.viewTo)),Mn&&(rt=ci(ie.doc,rt),mt=ni(ie.doc,mt));var Lt=rt!=Te.viewFrom||mt!=Te.viewTo||Te.lastWrapHeight!=ce.wrapperHeight||Te.lastWrapWidth!=ce.wrapperWidth;Xo(ie,rt,mt),Te.viewOffset=ji(_n(ie.doc,Te.viewFrom)),ie.display.mover.style.top=Te.viewOffset+"px";var Ct=Ka(ie);if(!Lt&&Ct==0&&!ce.force&&Te.renderedView==Te.view&&(Te.updateLineNumbers==null||Te.updateLineNumbers>=Te.viewTo))return!1;var jt=Po(ie);return Ct>4&&(Te.lineDiv.style.display="none"),Xr(ie,Te.updateLineNumbers,ce.dims),Ct>4&&(Te.lineDiv.style.display=""),Te.renderedView=Te.view,Cr(jt),De(Te.cursorDiv),De(Te.selectionDiv),Te.gutters.style.height=Te.sizer.style.minHeight=0,Lt&&(Te.lastWrapHeight=ce.wrapperHeight,Te.lastWrapWidth=ce.wrapperWidth,yi(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==Pa(ie)){if(Te&&Te.top!=null&&(Te={top:Math.min(ie.doc.height+ws(ie.display)-Sa(ie),Te.top)}),ce.visible=bo(ie.display,ie.doc,Te),ce.visible.from>=ie.display.viewFrom&&ce.visible.to<=ie.display.viewTo)break}else Me&&(ce.visible=bo(ie.display,ie.doc,Te));if(!Go(ie,ce))break;Nr(ie);var Fe=mo(ie);ea(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 To(ie,ce){var Te=new Ci(ie,ce);if(Go(ie,Te)){Nr(ie),Ki(ie,Te);var Me=mo(ie);ea(ie),ya(ie,Me),ho(ie,Me),Te.finish()}}function Xr(ie,ce,Te){var Me=ie.display,Fe=ie.options.lineNumbers,rt=Me.lineDiv,mt=rt.firstChild;function Lt(fi){var Si=fi.nextSibling;return be&&oe&&ie.display.currentWheelTarget==fi?fi.style.display="none":fi.parentNode.removeChild(fi),Si}for(var Ct=Me.view,jt=Me.viewFrom,cn=0;cn<Ct.length;cn++){var Wt=Ct[cn];if(!Wt.hidden)if(!Wt.node||Wt.node.parentNode!=rt){var Tn=$r(ie,Wt,jt,Te);rt.insertBefore(Tn,mt)}else{for(;mt!=Wt.node;)mt=Lt(mt);var Ln=Fe&&ce!=null&&ce<=jt&&Wt.lineNumber;Wt.changes&&(ht(Wt.changes,"gutter")>-1&&(Ln=!1),ss(ie,Wt,jt,Te)),Ln&&(De(Wt.lineNumber),Wt.lineNumber.appendChild(document.createTextNode(bn(ie.options,jt)))),mt=Wt.node.nextSibling}jt+=Wt.size}for(;mt;)mt=Lt(mt)}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+is(ie)+"px"}function Vo(ie){var ce=ie.display,Te=ce.view;if(!(!ce.alignWidgets&&(!ce.gutters.firstChild||!ie.options.fixedGutter))){for(var Me=Cu(ce)-ce.scroller.scrollLeft+ie.doc.scrollLeft,Fe=ce.gutters.offsetWidth,rt=Me+"px",mt=0;mt<Te.length;mt++)if(!Te[mt].hidden){ie.options.fixedGutter&&(Te[mt].gutter&&(Te[mt].gutter.style.left=rt),Te[mt].gutterBackground&&(Te[mt].gutterBackground.style.left=rt));var Lt=Te[mt].alignable;if(Lt)for(var Ct=0;Ct<Lt.length;Ct++)Lt[Ct].style.left=rt}ie.options.fixedGutter&&(ce.gutters.style.left=Me+Fe+"px")}}function Co(ie){if(!ie.options.lineNumbers)return!1;var ce=ie.doc,Te=bn(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")),rt=Fe.firstChild.offsetWidth,mt=Fe.offsetWidth-rt;return Me.lineGutter.style.width="",Me.lineNumInnerWidth=Math.max(rt,Me.lineGutter.offsetWidth-mt)+1,Me.lineNumWidth=Me.lineNumInnerWidth+mt,Me.lineNumChars=Me.lineNumInnerWidth?Te.length:-1,Me.lineGutter.style.width=Me.lineNumWidth+"px",rs(ie.display),!0}return!1}function Gr(ie,ce){for(var Te=[],Me=!1,Fe=0;Fe<ie.length;Fe++){var rt=ie[Fe],mt=null;if(typeof rt!="string"&&(mt=rt.style,rt=rt.className),rt=="CodeMirror-linenumbers")if(ce)Me=!0;else continue;Te.push({className:rt,style:mt})}return ce&&!Me&&Te.push({className:"CodeMirror-linenumbers",style:null}),Te}function Ko(ie){var ce=ie.gutters,Te=ie.gutterSpecs;De(ce),ie.lineGutter=null;for(var Me=0;Me<Te.length;++Me){var Fe=Te[Me],rt=Fe.className,mt=Fe.style,Lt=ce.appendChild(Ze("div",null,"CodeMirror-gutter "+rt));mt&&(Lt.style.cssText=mt),rt=="CodeMirror-linenumbers"&&(ie.lineGutter=Lt,Lt.style.width=(ie.lineNumWidth||1)+"px")}ce.style.display=Te.length?"":"none",rs(ie)}function Gi(ie){Ko(ie.display),ms(ie),Vo(ie)}function $o(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 rt=qe("div",[Fe.lineSpace],"CodeMirror-lines");Fe.mover=Ze("div",[rt],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=Gr(Me.gutters,Me.lineNumbers),Ko(Fe),Te.init(Fe)}var vo=0,Oo=null;Ce?Oo=-.53:ke?Oo=15:we?Oo=-.7:de&&(Oo=-1/3);function Vs(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 dr(ie){var ce=Vs(ie);return ce.x*=Oo,ce.y*=Oo,ce}function Fo(ie,ce){var Te=Vs(ce),Me=Te.x,Fe=Te.y,rt=ie.display,mt=rt.scroller,Lt=mt.scrollWidth>mt.clientWidth,Ct=mt.scrollHeight>mt.clientHeight;if(Me&&Lt||Fe&&Ct){if(Fe&&oe&&be){e:for(var jt=ce.target,cn=rt.view;jt!=mt;jt=jt.parentNode)for(var Wt=0;Wt<cn.length;Wt++)if(cn[Wt].node==jt){ie.display.currentWheelTarget=jt;break e}}if(Me&&!ke&&!pe&&Oo!=null){Fe&&Ct&&Cl(ie,Math.max(0,mt.scrollTop+Fe*Oo)),Xl(ie,Math.max(0,mt.scrollLeft+Me*Oo)),(!Fe||Fe&&Ct)&&Qn(ce),rt.wheelStartX=null;return}if(Fe&&Oo!=null){var Tn=Fe*Oo,Ln=ie.doc.scrollTop,fi=Ln+rt.wrapper.clientHeight;Tn<0?Ln=Math.max(0,Ln+Tn-50):fi=Math.min(ie.doc.height,fi+Tn+50),To(ie,{top:Ln,bottom:fi})}vo<20&&(rt.wheelStartX==null?(rt.wheelStartX=mt.scrollLeft,rt.wheelStartY=mt.scrollTop,rt.wheelDX=Me,rt.wheelDY=Fe,setTimeout(function(){if(rt.wheelStartX!=null){var Si=mt.scrollLeft-rt.wheelStartX,Ni=mt.scrollTop-rt.wheelStartY,Qi=Ni&&rt.wheelDY&&Ni/rt.wheelDY||Si&&rt.wheelDX&&Si/rt.wheelDX;rt.wheelStartX=rt.wheelStartY=null,Qi&&(Oo=(Oo*vo+Qi)/(vo+1),++vo)}},200)):(rt.wheelDX+=Me,rt.wheelDY+=Fe))}}var Eo=function(ie,ce){this.ranges=ie,this.primIndex=ce};Eo.prototype.primary=function(){return this.ranges[this.primIndex]},Eo.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(!yn(Te.anchor,Me.anchor)||!yn(Te.head,Me.head))return!1}return!0},Eo.prototype.deepCopy=function(){for(var ie=[],ce=0;ce<this.ranges.length;ce++)ie[ce]=new Or(vn(this.ranges[ce].anchor),vn(this.ranges[ce].head));return new Eo(ie,this.primIndex)},Eo.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Eo.prototype.contains=function(ie,ce){ce||(ce=ie);for(var Te=0;Te<this.ranges.length;Te++){var Me=this.ranges[Te];if(gn(ce,Me.from())>=0&&gn(ie,Me.to())<=0)return Te}return-1};var Or=function(ie,ce){this.anchor=ie,this.head=ce};Or.prototype.from=function(){return Un(this.anchor,this.head)},Or.prototype.to=function(){return jn(this.anchor,this.head)},Or.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function qr(ie,ce,Te){var Me=ie&&ie.options.selectionsMayTouch,Fe=ce[Te];ce.sort(function(Tn,Ln){return gn(Tn.from(),Ln.from())}),Te=ht(ce,Fe);for(var rt=1;rt<ce.length;rt++){var mt=ce[rt],Lt=ce[rt-1],Ct=gn(Lt.to(),mt.from());if(Me&&!mt.empty()?Ct>0:Ct>=0){var jt=Un(Lt.from(),mt.from()),cn=jn(Lt.to(),mt.to()),Wt=Lt.empty()?mt.from()==mt.head:Lt.from()==Lt.head;rt<=Te&&--Te,ce.splice(--rt,2,new Or(Wt?cn:jt,Wt?jt:cn))}}return new Eo(ce,Te)}function Uo(ie,ce){return new Eo([new Or(ie,ce||ie)],0)}function Vr(ie){return ie.text?Yt(ie.from.line+ie.text.length-1,It(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function Oa(ie,ce){if(gn(ie,ce.from)<0)return ie;if(gn(ie,ce.to)<=0)return Vr(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+=Vr(ce).ch-ce.to.ch),Yt(Te,Me)}function Ks(ie,ce){for(var Te=[],Me=0;Me<ie.sel.ranges.length;Me++){var Fe=ie.sel.ranges[Me];Te.push(new Or(Oa(Fe.anchor,ce),Oa(Fe.head,ce)))}return qr(ie.cm,Te,ie.sel.primIndex)}function ol(ie,ce,Te){return ie.line==ce.line?Yt(Te.line,ie.ch-ce.ch+Te.ch):Yt(Te.line+(ie.line-ce.line),ie.ch)}function ku(ie,ce,Te){for(var Me=[],Fe=Yt(ie.first,0),rt=Fe,mt=0;mt<ce.length;mt++){var Lt=ce[mt],Ct=ol(Lt.from,Fe,rt),jt=ol(Vr(Lt),Fe,rt);if(Fe=Lt.to,rt=jt,Te=="around"){var cn=ie.sel.ranges[mt],Wt=gn(cn.head,cn.anchor)<0;Me[mt]=new Or(Wt?jt:Ct,Wt?Ct:jt)}else Me[mt]=new Or(Ct,Ct)}return new Eo(Me,ie.sel.primIndex)}function lo(ie){ie.doc.mode=Ue(ie.options,ie.doc.modeOption),Tu(ie)}function Tu(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,yi(ie,100),ie.state.modeGen++,ie.curOp&&ms(ie)}function So(ie,ce){return ce.from.ch==0&&ce.to.ch==0&&It(ce.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function qo(ie,ce,Te,Me){function Fe(Lr){return Te?Te[Lr]:null}function rt(Lr,ur,Ir){zr(Lr,ur,Ir,Me),$i(Lr,"change",Lr,ce)}function mt(Lr,ur){for(var Ir=[],uo=Lr;uo<ur;++uo)Ir.push(new Zr(jt[uo],Fe(uo),Me));return Ir}var Lt=ce.from,Ct=ce.to,jt=ce.text,cn=_n(ie,Lt.line),Wt=_n(ie,Ct.line),Tn=It(jt),Ln=Fe(jt.length-1),fi=Ct.line-Lt.line;if(ce.full)ie.insert(0,mt(0,jt.length)),ie.remove(jt.length,ie.size-jt.length);else if(So(ie,ce)){var Si=mt(0,jt.length-1);rt(Wt,Wt.text,Ln),fi&&ie.remove(Lt.line,fi),Si.length&&ie.insert(Lt.line,Si)}else if(cn==Wt)if(jt.length==1)rt(cn,cn.text.slice(0,Lt.ch)+Tn+cn.text.slice(Ct.ch),Ln);else{var Ni=mt(1,jt.length-1);Ni.push(new Zr(Tn+cn.text.slice(Ct.ch),Ln,Me)),rt(cn,cn.text.slice(0,Lt.ch)+jt[0],Fe(0)),ie.insert(Lt.line+1,Ni)}else if(jt.length==1)rt(cn,cn.text.slice(0,Lt.ch)+jt[0]+Wt.text.slice(Ct.ch),Fe(0)),ie.remove(Lt.line+1,fi);else{rt(cn,cn.text.slice(0,Lt.ch)+jt[0],Fe(0)),rt(Wt,Tn+Wt.text.slice(Ct.ch),Ln);var Qi=mt(1,jt.length-1);fi>1&&ie.remove(Lt.line+1,fi-1),ie.insert(Lt.line+1,Qi)}$i(ie,"change",ie,ce)}function Rs(ie,ce,Te){function Me(Fe,rt,mt){if(Fe.linked)for(var Lt=0;Lt<Fe.linked.length;++Lt){var Ct=Fe.linked[Lt];if(Ct.doc!=rt){var jt=mt&&Ct.sharedHist;Te&&!jt||(ce(Ct.doc,jt),Me(Ct.doc,Fe,jt))}}}Me(ie,null,!0)}function Au(ie,ce){if(ce.cm)throw new Error("This document is already in use.");ie.doc=ce,ce.cm=ie,Fr(ie),lo(ie),Ia(ie),ie.options.lineWrapping||nr(ie),ie.options.mode=ce.modeOption,ms(ie)}function Ia(ie){(ie.doc.direction=="rtl"?kt:Ae)(ie.display.lineDiv,"CodeMirror-rtl")}function $c(ie){Jt(ie,function(){Ia(ie),ms(ie)})}function gl(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 ta(ie,ce){var Te={from:vn(ce.from),to:Vr(ce),text:zn(ie,ce.from,ce.to)};return aa(ie,Te,ce.from.line,ce.to.line+1),Rs(ie,function(Me){return aa(Me,Te,ce.from.line,ce.to.line+1)},!0),Te}function ql(ie){for(;ie.length;){var ce=It(ie);if(ce.ranges)ie.pop();else break}}function yc(ie,ce){if(ce)return ql(ie.done),It(ie.done);if(ie.done.length&&!It(ie.done).ranges)return It(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),It(ie.done)}function Sc(ie,ce,Te,Me){var Fe=ie.history;Fe.undone.length=0;var rt=+new Date,mt,Lt;if((Fe.lastOp==Me||Fe.lastOrigin==ce.origin&&ce.origin&&(ce.origin.charAt(0)=="+"&&Fe.lastModTime>rt-(ie.cm?ie.cm.options.historyEventDelay:500)||ce.origin.charAt(0)=="*"))&&(mt=yc(Fe,Fe.lastOp==Me)))Lt=It(mt.changes),gn(ce.from,ce.to)==0&&gn(ce.from,Lt.to)==0?Lt.to=Vr(ce):mt.changes.push(ta(ie,ce));else{var Ct=It(Fe.done);for((!Ct||!Ct.ranges)&&Ds(ie.sel,Fe.done),mt={changes:[ta(ie,ce)],generation:Fe.generation},Fe.done.push(mt);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=rt,Fe.lastOp=Fe.lastSelOp=Me,Fe.lastOrigin=Fe.lastSelOrigin=ce.origin,Lt||mn(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,rt=Me&&Me.origin;Te==Fe.lastSelOp||rt&&Fe.lastSelOrigin==rt&&(Fe.lastModTime==Fe.lastSelTime&&Fe.lastOrigin==rt||Td(ie,rt,It(Fe.done),ce))?Fe.done[Fe.done.length-1]=ce:Ds(ce,Fe.done),Fe.lastSelTime=+new Date,Fe.lastSelOrigin=rt,Fe.lastSelOp=Te,Me&&Me.clearRedo!==!1&&ql(Fe.undone)}function Ds(ie,ce){var Te=It(ce);Te&&Te.ranges&&Te.equals(ie)||ce.push(ie)}function aa(ie,ce,Te,Me){var Fe=ce["spans_"+ie.id],rt=0;ie.iter(Math.max(ie.first,Te),Math.min(ie.first+ie.size,Me),function(mt){mt.markedSpans&&((Fe||(Fe=ce["spans_"+ie.id]={}))[rt]=mt.markedSpans),++rt})}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 xs(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 Ql(ie,ce){var Te=xs(ie,ce),Me=yo(ie,ce);if(!Te)return Me;if(!Me)return Te;for(var Fe=0;Fe<Te.length;++Fe){var rt=Te[Fe],mt=Me[Fe];if(rt&&mt)e:for(var Lt=0;Lt<mt.length;++Lt){for(var Ct=mt[Lt],jt=0;jt<rt.length;++jt)if(rt[jt].marker==Ct.marker)continue e;rt.push(Ct)}else mt&&(Te[Fe]=mt)}return Te}function El(ie,ce,Te){for(var Me=[],Fe=0;Fe<ie.length;++Fe){var rt=ie[Fe];if(rt.ranges){Me.push(Te?Eo.prototype.deepCopy.call(rt):rt);continue}var mt=rt.changes,Lt=[];Me.push({changes:Lt});for(var Ct=0;Ct<mt.length;++Ct){var jt=mt[Ct],cn=void 0;if(Lt.push({from:jt.from,to:jt.to,text:jt.text}),ce)for(var Wt in jt)(cn=Wt.match(/^spans_(\d+)$/))&&ht(ce,Number(cn[1]))>-1&&(It(Lt)[Wt]=jt[Wt],delete jt[Wt])}}return Me}function rh(ie,ce,Te,Me){if(Me){var Fe=ie.anchor;if(Te){var rt=gn(ce,Fe)<0;rt!=gn(Te,Fe)<0?(Fe=ce,ce=Te):rt!=gn(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)),sl(ie,new Eo([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),rt=0;rt<ie.sel.ranges.length;rt++)Me[rt]=rh(ie.sel.ranges[rt],ce[rt],null,Fe);var mt=qr(ie.cm,Me,ie.sel.primIndex);sl(ie,mt,Te)}function sh(ie,ce,Te,Me){var Fe=ie.sel.ranges.slice(0);Fe[ce]=Te,sl(ie,qr(ie.cm,Fe,ie.sel.primIndex),Me)}function du(ie,ce,Te,Me){sl(ie,Uo(ce,Te),Me)}function mf(ie,ce,Te){var Me={ranges:ce.ranges,update:function(Fe){this.ranges=[];for(var rt=0;rt<Fe.length;rt++)this.ranges[rt]=new Or(An(ie,Fe[rt].anchor),An(ie,Fe[rt].head))},origin:Te&&Te.origin};return mn(ie,"beforeSelectionChange",ie,Me),ie.cm&&mn(ie.cm,"beforeSelectionChange",ie.cm,Me),Me.ranges!=ce.ranges?qr(ie.cm,Me.ranges,Me.ranges.length-1):ce}function vf(ie,ce,Te){var Me=ie.history.done,Fe=It(Me);Fe&&Fe.ranges?(Me[Me.length-1]=ce,xc(ie,ce,Te)):sl(ie,ce,Te)}function sl(ie,ce,Te){xc(ie,ce,Te),xo(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,Te)}function xc(ie,ce,Te){(pn(ie,"beforeSelectionChange")||ie.cm&&pn(ie.cm,"beforeSelectionChange"))&&(ce=mf(ie,ce,Te));var Me=Te&&Te.bias||(gn(ce.primary().head,ie.sel.primary().head)<0?-1:1);xp(ie,Nd(ie,ce,Me,!0)),!(Te&&Te.scroll===!1)&&ie.cm&&Yl(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,Kn(ie.cm)),$i(ie,"cursorActivity",ie))}function Ad(ie){xp(ie,Nd(ie,ie.sel,null,!1))}function Nd(ie,ce,Te,Me){for(var Fe,rt=0;rt<ce.ranges.length;rt++){var mt=ce.ranges[rt],Lt=ce.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[rt],Ct=Dd(ie,mt.anchor,Lt&&Lt.anchor,Te,Me),jt=Dd(ie,mt.head,Lt&&Lt.head,Te,Me);(Fe||Ct!=mt.anchor||jt!=mt.head)&&(Fe||(Fe=ce.ranges.slice(0,rt)),Fe[rt]=new Or(Ct,jt))}return Fe?qr(ie.cm,Fe,ce.primIndex):ce}function Mh(ie,ce,Te,Me,Fe){var rt=_n(ie,ce.line);if(rt.markedSpans)for(var mt=0;mt<rt.markedSpans.length;++mt){var Lt=rt.markedSpans[mt],Ct=Lt.marker,jt="selectLeft"in Ct?!Ct.selectLeft:Ct.inclusiveLeft,cn="selectRight"in Ct?!Ct.selectRight:Ct.inclusiveRight;if((Lt.from==null||(jt?Lt.from<=ce.ch:Lt.from<ce.ch))&&(Lt.to==null||(cn?Lt.to>=ce.ch:Lt.to>ce.ch))){if(Fe&&(mn(Ct,"beforeCursorEnter"),Ct.explicitlyCleared))if(rt.markedSpans){--mt;continue}else break;if(!Ct.atomic)continue;if(Te){var Wt=Ct.find(Me<0?1:-1),Tn=void 0;if((Me<0?cn:jt)&&(Wt=wp(ie,Wt,-Me,Wt&&Wt.line==ce.line?rt:null)),Wt&&Wt.line==ce.line&&(Tn=gn(Wt,Te))&&(Me<0?Tn<0:Tn>0))return Mh(ie,Wt,ce,Me,Fe)}var Ln=Ct.find(Me<0?-1:1);return(Me<0?jt:cn)&&(Ln=wp(ie,Ln,Me,Ln.line==ce.line?rt:null)),Ln?Mh(ie,Ln,ce,Me,Fe):null}}return ce}function Dd(ie,ce,Te,Me,Fe){var rt=Me||1,mt=Mh(ie,ce,Te,rt,Fe)||!Fe&&Mh(ie,ce,Te,rt,!0)||Mh(ie,ce,Te,-rt,Fe)||!Fe&&Mh(ie,ce,Te,-rt,!0);return mt||(ie.cantEdit=!0,Yt(ie.first,0))}function wp(ie,ce,Te,Me){return Te<0&&ce.ch==0?ce.line>ie.first?An(ie,Yt(ce.line-1)):null:Te>0&&ce.ch==(Me||_n(ie,ce.line)).text.length?ce.line<ie.first+ie.size-1?Yt(ce.line+1,0):null:new Yt(ce.line,ce.ch+Te)}function ca(ie){ie.setSelection(Yt(ie.firstLine(),0),Yt(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,rt,mt,Lt){Fe&&(Me.from=An(ie,Fe)),rt&&(Me.to=An(ie,rt)),mt&&(Me.text=mt),Lt!==void 0&&(Me.origin=Lt)}),mn(ie,"beforeChange",ie,Me),ie.cm&&mn(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 Hi(ie.cm,Zh)(ie,ce,Te);if(ie.cm.state.suppressEdits)return}if(!((pn(ie,"beforeChange")||ie.cm&&pn(ie.cm,"beforeChange"))&&(ce=Od(ie,ce,!0),!ce))){var Me=Rr&&!Te&&On(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]==""&&gn(ce.from,ce.to)==0)){var Te=Ks(ie,ce);Sc(ie,ce,Te,ie.cm?ie.cm.curOp.id:NaN),ed(ie,ce,Te,yo(ie,ce));var Me=[];Rs(ie,function(Fe,rt){!rt&&ht(Me,Fe.history)==-1&&(bp(Fe.history,ce),Me.push(Fe.history)),ed(Fe,ce,null,yo(Fe,ce))})}}function Id(ie,ce,Te){var Me=ie.cm&&ie.cm.state.suppressEdits;if(!(Me&&!Te)){for(var Fe=ie.history,rt,mt=ie.sel,Lt=ce=="undo"?Fe.done:Fe.undone,Ct=ce=="undo"?Fe.undone:Fe.done,jt=0;jt<Lt.length&&(rt=Lt[jt],!(Te?rt.ranges&&!rt.equals(ie.sel):!rt.ranges));jt++);if(jt!=Lt.length){for(Fe.lastOrigin=Fe.lastSelOrigin=null;;)if(rt=Lt.pop(),rt.ranges){if(Ds(rt,Ct),Te&&!rt.equals(ie.sel)){sl(ie,rt,{clearRedo:!1});return}mt=rt}else if(Me){Lt.push(rt);return}else break;var cn=[];Ds(mt,Ct),Ct.push({changes:cn,generation:Fe.generation}),Fe.generation=rt.generation||++Fe.maxGeneration;for(var Wt=pn(ie,"beforeChange")||ie.cm&&pn(ie.cm,"beforeChange"),Tn=function(Si){var Ni=rt.changes[Si];if(Ni.origin=ce,Wt&&!Od(ie,Ni,!1))return Lt.length=0,{};cn.push(ta(ie,Ni));var Qi=Si?Ks(ie,Ni):It(Lt);ed(ie,Ni,Qi,Ql(ie,Ni)),!Si&&ie.cm&&ie.cm.scrollIntoView({from:Ni.from,to:Vr(Ni)});var Lr=[];Rs(ie,function(ur,Ir){!Ir&&ht(Lr,ur.history)==-1&&(bp(ur.history,Ni),Lr.push(ur.history)),ed(ur,Ni,null,Ql(ur,Ni))})},Ln=rt.changes.length-1;Ln>=0;--Ln){var fi=Tn(Ln);if(fi)return fi.v}}}}function _p(ie,ce){if(ce!=0&&(ie.first+=ce,ie.sel=new Eo(Xt(ie.sel.ranges,function(Fe){return new Or(Yt(Fe.anchor.line+ce,Fe.anchor.ch),Yt(Fe.head.line+ce,Fe.head.ch))}),ie.sel.primIndex),ie.cm)){ms(ie.cm,ie.first,ie.first-ce,ce);for(var Te=ie.cm.display,Me=Te.viewFrom;Me<Te.viewTo;Me++)ro(ie.cm,Me,"gutter")}}function ed(ie,ce,Te,Me){if(ie.cm&&!ie.cm.curOp)return Hi(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:Yt(ie.first,0),to:Yt(ce.to.line+Fe,ce.to.ch),text:[It(ce.text)],origin:ce.origin}}var rt=ie.lastLine();ce.to.line>rt&&(ce={from:ce.from,to:Yt(rt,_n(ie,rt).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=zn(ie,ce.from,ce.to),Te||(Te=Ks(ie,ce)),ie.cm?Kg(ie.cm,ce,Me):qo(ie,ce,Me),xc(ie,Te,xt),ie.cantEdit&&Dd(ie,Yt(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function Kg(ie,ce,Te){var Me=ie.doc,Fe=ie.display,rt=ce.from,mt=ce.to,Lt=!1,Ct=rt.line;ie.options.lineWrapping||(Ct=wt(Bn(_n(Me,rt.line))),Me.iter(Ct,mt.line+1,function(Ln){if(Ln==Fe.maxLine)return Lt=!0,!0})),Me.sel.contains(ce.from,ce.to)>-1&&Kn(ie),qo(Me,ce,Te,gs(ie)),ie.options.lineWrapping||(Me.iter(Ct,rt.line+ce.text.length,function(Ln){var fi=br(Ln);fi>Fe.maxLineLength&&(Fe.maxLine=Ln,Fe.maxLineLength=fi,Fe.maxLineChanged=!0,Lt=!1)}),Lt&&(ie.curOp.updateMaxLine=!0)),_r(Me,rt.line),yi(ie,400);var jt=ce.text.length-(mt.line-rt.line)-1;ce.full?ms(ie):rt.line==mt.line&&ce.text.length==1&&!So(ie.doc,ce)?ro(ie,rt.line,"text"):ms(ie,rt.line,mt.line+1,jt);var cn=pn(ie,"changes"),Wt=pn(ie,"change");if(Wt||cn){var Tn={from:rt,to:mt,text:ce.text,removed:ce.removed,origin:ce.origin};Wt&&$i(ie,"change",ie,Tn),cn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(Tn)}ie.display.selForContextMenu=null}function _c(ie,ce,Te,Me,Fe){var rt;Me||(Me=Te),gn(Me,Te)<0&&(rt=[Me,Te],Te=rt[0],Me=rt[1]),typeof ce=="string"&&(ce=ie.splitLines(ce)),Zh(ie,{from:Te,to:Me,text:ce,origin:Fe})}function fu(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 rt=ie[Fe],mt=!0;if(rt.ranges){rt.copied||(rt=ie[Fe]=rt.deepCopy(),rt.copied=!0);for(var Lt=0;Lt<rt.ranges.length;Lt++)fu(rt.ranges[Lt].anchor,ce,Te,Me),fu(rt.ranges[Lt].head,ce,Te,Me);continue}for(var Ct=0;Ct<rt.changes.length;++Ct){var jt=rt.changes[Ct];if(Te<jt.from.line)jt.from=Yt(jt.from.line+Me,jt.from.ch),jt.to=Yt(jt.to.line+Me,jt.to.ch);else if(ce<=jt.to.line){mt=!1;break}}mt||(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,rt=ce;return typeof ce=="number"?rt=_n(ie,Gn(ie,ce)):Fe=wt(ce),Fe==null?null:(Me(rt,Fe)&&ie.cm&&ro(ie.cm,Fe,Te),rt)}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,Ur(Fe),$i(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 Ys(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}Ys.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 rt=Math.min(ce,Fe-ie),mt=Me.height;if(Me.removeInner(ie,rt),this.height-=mt-Me.height,Fe==rt&&(this.children.splice(Te--,1),Me.parent=null),(ce-=rt)==0)break;ie=0}else ie-=Fe}if(this.size-ce<25&&(this.children.length>1||!(this.children[0]instanceof td))){var Lt=[];this.collapse(Lt),this.children=[new td(Lt)],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],rt=Fe.chunkSize();if(ie<=rt){if(Fe.insertInner(ie,ce,Te),Fe.lines&&Fe.lines.length>50){for(var mt=Fe.lines.length%25+25,Lt=mt;Lt<Fe.lines.length;){var Ct=new td(Fe.lines.slice(Lt,Lt+=25));Fe.height-=Ct.height,this.children.splice(++Me,0,Ct),Ct.parent=this}Fe.lines=Fe.lines.slice(0,mt),this.maybeSpill()}break}ie-=rt}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ce=ie.children.splice(ie.children.length-5,5),Te=new Ys(ce);if(ie.parent){ie.size-=Te.size,ie.height-=Te.height;var Fe=ht(ie.parent.children,ie);ie.parent.children.splice(Fe+1,0,Te)}else{var Me=new Ys(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],rt=Fe.chunkSize();if(ie<rt){var mt=Math.min(ce,rt-ie);if(Fe.iterN(ie,mt,Te))return!0;if((ce-=mt)==0)break;ie=0}else ie-=rt}}};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=wt(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 rt=ps(this);Bi(Te,Math.max(0,Te.height-rt)),ie&&(Jt(ie,function(){Xg(ie,Te,-rt),ro(ie,Me,"widget")}),$i(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=ps(this)-ce;Fe&&(Pn(this.doc,Me)||Bi(Me,Me.height+Fe),Te&&Jt(Te,function(){Te.curOp.forceUpdate=!0,Xg(Te,Me,Fe),$i(Te,"lineWidgetChanged",Te,ie,wt(Me))}))},Hn(kh);function Xg(ie,ce,Te){ji(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),rt=ie.cm;return rt&&Fe.noHScroll&&(rt.display.alignWidgets=!0),bc(ie,ce,"widget",function(mt){var Lt=mt.widgets||(mt.widgets=[]);if(Fe.insertAt==null?Lt.push(Fe):Lt.splice(Math.min(Lt.length-1,Math.max(0,Fe.insertAt)),0,Fe),Fe.line=mt,rt&&!Pn(ie,mt)){var Ct=ji(mt)<ie.scrollTop;Bi(mt,mt.height+ps(Fe)),Ct&&Ph(rt,Fe.height),rt.curOp.forceUpdate=!0}return!0}),rt&&$i(rt,"lineWidgetAdded",rt,Fe,typeof ce=="number"?ce:wt(ce)),Fe}var Jg=0,nn=function(ie,ce){this.lines=[],this.type=ce,this.doc=ie,this.id=++Jg};nn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ce=ie&&!ie.curOp;if(ce&&Ya(ie),pn(this,"clear")){var Te=this.find();Te&&$i(this,"clear",Te.from,Te.to)}for(var Me=null,Fe=null,rt=0;rt<this.lines.length;++rt){var mt=this.lines[rt],Lt=kr(mt.markedSpans,this);ie&&!this.collapsed?ro(ie,wt(mt),"text"):ie&&(Lt.to!=null&&(Fe=wt(mt)),Lt.from!=null&&(Me=wt(mt))),mt.markedSpans=mr(mt.markedSpans,Lt),Lt.from==null&&this.collapsed&&!Pn(this.doc,mt)&&ie&&Bi(mt,sa(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var Ct=0;Ct<this.lines.length;++Ct){var jt=Bn(this.lines[Ct]),cn=br(jt);cn>ie.display.maxLineLength&&(ie.display.maxLine=jt,ie.display.maxLineLength=cn,ie.display.maxLineChanged=!0)}Me!=null&&ie&&this.collapsed&&ms(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&&$i(ie,"markerCleared",ie,this,Me,Fe),ce&&Jl(ie),this.parent&&this.parent.clear()}},nn.prototype.find=function(ie,ce){ie==null&&this.type=="bookmark"&&(ie=1);for(var Te,Me,Fe=0;Fe<this.lines.length;++Fe){var rt=this.lines[Fe],mt=kr(rt.markedSpans,this);if(mt.from!=null&&(Te=Yt(ce?rt:wt(rt),mt.from),ie==-1))return Te;if(mt.to!=null&&(Me=Yt(ce?rt:wt(rt),mt.to),ie==1))return Me}return Te&&{from:Te,to:Me}},nn.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,rt=wt(ce.line),mt=fl(Me,rt);if(mt&&(th(mt),Me.curOp.selectionChanged=Me.curOp.forceUpdate=!0),Me.curOp.updateMaxLine=!0,!Pn(Te.doc,Fe)&&Te.height!=null){var Lt=Te.height;Te.height=null;var Ct=ps(Te)-Lt;Ct&&Bi(Fe,Fe.height+Ct)}$i(Me,"markerChanged",Me,ie)})},nn.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||ht(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},nn.prototype.detachLine=function(ie){if(this.lines.splice(ht(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},Hn(nn);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 Hi(ie.cm,Pc)(ie,ce,Te,Me,Fe);var rt=new nn(ie,Fe),mt=gn(ce,Te);if(Me&&Rt(Me,rt,!1),mt>0||mt==0&&rt.clearWhenEmpty!==!1)return rt;if(rt.replacedWith&&(rt.collapsed=!0,rt.widgetNode=qe("span",[rt.replacedWith],"CodeMirror-widget"),Me.handleMouseEvents||rt.widgetNode.setAttribute("cm-ignore-events","true"),Me.insertLeft&&(rt.widgetNode.insertLeft=!0)),rt.collapsed){if(qn(ie,ce.line,ce,Te,rt)||ce.line!=Te.line&&qn(ie,Te.line,ce,Te,rt))throw new Error("Inserting collapsed marker partially overlapping an existing one");kn()}rt.addToHistory&&Sc(ie,{from:ce,to:Te,origin:"markText"},ie.sel,NaN);var Lt=ce.line,Ct=ie.cm,jt;if(ie.iter(Lt,Te.line+1,function(Wt){Ct&&rt.collapsed&&!Ct.options.lineWrapping&&Bn(Wt)==Ct.display.maxLine&&(jt=!0),rt.collapsed&&Lt!=ce.line&&Bi(Wt,0),eo(Wt,new Ri(rt,Lt==ce.line?ce.ch:null,Lt==Te.line?Te.ch:null)),++Lt}),rt.collapsed&&ie.iter(ce.line,Te.line+1,function(Wt){Pn(ie,Wt)&&Bi(Wt,0)}),rt.clearOnEnter&&Bt(rt,"beforeCursorEnter",function(){return rt.clear()}),rt.readOnly&&(Qr(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),rt.collapsed&&(rt.id=++Jg,rt.atomic=!0),Ct){if(jt&&(Ct.curOp.updateMaxLine=!0),rt.collapsed)ms(Ct,ce.line,Te.line+1);else if(rt.className||rt.startStyle||rt.endStyle||rt.css||rt.attributes||rt.title)for(var cn=ce.line;cn<=Te.line;cn++)ro(Ct,cn,"text");rt.atomic&&Ad(Ct.doc),$i(Ct,"markerAdded",Ct,rt)}return rt}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();$i(this,"clear")}},ah.prototype.find=function(ie,ce){return this.primary.find(ie,ce)},Hn(ah);function qg(ie,ce,Te,Me,Fe){Me=Rt(Me),Me.shared=!1;var rt=[Pc(ie,ce,Te,Me,Fe)],mt=rt[0],Lt=Me.widgetNode;return Rs(ie,function(Ct){Lt&&(Me.widgetNode=Lt.cloneNode(!0)),rt.push(Pc(Ct,An(Ct,ce),An(Ct,Te),Me,Fe));for(var jt=0;jt<Ct.linked.length;++jt)if(Ct.linked[jt].isParent)return;mt=It(rt)}),new ah(rt,mt)}function Pp(ie){return ie.findMarks(Yt(ie.first,0),ie.clipPos(Yt(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(),rt=ie.clipPos(Fe.from),mt=ie.clipPos(Fe.to);if(gn(rt,mt)){var Lt=Pc(ie,rt,mt,Me.primary,Me.primary.type);Me.markers.push(Lt),Lt.parent=Me}}}function Cp(ie){for(var ce=function(Me){var Fe=ie[Me],rt=[Fe.primary.doc];Rs(Fe.primary.doc,function(Ct){return rt.push(Ct)});for(var mt=0;mt<Fe.markers.length;mt++){var Lt=Fe.markers[mt];ht(rt,Lt.doc)==-1&&(Lt.parent=null,Fe.markers.splice(mt--,1))}},Te=0;Te<ie.length;Te++)ce(Te)}var tv=0,Xa=function(ie,ce,Te,Me,Fe){if(!(this instanceof Xa))return new Xa(ie,ce,Te,Me,Fe);Te==null&&(Te=0),Ys.call(this,[new td([new Zr("",null)])]),this.first=Te,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Te;var rt=Yt(Te,0);this.sel=Uo(rt),this.history=new gl(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:rt,to:rt,text:ie}),sl(this,Uo(rt),xt)};Xa.prototype=He(Ys.prototype,{constructor:Xa,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=_i(this,this.first,this.first+this.size);return ie===!1?ce:ce.join(ie||this.lineSeparator())},setValue:si(function(ie){var ce=Yt(this.first,0),Te=this.first+this.size-1;Zh(this,{from:ce,to:Yt(Te,_n(this,Te).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&Yr(this.cm,0,0),sl(this,Uo(ce),xt)}),replaceRange:function(ie,ce,Te,Me){ce=An(this,ce),Te=Te?An(this,Te):ce,_c(this,ie,ce,Te,Me)},getRange:function(ie,ce,Te){var Me=zn(this,An(this,ie),An(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(En(this,ie))return _n(this,ie)},getLineNumber:function(ie){return wt(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=_n(this,ie)),Bn(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return An(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:si(function(ie,ce,Te){du(this,An(this,typeof ie=="number"?Yt(ie,ce||0):ie),null,Te)}),setSelection:si(function(ie,ce,Te){du(this,An(this,ie),An(this,ce||ie),Te)}),extendSelection:si(function(ie,ce,Te){Lh(this,An(this,ie),ce&&An(this,ce),Te)}),extendSelections:si(function(ie,ce){oh(this,xi(this,ie),ce)}),extendSelectionsBy:si(function(ie,ce){var Te=Xt(this.sel.ranges,ie);oh(this,xi(this,Te),ce)}),setSelections:si(function(ie,ce,Te){if(ie.length){for(var Me=[],Fe=0;Fe<ie.length;Fe++)Me[Fe]=new Or(An(this,ie[Fe].anchor),An(this,ie[Fe].head));ce==null&&(ce=Math.min(ie.length-1,this.sel.primIndex)),sl(this,qr(this.cm,Me,ce),Te)}}),addSelection:si(function(ie,ce,Te){var Me=this.sel.ranges.slice(0);Me.push(new Or(An(this,ie),An(this,ce||ie))),sl(this,qr(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=zn(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=zn(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:si(function(ie,ce,Te){for(var Me=[],Fe=this.sel,rt=0;rt<Fe.ranges.length;rt++){var mt=Fe.ranges[rt];Me[rt]={from:mt.from(),to:mt.to(),text:this.splitLines(ie[rt]),origin:Te}}for(var Lt=ce&&ce!="end"&&ku(this,Me,ce),Ct=Me.length-1;Ct>=0;Ct--)Zh(this,Me[Ct]);Lt?vf(this,Lt):this.cm&&Yl(this.cm)}),undo:si(function(){Id(this,"undo")}),redo:si(function(){Id(this,"redo")}),undoSelection:si(function(){Id(this,"undo",!0)}),redoSelection:si(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 gl(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:El(this.history.done),undone:El(this.history.undone)}},setHistory:function(ie){var ce=this.history=new gl(this.history.maxGeneration);ce.done=El(ie.done.slice(0),null,!0),ce.undone=El(ie.undone.slice(0),null,!0)},setGutterMarker:si(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:si(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(!En(this,ie)||(ce=ie,ie=_n(this,ie),!ie))return null}else if(ce=wt(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:si(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:si(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",rt=Me[Fe];if(rt)if(Te==null)Me[Fe]=null;else{var mt=rt.match(Pe(Te));if(!mt)return!1;var Lt=mt.index+mt[0].length;Me[Fe]=rt.slice(0,mt.index)+(!mt.index||Lt==rt.length?"":" ")+rt.slice(Lt)||null}else return!1;return!0})}),addLineWidget:si(function(ie,ce,Te){return yf(this,ie,ce,Te)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ce,Te){return Pc(this,An(this,ie),An(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=An(this,ie),Pc(this,ie,ie,Te,"bookmark")},findMarksAt:function(ie){ie=An(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=An(this,ie),ce=An(this,ce);var Me=[],Fe=ie.line;return this.iter(ie.line,ce.line+1,function(rt){var mt=rt.markedSpans;if(mt)for(var Lt=0;Lt<mt.length;Lt++){var Ct=mt[Lt];!(Ct.to!=null&&Fe==ie.line&&ie.ch>=Ct.to||Ct.from==null&&Fe!=ie.line||Ct.from!=null&&Fe==ce.line&&Ct.from>=ce.ch)&&(!Te||Te(Ct.marker))&&Me.push(Ct.marker.parent||Ct.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 rt=Fe.text.length+Me;if(rt>ie)return ce=ie,!0;ie-=rt,++Te}),An(this,Yt(Te,ce))},indexFromPos:function(ie){ie=An(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 Xa(_i(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 Xa(_i(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 ts&&(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 gl(null),ie.history.done=El(this.history.done,Me),ie.history.undone=El(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):pr(ie)},lineSeparator:function(){return this.lineSep||`
`},setDirection:si(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))})}),Xa.prototype.eachLine=Xa.prototype.iter;var Rd=0;function Ep(ie){var ce=this;if(tm(ce),!(un(ce,ie)||cs(ce.display,ie))){Qn(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,rt=Array(Fe),mt=0,Lt=function(){++mt==Fe&&Hi(ce,function(){Te=An(ce.doc,Te);var Ln={from:Te,to:Te,text:ce.doc.splitLines(rt.filter(function(fi){return fi!=null}).join(ce.doc.lineSeparator())),origin:"paste"};Zh(ce.doc,Ln),vf(ce.doc,Uo(An(ce.doc,Te),An(ce.doc,Vr(Ln))))})()},Ct=function(Ln,fi){if(ce.options.allowDropFileTypes&&ht(ce.options.allowDropFileTypes,Ln.type)==-1){Lt();return}var Si=new FileReader;Si.onerror=function(){return Lt()},Si.onload=function(){var Ni=Si.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ni)){Lt();return}rt[fi]=Ni,Lt()},Si.readAsText(Ln)},jt=0;jt<Me.length;jt++)Ct(Me[jt],jt);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 cn=ie.dataTransfer.getData("Text");if(cn){var Wt;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(Wt=ce.listSelections()),xc(ce.doc,Uo(Te,Te)),Wt)for(var Tn=0;Tn<Wt.length;++Tn)_c(ce.doc,"",Wt[Tn].anchor,Wt[Tn].head,"drag");ce.replaceSelection(cn,"around","paste"),ce.display.input.focus()}}catch(Ln){}}}}function $g(ie,ce){if(Ce&&(!ie.state.draggingText||+new Date-Rd<100)){ki(ce);return}if(!(un(ie,ce)||cs(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)),Oe(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 rt=0;rt<Te.length;rt++)ie(Te[rt])})}}var Lp=!1;function $l(){Lp||(nd(),Lp=!0)}function nd(){var ie;Bt(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,nm(Mp)},100))}),Bt(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 Rl={};Rl.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"},Rl.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"},Rl.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"},Rl.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"]},Rl.default=oe?Rl.macDefault:Rl.pcDefault;function kp(ie){var ce=ie.split(/-(?!$)/);ie=ce[ce.length-1];for(var Te,Me,Fe,rt,mt=0;mt<ce.length-1;mt++){var Lt=ce[mt];if(/^(cmd|meta|m)$/i.test(Lt))rt=!0;else if(/^a(lt)?$/i.test(Lt))Te=!0;else if(/^(c|ctrl|control)$/i.test(Lt))Me=!0;else if(/^s(hift)?$/i.test(Lt))Fe=!0;else throw new Error("Unrecognized modifier name: "+Lt)}return Te&&(ie="Alt-"+ie),Me&&(ie="Ctrl-"+ie),rt&&(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=Xt(Te.split(" "),kp),rt=0;rt<Fe.length;rt++){var mt=void 0,Lt=void 0;rt==Fe.length-1?(Lt=Fe.join(" "),mt=Me):(Lt=Fe.slice(0,rt+1).join(" "),mt="...");var Ct=ce[Lt];if(!Ct)ce[Lt]=mt;else if(Ct!=mt)throw new Error("Inconsistent bindings for "+Lt)}delete ie[Te]}for(var jt in ce)ie[jt]=ce[jt];return ie}function pu(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 pu(ie,ce.fallthrough,Te,Me);for(var rt=0;rt<ce.fallthrough.length;rt++){var mt=pu(ie,ce.fallthrough[rt],Te,Me);if(mt)return mt}}}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"?Rl[ie]:ie}function Fl(ie,ce){for(var Te=ie.doc.sel.ranges,Me=[],Fe=0;Fe<Te.length;Fe++){for(var rt=ce(Te[Fe]);Me.length&&gn(rt.from,It(Me).to)<=0;){var mt=Me.pop();if(gn(mt.from,rt.from)<0){rt.from=mt.from;break}}Me.push(rt)}Jt(ie,function(){for(var Lt=Me.length-1;Lt>=0;Lt--)_c(ie.doc,"",Me[Lt].from,Me[Lt].to,"+delete");Yl(ie)})}function Np(ie,ce,Te){var Me=Re(ie.text,ce+Te,Te);return Me<0||Me>ie.text.length?null:Me}function da(ie,ce,Te){var Me=Np(ie,ce.ch,Te);return Me==null?null:new Yt(ce.line,Me,Te<0?"after":"before")}function jd(ie,ce,Te,Me,Fe){if(ie){ce.doc.direction=="rtl"&&(Fe=-Fe);var rt=Qt(Te,ce.doc.direction);if(rt){var mt=Fe<0?It(rt):rt[0],Lt=Fe<0==(mt.level==1),Ct=Lt?"after":"before",jt;if(mt.level>0||ce.doc.direction=="rtl"){var cn=Ol(ce,Te);jt=Fe<0?Te.text.length-1:0;var Wt=il(ce,cn,jt).top;jt=Qe(function(Tn){return il(ce,cn,Tn).top==Wt},Fe<0==(mt.level==1)?mt.from:mt.to-1,jt),Ct=="before"&&(jt=Np(Te,jt,1))}else jt=Fe<0?mt.to:mt.from;return new Yt(Me,jt,Ct)}}return new Yt(Me,Fe<0?Te.text.length:0,Fe<0?"before":"after")}function xf(ie,ce,Te,Me){var Fe=Qt(ce,ie.doc.direction);if(!Fe)return da(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 rt=pt(Fe,Te.ch,Te.sticky),mt=Fe[rt];if(ie.doc.direction=="ltr"&&mt.level%2==0&&(Me>0?mt.to>Te.ch:mt.from<Te.ch))return da(ce,Te,Me);var Lt=function(Qi,Lr){return Np(ce,Qi instanceof Yt?Qi.ch:Qi,Lr)},Ct,jt=function(Qi){return ie.options.lineWrapping?(Ct=Ct||Ol(ie,ce),Hs(ie,ce,Ct,Qi)):{begin:0,end:ce.text.length}},cn=jt(Te.sticky=="before"?Lt(Te,-1):Te.ch);if(ie.doc.direction=="rtl"||mt.level==1){var Wt=mt.level==1==Me<0,Tn=Lt(Te,Wt?1:-1);if(Tn!=null&&(Wt?Tn<=mt.to&&Tn<=cn.end:Tn>=mt.from&&Tn>=cn.begin)){var Ln=Wt?"before":"after";return new Yt(Te.line,Tn,Ln)}}var fi=function(Qi,Lr,ur){for(var Ir=function(Fs,La){return La?new Yt(Te.line,Lt(Fs,1),"before"):new Yt(Te.line,Fs,"after")};Qi>=0&&Qi<Fe.length;Qi+=Lr){var uo=Fe[Qi],ar=Lr>0==(uo.level!=1),Bo=ar?ur.begin:Lt(ur.end,-1);if(uo.from<=Bo&&Bo<uo.to||(Bo=ar?uo.from:Lt(uo.to,-1),ur.begin<=Bo&&Bo<ur.end))return Ir(Bo,ar)}},Si=fi(rt+Me,Me,cn);if(Si)return Si;var Ni=Me>0?cn.end:Lt(cn.begin,-1);return Ni!=null&&!(Me>0&&Ni==ce.text.length)&&(Si=fi(Me>0?0:Fe.length-1,Me,jt(Ni)),Si)?Si:null}var Vh={selectAll:ca,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),xt)},killLine:function(ie){return Fl(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:Yt(ce.head.line+1,0)}:{from:ce.head,to:Yt(ce.head.line,Te)}}else return{from:ce.from(),to:ce.to()}})},deleteLine:function(ie){return Fl(ie,function(ce){return{from:Yt(ce.from().line,0),to:An(ie.doc,Yt(ce.to().line+1,0))}})},delLineLeft:function(ie){return Fl(ie,function(ce){return{from:Yt(ce.from().line,0),to:ce.from()}})},delWrappedLineLeft:function(ie){return Fl(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 Fl(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(Yt(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(Yt(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")},Ht)},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")},Ht)},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},Ht)},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 rt=Te[Fe].from(),mt=ut(ie.getLine(rt.line),rt.ch,Me);ce.push(fn(Me-mt%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,rt=_n(ie.doc,Fe.line).text;if(rt){if(Fe.ch==rt.length&&(Fe=new Yt(Fe.line,Fe.ch-1)),Fe.ch>0)Fe=new Yt(Fe.line,Fe.ch+1),ie.replaceRange(rt.charAt(Fe.ch-1)+rt.charAt(Fe.ch-2),Yt(Fe.line,Fe.ch-2),Fe,"+transpose");else if(Fe.line>ie.doc.first){var mt=_n(ie.doc,Fe.line-1).text;mt&&(Fe=new Yt(Fe.line,1),ie.replaceRange(rt.charAt(0)+ie.doc.lineSeparator()+mt.charAt(mt.length-1),Yt(Fe.line-1,mt.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);Yl(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=Bn(Te);return Me!=Te&&(ce=wt(Me)),jd(!0,ie,Me,ce,1)}function od(ie,ce){var Te=_n(ie.doc,ce),Me=Jn(Te);return Me!=Te&&(ce=wt(Me)),jd(!0,ie,Te,ce,-1)}function Dp(ie,ce){var Te=rd(ie,ce.line),Me=_n(ie.doc,Te.line),Fe=Qt(Me,ie.doc.direction);if(!Fe||Fe[0].level==0){var rt=Math.max(Te.ch,Me.text.search(/\S/)),mt=ce.line==Te.line&&ce.ch<=rt&&ce.ch;return Yt(Te.line,mt?0:rt,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)!=_t}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=pu(ce,ie.state.keyMaps[Me],Te,ie);if(Fe)return Fe}return ie.options.extraKeys&&pu(ce,ie.options.extraKeys,Te,ie)||pu(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"&&$i(ie,"keyHandled",ie,ce,Te),(Fe=="handled"||Fe=="multi")&&(Qn(Te),es(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(),!un(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&&!ai&&(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;kt(ce,"CodeMirror-crosshair");function Te(Me){(Me.keyCode==18||!Me.altKey)&&(Ae(ce,"CodeMirror-crosshair"),Cn(document,"keyup",Te),Cn(document,"mouseover",Te))}Bt(document,"keyup",Te),Bt(document,"mouseover",Te)}function Fp(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),un(this,ie)}function Zu(ie){var ce=this;if(!(ie.target&&ie.target!=ce.display.input.getField())&&!(cs(ce.display,ie)||un(ce,ie)||ie.ctrlKey&&!ie.altKey||oe&&ie.metaKey)){var Te=ie.keyCode,Me=ie.charCode;if(pe&&Te==Lc){Lc=null,Qn(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&&gn(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(!(un(ce,ie)||Te.activeTouch&&Te.input.supportsTouch())){if(Te.input.ensurePolled(),Te.shift=ie.shiftKey,cs(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=Ui(ie),rt=Me?jp(Me,Fe):"single";window.focus(),Fe==1&&ce.state.selectingText&&ce.state.selectingText(ie),!(Me&&zp(ce,Fe,Me,rt,ie))&&(Fe==1?Me?om(ce,Me,rt,ie):Wi(ie)==Te.scroller&&Qn(ie):Fe==2?(Me&&Lh(ce.doc,Me),setTimeout(function(){return Te.input.focus()},20)):Fe==3&&(ve?ce.display.input.onContextMenu(ie):ds(ce)))}}}function zp(ie,ce,Te,Me,Fe){var rt="Click";return Me=="double"?rt="Double"+rt:Me=="triple"&&(rt="Triple"+rt),rt=(ce==1?"Left":ce==2?"Middle":"Right")+rt,Ec(ie,Ap(rt,Fe),Fe,function(mt){if(typeof mt=="string"&&(mt=Vh[mt]),!mt)return!1;var Lt=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),Lt=mt(ie,Te)!=_t}finally{ie.state.suppressEdits=!1}return Lt})}function Pf(ie,ce,Te){var Me=ie.getOption("configureMouse"),Fe=Me?Me(ie,ce,Te):{};if(Fe.unit==null){var rt=re?Te.shiftKey&&Te.metaKey:Te.altKey;Fe.unit=rt?"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(ct(Jo,ie),0):ie.curOp.focus=gt();var Fe=Pf(ie,Te,Me),rt=ie.doc.sel,mt;ie.options.dragDrop&&rr&&!ie.isReadOnly()&&Te=="single"&&(mt=rt.contains(ce))>-1&&(gn((mt=rt.ranges[mt]).from(),ce)<0||ce.xRel>0)&&(gn(mt.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,rt=!1,mt=Hi(ie,function(jt){be&&(Fe.scroller.draggable=!1),ie.state.draggingText=!1,Cn(Fe.wrapper.ownerDocument,"mouseup",mt),Cn(Fe.wrapper.ownerDocument,"mousemove",Lt),Cn(Fe.scroller,"dragstart",Ct),Cn(Fe.scroller,"drop",mt),rt||(Qn(jt),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())}),Lt=function(jt){rt=rt||Math.abs(ce.clientX-jt.clientX)+Math.abs(ce.clientY-jt.clientY)>=10},Ct=function(){return rt=!0};be&&(Fe.scroller.draggable=!0),ie.state.draggingText=mt,mt.copy=!Me.moveOnDrag,Fe.scroller.dragDrop&&Fe.scroller.dragDrop(),Bt(Fe.wrapper.ownerDocument,"mouseup",mt),Bt(Fe.wrapper.ownerDocument,"mousemove",Lt),Bt(Fe.scroller,"dragstart",Ct),Bt(Fe.scroller,"drop",mt),ds(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(Yt(ce.line,0),An(ie.doc,Yt(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,rt=ie.doc;Qn(ce);var mt,Lt,Ct=rt.sel,jt=Ct.ranges;if(Me.addNew&&!Me.extend?(Lt=rt.sel.contains(Te),Lt>-1?mt=jt[Lt]:mt=new Or(Te,Te)):(mt=rt.sel.primary(),Lt=rt.sel.primIndex),Me.unit=="rectangle")Me.addNew||(mt=new Or(Te,Te)),Te=va(ie,ce,!0,!0),Lt=-1;else{var cn=Hp(ie,Te,Me.unit);Me.extend?mt=rh(mt,cn.anchor,cn.head,Me.extend):mt=cn}Me.addNew?Lt==-1?(Lt=jt.length,sl(rt,qr(ie,jt.concat([mt]),Lt),{scroll:!1,origin:"*mouse"})):jt.length>1&&jt[Lt].empty()&&Me.unit=="char"&&!Me.extend?(sl(rt,qr(ie,jt.slice(0,Lt).concat(jt.slice(Lt+1)),0),{scroll:!1,origin:"*mouse"}),Ct=rt.sel):sh(rt,Lt,mt,Ut):(Lt=0,sl(rt,new Eo([mt],0),Ut),Ct=rt.sel);var Wt=Te;function Tn(ur){if(gn(Wt,ur)!=0)if(Wt=ur,Me.unit=="rectangle"){for(var Ir=[],uo=ie.options.tabSize,ar=ut(_n(rt,Te.line).text,Te.ch,uo),Bo=ut(_n(rt,ur.line).text,ur.ch,uo),Fs=Math.min(ar,Bo),La=Math.max(ar,Bo),Xs=Math.min(Te.line,ur.line),Ml=Math.min(ie.lastLine(),Math.max(Te.line,ur.line));Xs<=Ml;Xs++){var al=_n(rt,Xs).text,wa=dn(al,Fs,uo);Fs==La?Ir.push(new Or(Yt(Xs,wa),Yt(Xs,wa))):al.length>wa&&Ir.push(new Or(Yt(Xs,wa),Yt(Xs,dn(al,La,uo))))}Ir.length||Ir.push(new Or(Te,Te)),sl(rt,qr(ie,Ct.ranges.slice(0,Lt).concat(Ir),Lt),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(ur)}else{var Bl=mt,Ja=Hp(ie,ur,Me.unit),_a=Bl.anchor,os;gn(Ja.anchor,_a)>0?(os=Ja.head,_a=Un(Bl.from(),Ja.anchor)):(os=Ja.anchor,_a=jn(Bl.to(),Ja.head));var na=Ct.ranges.slice(0);na[Lt]=sm(ie,new Or(An(rt,_a),os)),sl(rt,qr(ie,na,Lt),Ut)}}var Ln=Fe.wrapper.getBoundingClientRect(),fi=0;function Si(ur){var Ir=++fi,uo=va(ie,ur,!0,Me.unit=="rectangle");if(uo)if(gn(uo,Wt)!=0){ie.curOp.focus=gt(),Tn(uo);var ar=bo(Fe,rt);(uo.line>=ar.to||uo.line<ar.from)&&setTimeout(Hi(ie,function(){fi==Ir&&Si(ur)}),150)}else{var Bo=ur.clientY<Ln.top?-20:ur.clientY>Ln.bottom?20:0;Bo&&setTimeout(Hi(ie,function(){fi==Ir&&(Fe.scroller.scrollTop+=Bo,Si(ur))}),50)}}function Ni(ur){ie.state.selectingText=!1,fi=1/0,ur&&(Qn(ur),Fe.input.focus()),Cn(Fe.wrapper.ownerDocument,"mousemove",Qi),Cn(Fe.wrapper.ownerDocument,"mouseup",Lr),rt.history.lastSelOrigin=null}var Qi=Hi(ie,function(ur){ur.buttons===0||!Ui(ur)?Ni(ur):Si(ur)}),Lr=Hi(ie,Ni);ie.state.selectingText=Lr,Bt(Fe.wrapper.ownerDocument,"mousemove",Qi),Bt(Fe.wrapper.ownerDocument,"mouseup",Lr)}function sm(ie,ce){var Te=ce.anchor,Me=ce.head,Fe=_n(ie.doc,Te.line);if(gn(Te,Me)==0&&Te.sticky==Me.sticky)return ce;var rt=Qt(Fe);if(!rt)return ce;var mt=pt(rt,Te.ch,Te.sticky),Lt=rt[mt];if(Lt.from!=Te.ch&&Lt.to!=Te.ch)return ce;var Ct=mt+(Lt.from==Te.ch==(Lt.level!=1)?0:1);if(Ct==0||Ct==rt.length)return ce;var jt;if(Me.line!=Te.line)jt=(Me.line-Te.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var cn=pt(rt,Me.ch,Me.sticky),Wt=cn-mt||(Me.ch-Te.ch)*(Lt.level==1?-1:1);cn==Ct-1||cn==Ct?jt=Wt<0:jt=Wt>0}var Tn=rt[Ct+(jt?-1:0)],Ln=jt==(Tn.level==1),fi=Ln?Tn.from:Tn.to,Si=Ln?"after":"before";return Te.ch==fi&&Te.sticky==Si?ce:new Or(new Yt(Te.line,fi,Si),Me)}function Cf(ie,ce,Te,Me){var Fe,rt;if(ce.touches)Fe=ce.touches[0].clientX,rt=ce.touches[0].clientY;else try{Fe=ce.clientX,rt=ce.clientY}catch(Tn){return!1}if(Fe>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;Me&&Qn(ce);var mt=ie.display,Lt=mt.lineDiv.getBoundingClientRect();if(rt>Lt.bottom||!pn(ie,Te))return ei(ce);rt-=Lt.top-mt.viewOffset;for(var Ct=0;Ct<ie.display.gutterSpecs.length;++Ct){var jt=mt.gutters.childNodes[Ct];if(jt&&jt.getBoundingClientRect().right>=Fe){var cn=zt(ie.doc,rt),Wt=ie.display.gutterSpecs[Ct];return mn(ie,Te,ie,cn,Wt.className,ce),ei(ce)}}}function Ef(ie,ce){return Cf(ie,ce,"gutterClick",!0)}function Lf(ie,ce){cs(ie.display,ce)||am(ie,ce)||un(ie,ce,"contextmenu")||ve||ie.display.input.onContextMenu(ce)}function am(ie,ce){return pn(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-"),hu(ie)}var Kh={toString:function(){return"CodeMirror.Init"}},Gp={},zd={};function lm(ie){var ce=ie.optionHandlers;function Te(Me,Fe,rt,mt){ie.defaults[Me]=Fe,rt&&(ce[Me]=mt?function(Lt,Ct,jt){jt!=Kh&&rt(Lt,Ct,jt)}:rt)}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,lo(Me)},!0),Te("indentUnit",2,lo,!0),Te("indentWithTabs",!1),Te("smartIndent",!0),Te("tabSize",4,function(Me){Tu(Me),hu(Me),ms(Me)},!0),Te("lineSeparator",null,function(Me,Fe){if(Me.doc.lineSep=Fe,!!Fe){var rt=[],mt=Me.doc.first;Me.doc.iter(function(Ct){for(var jt=0;;){var cn=Ct.text.indexOf(Fe,jt);if(cn==-1)break;jt=cn+Fe.length,rt.push(Yt(mt,cn))}mt++});for(var Lt=rt.length-1;Lt>=0;Lt--)_c(Me.doc,Fe,rt[Lt],Yt(rt[Lt].line,rt[Lt].ch+Fe.length))}}),Te("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Me,Fe,rt){Me.state.specialChars=new RegExp(Fe.source+(Fe.test(" ")?"":"| "),"g"),rt!=Kh&&Me.refresh()}),Te("specialCharPlaceholder",Kr,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),Gi(Me)},!0),Te("keyMap","default",function(Me,Fe,rt){var mt=Cc(Fe),Lt=rt!=Kh&&Cc(rt);Lt&&Lt.detach&&Lt.detach(Me,mt),mt.attach&&mt.attach(Me,Lt||null)}),Te("extraKeys",null),Te("configureMouse",null),Te("lineWrapping",!1,um,!0),Te("gutters",[],function(Me,Fe){Me.display.gutterSpecs=Gr(Fe,Me.options.lineNumbers),Gi(Me)},!0),Te("fixedGutter",!0,function(Me,Fe){Me.display.gutters.style.left=Fe?Cu(Me.display)+"px":"0",Me.refresh()},!0),Te("coverGutterNextToScrollbar",!1,function(Me){return ya(Me)},!0),Te("scrollbarStyle","native",function(Me){cu(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=Gr(Me.options.gutters,Fe),Gi(Me)},!0),Te("firstLineNumber",1,Gi,!0),Te("lineNumberFormatter",function(Me){return Me},Gi,!0),Te("showCursorWhenSelecting",!1,ea,!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,ea,!0),Te("singleCursorHeightPerLine",!0,ea,!0),Te("workTime",100),Te("workDelay",100),Te("flattenSpans",!0,Tu,!0),Te("addModeClass",!1,Tu,!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,Tu,!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,rt=ce?Bt:Cn;rt(ie.display.scroller,"dragstart",Fe.start),rt(ie.display.scroller,"dragenter",Fe.enter),rt(ie.display.scroller,"dragover",Fe.over),rt(ie.display.scroller,"dragleave",Fe.leave),rt(ie.display.scroller,"drop",Fe.drop)}}function um(ie){ie.options.lineWrapping?(kt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(Ae(ie.display.wrapper,"CodeMirror-wrap"),nr(ie)),Fr(ie),ms(ie),hu(ie),setTimeout(function(){return ya(ie)},100)}function ts(ie,ce){var Te=this;if(!(this instanceof ts))return new ts(ie,ce);this.options=ce=ce?Rt(ce):{},Rt(Gp,ce,!1);var Me=ce.value;typeof Me=="string"?Me=new Xa(Me,ce.mode,null,ce.lineSeparator,ce.direction):ce.mode&&(Me.modeOption=ce.mode),this.doc=Me;var Fe=new ts.inputStyles[ce.inputStyle](this),rt=this.display=new $o(ie,Me,Fe,ce);rt.wrapper.CodeMirror=this,Mf(this),ce.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),cu(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&&rt.input.focus(),Ce&&xe<11&&setTimeout(function(){return Te.display.input.reset(!0)},20),ld(this),$l(),Ya(this),this.curOp.forceUpdate=!0,Au(this,Me),ce.autofocus&&!z||this.hasFocus()?setTimeout(function(){Te.hasFocus()&&!Te.state.focused&&No(Te)},20):nh(this);for(var mt in zd)zd.hasOwnProperty(mt)&&zd[mt](this,ce[mt],Kh);Co(this),ce.finishInit&&ce.finishInit(this);for(var Lt=0;Lt<kc.length;++Lt)kc[Lt](this);Jl(this),be&&ce.lineWrapping&&getComputedStyle(rt.lineDiv).textRendering=="optimizelegibility"&&(rt.lineDiv.style.textRendering="auto")}ts.defaults=Gp,ts.optionHandlers=zd;function ld(ie){var ce=ie.display;Bt(ce.scroller,"mousedown",Hi(ie,Vu)),Ce&&xe<11?Bt(ce.scroller,"dblclick",Hi(ie,function(Ct){if(!un(ie,Ct)){var jt=va(ie,Ct);if(!(!jt||Ef(ie,Ct)||cs(ie.display,Ct))){Qn(Ct);var cn=ie.findWordAt(jt);Lh(ie.doc,cn.anchor,cn.head)}}})):Bt(ce.scroller,"dblclick",function(Ct){return un(ie,Ct)||Qn(Ct)}),Bt(ce.scroller,"contextmenu",function(Ct){return Lf(ie,Ct)}),Bt(ce.input.getField(),"contextmenu",function(Ct){ce.scroller.contains(Ct.target)||Lf(ie,Ct)});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 rt(Ct){if(Ct.touches.length!=1)return!1;var jt=Ct.touches[0];return jt.radiusX<=1&&jt.radiusY<=1}function mt(Ct,jt){if(jt.left==null)return!0;var cn=jt.left-Ct.left,Wt=jt.top-Ct.top;return cn*cn+Wt*Wt>20*20}Bt(ce.scroller,"touchstart",function(Ct){if(!un(ie,Ct)&&!rt(Ct)&&!Ef(ie,Ct)){ce.input.ensurePolled(),clearTimeout(Te);var jt=+new Date;ce.activeTouch={start:jt,moved:!1,prev:jt-Me.end<=300?Me:null},Ct.touches.length==1&&(ce.activeTouch.left=Ct.touches[0].pageX,ce.activeTouch.top=Ct.touches[0].pageY)}}),Bt(ce.scroller,"touchmove",function(){ce.activeTouch&&(ce.activeTouch.moved=!0)}),Bt(ce.scroller,"touchend",function(Ct){var jt=ce.activeTouch;if(jt&&!cs(ce,Ct)&&jt.left!=null&&!jt.moved&&new Date-jt.start<300){var cn=ie.coordsChar(ce.activeTouch,"page"),Wt;!jt.prev||mt(jt,jt.prev)?Wt=new Or(cn,cn):!jt.prev.prev||mt(jt,jt.prev.prev)?Wt=ie.findWordAt(cn):Wt=new Or(Yt(cn.line,0),An(ie.doc,Yt(cn.line+1,0))),ie.setSelection(Wt.anchor,Wt.head),ie.focus(),Qn(Ct)}Fe()}),Bt(ce.scroller,"touchcancel",Fe),Bt(ce.scroller,"scroll",function(){ce.scroller.clientHeight&&(Cl(ie,ce.scroller.scrollTop),Xl(ie,ce.scroller.scrollLeft,!0),mn(ie,"scroll",ie))}),Bt(ce.scroller,"mousewheel",function(Ct){return Fo(ie,Ct)}),Bt(ce.scroller,"DOMMouseScroll",function(Ct){return Fo(ie,Ct)}),Bt(ce.wrapper,"scroll",function(){return ce.wrapper.scrollTop=ce.wrapper.scrollLeft=0}),ce.dragFunctions={enter:function(Ct){un(ie,Ct)||ki(Ct)},over:function(Ct){un(ie,Ct)||(em(ie,Ct),ki(Ct))},start:function(Ct){return $g(ie,Ct)},drop:Hi(ie,Ep),leave:function(Ct){un(ie,Ct)||tm(ie)}};var Lt=ce.input.getField();Bt(Lt,"keyup",function(Ct){return Fp.call(ie,Ct)}),Bt(Lt,"keydown",Hi(ie,Ip)),Bt(Lt,"keypress",Hi(ie,Zu)),Bt(Lt,"focus",function(Ct){return No(ie,Ct)}),Bt(Lt,"blur",function(Ct){return nh(ie,Ct)})}var kc=[];ts.defineInitHook=function(ie){return kc.push(ie)};function Ea(ie,ce,Te,Me){var Fe=ie.doc,rt;Te==null&&(Te="add"),Te=="smart"&&(Fe.mode.indent?rt=Mr(ie,ce).state:Te="prev");var mt=ie.options.tabSize,Lt=_n(Fe,ce),Ct=ut(Lt.text,null,mt);Lt.stateAfter&&(Lt.stateAfter=null);var jt=Lt.text.match(/^\s*/)[0],cn;if(!Me&&!/\S/.test(Lt.text))cn=0,Te="not";else if(Te=="smart"&&(cn=Fe.mode.indent(rt,Lt.text.slice(jt.length),Lt.text),cn==_t||cn>150)){if(!Me)return;Te="prev"}Te=="prev"?ce>Fe.first?cn=ut(_n(Fe,ce-1).text,null,mt):cn=0:Te=="add"?cn=Ct+ie.options.indentUnit:Te=="subtract"?cn=Ct-ie.options.indentUnit:typeof Te=="number"&&(cn=Ct+Te),cn=Math.max(0,cn);var Wt="",Tn=0;if(ie.options.indentWithTabs)for(var Ln=Math.floor(cn/mt);Ln;--Ln)Tn+=mt,Wt+=" ";if(Tn<cn&&(Wt+=fn(cn-Tn)),Wt!=jt)return _c(Fe,Wt,Yt(ce,0),Yt(ce,jt.length),"+input"),Lt.stateAfter=null,!0;for(var fi=0;fi<Fe.sel.ranges.length;fi++){var Si=Fe.sel.ranges[fi];if(Si.head.line==ce&&Si.head.ch<jt.length){var Ni=Yt(ce,jt.length);sh(Fe,fi,new Or(Ni,Ni));break}}}var Ll=null;function Tc(ie){Ll=ie}function Ud(ie,ce,Te,Me,Fe){var rt=ie.doc;ie.display.shift=!1,Me||(Me=rt.sel);var mt=+new Date-200,Lt=Fe=="paste"||ie.state.pasteIncoming>mt,Ct=pr(ce),jt=null;if(Lt&&Me.ranges.length>1)if(Ll&&Ll.text.join(`
`)==ce){if(Me.ranges.length%Ll.text.length==0){jt=[];for(var cn=0;cn<Ll.text.length;cn++)jt.push(rt.splitLines(Ll.text[cn]))}}else Ct.length==Me.ranges.length&&ie.options.pasteLinesPerSelection&&(jt=Xt(Ct,function(Qi){return[Qi]}));for(var Wt=ie.curOp.updateInput,Tn=Me.ranges.length-1;Tn>=0;Tn--){var Ln=Me.ranges[Tn],fi=Ln.from(),Si=Ln.to();Ln.empty()&&(Te&&Te>0?fi=Yt(fi.line,fi.ch-Te):ie.state.overwrite&&!Lt?Si=Yt(Si.line,Math.min(_n(rt,Si.line).text.length,Si.ch+It(Ct).length)):Lt&&Ll&&Ll.lineWise&&Ll.text.join(`
`)==Ct.join(`
`)&&(fi=Si=Yt(fi.line,0)));var Ni={from:fi,to:Si,text:jt?jt[Tn%jt.length]:Ct,origin:Fe||(Lt?"paste":ie.state.cutIncoming>mt?"cut":"+input")};Zh(ie.doc,Ni),$i(ie,"inputRead",ie,Ni)}ce&&!Lt&&Zp(ie,ce),Yl(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Wt),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 rt=ie.getModeAt(Fe.head),mt=!1;if(rt.electricChars){for(var Lt=0;Lt<rt.electricChars.length;Lt++)if(ce.indexOf(rt.electricChars.charAt(Lt))>-1){mt=Ea(ie,Fe.head.line,"smart");break}}else rt.electricInput&&rt.electricInput.test(_n(ie.doc,Fe.head.line).text.slice(0,Fe.head.ch))&&(mt=Ea(ie,Fe.head.line,"smart"));mt&&$i(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,rt={anchor:Yt(Fe,0),head:Yt(Fe+1,0)};Te.push(rt),ce.push(ie.getRange(rt.anchor,rt.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 rt=this.options,mt=rt[Me];rt[Me]==Fe&&Me!="mode"||(rt[Me]=Fe,ce.hasOwnProperty(Me)&&Hi(this,ce[Me])(this,Fe,mt),mn(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,rt=0;rt<Fe.length;++rt)if(Fe[rt]==Me||Fe[rt].name==Me)return Fe.splice(rt,1),!0},addOverlay:Pi(function(Me,Fe){var rt=Me.token?Me:ie.getMode(this.options,Me);if(rt.startState)throw new Error("Overlays may not be stateful.");tn(this.state.overlays,{mode:rt,modeSpec:Me,opaque:Fe&&Fe.opaque,priority:Fe&&Fe.priority||0},function(mt){return mt.priority}),this.state.modeGen++,ms(this)}),removeOverlay:Pi(function(Me){for(var Fe=this.state.overlays,rt=0;rt<Fe.length;++rt){var mt=Fe[rt].modeSpec;if(mt==Me||typeof Me=="string"&&mt.name==Me){Fe.splice(rt,1),this.state.modeGen++,ms(this);return}}}),indentLine:Pi(function(Me,Fe,rt){typeof Fe!="string"&&typeof Fe!="number"&&(Fe==null?Fe=this.options.smartIndent?"smart":"prev":Fe=Fe?"add":"subtract"),En(this.doc,Me)&&Ea(this,Me,Fe,rt)}),indentSelection:Pi(function(Me){for(var Fe=this.doc.sel.ranges,rt=-1,mt=0;mt<Fe.length;mt++){var Lt=Fe[mt];if(Lt.empty())Lt.head.line>rt&&(Ea(this,Lt.head.line,Me,!0),rt=Lt.head.line,mt==this.doc.sel.primIndex&&Yl(this));else{var Ct=Lt.from(),jt=Lt.to(),cn=Math.max(rt,Ct.line);rt=Math.min(this.lastLine(),jt.line-(jt.ch?0:1))+1;for(var Wt=cn;Wt<rt;++Wt)Ea(this,Wt,Me);var Tn=this.doc.sel.ranges;Ct.ch==0&&Fe.length==Tn.length&&Tn[mt].from().ch>0&&sh(this.doc,mt,new Or(Ct,Tn[mt].to()),xt)}}}),getTokenAt:function(Me,Fe){return gi(this,Me,Fe)},getLineTokens:function(Me,Fe){return gi(this,Yt(Me),Fe,!0)},getTokenTypeAt:function(Me){Me=An(this.doc,Me);var Fe=lr(this,_n(this.doc,Me.line)),rt=0,mt=(Fe.length-1)/2,Lt=Me.ch,Ct;if(Lt==0)Ct=Fe[2];else for(;;){var jt=rt+mt>>1;if((jt?Fe[jt*2-1]:0)>=Lt)mt=jt;else if(Fe[jt*2+1]<Lt)rt=jt+1;else{Ct=Fe[jt*2+2];break}}var cn=Ct?Ct.indexOf("overlay "):-1;return cn<0?Ct:cn==0?null:Ct.slice(0,cn-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 rt=[];if(!Te.hasOwnProperty(Fe))return rt;var mt=Te[Fe],Lt=this.getModeAt(Me);if(typeof Lt[Fe]=="string")mt[Lt[Fe]]&&rt.push(mt[Lt[Fe]]);else if(Lt[Fe])for(var Ct=0;Ct<Lt[Fe].length;Ct++){var jt=mt[Lt[Fe][Ct]];jt&&rt.push(jt)}else Lt.helperType&&mt[Lt.helperType]?rt.push(mt[Lt.helperType]):mt[Lt.name]&&rt.push(mt[Lt.name]);for(var cn=0;cn<mt._global.length;cn++){var Wt=mt._global[cn];Wt.pred(Lt,this)&&ht(rt,Wt.val)==-1&&rt.push(Wt.val)}return rt},getStateAfter:function(Me,Fe){var rt=this.doc;return Me=Gn(rt,Me==null?rt.first+rt.size-1:Me),Mr(this,Me+1,Fe).state},cursorCoords:function(Me,Fe){var rt,mt=this.doc.sel.primary();return Me==null?rt=mt.head:typeof Me=="object"?rt=An(this.doc,Me):rt=Me?mt.from():mt.to(),Yo(this,rt,Fe||"page")},charCoords:function(Me,Fe){return Ca(this,An(this.doc,Me),Fe||"page")},coordsChar:function(Me,Fe){return Me=Il(this,Me,Fe||"page"),Us(this,Me.left,Me.top)},lineAtHeight:function(Me,Fe){return Me=Il(this,{top:Me,left:0},Fe||"page").top,zt(this.doc,Me+this.display.viewOffset)},heightAtLine:function(Me,Fe,rt){var mt=!1,Lt;if(typeof Me=="number"){var Ct=this.doc.first+this.doc.size-1;Me<this.doc.first?Me=this.doc.first:Me>Ct&&(Me=Ct,mt=!0),Lt=_n(this.doc,Me)}else Lt=Me;return $s(this,Lt,{top:0,left:0},Fe||"page",rt||mt).top+(mt?this.doc.height-ji(Lt):0)},defaultTextHeight:function(){return sa(this.display)},defaultCharWidth:function(){return rl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Me,Fe,rt,mt,Lt){var Ct=this.display;Me=Yo(this,An(this.doc,Me));var jt=Me.bottom,cn=Me.left;if(Fe.style.position="absolute",Fe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Fe),Ct.sizer.appendChild(Fe),mt=="over")jt=Me.top;else if(mt=="above"||mt=="near"){var Wt=Math.max(Ct.wrapper.clientHeight,this.doc.height),Tn=Math.max(Ct.sizer.clientWidth,Ct.lineSpace.clientWidth);(mt=="above"||Me.bottom+Fe.offsetHeight>Wt)&&Me.top>Fe.offsetHeight?jt=Me.top-Fe.offsetHeight:Me.bottom+Fe.offsetHeight<=Wt&&(jt=Me.bottom),cn+Fe.offsetWidth>Tn&&(cn=Tn-Fe.offsetWidth)}Fe.style.top=jt+"px",Fe.style.left=Fe.style.right="",Lt=="right"?(cn=Ct.sizer.clientWidth-Fe.offsetWidth,Fe.style.right="0px"):(Lt=="left"?cn=0:Lt=="middle"&&(cn=(Ct.sizer.clientWidth-Fe.offsetWidth)/2),Fe.style.left=cn+"px"),rt&&ih(this,{left:cn,top:jt,right:cn+Fe.offsetWidth,bottom:jt+Fe.offsetHeight})},triggerOnKeyDown:Pi(Ip),triggerOnKeyPress:Pi(Zu),triggerOnKeyUp:Fp,triggerOnMouseDown:Pi(Vu),execCommand:function(Me){if(Vh.hasOwnProperty(Me))return Vh[Me].call(null,this)},triggerElectric:Pi(function(Me){Zp(this,Me)}),findPosH:function(Me,Fe,rt,mt){var Lt=1;Fe<0&&(Lt=-1,Fe=-Fe);for(var Ct=An(this.doc,Me),jt=0;jt<Fe&&(Ct=Hd(this.doc,Ct,Lt,rt,mt),!Ct.hitSide);++jt);return Ct},moveH:Pi(function(Me,Fe){var rt=this;this.extendSelectionsBy(function(mt){return rt.display.shift||rt.doc.extend||mt.empty()?Hd(rt.doc,mt.head,Me,Fe,rt.options.rtlMoveVisually):Me<0?mt.from():mt.to()},Ht)}),deleteH:Pi(function(Me,Fe){var rt=this.doc.sel,mt=this.doc;rt.somethingSelected()?mt.replaceSelection("",null,"+delete"):Fl(this,function(Lt){var Ct=Hd(mt,Lt.head,Me,Fe,!1);return Me<0?{from:Ct,to:Lt.head}:{from:Lt.head,to:Ct}})}),findPosV:function(Me,Fe,rt,mt){var Lt=1,Ct=mt;Fe<0&&(Lt=-1,Fe=-Fe);for(var jt=An(this.doc,Me),cn=0;cn<Fe;++cn){var Wt=Yo(this,jt,"div");if(Ct==null?Ct=Wt.left:Wt.left=Ct,jt=Xh(this,Wt,Lt,rt),jt.hitSide)break}return jt},moveV:Pi(function(Me,Fe){var rt=this,mt=this.doc,Lt=[],Ct=!this.display.shift&&!mt.extend&&mt.sel.somethingSelected();if(mt.extendSelectionsBy(function(cn){if(Ct)return Me<0?cn.from():cn.to();var Wt=Yo(rt,cn.head,"div");cn.goalColumn!=null&&(Wt.left=cn.goalColumn),Lt.push(Wt.left);var Tn=Xh(rt,Wt,Me,Fe);return Fe=="page"&&cn==mt.sel.primary()&&Ph(rt,Ca(rt,Tn,"div").top-Wt.top),Tn},Ht),Lt.length)for(var jt=0;jt<mt.sel.ranges.length;jt++)mt.sel.ranges[jt].goalColumn=Lt[jt]}),findWordAt:function(Me){var Fe=this.doc,rt=_n(Fe,Me.line).text,mt=Me.ch,Lt=Me.ch;if(rt){var Ct=this.getHelper(Me,"wordChars");(Me.sticky=="before"||Lt==rt.length)&&mt?--mt:++Lt;for(var jt=rt.charAt(mt),cn=dt(jt,Ct)?function(Wt){return dt(Wt,Ct)}:/\s/.test(jt)?function(Wt){return/\s/.test(Wt)}:function(Wt){return!/\s/.test(Wt)&&!dt(Wt)};mt>0&&cn(rt.charAt(mt-1));)--mt;for(;Lt<rt.length&&cn(rt.charAt(Lt));)++Lt}return new Or(Yt(Me.line,mt),Yt(Me.line,Lt))},toggleOverwrite:function(Me){Me!=null&&Me==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?kt(this.display.cursorDiv,"CodeMirror-overwrite"):Ae(this.display.cursorDiv,"CodeMirror-overwrite"),mn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==gt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Pi(function(Me,Fe){Yr(this,Me,Fe)}),getScrollInfo:function(){var Me=this.display.scroller;return{left:Me.scrollLeft,top:Me.scrollTop,height:Me.scrollHeight-is(this)-this.display.barHeight,width:Me.scrollWidth-is(this)-this.display.barWidth,clientHeight:Sa(this),clientWidth:Pa(this)}},scrollIntoView:Pi(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:Yt(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:Pi(function(Me,Fe){var rt=this,mt=function(Ct){return typeof Ct=="number"||/^\d+$/.test(String(Ct))?Ct+"px":Ct};Me!=null&&(this.display.wrapper.style.width=mt(Me)),Fe!=null&&(this.display.wrapper.style.height=mt(Fe)),this.options.lineWrapping&&uu(this);var Lt=this.display.viewFrom;this.doc.iter(Lt,this.display.viewTo,function(Ct){if(Ct.widgets){for(var jt=0;jt<Ct.widgets.length;jt++)if(Ct.widgets[jt].noHScroll){ro(rt,Lt,"widget");break}}++Lt}),this.curOp.forceUpdate=!0,mn(this,"refresh",this)}),operation:function(Me){return Jt(this,Me)},startOperation:function(){return Ya(this)},endOperation:function(){return Jl(this)},refresh:Pi(function(){var Me=this.display.cachedTextHeight;ms(this),this.curOp.forceUpdate=!0,hu(this),Yr(this,this.doc.scrollLeft,this.doc.scrollTop),rs(this.display),(Me==null||Math.abs(Me-sa(this.display))>.5||this.options.lineWrapping)&&Fr(this),mn(this,"refresh",this)}),swapDoc:Pi(function(Me){var Fe=this.doc;return Fe.cm=null,this.state.selectingText&&this.state.selectingText(),Au(this,Me),hu(this),this.display.input.reset(),Yr(this,Me.scrollLeft,Me.scrollTop),this.curOp.forceScroll=!0,$i(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}},Hn(ie),ie.registerHelper=function(Me,Fe,rt){Te.hasOwnProperty(Me)||(Te[Me]=ie[Me]={_global:[]}),Te[Me][Fe]=rt},ie.registerGlobalHelper=function(Me,Fe,rt,mt){ie.registerHelper(Me,Fe,mt),Te[Me]._global.push({pred:rt,val:mt})}}function Hd(ie,ce,Te,Me,Fe){var rt=ce,mt=Te,Lt=_n(ie,ce.line),Ct=Fe&&ie.direction=="rtl"?-Te:Te;function jt(){var Lr=ce.line+Ct;return Lr<ie.first||Lr>=ie.first+ie.size?!1:(ce=new Yt(Lr,ce.ch,ce.sticky),Lt=_n(ie,Lr))}function cn(Lr){var ur;if(Me=="codepoint"){var Ir=Lt.text.charCodeAt(ce.ch+(Me>0?0:-1));isNaN(Ir)?ur=null:ur=new Yt(ce.line,Math.max(0,Math.min(Lt.text.length,ce.ch+Te*(Ir>=55296&&Ir<56320?2:1))),-Te)}else Fe?ur=xf(ie.cm,Lt,ce,Te):ur=da(Lt,ce,Te);if(ur==null)if(!Lr&&jt())ce=jd(Fe,ie.cm,Lt,ce.line,Ct);else return!1;else ce=ur;return!0}if(Me=="char"||Me=="codepoint")cn();else if(Me=="column")cn(!0);else if(Me=="word"||Me=="group")for(var Wt=null,Tn=Me=="group",Ln=ie.cm&&ie.cm.getHelper(ce,"wordChars"),fi=!0;!(Te<0&&!cn(!fi));fi=!1){var Si=Lt.text.charAt(ce.ch)||`
`,Ni=dt(Si,Ln)?"w":Tn&&Si==`
`?"n":!Tn||/\s/.test(Si)?null:"p";if(Tn&&!fi&&!Ni&&(Ni="s"),Wt&&Wt!=Ni){Te<0&&(Te=1,cn(),ce.sticky="after");break}if(Ni&&(Wt=Ni),Te>0&&!cn(!fi))break}var Qi=Dd(ie,ce,rt,mt,!0);return yn(rt,Qi)&&(Qi.hitSide=!0),Qi}function Xh(ie,ce,Te,Me){var Fe=ie.doc,rt=ce.left,mt;if(Me=="page"){var Lt=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ct=Math.max(Lt-.5*sa(ie.display),3);mt=(Te>0?ce.bottom:ce.top)+Te*Ct}else Me=="line"&&(mt=Te>0?ce.bottom+3:ce.top-3);for(var jt;jt=Us(ie,rt,mt),!!jt.outside;){if(Te<0?mt<=0:mt>=Fe.height){jt.hitSide=!0;break}mt+=Te*5}return jt}var Ps=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};Ps.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 rt(Lt){for(var Ct=Lt.target;Ct;Ct=Ct.parentNode){if(Ct==Fe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ct.className))break}return!1}Bt(Fe,"paste",function(Lt){!rt(Lt)||un(Me,Lt)||Wp(Lt,Me)||xe<=11&&setTimeout(Hi(Me,function(){return ce.updateFromDOM()}),20)}),Bt(Fe,"compositionstart",function(Lt){ce.composing={data:Lt.data,done:!1}}),Bt(Fe,"compositionupdate",function(Lt){ce.composing||(ce.composing={data:Lt.data,done:!1})}),Bt(Fe,"compositionend",function(Lt){ce.composing&&(Lt.data!=ce.composing.data&&ce.readFromDOMSoon(),ce.composing.done=!0)}),Bt(Fe,"touchstart",function(){return Te.forceCompositionEnd()}),Bt(Fe,"input",function(){ce.composing||ce.readFromDOMSoon()});function mt(Lt){if(!(!rt(Lt)||un(Me,Lt))){if(Me.somethingSelected())Tc({lineWise:!1,text:Me.getSelections()}),Lt.type=="cut"&&Me.replaceSelection("",null,"cut");else if(Me.options.lineWiseCopyCut){var Ct=Vp(Me);Tc({lineWise:!0,text:Ct.text}),Lt.type=="cut"&&Me.operation(function(){Me.setSelections(Ct.ranges,0,xt),Me.replaceSelection("",null,"cut")})}else return;if(Lt.clipboardData){Lt.clipboardData.clearData();var jt=Ll.text.join(`
`);if(Lt.clipboardData.setData("Text",jt),Lt.clipboardData.getData("Text")==jt){Lt.preventDefault();return}}var cn=Yp(),Wt=cn.firstChild;Me.display.lineSpace.insertBefore(cn,Me.display.lineSpace.firstChild),Wt.value=Ll.text.join(`
`);var Tn=document.activeElement;bt(Wt),setTimeout(function(){Me.display.lineSpace.removeChild(cn),Tn.focus(),Tn==Fe&&Te.showPrimarySelection()},50)}}Bt(Fe,"copy",mt),Bt(Fe,"cut",mt)},Ps.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},Ps.prototype.prepareSelection=function(){var ie=Eu(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},Ps.prototype.showSelection=function(ie,ce){!ie||!this.cm.display.view.length||((ie.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},Ps.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ps.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 rt=Gd(ce,ie.anchorNode,ie.anchorOffset),mt=Gd(ce,ie.focusNode,ie.focusOffset);if(!(rt&&!rt.bad&&mt&&!mt.bad&&gn(Un(rt,mt),Me)==0&&gn(jn(rt,mt),Fe)==0)){var Lt=ce.display.view,Ct=Me.line>=ce.display.viewFrom&&Tf(ce,Me)||{node:Lt[0].measure.map[2],offset:0},jt=Fe.line<ce.display.viewTo&&Tf(ce,Fe);if(!jt){var cn=Lt[Lt.length-1].measure,Wt=cn.maps?cn.maps[cn.maps.length-1]:cn.map;jt={node:Wt[Wt.length-1],offset:Wt[Wt.length-2]-Wt[Wt.length-3]}}if(!Ct||!jt){ie.removeAllRanges();return}var Tn=ie.rangeCount&&ie.getRangeAt(0),Ln;try{Ln=Xe(Ct.node,Ct.offset,jt.offset,jt.node)}catch(fi){}Ln&&(!ke&&ce.state.focused?(ie.collapse(Ct.node,Ct.offset),Ln.collapsed||(ie.removeAllRanges(),ie.addRange(Ln))):(ie.removeAllRanges(),ie.addRange(Ln)),Tn&&ie.anchorNode==null?ie.addRange(Tn):ke&&this.startGracePeriod()),this.rememberSelection()}},Ps.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)},Ps.prototype.showMultipleSelections=function(ie){Oe(this.cm.display.cursorDiv,ie.cursors),Oe(this.cm.display.selectionDiv,ie.selection)},Ps.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},Ps.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ce=ie.getRangeAt(0).commonAncestorContainer;return vt(this.div,ce)},Ps.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ps.prototype.blur=function(){this.div.blur()},Ps.prototype.getField=function(){return this.div},Ps.prototype.supportsTouch=function(){return!0},Ps.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)},Ps.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},Ps.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(){sl(ce.doc,Uo(Te,Me),xt),(Te.bad||Me.bad)&&(ce.curOp.selectionChanged=!0)})}}},Ps.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=Yt(Me.line-1,_n(ie.doc,Me.line-1).length)),Fe.ch==_n(ie.doc,Fe.line).text.length&&Fe.line<ie.lastLine()&&(Fe=Yt(Fe.line+1,0)),Me.line<ce.viewFrom||Fe.line>ce.viewTo-1)return!1;var rt,mt,Lt;Me.line==ce.viewFrom||(rt=Is(ie,Me.line))==0?(mt=wt(ce.view[0].line),Lt=ce.view[0].node):(mt=wt(ce.view[rt].line),Lt=ce.view[rt-1].node.nextSibling);var Ct=Is(ie,Fe.line),jt,cn;if(Ct==ce.view.length-1?(jt=ce.viewTo-1,cn=ce.lineDiv.lastChild):(jt=wt(ce.view[Ct+1].line)-1,cn=ce.view[Ct+1].node.previousSibling),!Lt)return!1;for(var Wt=ie.doc.splitLines(hd(ie,Lt,cn,mt,jt)),Tn=zn(ie.doc,Yt(mt,0),Yt(jt,_n(ie.doc,jt).text.length));Wt.length>1&&Tn.length>1;)if(It(Wt)==It(Tn))Wt.pop(),Tn.pop(),jt--;else if(Wt[0]==Tn[0])Wt.shift(),Tn.shift(),mt++;else break;for(var Ln=0,fi=0,Si=Wt[0],Ni=Tn[0],Qi=Math.min(Si.length,Ni.length);Ln<Qi&&Si.charCodeAt(Ln)==Ni.charCodeAt(Ln);)++Ln;for(var Lr=It(Wt),ur=It(Tn),Ir=Math.min(Lr.length-(Wt.length==1?Ln:0),ur.length-(Tn.length==1?Ln:0));fi<Ir&&Lr.charCodeAt(Lr.length-fi-1)==ur.charCodeAt(ur.length-fi-1);)++fi;if(Wt.length==1&&Tn.length==1&&mt==Me.line)for(;Ln&&Ln>Me.ch&&Lr.charCodeAt(Lr.length-fi-1)==ur.charCodeAt(ur.length-fi-1);)Ln--,fi++;Wt[Wt.length-1]=Lr.slice(0,Lr.length-fi).replace(/^\u200b+/,""),Wt[0]=Wt[0].slice(Ln).replace(/\u200b+$/,"");var uo=Yt(mt,Ln),ar=Yt(jt,Tn.length?It(Tn).length-fi:0);if(Wt.length>1||Wt[0]||gn(uo,ar))return _c(ie.doc,Wt,uo,ar,"+input"),!0},Ps.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ps.prototype.reset=function(){this.forceCompositionEnd()},Ps.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ps.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))},Ps.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&Jt(this.cm,function(){return ms(ie.cm)})},Ps.prototype.setUneditable=function(ie){ie.contentEditable="false"},Ps.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||Hi(this.cm,Ud)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},Ps.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},Ps.prototype.onContextMenu=function(){},Ps.prototype.resetPosition=function(){},Ps.prototype.needsContentAttribute=!0;function Tf(ie,ce){var Te=fl(ie,ce.line);if(!Te||Te.hidden)return null;var Me=_n(ie.doc,ce.line),Fe=_s(Te,Me,ce.line),rt=Qt(Me,ie.doc.direction),mt="left";if(rt){var Lt=pt(rt,ce.ch);mt=Lt%2?"right":"left"}var Ct=eh(Fe.map,ce.ch,mt);return Ct.offset=Ct.collapse=="right"?Ct.end:Ct.start,Ct}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 rt="",mt=!1,Lt=ie.doc.lineSeparator(),Ct=!1;function jt(Ln){return function(fi){return fi.id==Ln}}function cn(){mt&&(rt+=Lt,Ct&&(rt+=Lt),mt=Ct=!1)}function Wt(Ln){Ln&&(cn(),rt+=Ln)}function Tn(Ln){if(Ln.nodeType==1){var fi=Ln.getAttribute("cm-text");if(fi){Wt(fi);return}var Si=Ln.getAttribute("cm-marker"),Ni;if(Si){var Qi=ie.findMarks(Yt(Me,0),Yt(Fe+1,0),jt(+Si));Qi.length&&(Ni=Qi[0].find(0))&&Wt(zn(ie.doc,Ni.from,Ni.to).join(Lt));return}if(Ln.getAttribute("contenteditable")=="false")return;var Lr=/^(pre|div|p|li|table|br)$/i.test(Ln.nodeName);if(!/^br$/i.test(Ln.nodeName)&&Ln.textContent.length==0)return;Lr&&cn();for(var ur=0;ur<Ln.childNodes.length;ur++)Tn(Ln.childNodes[ur]);/^(pre|p)$/i.test(Ln.nodeName)&&(Ct=!0),Lr&&(mt=!0)}else Ln.nodeType==3&&Wt(Ln.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Tn(ce),ce!=Te;)ce=ce.nextSibling,Ct=!1;return rt}function Gd(ie,ce,Te){var Me;if(ce==ie.display.lineDiv){if(Me=ie.display.lineDiv.childNodes[Te],!Me)return ud(ie.clipPos(Yt(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 rt=ie.display.view[Fe];if(rt.node==Me)return hm(rt,ce,Te)}}function hm(ie,ce,Te){var Me=ie.text.firstChild,Fe=!1;if(!ce||!vt(Me,ce))return ud(Yt(wt(ie.line),0),!0);if(ce==Me&&(Fe=!0,ce=Me.childNodes[Te],Te=0,!ce)){var rt=ie.rest?It(ie.rest):ie.line;return ud(Yt(wt(rt),rt.text.length),Fe)}var mt=ce.nodeType==3?ce:null,Lt=ce;for(!mt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(mt=ce.firstChild,Te&&(Te=mt.nodeValue.length));Lt.parentNode!=Me;)Lt=Lt.parentNode;var Ct=ie.measure,jt=Ct.maps;function cn(Ni,Qi,Lr){for(var ur=-1;ur<(jt?jt.length:0);ur++)for(var Ir=ur<0?Ct.map:jt[ur],uo=0;uo<Ir.length;uo+=3){var ar=Ir[uo+2];if(ar==Ni||ar==Qi){var Bo=wt(ur<0?ie.line:ie.rest[ur]),Fs=Ir[uo]+Lr;return(Lr<0||ar!=Ni)&&(Fs=Ir[uo+(Lr?1:0)]),Yt(Bo,Fs)}}}var Wt=cn(mt,Lt,Te);if(Wt)return ud(Wt,Fe);for(var Tn=Lt.nextSibling,Ln=mt?mt.nodeValue.length-Te:0;Tn;Tn=Tn.nextSibling){if(Wt=cn(Tn,Tn.firstChild,0),Wt)return ud(Yt(Wt.line,Wt.ch-Ln),Fe);Ln+=Tn.textContent.length}for(var fi=Lt.previousSibling,Si=Te;fi;fi=fi.previousSibling){if(Wt=cn(fi,fi.firstChild,-1),Wt)return ud(Yt(Wt.line,Wt.ch+Si),Fe);Si+=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"),Bt(Fe,"input",function(){Ce&&xe>=9&&ce.hasSelection&&(ce.hasSelection=null),Te.poll()}),Bt(Fe,"paste",function(mt){un(Me,mt)||Wp(mt,Me)||(Me.state.pasteIncoming=+new Date,Te.fastPoll())});function rt(mt){if(!un(Me,mt)){if(Me.somethingSelected())Tc({lineWise:!1,text:Me.getSelections()});else if(Me.options.lineWiseCopyCut){var Lt=Vp(Me);Tc({lineWise:!0,text:Lt.text}),mt.type=="cut"?Me.setSelections(Lt.ranges,null,xt):(Te.prevInput="",Fe.value=Lt.text.join(`
`),bt(Fe))}else return;mt.type=="cut"&&(Me.state.cutIncoming=+new Date)}}Bt(Fe,"cut",rt),Bt(Fe,"copy",rt),Bt(ie.scroller,"paste",function(mt){if(!(cs(ie,mt)||un(Me,mt))){if(!Fe.dispatchEvent){Me.state.pasteIncoming=+new Date,Te.focus();return}var Lt=new Event("paste");Lt.clipboardData=mt.clipboardData,Fe.dispatchEvent(Lt)}}),Bt(ie.lineSpace,"selectstart",function(mt){cs(ie,mt)||Qn(mt)}),Bt(Fe,"compositionstart",function(){var mt=Me.getCursor("from");Te.composing&&Te.composing.range.clear(),Te.composing={start:mt,range:Me.markText(mt,Me.getCursor("to"),{className:"CodeMirror-composing"})}}),Bt(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=Eu(ie);if(ie.options.moveInputWithCursor){var Fe=Yo(ie,Te.sel.primary().head,"div"),rt=ce.wrapper.getBoundingClientRect(),mt=ce.lineDiv.getBoundingClientRect();Me.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,Fe.top+mt.top-rt.top)),Me.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,Fe.left+mt.left-rt.left))}return Me},xa.prototype.showSelection=function(ie){var ce=this.cm,Te=ce.display;Oe(Te.cursorDiv,ie.cursors),Oe(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&&bt(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||et(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 rt=Fe.charCodeAt(0);if(rt==8203&&!Me&&(Me="\u200B"),rt==8666)return this.reset(),this.cm.execCommand("undo")}for(var mt=0,Lt=Math.min(Me.length,Fe.length);mt<Lt&&Me.charCodeAt(mt)==Fe.charCodeAt(mt);)++mt;return Jt(ce,function(){Ud(ce,Fe.slice(mt),Me.length-mt,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 rt=va(Te,ie),mt=Me.scroller.scrollTop;if(!rt||pe)return;var Lt=Te.options.resetSelectionOnContextMenu;Lt&&Te.doc.sel.contains(rt)==-1&&Hi(Te,sl)(Te.doc,Uo(rt),xt);var Ct=Fe.style.cssText,jt=ce.wrapper.style.cssText,cn=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",Fe.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(ie.clientY-cn.top-5)+"px; left: "+(ie.clientX-cn.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 Wt;be&&(Wt=window.scrollY),Me.input.focus(),be&&window.scrollTo(null,Wt),Me.input.reset(),Te.somethingSelected()||(Fe.value=ce.prevInput=" "),ce.contextMenuPending=Ln,Me.selForContextMenu=Te.doc.sel,clearTimeout(Me.detectingSelectAll);function Tn(){if(Fe.selectionStart!=null){var Si=Te.somethingSelected(),Ni="\u200B"+(Si?Fe.value:"");Fe.value="\u21DA",Fe.value=Ni,ce.prevInput=Si?"":"\u200B",Fe.selectionStart=1,Fe.selectionEnd=Ni.length,Me.selForContextMenu=Te.doc.sel}}function Ln(){if(ce.contextMenuPending==Ln&&(ce.contextMenuPending=!1,ce.wrapper.style.cssText=jt,Fe.style.cssText=Ct,Ce&&xe<9&&Me.scrollbars.setScrollTop(Me.scroller.scrollTop=mt),Fe.selectionStart!=null)){(!Ce||Ce&&xe<9)&&Tn();var Si=0,Ni=function(){Me.selForContextMenu==Te.doc.sel&&Fe.selectionStart==0&&Fe.selectionEnd>0&&ce.prevInput=="\u200B"?Hi(Te,ca)(Te):Si++<10?Me.detectingSelectAll=setTimeout(Ni,500):(Me.selForContextMenu=null,Me.input.reset())};Me.detectingSelectAll=setTimeout(Ni,200)}}if(Ce&&xe>=9&&Tn(),ve){ki(ie);var fi=function(){Cn(window,"mouseup",fi),setTimeout(Ln,20)};Bt(window,"mouseup",fi)}else setTimeout(Ln,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?Rt(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=Lt.getValue()}var Fe;if(ie.form&&(Bt(ie.form,"submit",Me),!ce.leaveSubmitMethodAlone)){var rt=ie.form;Fe=rt.submit;try{var mt=rt.submit=function(){Me(),rt.submit=Fe,rt.submit(),rt.submit=mt}}catch(Ct){}}ce.finishInit=function(Ct){Ct.save=Me,Ct.getTextArea=function(){return ie},Ct.toTextArea=function(){Ct.toTextArea=isNaN,Me(),ie.parentNode.removeChild(Ct.getWrapperElement()),ie.style.display="",ie.form&&(Cn(ie.form,"submit",Me),!ce.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=Fe))}},ie.style.display="none";var Lt=ts(function(Ct){return ie.parentNode.insertBefore(Ct,ie.nextSibling)},ce);return Lt}function cd(ie){ie.off=Cn,ie.on=Bt,ie.wheelEventPixels=dr,ie.Doc=Xa,ie.splitLines=pr,ie.countColumn=ut,ie.findColumn=dn,ie.isWordChar=it,ie.Pass=_t,ie.signal=mn,ie.Line=Zr,ie.changeEnd=Vr,ie.scrollbarModel=Wu,ie.Pos=Yt,ie.cmpPos=gn,ie.modes=gr,ie.mimeModes=hr,ie.resolveMode=$n,ie.getMode=Ue,ie.modeExtensions=Je,ie.extendMode=nt,ie.copyState=Pt,ie.startState=sn,ie.innerMode=Nt,ie.commands=Vh,ie.keyMap=Rl,ie.keyName=im,ie.isModifierKey=id,ie.lookupKey=pu,ie.normalizeKeyMap=Tp,ie.StringStream=Kt,ie.SharedTextMarker=ah,ie.TextMarker=nn,ie.LineWidget=kh,ie.e_preventDefault=Qn,ie.e_stopPropagation=Ai,ie.e_stop=ki,ie.addClass=kt,ie.contains=vt,ie.rmClass=Ae,ie.keyNames=lh}lm(ts),Yh(ts);var Th="iter insert remove copy getEditor constructor".split(" ");for(var Wd in Xa.prototype)Xa.prototype.hasOwnProperty(Wd)&&ht(Th,Wd)<0&&(ts.prototype[Wd]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Xa.prototype[Wd]));return Hn(Xa),ts.inputStyles={textarea:xa,contenteditable:Ps},ts.defineMode=function(ie){!ts.defaults.mode&&ie!="null"&&(ts.defaults.mode=ie),or.apply(this,arguments)},ts.defineMIME=po,ts.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),ts.defineMIME("text/plain","null"),ts.defineExtension=function(ie,ce){ts.prototype[ie]=ce},ts.defineDocExtension=function(ie,ce){Xa.prototype[ie]=ce},ts.fromTextArea=cm,cd(ts),ts.version="5.58.2",ts})},25419:function(Sn,ln,Ie){(function(ke){ke(Ie(89780),Ie(15525),Ie(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 ht=ke.getMode(Se,ut);return ht.name=="null"?null:ht}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,ht){return ot.f=ot.inline=ht,ht(ut,ot)}function le(ut,ot,ht){return ot.f=ot.block=ht,ht(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 ht=ke.innerMode(Le,ut.htmlState);ot=ht.mode.name=="xml"&&ht.state.tagStart===null&&!ht.state.context&&ht.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 ht=ut.column()===ot.indentation,yt=me(ot.prevLine.stream),_t=ot.indentedCode,xt=ot.prevLine.hr,Ut=ot.list!==!1,Ht=(ot.listStack[ot.listStack.length-1]||0)+3;ot.indentedCode=!1;var dn=ot.indentation;if(ot.indentationDiff===null&&(ot.indentationDiff=ot.indentation,Ut)){for(ot.list=null;dn<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=dn-ot.listStack[ot.listStack.length-1])}var Ft=!yt&&!xt&&!ot.prevLine.header&&(!Ut||!_t)&&!ot.prevLine.fencedCodeEnd,fn=(ot.list===!1||xt||yt)&&ot.indentation<=Ht&&ut.match(we),It=null;if(ot.indentationDiff>=4&&(_t||ot.prevLine.fencedCodeEnd||ot.prevLine.header||yt))return ut.skipToEnd(),ot.indentedCode=!0,be.code;if(ut.eatSpace())return null;if(ht&&ot.indentation<=Ht&&(It=ut.match(ge))&&It[1].length<=6)return ot.quote=0,ot.header=It[1].length,ot.thisLine.header=!0,Be.highlightFormatting&&(ot.formatting="header"),ot.f=ot.inline,Oe(ot);if(ot.indentation<=Ht&&ut.eat(">"))return ot.quote=ht?1:ot.quote+1,Be.highlightFormatting&&(ot.formatting="quote"),ut.eatSpace(),Oe(ot);if(!fn&&!ot.setext&&ht&&ot.indentation<=Ht&&(It=ut.match(pe))){var Xt=It[1]?"ol":"ul";return ot.indentation=dn+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-"+Xt]),Oe(ot)}else{if(ht&&ot.indentation<=Ht&&(It=ut.match(ee,!0)))return ot.quote=0,ot.fencedEndRE=new RegExp(It[1]+"+ *$"),ot.localMode=Be.fencedCodeBlockHighlighting&&xe(It[2]||Be.fencedCodeBlockDefaultMode),ot.localMode&&(ot.localState=ke.startState(ot.localMode)),ot.f=ot.block=De,Be.highlightFormatting&&(ot.formatting="code-block"),ot.code=-1,Oe(ot);if(ot.setext||(!Ft||!Ut)&&!ot.quote&&ot.list===!1&&!ot.code&&!fn&&!z.test(ut.string)&&(It=ut.lookAhead(1))&&(It=It.match(fe)))return ot.setext?(ot.header=ot.setext,ot.setext=0,ut.skipToEnd(),Be.highlightFormatting&&(ot.formatting="header")):(ot.header=It[0].charAt(0)=="="?1:2,ot.setext=ot.header),ot.thisLine.header=!0,ot.f=ot.inline,Oe(ot);if(fn)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 ht=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 ht}function De(ut,ot){var ht=ot.listStack[ot.listStack.length-1]||0,yt=ot.indentation<ht,_t=ht+3;if(ot.fencedEndRE&&ot.indentation<=_t&&(yt||ut.match(ot.fencedEndRE))){Be.highlightFormatting&&(ot.formatting="code-block");var xt;return yt||(xt=Oe(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 Oe(ut){var ot=[];if(ut.formatting){ot.push(be.formatting),typeof ut.formatting=="string"&&(ut.formatting=[ut.formatting]);for(var ht=0;ht<ut.formatting.length;ht++)ot.push(be.formatting+"-"+ut.formatting[ht]),ut.formatting[ht]==="header"&&ot.push(be.formatting+"-"+ut.formatting[ht]+"-"+ut.header),ut.formatting[ht]==="quote"&&(!Be.maxBlockquoteDepth||Be.maxBlockquoteDepth>=ut.quote?ot.push(be.formatting+"-"+ut.formatting[ht]+"-"+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 Oe(ot)}function qe(ut,ot){var ht=ot.text(ut,ot);if(typeof ht!="undefined")return ht;if(ot.list)return ot.list=null,Oe(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,Oe(ot)}if(ot.taskOpen=!1,ot.taskClosed=!1,ot.header&&ut.match(/^#+$/,!0))return Be.highlightFormatting&&(ot.formatting="header"),Oe(ot);var _t=ut.next();if(ot.linkTitle){ot.linkTitle=!1;var xt=_t;_t==="("&&(xt=")"),xt=(xt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ut="^\\s*(?:[^"+xt+"\\\\]+|\\\\\\\\|\\\\.)"+xt;if(ut.match(new RegExp(Ut),!0))return be.linkHref}if(_t==="`"){var Ht=ot.formatting;Be.highlightFormatting&&(ot.formatting="code"),ut.eatWhile("`");var dn=ut.current().length;if(ot.code==0&&(!ot.quote||dn==1))return ot.code=dn,Oe(ot);if(dn==ot.code){var Ft=Oe(ot);return ot.code=0,Ft}else return ot.formatting=Ht,Oe(ot)}else if(ot.code)return Oe(ot);if(_t==="\\"&&(ut.next(),Be.highlightFormatting)){var fn=Oe(ot),It=be.formatting+"-escape";return fn?fn+" "+It:It}if(_t==="!"&&ut.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ot.imageMarker=!0,ot.image=!0,Be.highlightFormatting&&(ot.formatting="image"),Oe(ot);if(_t==="["&&ot.imageMarker&&ut.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ot.imageMarker=!1,ot.imageAltText=!0,Be.highlightFormatting&&(ot.formatting="image"),Oe(ot);if(_t==="]"&&ot.imageAltText){Be.highlightFormatting&&(ot.formatting="image");var fn=Oe(ot);return ot.imageAltText=!1,ot.image=!1,ot.inline=ot.f=vt,fn}if(_t==="["&&!ot.image)return ot.linkText&&ut.match(/^.*?\]/)||(ot.linkText=!0,Be.highlightFormatting&&(ot.formatting="link")),Oe(ot);if(_t==="]"&&ot.linkText){Be.highlightFormatting&&(ot.formatting="link");var fn=Oe(ot);return ot.linkText=!1,ot.inline=ot.f=ut.match(/\(.*?\)| ?\[.*?\]/,!1)?vt:qe,fn}if(_t==="<"&&ut.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ot.f=ot.inline=Xe,Be.highlightFormatting&&(ot.formatting="link");var fn=Oe(ot);return fn?fn+=" ":fn="",fn+be.linkInline}if(_t==="<"&&ut.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ot.f=ot.inline=Xe,Be.highlightFormatting&&(ot.formatting="link");var fn=Oe(ot);return fn?fn+=" ":fn="",fn+be.linkEmail}if(Be.xml&&_t==="<"&&ut.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Xt=ut.string.indexOf(">",ut.pos);if(Xt!=-1){var tn=ut.string.substring(ut.start,Xt);/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&&_t==="<"&&ut.match(/^\/\w*?>/))return ot.md_inside=!1,"tag";if(_t==="*"||_t==="_"){for(var lt=1,He=ut.pos==1?" ":ut.string.charAt(ut.pos-2);lt<3&&ut.eat(_t);)lt++;var ze=ut.peek()||" ",it=!/\s/.test(ze)&&(!oe.test(ze)||/\s/.test(He)||oe.test(He)),dt=!/\s/.test(He)&&(!oe.test(He)||/\s/.test(ze)||oe.test(ze)),tt=null,Ke=null;if(lt%2&&(!ot.em&&it&&(_t==="*"||!dt||oe.test(He))?tt=!0:ot.em==_t&&dt&&(_t==="*"||!it||oe.test(ze))&&(tt=!1)),lt>1&&(!ot.strong&&it&&(_t==="*"||!dt||oe.test(He))?Ke=!0:ot.strong==_t&&dt&&(_t==="*"||!it||oe.test(ze))&&(Ke=!1)),Ke!=null||tt!=null){Be.highlightFormatting&&(ot.formatting=tt==null?"strong":Ke==null?"em":"strong em"),tt===!0&&(ot.em=_t),Ke===!0&&(ot.strong=_t);var Ft=Oe(ot);return tt===!1&&(ot.em=!1),Ke===!1&&(ot.strong=!1),Ft}}else if(_t===" "&&(ut.eat("*")||ut.eat("_"))){if(ut.peek()===" ")return Oe(ot);ut.backUp(1)}if(Be.strikethrough){if(_t==="~"&&ut.eatWhile(_t)){if(ot.strikethrough){Be.highlightFormatting&&(ot.formatting="strikethrough");var Ft=Oe(ot);return ot.strikethrough=!1,Ft}else if(ut.match(/^[^\s]/,!1))return ot.strikethrough=!0,Be.highlightFormatting&&(ot.formatting="strikethrough"),Oe(ot)}else if(_t===" "&&ut.match(/^~~/,!0)){if(ut.peek()===" ")return Oe(ot);ut.backUp(2)}}if(Be.emoji&&_t===":"&&ut.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ot.emoji=!0,Be.highlightFormatting&&(ot.formatting="emoji");var je=Oe(ot);return ot.emoji=!1,je}return _t===" "&&(ut.match(/^ +$/,!1)?ot.trailingSpace++:ot.trailingSpace&&(ot.trailingSpaceNewLine=!0)),Oe(ot)}function Xe(ut,ot){var ht=ut.next();if(ht===">"){ot.f=ot.inline=qe,Be.highlightFormatting&&(ot.formatting="link");var yt=Oe(ot);return yt?yt+=" ":yt="",yt+be.linkInline}return ut.match(/^[^>]+/,!0),be.linkInline}function vt(ut,ot){if(ut.eatSpace())return null;var ht=ut.next();return ht==="("||ht==="["?(ot.f=ot.inline=kt(ht==="("?")":"]"),Be.highlightFormatting&&(ot.formatting="link-string"),ot.linkHref=!0,Oe(ot)):"error"}var gt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function kt(ut){return function(ot,ht){var yt=ot.next();if(yt===ut){ht.f=ht.inline=qe,Be.highlightFormatting&&(ht.formatting="link-string");var _t=Oe(ht);return ht.linkHref=!1,_t}return ot.match(gt[ut]),ht.linkHref=!0,Oe(ht)}}function at(ut,ot){return ut.match(/^([^\]\\]|\\.)*\]:/,!1)?(ot.f=bt,ut.next(),Be.highlightFormatting&&(ot.formatting="link"),ot.linkText=!0,Oe(ot)):ae(ut,ot,qe)}function bt(ut,ot){if(ut.match(/^\]:/,!0)){ot.f=ot.inline=ct,Be.highlightFormatting&&(ot.formatting="link");var ht=Oe(ot);return ot.linkText=!1,ht}return ut.match(/^([^\]\\]|\\.)+/,!0),be.linkText}function ct(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 Rt={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 ht=ut.match(/^\s*/,!0)[0].replace(/\t/g,re).length;if(ot.indentation=ht,ot.indentationDiff=null,ht>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:Rt}},indent:function(ut,ot,ht){return ut.block==Ae&&Le.indent?Le.indent(ut.htmlState,ot,ht):ut.localState&&ut.localMode.indent?ut.localMode.indent(ut.localState,ot,ht):ke.Pass},blankLine:ve,getType:Oe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Rt},"xml"),ke.defineMIME("text/markdown","markdown"),ke.defineMIME("text/x-markdown","markdown")})},98101:function(Sn,ln,Ie){(function(ke){ke(Ie(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(Sn,ln,Ie){(function(ke){ke(Ie(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(Sn,ln,Ie){(function(ke){ke(Ie(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(Xe,vt){function gt(bt){return vt.tokenize=bt,bt(Xe,vt)}var kt=Xe.next();if(kt=="<")return Xe.eat("!")?Xe.eat("[")?Xe.match("CDATA[")?gt(ee("atom","]]>")):null:Xe.match("--")?gt(ee("comment","-->")):Xe.match("DOCTYPE",!0,!0)?(Xe.eatWhile(/[\w\._\-]/),gt(z(1))):null:Xe.eat("?")?(Xe.eatWhile(/[\w\._\-]/),vt.tokenize=ee("meta","?>"),"meta"):(pe=Xe.eat("/")?"closeTag":"openTag",vt.tokenize=fe,"tag bracket");if(kt=="&"){var at;return Xe.eat("#")?Xe.eat("x")?at=Xe.eatWhile(/[a-fA-F\d]/)&&Xe.eat(";"):at=Xe.eatWhile(/[\d]/)&&Xe.eat(";"):at=Xe.eatWhile(/[\w\.\-:]/)&&Xe.eat(";"),at?"atom":"error"}else return Xe.eatWhile(/[^&<]/),null}ge.isInText=!0;function fe(Xe,vt){var gt=Xe.next();if(gt==">"||gt=="/"&&Xe.eat(">"))return vt.tokenize=ge,pe=gt==">"?"endTag":"selfcloseTag","tag bracket";if(gt=="=")return pe="equals",null;if(gt=="<"){vt.tokenize=ge,vt.state=le,vt.tagName=vt.tagStart=null;var kt=vt.tokenize(Xe,vt);return kt?kt+" tag error":"tag error"}else return/[\'\"]/.test(gt)?(vt.tokenize=ue(gt),vt.stringStartCol=Xe.column(),vt.tokenize(Xe,vt)):(Xe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ue(Xe){var vt=function(gt,kt){for(;!gt.eol();)if(gt.next()==Xe){kt.tokenize=fe;break}return"string"};return vt.isInAttribute=!0,vt}function ee(Xe,vt){return function(gt,kt){for(;!gt.eol();){if(gt.match(vt)){kt.tokenize=ge;break}gt.next()}return Xe}}function z(Xe){return function(vt,gt){for(var kt;(kt=vt.next())!=null;){if(kt=="<")return gt.tokenize=z(Xe+1),gt.tokenize(vt,gt);if(kt==">")if(Xe==1){gt.tokenize=ge;break}else return gt.tokenize=z(Xe-1),gt.tokenize(vt,gt)}return"meta"}}function oe(Xe,vt,gt){this.prev=Xe.context,this.tagName=vt,this.indent=Xe.indented,this.startOfLine=gt,(be.doNotIndent.hasOwnProperty(vt)||Xe.context&&Xe.context.noIndent)&&(this.noIndent=!0)}function re(Xe){Xe.context&&(Xe.context=Xe.context.prev)}function ae(Xe,vt){for(var gt;;){if(!Xe.context||(gt=Xe.context.tagName,!be.contextGrabbers.hasOwnProperty(gt)||!be.contextGrabbers[gt].hasOwnProperty(vt)))return;re(Xe)}}function le(Xe,vt,gt){return Xe=="openTag"?(gt.tagStart=vt.column(),me):Xe=="closeTag"?ve:le}function me(Xe,vt,gt){return Xe=="word"?(gt.tagName=vt.current(),de="tag",De):be.allowMissingTagName&&Xe=="endTag"?(de="tag bracket",De(Xe,vt,gt)):(de="error",me)}function ve(Xe,vt,gt){if(Xe=="word"){var kt=vt.current();return gt.context&&gt.context.tagName!=kt&&be.implicitlyClosed.hasOwnProperty(gt.context.tagName)&&re(gt),gt.context&&gt.context.tagName==kt||be.matchClosing===!1?(de="tag",Pe):(de="tag error",Ae)}else return be.allowMissingTagName&&Xe=="endTag"?(de="tag bracket",Pe(Xe,vt,gt)):(de="error",Ae)}function Pe(Xe,vt,gt){return Xe!="endTag"?(de="error",Pe):(re(gt),le)}function Ae(Xe,vt,gt){return de="error",Pe(Xe,vt,gt)}function De(Xe,vt,gt){if(Xe=="word")return de="attribute",Oe;if(Xe=="endTag"||Xe=="selfcloseTag"){var kt=gt.tagName,at=gt.tagStart;return gt.tagName=gt.tagStart=null,Xe=="selfcloseTag"||be.autoSelfClosers.hasOwnProperty(kt)?ae(gt,kt):(ae(gt,kt),gt.context=new oe(gt,kt,at==gt.indented)),le}return de="error",De}function Oe(Xe,vt,gt){return Xe=="equals"?Ze:(be.allowMissing||(de="error"),De(Xe,vt,gt))}function Ze(Xe,vt,gt){return Xe=="string"?qe:Xe=="word"&&be.allowUnquoted?(de="string",De):(de="error",De(Xe,vt,gt))}function qe(Xe,vt,gt){return Xe=="string"?qe:De(Xe,vt,gt)}return{startState:function(Xe){var vt={tokenize:ge,state:le,indented:Xe||0,tagName:null,tagStart:null,context:null};return Xe!=null&&(vt.baseIndent=Xe),vt},token:function(Xe,vt){if(!vt.tagName&&Xe.sol()&&(vt.indented=Xe.indentation()),Xe.eatSpace())return null;pe=null;var gt=vt.tokenize(Xe,vt);return(gt||pe)&&gt!="comment"&&(de=null,vt.state=vt.state(pe||gt,Xe,vt),de&&(gt=de=="error"?gt+" error":de)),gt},indent:function(Xe,vt,gt){var kt=Xe.context;if(Xe.tokenize.isInAttribute)return Xe.tagStart==Xe.indented?Xe.stringStartCol+1:Xe.indented+xe;if(kt&&kt.noIndent)return ke.Pass;if(Xe.tokenize!=fe&&Xe.tokenize!=ge)return gt?gt.match(/^(\s*)/)[0].length:0;if(Xe.tagName)return be.multilineTagIndentPastTag!==!1?Xe.tagStart+Xe.tagName.length+2:Xe.tagStart+xe*(be.multilineTagIndentFactor||1);if(be.alignCDATA&&/<!\[CDATA\[/.test(vt))return 0;var at=vt&&/^<(\/)?([\w_:\.-]*)/.exec(vt);if(at&&at[1])for(;kt;)if(kt.tagName==at[2]){kt=kt.prev;break}else if(be.implicitlyClosed.hasOwnProperty(kt.tagName))kt=kt.prev;else break;else if(at)for(;kt;){var bt=be.contextGrabbers[kt.tagName];if(bt&&bt.hasOwnProperty(at[2]))kt=kt.prev;else break}for(;kt&&kt.prev&&!kt.startOfLine;)kt=kt.prev;return kt?kt.indent+xe:Xe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:be.htmlMode?"html":"xml",helperType:be.htmlMode?"html":"xml",skipAttribute:function(Xe){Xe.state==Ze&&(Xe.state=De)},xmlCurrentTag:function(Xe){return Xe.tagName?{name:Xe.tagName,close:Xe.type=="closeTag"}:null},xmlCurrentContext:function(Xe){for(var vt=[],gt=Xe.context;gt;gt=gt.prev)gt.tagName&&vt.push(gt.tagName);return vt.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(Sn,ln,Ie){var ke=Ie(97671);(function(Se,Be){Sn.exports=Be()})(this,function(){"use strict";function Se(Re){var Qe=typeof Re;return Re!==null&&(Qe==="object"||Qe==="function")}function Be(Re){return typeof Re=="function"}var Le=void 0;Array.isArray?Le=Array.isArray:Le=function(Re){return Object.prototype.toString.call(Re)==="[object Array]"};var Ce=Le,xe=0,be=void 0,ye=void 0,we=function(Qe,Ve){ve[xe]=Qe,ve[xe+1]=Ve,xe+=2,xe===2&&(ye?ye(Pe):De())};function pe(Re){ye=Re}function de(Re){we=Re}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 Re=0,Qe=new ue(Pe),Ve=document.createTextNode("");return Qe.observe(Ve,{characterData:!0}),function(){Ve.data=Re=++Re%2}}function le(){var Re=new MessageChannel;return Re.port1.onmessage=Pe,function(){return Re.port2.postMessage(0)}}function me(){var Re=setTimeout;return function(){return Re(Pe,1)}}var ve=new Array(1e3);function Pe(){for(var Re=0;Re<xe;Re+=2){var Qe=ve[Re],Ve=ve[Re+1];Qe(Ve),ve[Re]=void 0,ve[Re+1]=void 0}xe=0}function Ae(){try{var Re=Function("return this")().require("vertx");return be=Re.runOnLoop||Re.runOnContext,re()}catch(Qe){return me()}}var De=void 0;ee?De=oe():ue?De=ae():z?De=le():ge===void 0?De=Ae():De=me();function Oe(Re,Qe){var Ve=this,We=new this.constructor(Xe);We[qe]===void 0&&Xt(We);var pt=Ve._state;if(pt){var Mt=arguments[pt-1];we(function(){return dn(pt,We,Mt,Ve._result)})}else Ut(Ve,We,Re,Qe);return We}function Ze(Re){var Qe=this;if(Re&&typeof Re=="object"&&Re.constructor===Qe)return Re;var Ve=new Qe(Xe);return ht(Ve,Re),Ve}var qe=Math.random().toString(36).substring(2);function Xe(){}var vt=void 0,gt=1,kt=2;function at(){return new TypeError("You cannot resolve a promise with itself")}function bt(){return new TypeError("A promises callback cannot return that same promise.")}function ct(Re,Qe,Ve,We){try{Re.call(Qe,Ve,We)}catch(pt){return pt}}function Rt(Re,Qe,Ve){we(function(We){var pt=!1,Mt=ct(Ve,Qe,function(Qt){pt||(pt=!0,Qe!==Qt?ht(We,Qt):_t(We,Qt))},function(Qt){pt||(pt=!0,xt(We,Qt))},"Settle: "+(We._label||" unknown promise"));!pt&&Mt&&(pt=!0,xt(We,Mt))},Re)}function ut(Re,Qe){Qe._state===gt?_t(Re,Qe._result):Qe._state===kt?xt(Re,Qe._result):Ut(Qe,void 0,function(Ve){return ht(Re,Ve)},function(Ve){return xt(Re,Ve)})}function ot(Re,Qe,Ve){Qe.constructor===Re.constructor&&Ve===Oe&&Qe.constructor.resolve===Ze?ut(Re,Qe):Ve===void 0?_t(Re,Qe):Be(Ve)?Rt(Re,Qe,Ve):_t(Re,Qe)}function ht(Re,Qe){if(Re===Qe)xt(Re,at());else if(Se(Qe)){var Ve=void 0;try{Ve=Qe.then}catch(We){xt(Re,We);return}ot(Re,Qe,Ve)}else _t(Re,Qe)}function yt(Re){Re._onerror&&Re._onerror(Re._result),Ht(Re)}function _t(Re,Qe){Re._state===vt&&(Re._result=Qe,Re._state=gt,Re._subscribers.length!==0&&we(Ht,Re))}function xt(Re,Qe){Re._state===vt&&(Re._state=kt,Re._result=Qe,we(yt,Re))}function Ut(Re,Qe,Ve,We){var pt=Re._subscribers,Mt=pt.length;Re._onerror=null,pt[Mt]=Qe,pt[Mt+gt]=Ve,pt[Mt+kt]=We,Mt===0&&Re._state&&we(Ht,Re)}function Ht(Re){var Qe=Re._subscribers,Ve=Re._state;if(Qe.length!==0){for(var We=void 0,pt=void 0,Mt=Re._result,Qt=0;Qt<Qe.length;Qt+=3)We=Qe[Qt],pt=Qe[Qt+Ve],We?dn(Ve,We,pt,Mt):pt(Mt);Re._subscribers.length=0}}function dn(Re,Qe,Ve,We){var pt=Be(Ve),Mt=void 0,Qt=void 0,qt=!0;if(pt){try{Mt=Ve(We)}catch(Bt){qt=!1,Qt=Bt}if(Qe===Mt){xt(Qe,bt());return}}else Mt=We;Qe._state!==vt||(pt&&qt?ht(Qe,Mt):qt===!1?xt(Qe,Qt):Re===gt?_t(Qe,Mt):Re===kt&&xt(Qe,Mt))}function Ft(Re,Qe){try{Qe(function(We){ht(Re,We)},function(We){xt(Re,We)})}catch(Ve){xt(Re,Ve)}}var fn=0;function It(){return fn++}function Xt(Re){Re[qe]=fn++,Re._state=void 0,Re._result=void 0,Re._subscribers=[]}function tn(){return new Error("Array Methods must be provided an Array")}var lt=function(){function Re(Qe,Ve){this._instanceConstructor=Qe,this.promise=new Qe(Xe),this.promise[qe]||Xt(this.promise),Ce(Ve)?(this.length=Ve.length,this._remaining=Ve.length,this._result=new Array(this.length),this.length===0?_t(this.promise,this._result):(this.length=this.length||0,this._enumerate(Ve),this._remaining===0&&_t(this.promise,this._result))):xt(this.promise,tn())}return Re.prototype._enumerate=function(Ve){for(var We=0;this._state===vt&&We<Ve.length;We++)this._eachEntry(Ve[We],We)},Re.prototype._eachEntry=function(Ve,We){var pt=this._instanceConstructor,Mt=pt.resolve;if(Mt===Ze){var Qt=void 0,qt=void 0,Bt=!1;try{Qt=Ve.then}catch(Cn){Bt=!0,qt=Cn}if(Qt===Oe&&Ve._state!==vt)this._settledAt(Ve._state,We,Ve._result);else if(typeof Qt!="function")this._remaining--,this._result[We]=Ve;else if(pt===Ke){var $t=new pt(Xe);Bt?xt($t,qt):ot($t,Ve,Qt),this._willSettleAt($t,We)}else this._willSettleAt(new pt(function(Cn){return Cn(Ve)}),We)}else this._willSettleAt(Mt(Ve),We)},Re.prototype._settledAt=function(Ve,We,pt){var Mt=this.promise;Mt._state===vt&&(this._remaining--,Ve===kt?xt(Mt,pt):this._result[We]=pt),this._remaining===0&&_t(Mt,this._result)},Re.prototype._willSettleAt=function(Ve,We){var pt=this;Ut(Ve,void 0,function(Mt){return pt._settledAt(gt,We,Mt)},function(Mt){return pt._settledAt(kt,We,Mt)})},Re}();function He(Re){return new lt(this,Re).promise}function ze(Re){var Qe=this;return Ce(Re)?new Qe(function(Ve,We){for(var pt=Re.length,Mt=0;Mt<pt;Mt++)Qe.resolve(Re[Mt]).then(Ve,We)}):new Qe(function(Ve,We){return We(new TypeError("You must pass an array to race."))})}function it(Re){var Qe=this,Ve=new Qe(Xe);return xt(Ve,Re),Ve}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 Re(Qe){this[qe]=It(),this._result=this._state=void 0,this._subscribers=[],Xe!==Qe&&(typeof Qe!="function"&&dt(),this instanceof Re?Ft(this,Qe):tt())}return Re.prototype.catch=function(Ve){return this.then(null,Ve)},Re.prototype.finally=function(Ve){var We=this,pt=We.constructor;return Be(Ve)?We.then(function(Mt){return pt.resolve(Ve()).then(function(){return Mt})},function(Mt){return pt.resolve(Ve()).then(function(){throw Mt})}):We.then(Ve,Ve)},Re}();Ke.prototype.then=Oe,Ke.all=He,Ke.race=ze,Ke.resolve=Ze,Ke.reject=it,Ke._setScheduler=pe,Ke._setAsap=de,Ke._asap=we;function je(){var Re=void 0;if(typeof Ie.g!="undefined")Re=Ie.g;else if(typeof self!="undefined")Re=self;else try{Re=Function("return this")()}catch(We){throw new Error("polyfill failed because global object is unavailable in this environment")}var Qe=Re.Promise;if(Qe){var Ve=null;try{Ve=Object.prototype.toString.call(Qe.resolve())}catch(We){}if(Ve==="[object Promise]"&&!Qe.cast)return}Re.Promise=Ke}return Ke.polyfill=je,Ke.Promise=Ke,Ke})},86204:function(Sn){"use strict";var ln=typeof Reflect=="object"?Reflect:null,Ie=ln&&typeof ln.apply=="function"?ln.apply:function(le,me,ve){return Function.prototype.apply.call(le,me,ve)},ke;ln&&typeof ln.ownKeys=="function"?ke=ln.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)}Sn.exports=Le,Sn.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 De;if(me.length>0&&(De=me[0]),De instanceof Error)throw De;var Oe=new Error("Unhandled error."+(De?" ("+De.message+")":""));throw Oe.context=De,Oe}var Ze=Ae[le];if(Ze===void 0)return!1;if(typeof Ze=="function")Ie(Ze,this,me);else for(var qe=Ze.length,Xe=fe(Ze,qe),ve=0;ve<qe;++ve)Ie(Xe[ve],this,me);return!0};function ye(ae,le,me,ve){var Pe,Ae,De;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),De=Ae[le]),De===void 0)De=Ae[le]=me,++ae._eventsCount;else if(typeof De=="function"?De=Ae[le]=ve?[me,De]:[De,me]:ve?De.unshift(me):De.push(me),Pe=be(ae),Pe>0&&De.length>Pe&&!De.warned){De.warned=!0;var Oe=new Error("Possible EventEmitter memory leak detected. "+De.length+" "+String(le)+" listeners added. Use emitter.setMaxListeners() to increase limit");Oe.name="MaxListenersExceededWarning",Oe.emitter=ae,Oe.type=le,Oe.count=De.length,Se(Oe)}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,De,Oe;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,De=ve.length-1;De>=0;De--)if(ve[De]===me||ve[De].listener===me){Oe=ve[De].listener,Ae=De;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,Oe||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),De;for(Pe=0;Pe<Ae.length;++Pe)De=Ae[Pe],De!=="removeListener"&&this.removeAllListeners(De);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(De){ae.removeListener(le,Ae),ve(De)}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(Sn,ln,Ie){"use strict";Ie.d(ln,{$u:function(){return we},BD:function(){return lt},E9:function(){return ye},FF:function(){return vr},FJ:function(){return le},Hn:function(){return ae},KX:function(){return ve},NB:function(){return Ve},S0:function(){return It},UL:function(){return pe},Vk:function(){return re},Vm:function(){return pt},YI:function(){return Xt},ZA:function(){return Be},Zt:function(){return de},al:function(){return tt},bn:function(){return dt},bx:function(){return He},g2:function(){return tn},h1:function(){return Ze},hD:function(){return Hn},l4:function(){return xe},rU:function(){return We},s_:function(){return ze},uz:function(){return Qe},z6:function(){return ge}}),Sn=Ie.hmd(Sn),function(){var et;function ai(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function ti(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:ai(a)}}function Ii(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var gr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},hr;if(typeof Object.setPrototypeOf=="function")hr=Object.setPrototypeOf;else{var or;e:{var po={a:!0},$n={};try{$n.__proto__=po,or=$n.a;break e}catch(a){}or=!1}hr=or?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Ue=hr;function Je(a,y){if(a.prototype=gr(y.prototype),a.prototype.constructor=a,Ue)Ue(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 Ie.g!="undefined"&&Ie.g!=null?Ie.g:self,Pt=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||Pt}),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 Kt=typeof globalThis=="object"&&globalThis||typeof Ie.g=="object"&&Ie.g.global===Ie.g&&Ie.g||typeof self=="object"&&self.self===self&&self||{};Kt.requestAnimationFrame===void 0&&(Kt.setImmediate===void 0?Kt.requestAnimationFrame=function(a){Kt.setTimeout(a,0)}:Kt.requestAnimationFrame=Kt.setImmediate);function _n(){}function zn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Kt.clearTimeout(x),x=_i(function(){x=-1,a.apply(b,E)},y)}}function _i(a,y){return Kt.setTimeout(a,y)}function Bi(a){return Kt.document.createElement(a)}function wt(a){throw Error(a)}function zt(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),wt(a)}function En(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),wt(x+" is not in the range "+y+": "+a)}function bn(a){Kt.console&&Kt.console.log(a)}function Yt(a){return typeof a=="object"&&a!==null}function gn(a){return Array.isArray(a)||Kt.NodeList&&a instanceof Kt.NodeList||Kt.HTMLCollection&&a instanceof Kt.HTMLCollection}function yn(a){return Array.prototype.slice.call(a)}function vn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):wt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function jn(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):wt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Un(){var a=Mr.pop();return a===void 0?[]:a}function Gn(a){a.length=0,Mr.push(a)}function An(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(Yt(a)&&a.constructor)return An(a.constructor);return typeof a}function Li(a){var y=a;return Yt(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 xi(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 bi(a,y,x){Object.defineProperty(bo.prototype,a,{get:y,set:x})}function hn(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 Vi=Kt.navigator!==void 0&&0<Kt.navigator.userAgent.indexOf("Trident/7"),lr=Kt.navigator!==void 0&&Kt.navigator.platform!==void 0&&Kt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Mr=[];Object.freeze([]),_n.className="Util",_n.Dx="32ab5ff3b26f42dc0ed90f21472913b5",_n.adym="gojs.net",_n.vfo="28e645fdb266",_n.className="Util";function xn(a,y,x){Ri(this),this.j=a,this.xa=y,this.o=x}xn.prototype.toString=function(){return"EnumValue."+this.xa};function Vn(a,y){return y==null||y===""?null:a[y]}nt.Object.defineProperties(xn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),xn.className="EnumValue";function mi(){this.ew=[]}mi.prototype.toString=function(){return this.ew.join("")},mi.prototype.add=function(a){a!==""&&this.ew.push(a)},mi.className="StringBuilder";function di(){}di.className="PropertyCollection";var gi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Kt.console&&Kt.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 Di(){}Di.prototype.reset=function(){},Di.prototype.next=function(){return!1},Di.prototype.Ad=function(){return!1},Di.prototype.first=function(){return null},Di.prototype.any=function(){return!1},Di.prototype.all=function(){return!0},Di.prototype.each=function(){return this},Di.prototype.map=function(){return this},Di.prototype.filter=function(){return this},Di.prototype.de=function(){},Di.prototype.toString=function(){return"EmptyIterator"},nt.Object.defineProperties(Di.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Di.prototype.first=Di.prototype.first,Di.prototype.hasNext=Di.prototype.Ad,Di.prototype.next=Di.prototype.next,Di.prototype.reset=Di.prototype.reset;var Ji=null;Di.className="EmptyIterator",Ji=new Di;function cr(a){this.key=-1,this.value=a}cr.prototype.reset=function(){this.key=-1},cr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},cr.prototype.Ad=function(){return this.next()},cr.prototype.first=function(){return this.key=0,this.value},cr.prototype.any=function(a){return this.key=-1,a(this.value)},cr.prototype.all=function(a){return this.key=-1,a(this.value)},cr.prototype.each=function(a){return this.key=-1,a(this.value),this},cr.prototype.map=function(a){return new cr(a(this.value))},cr.prototype.filter=function(a){return a(this.value)?new cr(this.value):Ji},cr.prototype.de=function(){this.value=null},cr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},nt.Object.defineProperties(cr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),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="SingletonIterator";function _r(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}_r.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},_r.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},_r.prototype.Ad=function(){return this.next()},_r.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},_r.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},_r.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},_r.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},_r.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&x.push(a(ne))}return a=new Mn,a.s=x,a.xb(),a.iterator},_r.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new Mn,a.s=x,a.xb(),a.iterator},_r.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},_r.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},nt.Object.defineProperties(_r.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}}}),_r.prototype.first=_r.prototype.first,_r.prototype.hasNext=_r.prototype.Ad,_r.prototype.next=_r.prototype.next,_r.prototype.reset=_r.prototype.reset,_r.className="ListIterator";function Rr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Rr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Rr.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)},Rr.prototype.Ad=function(){return this.next()},Rr.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},Rr.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},Rr.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},Rr.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},Rr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new Mn,a.s=x,a.xb(),a.iterator},Rr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new Mn,a.s=x,a.xb(),a.iterator},Rr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Rr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},nt.Object.defineProperties(Rr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Rr.prototype.first=Rr.prototype.first,Rr.prototype.hasNext=Rr.prototype.Ad,Rr.prototype.next=Rr.prototype.next,Rr.prototype.reset=Rr.prototype.reset,Rr.className="ListIteratorBackwards";function Mn(a){Ri(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&wt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=Mn.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"List()#"+mr(this)},et.add=function(a){return a===null?this:(this._isFrozen&&zt(this,a),this.s.push(a),this.xb(),this)},et.push=function(a){this.add(a)},et.addAll=function(a){if(a===null)return this;this._isFrozen&&zt(this);var y=this.s;if(gn(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},et.clear=function(){this._isFrozen&&zt(this),this.s.length=0,this.xb()},et.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},et.has=function(a){return this.contains(a)},et.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},et.M=function(a){var y=this.s;return(0>a||a>=y.length)&&En(a,"0 <= i < length",Mn,"elt:i"),y[a]},et.get=function(a){return this.M(a)},et.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&En(a,"0 <= i < length",Mn,"setElt:i"),this._isFrozen&&zt(this,a),x[a]=y},et.set=function(a,y){this.cd(a,y)},et.first=function(){var a=this.s;return a.length===0?null:a[0]},et.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},et.pop=function(){this._isFrozen&&zt(this);var a=this.s;return 0<a.length?a.pop():null},Mn.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},Mn.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},Mn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Mn.prototype.map=function(a){for(var y=new Mn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},Mn.prototype.filter=function(a){for(var y=new Mn,x=[],b=this.s,E=b.length,te=0;te<E;te++){var ne=b[te];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},et=Mn.prototype,et.Gb=function(a,y){0>a&&En(a,">= 0",Mn,"insertAt:i"),this._isFrozen&&zt(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},et.remove=function(a){if(a===null)return!1;this._isFrozen&&zt(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},et.delete=function(a){return this.remove(a)},et.mb=function(a){var y=this.s;(0>a||a>=y.length)&&En(a,"0 <= i < length",Mn,"removeAt:i"),this._isFrozen&&zt(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},et.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&zt(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},Mn.prototype.copy=function(){var a=new Mn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},et=Mn.prototype,et.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},et.Iv=function(){for(var a=new kn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},et.sort=function(a){return this._isFrozen&&zt(this),this.s.sort(a),this.xb(),this},et.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&zt(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&En(y,"0 <= from < length",Mn,"sortRange:from"),te===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},et.reverse=function(){return this._isFrozen&&zt(this),this.s.reverse(),this.xb(),this},nt.Object.defineProperties(Mn.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return Ji;var a=this.Sa;return a!==null?(a.reset(),a):new _r(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Ji;var a=this.Hg;return a!==null?(a.reset(),a):new Rr(this)}}}),Mn.prototype.reverse=Mn.prototype.reverse,Mn.prototype.sortRange=Mn.prototype.zi,Mn.prototype.sort=Mn.prototype.sort,Mn.prototype.toSet=Mn.prototype.Iv,Mn.prototype.toArray=Mn.prototype.Fa,Mn.prototype.removeRange=Mn.prototype.removeRange,Mn.prototype.removeAt=Mn.prototype.mb,Mn.prototype.delete=Mn.prototype.delete,Mn.prototype.remove=Mn.prototype.remove,Mn.prototype.insertAt=Mn.prototype.Gb,Mn.prototype.pop=Mn.prototype.pop,Mn.prototype.last=Mn.prototype.jc,Mn.prototype.first=Mn.prototype.first,Mn.prototype.set=Mn.prototype.set,Mn.prototype.setElt=Mn.prototype.cd,Mn.prototype.get=Mn.prototype.get,Mn.prototype.elt=Mn.prototype.M,Mn.prototype.indexOf=Mn.prototype.indexOf,Mn.prototype.has=Mn.prototype.has,Mn.prototype.contains=Mn.prototype.contains,Mn.prototype.clear=Mn.prototype.clear,Mn.prototype.addAll=Mn.prototype.addAll,Mn.prototype.push=Mn.prototype.push,Mn.prototype.add=Mn.prototype.add,Mn.prototype.thaw=Mn.prototype.ka,Mn.prototype.freeze=Mn.prototype.freeze,Mn.className="List";function Qr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Qr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Qr.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)},Qr.prototype.Ad=function(){return this.next()},Qr.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},Qr.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},Qr.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},Qr.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},Qr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Mn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Qr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Mn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Qr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Qr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},nt.Object.defineProperties(Qr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Qr.prototype.first=Qr.prototype.first,Qr.prototype.hasNext=Qr.prototype.Ad,Qr.prototype.next=Qr.prototype.next,Qr.prototype.reset=Qr.prototype.reset,Qr.className="SetIterator";function kn(a){Ri(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&wt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=kn.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Set()#"+mr(this)},et.add=function(a){if(a===null)return this;this._isFrozen&&zt(this,a);var y=a;return Yt(a)&&(y=kr(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},et.addAll=function(a){if(a===null)return this;if(this._isFrozen&&zt(this),gn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},et.contains=function(a){if(a===null)return!1;var y=a;return Yt(a)&&(y=mr(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},et.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},et.first=function(){var a=this.ea;return a===null?null:a.value},kn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},kn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},kn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},kn.prototype.map=function(a){for(var y=new kn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},kn.prototype.filter=function(a){for(var y=new kn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},et=kn.prototype,et.remove=function(a){if(a===null)return!1;this._isFrozen&&zt(this,a);var y=a;if(Yt(a)&&(y=mr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},et.delete=function(a){return this.remove(a)},et.hp=function(a){if(a===null)return this;if(this._isFrozen&&zt(this),gn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},et.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&zt(this);var y=new kn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},et.clear=function(){this._isFrozen&&zt(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},kn.prototype.copy=function(){var a=new kn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},kn.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},kn.prototype.Hv=function(){var a=new Mn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Ri(a){a.__gohashid=eo++}function kr(a){var y=a.__gohashid;return y===void 0&&(y=eo++,a.__gohashid=y),y}function mr(a){return a.__gohashid}nt.Object.defineProperties(kn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Ji;var a=this.Sa;return a!==null?(a.reset(),a):new Qr(this)}}}),kn.prototype.toList=kn.prototype.Hv,kn.prototype.toArray=kn.prototype.Fa,kn.prototype.clear=kn.prototype.clear,kn.prototype.retainAll=kn.prototype.pA,kn.prototype.removeAll=kn.prototype.hp,kn.prototype.delete=kn.prototype.delete,kn.prototype.remove=kn.prototype.remove,kn.prototype.first=kn.prototype.first,kn.prototype.containsAny=kn.prototype.Ty,kn.prototype.containsAll=kn.prototype.Sy,kn.prototype.has=kn.prototype.has,kn.prototype.contains=kn.prototype.contains,kn.prototype.addAll=kn.prototype.addAll,kn.prototype.add=kn.prototype.add,kn.prototype.thaw=kn.prototype.ka,kn.prototype.freeze=kn.prototype.freeze;var eo=1;kn.className="Set",kn.uniqueHash=Ri,kn.hashIdUnique=kr,kn.hashId=mr;function Tr(a){this.ma=a,this.qa=a.Ja,this.sa=null}Tr.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Tr.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)},Tr.prototype.Ad=function(){return this.next()},Tr.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},Tr.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},Tr.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},Tr.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},Tr.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Mn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Tr.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Mn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Tr.prototype.de=function(){this.value=this.key=null,this.qa=-1},Tr.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},nt.Object.defineProperties(Tr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Tr.prototype.first=Tr.prototype.first,Tr.prototype.hasNext=Tr.prototype.Ad,Tr.prototype.next=Tr.prototype.next,Tr.prototype.reset=Tr.prototype.reset,Tr.className="MapKeySetIterator";function Sr(a){kn.call(this),Ri(this),this._isFrozen=!0,this.ma=a}Je(Sr,kn),et=Sr.prototype,et.freeze=function(){return this},et.ka=function(){return this},et.toString=function(){return"MapKeySet("+this.ma.toString()+")"},et.add=function(){wt("This Set is read-only: "+this.toString())},et.contains=function(a){return this.ma.contains(a)},et.has=function(a){return this.contains(a)},et.remove=function(){wt("This Set is read-only: "+this.toString())},et.delete=function(a){return this.remove(a)},et.clear=function(){wt("This Set is read-only: "+this.toString())},et.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Sr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Sr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Sr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Sr.prototype.map=function(a){for(var y=new kn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Sr.prototype.filter=function(a){for(var y=new kn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Sr.prototype.copy=function(){return new Sr(this.ma)},Sr.prototype.Iv=function(){var a=new kn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Sr.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},Sr.prototype.Hv=function(){var a=new Mn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},nt.Object.defineProperties(Sr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Ji:new Tr(this.ma)}}}),Sr.prototype.toList=Sr.prototype.Hv,Sr.prototype.toArray=Sr.prototype.Fa,Sr.prototype.toSet=Sr.prototype.Iv,Sr.prototype.first=Sr.prototype.first,Sr.prototype.clear=Sr.prototype.clear,Sr.prototype.delete=Sr.prototype.delete,Sr.prototype.remove=Sr.prototype.remove,Sr.prototype.has=Sr.prototype.has,Sr.prototype.contains=Sr.prototype.contains,Sr.prototype.add=Sr.prototype.add,Sr.prototype.thaw=Sr.prototype.ka,Sr.prototype.freeze=Sr.prototype.freeze,Sr.className="MapKeySet";function yo(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}yo.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},yo.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)},yo.prototype.Ad=function(){return this.next()},yo.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},yo.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},yo.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},yo.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},yo.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Mn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},yo.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Mn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},yo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},yo.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},nt.Object.defineProperties(yo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),yo.prototype.first=yo.prototype.first,yo.prototype.hasNext=yo.prototype.Ad,yo.prototype.next=yo.prototype.next,yo.prototype.reset=yo.prototype.reset,yo.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 On(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}On.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},On.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)},On.prototype.Ad=function(){return this.next()},On.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},On.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},On.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},On.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},On.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Mn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},On.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Mn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},On.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},On.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},nt.Object.defineProperties(On.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),On.prototype.first=On.prototype.first,On.prototype.hasNext=On.prototype.Ad,On.prototype.next=On.prototype.next,On.prototype.reset=On.prototype.reset,On.className="MapIterator";function on(a){Ri(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"&&wt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=on.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Map()#"+mr(this)},et.add=function(a,y){this._isFrozen&&zt(this,a);var x=a;Yt(a)&&(x=kr(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},et.set=function(a,y){return this.add(a,y)},et.addAll=function(a){if(a===null)return this;if(gn(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 on)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},et.first=function(){return this.ea},on.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},on.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},on.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},on.prototype.map=function(a){for(var y=new on,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},on.prototype.filter=function(a){for(var y=new on,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},et=on.prototype,et.contains=function(a){var y=a;return Yt(a)&&(y=mr(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.I=function(a){var y=a;return Yt(a)&&(y=mr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},et.get=function(a){return this.I(a)},et.remove=function(a){if(a===null)return!1;this._isFrozen&&zt(this,a);var y=a;if(Yt(a)&&(y=mr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},et.delete=function(a){return this.remove(a)},et.clear=function(){this._isFrozen&&zt(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()},on.prototype.copy=function(){var a=new on,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},on.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},on.prototype.Lf=function(){return new Sr(this)},nt.Object.defineProperties(on.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Ji;var a=this.Sa;return a!==null?(a.reset(),a):new On(this)}},iteratorKeys:{get:function(){return 0>=this.count?Ji:new Tr(this)}},iteratorValues:{get:function(){if(0>=this.count)return Ji;var a=this.jf;return a!==null?(a.reset(),a):new yo(this)}}}),on.prototype.toKeySet=on.prototype.Lf,on.prototype.toArray=on.prototype.Fa,on.prototype.clear=on.prototype.clear,on.prototype.delete=on.prototype.delete,on.prototype.remove=on.prototype.remove,on.prototype.get=on.prototype.get,on.prototype.getValue=on.prototype.I,on.prototype.has=on.prototype.has,on.prototype.contains=on.prototype.contains,on.prototype.first=on.prototype.first,on.prototype.addAll=on.prototype.addAll,on.prototype.set=on.prototype.set,on.prototype.add=on.prototype.add,on.prototype.thaw=on.prototype.ka,on.prototype.freeze=on.prototype.freeze,on.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):wt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Wn,ii,Mi,vi,hi;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},et=ft.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Nn(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 Yn(a){return a.x.toString()+" "+a.y.toString()}et.toString=function(){return"Point("+this.x+","+this.y+")"},et.D=function(a){return a instanceof ft?this.x===a.x&&this.y===a.y:!1},et.hi=function(a,y){return this.x===a&&this.y===y},et.Xa=function(a){return Zt.B(this.x,a.x)&&Zt.B(this.y,a.y)},et.add=function(a){return this.x+=a.x,this.y+=a.y,this},et.re=function(a){return this.x-=a.x,this.y-=a.y,this},et.offset=function(a,y){return this.x+=a,this.y+=y,this},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},et=ft.prototype,et.scale=function(a,y){return this.x*=a,this.y*=y,this},et.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},et.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},et.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},et.ab=function(a){return qn(a.x-this.x,a.y-this.y)},et.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}et.Ry=function(a,y){return Zt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},et.fA=function(a,y,x,b){return Zt.qh(a,y,x,b,this.x,this.y,this),this},et.gA=function(a,y){return Zt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},et.uA=function(a,y,x,b){return Zt.No(this.x,this.y,a,y,x,b,this),this},et.vA=function(a,y){return Zt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},et.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},et.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},et.transform=function(a){return a.Ga(this),this};function Bn(a,y){return y.Cd(a),a}function Jn(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 Ti(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function ci(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)},ft.alloc=function(){var a=ni.pop();return a===void 0?new ft:a},ft.allocAt=function(a,y){var x=ni.pop();return x===void 0?new ft(a,y):(x.x=a,x.y=y,x)},ft.free=function(a){ni.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 Zt.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 Zt.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 ni=[];ft.className="Point",ft.parse=Nn,ft.stringify=Yn,ft.distanceLineSegmentSquared=Jn,ft.distanceSquared=Ti,ft.direction=ci,ft.Origin=Wn=new ft(0,0).ja(),ft.InfiniteTopLeft=ii=new ft(-1/0,-1/0).ja(),ft.InfiniteBottomRight=Mi=new ft(1/0,1/0).ja(),ft.SixPoint=vi=new ft(6,6).ja(),ft.NoPoint=hi=new ft(NaN,NaN).ja(),ft.parse=Nn,ft.stringify=Yn,ft.distanceLineSegmentSquared=Jn,ft.distanceSquared=Ti,ft.direction=ci;function Pn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):wt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var wi,ji,br,nr,Zr,zr,Ur;Pn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Pn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Pn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Pn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Pn.prototype.copy=function(){var a=new Pn;return a.width=this.width,a.height=this.height,a},et=Pn.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function to(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Pn(x,E)}return new Pn}function Jr(a){return a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Size("+this.width+","+this.height+")"},et.D=function(a){return a instanceof Pn?this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y){return this.width===a&&this.height===y},et.Xa=function(a){return Zt.B(this.width,a.width)&&Zt.B(this.height,a.height)},et.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},et.w=function(){return isFinite(this.width)&&isFinite(this.height)},Pn.alloc=function(){var a=ko.pop();return a===void 0?new Pn:a},Pn.free=function(a){ko.push(a)},Pn.prototype.isReal=Pn.prototype.w,Pn.prototype.inflate=Pn.prototype.Bc,Pn.prototype.equalsApprox=Pn.prototype.Xa,Pn.prototype.equalTo=Pn.prototype.hi,Pn.prototype.equals=Pn.prototype.D,Pn.prototype.set=Pn.prototype.set,Pn.prototype.setTo=Pn.prototype.sg;var ko=[];Pn.className="Size",Pn.parse=to,Pn.stringify=Jr,Pn.ZeroSize=wi=new Pn(0,0).ja(),Pn.OneSize=ji=new Pn(1,1).ja(),Pn.SixSize=br=new Pn(6,6).ja(),Pn.EightSize=nr=new Pn(8,8).ja(),Pn.TenSize=Zr=new Pn(10,10).ja(),Pn.InfiniteSize=zr=new Pn(1/0,1/0).ja(),Pn.NoSize=Ur=new Pn(NaN,NaN).ja(),Pn.parse=to,Pn.stringify=Jr;function rn(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof 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 Pn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):wt("Incorrect second argument supplied to Rect constructor "+y)):wt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}et=rn.prototype,et.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Kr(a,y,x){a.width=y,a.height=x}et.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},et.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.dd=function(a){return this.x=a.x,this.y=a.y,this},et.tA=function(a){return this.width=a.width,this.height=a.height,this},rn.prototype.copy=function(){var a=new rn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},et=rn.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Hr(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;(b=a[y++])&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new rn(x,E,te,ne)}return new rn}function sr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},et.D=function(a){return a instanceof rn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},et.Xa=function(a){return Zt.B(this.x,a.x)&&Zt.B(this.y,a.y)&&Zt.B(this.width,a.width)&&Zt.B(this.height,a.height)};function yr(a,y){return Zt.$(a.x,y.x)&&Zt.$(a.y,y.y)&&Zt.$(a.width,y.width)&&Zt.$(a.height,y.height)}et.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},et.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},et.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},et.offset=function(a,y){return this.x+=a,this.y+=y,this},et.Bc=function(a,y){return fr(this,y,a,y,a)},et.Co=function(a){return fr(this,a.top,a.right,a.bottom,a.left)},et.Fv=function(a){return fr(this,-a.top,-a.right,-a.bottom,-a.left)},et.Hz=function(a,y,x,b){return fr(this,a,y,x,b)};function fr(a,y,x,b,E){var te=a.width;return x+E<=-te?(a.x+=te/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}et.Ex=function(a){return co(this,a.x,a.y,a.width,a.height)},et.Uu=function(a,y,x,b){return co(this,a,y,x,b)};function co(a,y,x,b,E){var te=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=Math.max(0,y-te),a.height=Math.max(0,x-ne),a}et.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},et.Vu=function(a,y,x,b){var E=this.width,te=this.x;return E!==1/0&&x!==1/0&&(E+=te,x+=a,isNaN(x)||isNaN(E)||te>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function 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))}et.Ye=function(a){return Er(this,a.x,a.y,0,0)},et.ed=function(a){return Er(this,a.x,a.y,a.width,a.height)},et.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),Er(this,a,y,x,b)};function Er(a,y,x,b,E){var te=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=y-te,a.height=x-ne,a}et.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function no(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 Qs(a,y,x,b,E,te,ne,se){return a>ne+E||E>x+a?!1:!(y>se+te||te>b+y)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},et.Mz=function(){return this.width===0&&this.height===0},rn.alloc=function(){var a=oa.pop();return a===void 0?new rn:a},rn.allocAt=function(a,y,x,b){var E=oa.pop();return E===void 0?new rn(a,y,x,b):E.h(a,y,x,b)},rn.free=function(a){oa.push(a)},nt.Object.defineProperties(rn.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new ft(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Pn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new 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}}}),rn.prototype.isEmpty=rn.prototype.Mz,rn.prototype.isReal=rn.prototype.w,rn.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return Zt.Fx(a,y,x,b,E,te,ne,se)},rn.prototype.setSpot=rn.prototype.yi,rn.prototype.union=rn.prototype.Kv,rn.prototype.unionRect=rn.prototype.ed,rn.prototype.unionPoint=rn.prototype.Ye,rn.prototype.intersects=rn.prototype.Vu,rn.prototype.intersectsRect=rn.prototype.Yc,rn.prototype.intersect=rn.prototype.Uu,rn.prototype.intersectRect=rn.prototype.Ex,rn.prototype.grow=rn.prototype.Hz,rn.prototype.subtractMargin=rn.prototype.Fv,rn.prototype.addMargin=rn.prototype.Co,rn.prototype.inflate=rn.prototype.Bc,rn.prototype.offset=rn.prototype.offset,rn.prototype.contains=rn.prototype.contains,rn.prototype.containsRect=rn.prototype.Re,rn.prototype.containsPoint=rn.prototype.ca,rn.prototype.equalsApprox=rn.prototype.Xa,rn.prototype.equalTo=rn.prototype.hi,rn.prototype.equals=rn.prototype.D,rn.prototype.setSize=rn.prototype.tA,rn.prototype.setPoint=rn.prototype.dd,rn.prototype.set=rn.prototype.set,rn.prototype.setTo=rn.prototype.sg;var us=null,Aa=null,oa=[];rn.className="Rect",rn.parse=Hr,rn.stringify=sr,rn.contains=no,rn.intersects=Qs,rn.ZeroRect=us=new rn(0,0,0,0).ja(),rn.NoRect=Aa=new rn(NaN,NaN,NaN,NaN).ja(),rn.parse=Hr,rn.stringify=sr,rn.contains=no,rn.intersects=Qs;function $i(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):wt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}$i.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},$i.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},$i.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},$i.prototype.copy=function(){var a=new $i;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},et=$i.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ns(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 $i;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new $i(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new $i(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new $i(x,E):new $i(x,E,te,ne)}return new $i}function ss(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}et.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},et.D=function(a){return a instanceof $i?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},et.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},et.Xa=function(a){return Zt.B(this.top,a.top)&&Zt.B(this.right,a.right)&&Zt.B(this.bottom,a.bottom)&&Zt.B(this.left,a.left)},et.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},$i.alloc=function(){var a=Ms.pop();return a===void 0?new $i:a},$i.free=function(a){Ms.push(a)},$i.prototype.isReal=$i.prototype.w,$i.prototype.equalsApprox=$i.prototype.Xa,$i.prototype.equalTo=$i.prototype.hi,$i.prototype.equals=$i.prototype.D,$i.prototype.set=$i.prototype.set,$i.prototype.setTo=$i.prototype.sg;var zs=null,hs=null,Ms=[];$i.className="Margin",$i.parse=ns,$i.stringify=ss,$i.ZeroMargin=zs=new $i(0,0,0,0).ja(),$i.TwoMargin=hs=new $i(2,2,2,2).ja(),$i.parse=ns,$i.stringify=ss;function li(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 er,Pr,jr,$r,jo,tr,pa,ps,cs,io,ws,ga,is,Pa,Sa,Na,_s,nl,Hu,fl,Ol,il,Pu,eh,lu,As,Gu,th,uu,hu,ua,ma,Os,$s,Il,Ca;li.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},li.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},li.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},li.prototype.copy=function(){var a=new li;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},et=li.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Yo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function zo(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return er;if(a==="TopLeft")return Pr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return jr;if(a==="TopRight")return $r;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return jo;if(a==="Center")return tr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return pa;if(a==="BottomLeft")return ps;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return cs;if(a==="BottomRight")return io;if(a==="TopSide")return ws;if(a==="LeftSide")return ga;if(a==="RightSide")return is;if(a==="BottomSide")return Pa;if(a==="TopBottomSides")return Sa;if(a==="LeftRightSides")return Na;if(a==="TopLeftSides")return _s;if(a==="TopRightSides")return nl;if(a==="BottomLeftSides")return Hu;if(a==="BottomRightSides")return fl;if(a==="NotTopSide")return Ol;if(a==="NotLeftSide")return il;if(a==="NotRightSide")return Pu;if(a==="NotBottomSide")return eh;if(a==="AllSides")return lu;if(a==="Default")return As;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 li(x,E,te,ne)}return new li}function wo(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}et.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(er)?"None":this.D(Pr)?"TopLeft":this.D(jr)?"Top":this.D($r)?"TopRight":this.D(jo)?"Left":this.D(tr)?"Center":this.D(pa)?"Right":this.D(ps)?"BottomLeft":this.D(cs)?"Bottom":this.D(io)?"BottomRight":this.D(ws)?"TopSide":this.D(ga)?"LeftSide":this.D(is)?"RightSide":this.D(Pa)?"BottomSide":this.D(Sa)?"TopBottomSides":this.D(Na)?"LeftRightSides":this.D(_s)?"TopLeftSides":this.D(nl)?"TopRightSides":this.D(Hu)?"BottomLeftSides":this.D(fl)?"BottomRightSides":this.D(Ol)?"NotTopSide":this.D(il)?"NotLeftSide":this.D(Pu)?"NotRightSide":this.D(eh)?"NotBottomSide":this.D(lu)?"AllSides":this.D(As)?"Default":"None"},et.D=function(a){return a instanceof li?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},et.gv=function(){return new li(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},et.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Gu))a=ga;else if(a.D(th))a=is;else if(a.D(uu))a=ws;else if(a.D(hu))a=Pa;else return!1;return a=a.offsetY,(this.offsetY&a)===a},et.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},et.Mc=function(){return isNaN(this.x)||isNaN(this.y)},et.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},et.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},et.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},li.alloc=function(){var a=Us.pop();return a===void 0?new li:a},li.free=function(a){Us.push(a)},li.prototype.isDefault=li.prototype.Xb,li.prototype.isNone=li.prototype.ys,li.prototype.isSide=li.prototype.$c,li.prototype.isNoSpot=li.prototype.Mc,li.prototype.isSpot=li.prototype.sb,li.prototype.includesSide=li.prototype.Hf,li.prototype.opposite=li.prototype.gv,li.prototype.equals=li.prototype.D,li.prototype.set=li.prototype.set,li.prototype.setTo=li.prototype.sg;var Us=[];li.className="Spot",li.parse=zo,li.stringify=wo,li.None=er=Yo(new li(0,0,0,0),0).ja(),li.Default=As=Yo(new li(0,0,-1,0),-1).ja(),li.TopLeft=Pr=new li(0,0,0,0).ja(),li.TopCenter=jr=new li(.5,0,0,0).ja(),li.TopRight=$r=new li(1,0,0,0).ja(),li.LeftCenter=jo=new li(0,.5,0,0).ja(),li.Center=tr=new li(.5,.5,0,0).ja(),li.RightCenter=pa=new li(1,.5,0,0).ja(),li.BottomLeft=ps=new li(0,1,0,0).ja(),li.BottomCenter=cs=new li(.5,1,0,0).ja(),li.BottomRight=io=new li(1,1,0,0).ja(),li.MiddleTop=ua=jr,li.MiddleLeft=ma=jo,li.MiddleRight=Os=pa,li.MiddleBottom=$s=cs,li.Top=uu=jr,li.Left=Gu=jo,li.Right=th=pa,li.Bottom=hu=cs,li.TopSide=ws=Yo(new li(0,0,1,1),1).ja(),li.LeftSide=ga=Yo(new li(0,0,1,2),1).ja(),li.RightSide=is=Yo(new li(0,0,1,4),1).ja(),li.BottomSide=Pa=Yo(new li(0,0,1,8),1).ja(),li.TopBottomSides=Sa=Yo(new li(0,0,1,9),1).ja(),li.LeftRightSides=Na=Yo(new li(0,0,1,6),1).ja(),li.TopLeftSides=_s=Yo(new li(0,0,1,3),1).ja(),li.TopRightSides=nl=Yo(new li(0,0,1,5),1).ja(),li.BottomLeftSides=Hu=Yo(new li(0,0,1,10),1).ja(),li.BottomRightSides=fl=Yo(new li(0,0,1,12),1).ja(),li.NotTopSide=Ol=Yo(new li(0,0,1,14),1).ja(),li.NotLeftSide=il=Yo(new li(0,0,1,13),1).ja(),li.NotRightSide=Pu=Yo(new li(0,0,1,11),1).ja(),li.NotBottomSide=eh=Yo(new li(0,0,1,7),1).ja(),li.AllSides=lu=Yo(new li(0,0,1,15),1).ja(),Il=new li(.156,.156).ja(),Ca=new li(.844,.844).ja(),li.parse=zo,li.stringify=wo;function Fi(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Fi.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},Fi.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},Fi.prototype.copy=function(){var a=new Fi;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},Fi.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Fi.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},Fi.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Fi.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Fi.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},Fi.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},Fi.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},Fi.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},et=Fi.prototype,et.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},et.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},et.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},et.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},et.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},et.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,se=this.m21,he=this.m22,_e=this.dx,Ee=this.dy,Ne=y*te+x*se+_e,Ge=y*ne+x*he+Ee,Ye=b*te+x*se+_e,$e=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,$e),Ge=Math.max(Ge,$e),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},Fi.alloc=function(){var a=Hs.pop();return a===void 0?new Fi:a},Fi.free=function(a){Hs.push(a)},Fi.prototype.transformRect=Fi.prototype.pp,Fi.prototype.transformPoint=Fi.prototype.Ga,Fi.prototype.scale=Fi.prototype.scale,Fi.prototype.translate=Fi.prototype.translate,Fi.prototype.rotate=Fi.prototype.rotate,Fi.prototype.invert=Fi.prototype.Vj,Fi.prototype.multiplyInverted=Fi.prototype.bv,Fi.prototype.multiply=Fi.prototype.multiply,Fi.prototype.reset=Fi.prototype.reset,Fi.prototype.isIdentity=Fi.prototype.ws,Fi.prototype.equals=Fi.prototype.D,Fi.prototype.setTransform=Fi.prototype.setTransform,Fi.prototype.set=Fi.prototype.set;var Hs=[];Fi.className="Transform",Fi.xF="54a702f3e53909c447824c6706603faf4c";var Zt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Zt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Zt.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(Zt.Yb(a,y,ne,se,Ne,x,b)&&Zt.Yb(a,y,ne,se,Ne,E,te))return Zt.Yb(a,y,ne,se,Ne,_e,Ee);var Ge=(a+x)/2,Ye=(y+b)/2,$e=(x+E)/2,st=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ge+$e)/2,x=(Ye+st)/2,$e=($e+E)/2,st=(st+te)/2;var Et=(b+$e)/2,St=(x+st)/2;return Zt.cs(a,y,Ge,Ye,b,x,Et,St,he,_e,Ee,Ne)||Zt.cs(Et,St,$e,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 ci(((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(Zt.Yb(a,y,ne,se,he,x,b)&&Zt.Yb(a,y,ne,se,he,E,te))Er(_e,a,y,0,0),Er(_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 $e=(b+Ge)/2,st=(x+Ye)/2;Zt.Dl(a,y,Ee,Ne,b,x,$e,st,he,_e),Zt.Dl($e,st,Ge,Ye,E,te,ne,se,he,_e)}return _e},Qe:function(a,y,x,b,E,te,ne,se,he,_e){if(Zt.Yb(a,y,ne,se,he,x,b)&&Zt.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 $e=(b+Ge)/2,st=(x+Ye)/2;Zt.Qe(a,y,Ee,Ne,b,x,$e,st,he,_e),Zt.Qe($e,st,Ge,Ye,E,te,ne,se,he,_e)}return _e},jv:function(a,y,x,b,E,te,ne,se,he,_e){if(Zt.Yb(a,y,E,te,_e,x,b))return Zt.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 Zt.jv(a,y,Ee,Ne,Ge,Ye,ne,se,he,_e)||Zt.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(Zt.Yb(a,y,E,te,ne,x,b))Er(se,a,y,0,0),Er(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;Zt.iv(a,y,he,_e,Ee,Ne,ne,se),Zt.iv(Ee,Ne,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(Zt.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;Zt.ep(a,y,he,_e,Ee,Ne,ne,se),Zt.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(Zt.Yb(a,y,ne,se,Ge,x,b)&&Zt.Yb(a,y,ne,se,Ge,E,te))return!Zt.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 $e=(a+x)/2,st=(y+b)/2,Et=(x+E)/2,St=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=($e+Et)/2,x=(st+St)/2,Et=(Et+E)/2,St=(St+te)/2;var Tt=(b+Et)/2,At=(x+St)/2,Ot=1/0,Gt=!1,en=0,Zn=0;return Zt.Eo(a,y,$e,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<Ot&&(Ot=a,Gt=!0,en=Ye.x,Zn=Ye.y)),Zt.Eo(Tt,At,Et,St,E,te,ne,se,he,_e,Ee,Ne,Ge,Ye)&&(Ye.x-he)*(Ye.x-he)+(Ye.y-_e)*(Ye.y-_e)<Ot&&(Gt=!0,en=Ye.x,Zn=Ye.y),Gt&&(Ye.x=en,Ye.y=Zn),Gt},Fo:function(a,y,x,b,E,te,ne,se,he,_e,Ee,Ne,Ge){var Ye=0;if(Zt.Yb(a,y,ne,se,Ge,x,b)&&Zt.Yb(a,y,ne,se,Ge,E,te)){if(Ge=(a-ne)*(_e-Ne)-(y-se)*(he-Ee),Ge===0)return Ye;var $e=((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($e>=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,$e<he||$e>a)return Ye;0<Ge?Ye++:0>Ge&&Ye--}else{$e=(a+x)/2,st=(y+b)/2;var Et=(x+E)/2,St=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=($e+Et)/2,x=(st+St)/2,Et=(Et+E)/2,St=(St+te)/2;var Tt=(b+Et)/2,At=(x+St)/2;Ye+=Zt.Fo(a,y,$e,st,b,x,Tt,At,he,_e,Ee,Ne,Ge),Ye+=Zt.Fo(Tt,At,Et,St,E,te,ne,se,he,_e,Ee,Ne,Ge)}return Ye},qh:function(a,y,x,b,E,te,ne){return Zt.$(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)):Zt.$(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 Zt.B(a,x)&&Zt.B(y,b)?(he.h(a,y),!1):Zt.$(E,ne)?Zt.$(a,x)?(Zt.qh(a,y,x,b,E,te,he),!1):Zt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),Zt.$(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),Zt.$(se,ne)?(Zt.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),Zt.$(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)):Zt.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return Zt.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(Et,St){var Tt=(Et-a)*(Et-a)+(St-y)*(St-y);Tt<Ne&&(Ne=Tt,he.h(Et,St))}var Ne=1/0;Ee(he.x,he.y);var Ge=0,Ye=0,$e=0,st=0;if(E<ne?(Ge=E,Ye=ne):(Ge=ne,Ye=E),te<se?($e=E,st=ne):($e=ne,st=E),Ge=(Ye-Ge)/2+_e,_e=(st-$e)/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(Zt.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 Zt.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)),Zt.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)),Zt.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 Zt.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):!!(no(a,y,x,b,E,te)||no(a,y,x,b,ne,se)||Zt.Rl(a,y,he,y,E,te,ne,se)||Zt.Rl(he,y,he,_e,E,te,ne,se)||Zt.Rl(he,_e,a,_e,E,te,ne,se)||Zt.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>=Zt.Fl(a,y,x,b,E,te)*Zt.Fl(a,y,x,b,ne,se)&&0>=Zt.Fl(E,te,ne,se,a,y)*Zt.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(Zt.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),Zt.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 di,um:new di,Mf:new di,Nf:0,vm:100};Zt.za=Zt.AA;function In(a){Ri(this),this.l=2,a===void 0&&(a=In.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===In.o?this.ee=new Mn:(In.V===null&&(In.V=new Mn().freeze()),this.ee=In.V),this.aq=this.ee.Ja,this.Ip=new rn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Pr,this.gg=io,this.Rk=this.Sk=NaN,this.Uf=Tn}In.prototype.copy=function(){var a=new In;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===In.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},In.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},In.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==In.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},In.prototype.ka=function(){if(Object.isFrozen(this)&&wt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==In.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},In.prototype.Xa=function(a){if(!(a instanceof In))return!1;if(this.type!==a.type)return this.type===In.j&&a.type===In.o?pl(this,a):a.type===In.j&&this.type===In.o?pl(a,this):!1;if(this.type===In.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 Zt.B(this.startX,a.startX)&&Zt.B(this.startY,a.startY)&&Zt.B(this.endX,a.endX)&&Zt.B(this.endY,a.endY)};function pl(a,y){return a.type!==In.j||y.type!==In.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Zt.B(a.startX,y.startX)&&Zt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===ro&&Zt.B(a.endX,y.endX)&&Zt.B(a.endY,y.endY))))}In.ia=function(a){return a.toString()},In.prototype.qb=function(a){a.classType===In&&(this.type=a)},In.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case In.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 In.u:var y=new rn(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case In.F:if(y=new rn(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case In.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()}},In.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},In.parse=function(a,y){function x(){return st>=Ot-1?!0:_e[st+1].match(Gt)!==null}function b(){return st++,_e[st]}function E(Yi){var zi=parseFloat(b()),Wr=parseFloat(b());Et===Et.toLowerCase()&&(zi=At.x+zi,Wr=At.y+Wr),Yi.h(zi,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=Un();for(var Ne="",Ge=!1,Ye=0;Ye<Ee.length;Ye++){var $e=Ee[Ye];$e!=="."||Ge?$e==="."?(he.push(Ne),Ne="."):Ne+=$e:(Ge=!0,Ne+=$e)}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,Et="",St="";he=new ft(0,0);var Tt=new ft(0,0),At=new ft(0,0),Ot=_e.length;a=A1(null),Ge=Ne=Ee=!1,Ye=!0,$e=null;for(var Gt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(st>=Ot-1);)if(St=Et,Et=b(),Et!=="")switch(Et.toUpperCase()){case"X":Ye=!0,Ne=Ee=!1;break;case"M":for($e=te(),a.mc===null||Ye===!0?(Wf(a,$e.x,$e.y,Ee,!Ne,Ge),Ye=!1):a.moveTo($e.x,$e.y),he.assign(At);!x();)$e=te(),a.lineTo($e.x,$e.y);break;case"L":for(;!x();)$e=te(),a.lineTo($e.x,$e.y);break;case"H":for(;!x();)At=new ft((Et===Et.toLowerCase()?At.x:0)+parseFloat(b()),At.y),a.lineTo(At.x,At.y);break;case"V":for(;!x();)At=new ft(At.x,(Et===Et.toLowerCase()?At.y:0)+parseFloat(b())),a.lineTo(At.x,At.y);break;case"C":for(;!x();){$e=new ft,E($e);var en=ne(),Zn=te();$h(a,$e.x,$e.y,en.x,en.y,Zn.x,Zn.y)}break;case"S":for(;!x();)$e=se(),en=ne(),Zn=te(),$h(a,$e.x,$e.y,en.x,en.y,Zn.x,Zn.y);break;case"Q":for(;!x();)$e=ne(),en=te(),Um(a,$e.x,$e.y,en.x,en.y);break;case"T":for(;!x();)Tt=$e=se(),en=te(),Um(a,$e.x,$e.y,en.x,en.y);break;case"B":for(;!x();){$e=parseFloat(b()),en=parseFloat(b()),Zn=parseFloat(b());var ui=parseFloat(b()),ri=parseFloat(b()),Rn=ri,wn=!1;x()||(Rn=parseFloat(b()),x()||(wn=parseFloat(b())!==0)),Et===Et.toLowerCase()&&(Zn+=At.x,ui+=At.y),a.arcTo($e,en,Zn,ui,ri,Rn,wn)}break;case"A":for(;!x();)$e=Math.abs(parseFloat(b())),en=Math.abs(parseFloat(b())),Zn=parseFloat(b()),ri=ui=!1,wn=Rn=0,Rn=b(),Rn.length===1?(ui=!!parseFloat(Rn),ri=!!parseFloat(b()),Rn=parseFloat(b())):Rn.length===2?(ui=!!parseFloat(Rn[0]),ri=!!parseFloat(Rn[1]),Rn=parseFloat(b())):(ui=!!parseFloat(Rn[0]),ri=!!parseFloat(Rn[1]),Rn=parseFloat(Rn.slice(2))),wn=parseFloat(b()),Et===Et.toLowerCase()&&(Rn=At.x+Rn,wn=At.y+wn),At.h(Rn,wn),bx(a,$e,en,Zn,ui,ri,Rn,wn);break;case"Z":_x(a),At.assign(he);break;case"F":for($e="",en=1;_e[st+en];)if(_e[st+en]==="0")Ge=!0,en++;else if(_e[st+en].match(/[Uu]/)!==null)en++;else if(_e[st+en].match(Gt)===null)en++;else{$e=_e[st+en];break}$e.match(/[Mm]/)?Ee=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for($e="",en=1;_e[st+en];)if(_e[st+en].match(/[Ff]/)!==null)en++;else if(_e[st+en].match(Gt)===null)en++;else{$e=_e[st+en];break}$e.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},In.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)},In.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===In.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},In.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===In.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),Kl(this,a,!1),Er(a,0,0,0,0),a.freeze()},In.prototype.ix=function(){var a=new rn;return Kl(this,a,!0),a};function Kl(a,y,x){switch(a.type){case In.j:case In.u:case In.F:x?y.h(a.od,a.pd,0,0):Er(y,a.od,a.pd,0,0),Er(y,a.Dc,a.Ec,0,0);break;case In.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):Er(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 ro:case ms:he=Ne.endX,_e=Ne.endY,Er(y,he,_e,0,0);break;case bs:Zt.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 Da:Zt.iv(he,_e,Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY,.5,y),he=Ne.endX,_e=Ne.endY;break;case Xo:case Ka:var Ge=Ne.type===Xo?va(Ne,te):Is(Ne,te,he,_e),Ye=Ge.length;if(Ye===0){he=Ne.type===Xo?Ne.centerX:Ne.endX,_e=Ne.type===Xo?Ne.centerY:Ne.endY,Er(y,he,_e,0,0);break}Ne=null;for(var $e=0;$e<Ye;$e++)Ne=Ge[$e],Zt.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:wt("Unknown Segment type: "+Ne.type)}}}break;default:wt("Unknown Geometry type: "+a.type)}}In.prototype.normalize=function(){this._isFrozen&&zt(this);var a=this.ix();return this.offset(-a.x,-a.y),new ft(-a.x,-a.y)},In.prototype.offset=function(a,y){return this._isFrozen&&zt(this),this.transform(1,0,0,1,a,y),this},In.prototype.scale=function(a,y){return this._isFrozen&&zt(this),this.transform(a,0,0,y,0,0),this},In.prototype.rotate=function(a,y,x){this._isFrozen&&zt(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Fi.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Fi.free(b),this},et=In.prototype,et.transform=function(a,y,x,b,E,te){switch(this.type){case In.j:case In.u:case In.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 In.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 $e=Ne[Ye];switch($e.type){case ro:case ms:ne=$e.endX,se=$e.endY,$e.endX=ne*a+se*x+E,$e.endY=ne*y+se*b+te;break;case bs:ne=$e.point1X,se=$e.point1Y,$e.point1X=ne*a+se*x+E,$e.point1Y=ne*y+se*b+te,ne=$e.point2X,se=$e.point2Y,$e.point2X=ne*a+se*x+E,$e.point2Y=ne*y+se*b+te,ne=$e.endX,se=$e.endY,$e.endX=ne*a+se*x+E,$e.endY=ne*y+se*b+te;break;case Da:ne=$e.point1X,se=$e.point1Y,$e.point1X=ne*a+se*x+E,$e.point1Y=ne*y+se*b+te,ne=$e.endX,se=$e.endY,$e.endX=ne*a+se*x+E,$e.endY=ne*y+se*b+te;break;case Xo:ne=$e.centerX,se=$e.centerY,$e.centerX=ne*a+se*x+E,$e.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),$e.startAngle+=ne),0>a&&($e.startAngle=180-$e.startAngle,$e.sweepAngle=-$e.sweepAngle),0>b&&($e.startAngle=-$e.startAngle,$e.sweepAngle=-$e.sweepAngle),$e.radiusX*=Math.sqrt(a*a+x*x),$e.radiusY!==void 0&&($e.radiusY*=Math.sqrt(y*y+b*b));break;case Ka:if(ne=$e.endX,se=$e.endY,$e.endX=ne*a+se*x+E,$e.endY=ne*y+se*b+te,$e.radiusX===0||$e.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),$e.xAxisRotation+=ne),0>a&&($e.xAxisRotation=180-$e.xAxisRotation,$e.isClockwiseArc=!$e.isClockwiseArc),0>b&&($e.xAxisRotation=-$e.xAxisRotation,$e.isClockwiseArc=!$e.isClockwiseArc),$e.radiusX*=Math.sqrt(a*a+x*x),$e.radiusY*=Math.sqrt(y*y+b*b);break;default:wt("Unknown Segment type: "+$e.type)}}}}return this._isInvalidBounds=!0,this},et.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,te=this.Ec;switch(this.type){case In.j:return Zt.Yb(x,b,E,te,y,a.x,a.y);case In.u:var ne=rn.allocAt(Math.min(x,E)-y,Math.min(b,te)-y,Math.abs(E-x)+2*y,Math.abs(te-b)+2*y);return a=ne.ca(a),rn.free(ne),a;case In.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 In.o:return Ns(this,a,y,!0,!1);default:return!1}};function Ns(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,$e=0;$e<Ye;$e++){var st=Ge[$e],Et=!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,Ot=St.s,Gt=0;Gt<=St.length;Gt++){var en=void 0;if(Gt!==St.length){en=Ot[Gt];var Zn=en.type;a=en.endX,Ne=en.endY}else Zn=ro,a=Tt,Ne=At;switch(Zn){case ms:if(Tt=sa(te,y,ne,y,he,_e,Tt,At),isNaN(Tt))return!0;se+=Tt,Tt=a,At=Ne;break;case ro:if(he=sa(te,y,ne,y,he,_e,a,Ne),isNaN(he))return!0;se+=he;break;case bs:Ee=Zt.Fo(he,_e,en.point1X,en.point1Y,en.point2X,en.point2Y,a,Ne,ne,y,te,y,.5),se+=Ee;break;case Da:Ee=Zt.Fo(he,_e,(he+2*en.point1X)/3,(_e+2*en.point1Y)/3,(2*en.point1X+a)/3,(2*en.point1Y+Ne)/3,a,Ne,ne,y,te,y,.5),se+=Ee;break;case Xo:case Ka:Zn=en.type===Xo?va(en,st):Is(en,st,he,_e);var ui=Zn.length;if(ui===0){if(he=sa(te,y,ne,y,he,_e,en.type===Xo?en.centerX:en.endX,en.type===Xo?en.centerY:en.endY),isNaN(he))return!0;se+=he;break}en=null;for(var ri=0;ri<ui;ri++){if(en=Zn[ri],ri===0){if(Ee=sa(te,y,ne,y,he,_e,en[0],en[1]),isNaN(Ee))return!0;se+=Ee}Ee=Zt.Fo(en[0],en[1],en[2],en[3],en[4],en[5],en[6],en[7],ne,y,te,y,.5),se+=Ee}en!==null&&(a=en[6],Ne=en[7]);break;default:wt("Unknown Segment type: "+en.type)}he=a,_e=Ne}if(Et){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 sa(a,y,x,b,E,te,ne,se){if(Zt.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 rl(a,y,x,b){a=a.figures.s;for(var E=a.length,te=0;te<E;te++)if(a[te].ca(y,x,b))return!0;return!1}et.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new ft),this.type===In.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},et.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===In.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},et.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===In.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},et.xx=function(a){if(this.type===In.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 Zt.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===In.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],$e=Ge.length,st=0;st<$e;st+=2){var Et=Ge[st],St=Ge[st+1];if(st!==0){Zt.qh(_e,Ee,Et,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=Et,Ee=St}return ft.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function bl(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===In.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===In.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===In.F){var te=new gs;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Fr(Xo);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,te.add(ne),a=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];Zt.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(Cu(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 ms:4<=b.length&&(y.push(b),x.push(Cu(b))),b=[],b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY,se=ne,he=te;break;case ro:b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY;break;case bs:Zt.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 Da:Zt.ep(ne,te,Ge.point1X,Ge.point1Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case Xo:var Ye=va(Ge,E),$e=Ye.length;if($e===0){b.push(Ge.centerX),b.push(Ge.centerY),ne=Ge.centerX,te=Ge.centerY;break}for(var st=0;st<$e;st++){var Et=Ye[st];Zt.Qe(ne,te,Et[2],Et[3],Et[4],Et[5],Et[6],Et[7],.5,b),ne=Et[6],te=Et[7]}break;case Ka:if(Ye=Is(Ge,E,ne,te),$e=Ye.length,st=Ge.endX,Et=Ge.endY,$e===0){b.push(st),b.push(Et),ne=st,te=Et;break}for(st=0;st<$e;st++)Et=Ye[st],Zt.Qe(ne,te,Et[2],Et[3],Et[4],Et[5],Et[6],Et[7],.5,b),ne=Et[6],te=Et[7];break;default:wt("Segment not of valid type: "+Ge.type)}Ge.isClosed&&(b.push(se),b.push(he))}4<=b.length&&(y.push(b),x.push(Cu(b)))}}}function Cu(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(Ti(x,b,ne,se))),x=ne,b=se}return y}et.add=function(a){return this.ee.add(a),this},et.pm=function(a,y,x,b,E,te,ne,se){return this._isFrozen&&zt(this),this.fg=new li(a,y,E,te).freeze(),this.gg=new li(x,b,ne,se).freeze(),this},nt.Object.defineProperties(In.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 bl(this),this.tk}},flattenedLengths:{get:function(){return bl(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===In.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===In.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&&zt(this,a),this.na=a,a===In.o?this.ee=new Mn:(In.V===null&&(In.V=new Mn().freeze()),this.ee=In.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&zt(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&zt(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&zt(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&zt(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&zt(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&zt(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&zt(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&zt(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),In.prototype.setSpots=In.prototype.pm,In.prototype.add=In.prototype.add,In.prototype.getFractionForPoint=In.prototype.xx,In.prototype.getPointAndAngleAlongPath=In.prototype.Qu,In.prototype.getAngleAlongPath=In.prototype.wx,In.prototype.getPointAlongPath=In.prototype.Pu,In.prototype.containsPoint=In.prototype.ca,In.prototype.transform=In.prototype.transform,In.prototype.rotate=In.prototype.rotate,In.prototype.scale=In.prototype.scale,In.prototype.offset=In.prototype.offset,In.prototype.normalize=In.prototype.normalize,In.prototype.computeBoundsWithoutOrigin=In.prototype.ix,In.prototype.equalsApprox=In.prototype.Xa,In.className="Geometry",In.j=new xn(In,"Line",0),In.u=new xn(In,"Rectangle",1),In.F=new xn(In,"Ellipse",2),In.o=new xn(In,"Path",3),In.V=null,In.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",In.className="Geometry",In.stringify=In.ia,In.fillPath=In.nb,In.parse=In.parse,In.Line=In.j,In.Rectangle=In.u,In.Ellipse=In.F,In.Path=In.o;function gs(a,y,x,b,E){Ri(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Mn,this.sr=this.pl.Ja,this.fw=null}gs.prototype.copy=function(){var a=new gs;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var te=y[E].copy();b.add(te)}return a.sr=this.sr,a.fw=this.fw,a},et=gs.prototype,et.Xa=function(a){if(!(a instanceof gs&&Zt.B(this.startX,a.startX)&&Zt.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},et.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},et.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},et.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},et.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},et.add=function(a){return this.pl.add(a),this},et.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,se=this.segments.s,he=se.length,_e=0;_e<he;_e++){var Ee=se[_e];switch(Ee.type){case ms:te=Ee.endX,ne=Ee.endY,b=Ee.endX,E=Ee.endY;break;case ro:if(Zt.Yb(b,E,Ee.endX,Ee.endY,x,a,y))return!0;b=Ee.endX,E=Ee.endY;break;case bs:if(Zt.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 Da:if(Zt.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 Xo:case Ka:var Ne=Ee.type===Xo?va(Ee,this):Is(Ee,this,b,E),Ge=Ne.length,Ye=Ee.type===Xo?Ee.centerX:Ee.endX,$e=Ee.type===Xo?Ee.centerY:Ee.endY;if(Ge===0){if(Zt.Yb(b,E,Ye,$e,x,a,y))return!0;b=Ye,E=$e;break}for(Ye=null,$e=0;$e<Ge;$e++)if(Ye=Ne[$e],$e===0&&Zt.Yb(b,E,Ye[0],Ye[1],x,a,y)||Zt.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:wt("Unknown Segment type: "+Ee.type)}if(Ee.isClosed&&(b!==te||E!==ne)&&Zt.Yb(b,E,te,ne,x,a,y))return!0}return!1},nt.Object.defineProperties(gs.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&&zt(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&zt(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&zt(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&zt(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&zt(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&zt(this,a),this.pl=a,this._isInvalidBounds=!0}}}),gs.prototype.add=gs.prototype.add,gs.prototype.equalsApprox=gs.prototype.Xa,gs.className="PathFigure";function Fr(a,y,x,b,E,te,ne,se){Ri(this),a===void 0&&(a=ro),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===Ka?(a=te%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),se&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===Xo&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===Xo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Fr.prototype.copy=function(){var a=new Fr;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},et=Fr.prototype,et.Xa=function(a){if(!(a instanceof Fr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ms:case ro:return Zt.B(this.endX,a.endX)&&Zt.B(this.endY,a.endY);case bs:return Zt.B(this.endX,a.endX)&&Zt.B(this.endY,a.endY)&&Zt.B(this.point1X,a.point1X)&&Zt.B(this.point1Y,a.point1Y)&&Zt.B(this.point2X,a.point2X)&&Zt.B(this.point2Y,a.point2Y);case Da:return Zt.B(this.endX,a.endX)&&Zt.B(this.endY,a.endY)&&Zt.B(this.point1X,a.point1X)&&Zt.B(this.point1Y,a.point1Y);case Xo:return Zt.B(this.startAngle,a.startAngle)&&Zt.B(this.sweepAngle,a.sweepAngle)&&Zt.B(this.centerX,a.centerX)&&Zt.B(this.centerY,a.centerY)&&Zt.B(this.radiusX,a.radiusX)&&Zt.B(this.radiusY,a.radiusY);case Ka:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Zt.B(this.xAxisRotation,a.xAxisRotation)&&Zt.B(this.endX,a.endX)&&Zt.B(this.endY,a.endY)&&Zt.B(this.radiusX,a.radiusX)&&Zt.B(this.radiusY,a.radiusY);default:return!1}},et.qb=function(a){a.classType===Fr&&(this.type=a)},et.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ms:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ro:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case bs: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 Da:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Xo:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Ka:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.close=function(){return this.isClosed=!0,this};function 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=Zt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=Fi.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),In.Ha(te,ne),Fi.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,Et,St,Tt){return(st*Tt<Et*St?-1:1)*Math.acos((st*St+Et*Tt)/(Math.sqrt(st*st+Et*Et)*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 $e=Ye*Ye/(y*y)+ne*ne/(te*te);return 1<$e&&(y*=Math.sqrt($e),te*=Math.sqrt($e)),$e=(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($e)&&($e=0),se=$e*y*ne/te,$e=$e*-te*Ye/y,isNaN(se)&&(se=0),isNaN($e)&&($e=0),x=(x+_e)/2+Ne*se-Ge*$e,b=(b+Ee)/2+Ge*se+Ne*$e,Ee=E(1,0,(Ye-se)/y,(ne-$e)/te),Ne=(Ye-se)/y,_e=(ne-$e)/te,Ye=(-Ye-se)/y,se=(-ne-$e)/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=Zt.jx(0,0,y>te?y:te,Ee,Ee+ne,!0),te=Fi.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Ye),In.Ha(y,te),Fi.free(te),a.ae=y,a.ae}nt.Object.defineProperties(Fr.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&&zt(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&zt(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&zt(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&zt(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&zt(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&zt(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&zt(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&zt(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&zt(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&En(a,">= zero",Fr,"radiusX"),this._isFrozen&&zt(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&En(a,">= zero",Fr,"radiusY"),this._isFrozen&&zt(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&zt(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&&zt(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&&zt(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&&zt(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&&zt(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Fr.prototype.equalsApprox=Fr.prototype.Xa;var ms=new xn(Fr,"Move",0),ro=new xn(Fr,"Line",1),bs=new xn(Fr,"Bezier",2),Da=new xn(Fr,"QuadraticBezier",3),Xo=new xn(Fr,"Arc",4),Ka=new xn(Fr,"SvgArc",4);Fr.className="PathSegment",Fr.Move=ms,Fr.Line=ro,Fr.Bezier=bs,Fr.QuadraticBezier=Da,Fr.Arc=Xo,Fr.SvgArc=Ka;function ea(){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}ea.prototype.copy=function(){var a=new ea;return this.clone(a)},ea.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},ea.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},ea.prototype.So=function(a,y){var x=this.diagram;return x===null||Ap(x,a,y),y},ea.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(ea.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}}}),ea.prototype.getMultiTouchDocumentPoint=ea.prototype.Bz,ea.prototype.getMultiTouchViewPoint=ea.prototype.So,ea.className="InputEvent";function Eu(){this.H=null,this.xa="",this.ar=this.Lr=null}Eu.prototype.copy=function(){var a=new Eu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Eu.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(Eu.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}}}),Eu.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=Yt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Yt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Yt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Yt(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===ha?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===ha?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Li(this.object)),this.oldValue!==null&&(a+=" old: "+Li(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Li(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===ha&&(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 ha=new xn(Io,"Transaction",-1),Ro=new xn(Io,"Property",0),es=new xn(Io,"Insert",1),Jo=new xn(Io,"Remove",2);Io.className="ChangedEvent",Io.Transaction=ha,Io.Property=Ro,Io.Insert=es,Io.Remove=Jo;function ds(){this.o=new Mn().freeze(),this.xa="",this.j=!1}ds.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},ds.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()},ds.prototype.canUndo=function(){return this.isComplete},ds.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()}},ds.prototype.canRedo=function(){return this.isComplete},ds.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()}},ds.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new on,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 on,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(ds.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}}}),ds.prototype.optimize=ds.prototype.ak,ds.prototype.redo=ds.prototype.redo,ds.prototype.canRedo=ds.prototype.canRedo,ds.prototype.undo=ds.prototype.undo,ds.prototype.canUndo=ds.prototype.canUndo,ds.prototype.clear=ds.prototype.clear,ds.className="Transaction";function No(){this.Pt=new kn,this.Jd=!1,this.u=new Mn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Mn().freeze(),this.hl=new Mn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}No.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},No.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},No.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},et=No.prototype,et.Xw=function(a){this.Pt.add(a)},et.Rx=function(a){this.Pt.remove(a)},et.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},et.eb=function(a){return a===void 0&&(a=""),nh(this,!0,a)},et.Kf=function(){return nh(this,!1,"")};function nh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&bn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var te=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(te=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(te=y.M(0),te!==null&&te.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=te,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}et.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},No.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},No.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){bn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},No.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},No.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){bn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},No.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Io;for(b.change=ha,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},No.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new ds);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||bn("Change not within a transaction: "+x.toString()))}},No.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(No.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}}}),No.prototype.handleChanged=No.prototype.Tu,No.prototype.redo=No.prototype.redo,No.prototype.undo=No.prototype.undo,No.prototype.canUndo=No.prototype.canUndo,No.prototype.discardHistoryAfterIndex=No.prototype.lx,No.prototype.rollbackTransaction=No.prototype.Kf,No.prototype.commitTransaction=No.prototype.eb,No.prototype.startTransaction=No.prototype.Ea,No.prototype.removeModel=No.prototype.Rx,No.prototype.addModel=No.prototype.Xw,No.prototype.clear=No.prototype.clear,No.className="UndoManager";function Nr(){Ri(this),this.H=ah,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ea,this.Zr=-1}Nr.prototype.toString=function(){return this.name!==""?this.name+" Tool":An(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(lr?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||(lr?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===Lu&&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===Lu&&!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=_i(function(){x.doWaitAfter(b)},a)},Nr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Kt.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 Br);)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 nn&&(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 bo(){Nr.call(this),this.name="ToolManager",this.hb=new Mn,this.ob=new Mn,this.Hb=new Mn,this.F=this.V=850,this.o=new Pn(2,2).ja(),this.Ha=5e3,this.ia=Lu,this.u=Ph,this.Mp=this.j=null,this.zj=-1}Je(bo,Nr),bo.prototype.initializeStandardTools=function(){},bo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Br&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},bo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Yl&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Yr){y.bubbles=!0;return}if(this.gestureBehavior===Yl)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===Lu?this.mouseWheelBehavior=ih:this.mouseWheelBehavior===ih&&(this.mouseWheelBehavior=Lu)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},bo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Yr){y.bubbles=!0;return}if(this.gestureBehavior===Yl)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)}bo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Br&&(y===a||y.rg(a))||this.hideToolTip()},bo.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()))},bo.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)},bo.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 Br)||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()},bo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Br){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 Vs&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Kt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=_i(function(){E.hideToolTip()},a)}},bo.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}},bo.prototype.hideToolTip=function(){this.zj!==-1&&(Kt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Br?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Vs&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},bo.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()},bo.prototype.doMouseWheel=function(){this.standardMouseWheel()},bo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},bo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},bo.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},bo.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},bo.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(bo.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 Br?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}}}),bo.prototype.replaceStandardTool=bo.prototype.gb;var Lu=new xn(bo,"WheelScroll",0),ih=new xn(bo,"WheelZoom",1),Wh=new xn(bo,"WheelNone",2),Ph=new xn(bo,"GestureZoom",3),Yl=new xn(bo,"GestureCancel",4),Yr=new xn(bo,"GestureNone",5);bo.className="ToolManager",bo.WheelScroll=Lu,bo.WheelZoom=ih,bo.WheelNone=Wh,bo.GestureZoom=Ph,bo.GestureCancel=Yl,bo.GestureNone=Yr;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 kn().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Pl;Je(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,(lr?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),Dt=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&&Xa(a),bf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Dt=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 Cr,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(Wn):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(),Cl(this),Lc(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Pl.count){for(var y=Pl,x=y.length,b=0;b<x;b++){var E=y.M(b);Dr(E),mo(E),Cl(E),E.diagram.ug()}y.clear()}Dr(this),this.tl.h(NaN,NaN),Vt!==null&&(Vt.currentCursor=""),Dt=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 Cl(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=Dt;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 Xl(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 on,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 Do(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&&(Xa(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),Ya(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&&Dt===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof Xi)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&Dt===null||(a.doDragOver(y,b),!a.isActive&&Dt===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 Br||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&&Dt===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=cu(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 cu(a){var y=a.panel;return y!==null?y:a instanceof Ei&&!(a instanceof Xi)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Mu(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(tr,a);he=y.Bf(he),he<te&&(ne=se,te=he)}}return ft.free(a),ne}function Ya(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=Mu(a,x.i(0),!1),te!==null&&(ne=te.part));var se=null,he=null;x.toNode===null&&(se=Mu(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 Jl(a,y){var x=a.diagram;a.dragsLink&&Ya(a,!0),Cl(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=cu(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||Dt!==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||Dt!==null){for(a=rn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Xn&&yp(x,b,a);rn.free(a)}}}function vp(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Xi||(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()?(Xl(this,!1),bf(a,this.copiedParts),Do(this,this.copiedParts,!1),Lc(a,this.copiedParts)):this.mayMove()?(mo(this),Do(this,this.draggedParts,!0)):this.mayDragOut()?(Xl(this,!1),Do(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),Xl(this,!0),bf(a,this.copiedParts),Do(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()&&(Do(this,this.draggedParts,!0),ls(this,a.lastInput.documentPoint))),this.Ym=!0,Jl(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(Dt===null)return!1;var b=Dt.diagram;x instanceof nn||(x=null);var E=Vt;return x!==E&&(E!==null&&E!==b&&(E.ug(),Dt.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&&(Pl.contains(E)||Pl.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(Dt===null)return!1;var b=Vt,E=Dt.diagram;if(x===null)return Dt.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),Dt.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;Vt=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Eh(),Pl.contains(b)||Pl.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=Dt,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||(lr?!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 Dt},Ho.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Dt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Ho.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Fl(a),a.animationManager.Cc(),a=Dt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Ho.prototype.doSimulatedDragLeave=function(){var a=Dt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Ho.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Dt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;gf(this,y.draggedParts.Lf(),!1,a.firstInput),Do(this,this.copiedParts,!1),ls(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Ho.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Dt;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),Do(this,this.copiedParts,!1);var b=new kn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Jl(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=rn.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,rn.free(te),te=a.Fr,ne=new on,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 Dt=null,Vt=null;Ho.className="DraggingTool",Pl=new Mn,bi("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),bo.prototype.doCancel=function(){Dt!==null&&Dt.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 ir;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new ir,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Xn,y=new ir,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=ji,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Xn,y=new ir,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=ji,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 on,this.Of=this.gj=this.Pf=null}Je(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=Pn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Pn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=tr,te=ft.alloc(),x.location=y.ga(tr,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=ji,y.fromSpot=er,y.toSpot=er),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(tr,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 kn;return b.add(a),Hi(this,x,y,b)};function Hi(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Hi(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Hi(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!Pi(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!Pi(this,a,y,x,!0)}if(b===Wp)return a===y?a=!0:(b=new kn,b.add(y),a=si(this,b,a,y,x)),!a;if(b===Zp)return!Pi(this,a,y,x,!1);if(b===Vp)return a===y?a=!0:(b=new kn,b.add(y),a=yi(this,b,a,y,x)),!a}return!0};function Pi(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&&Pi(a,ne,x,b,E)))return!0}return!1}function si(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&&si(a,y,ne,b,E)))return!0}return!1}function yi(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&&yi(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 oi(){Jt.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ci,this.Xd=null}Je(oi,Jt),oi.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},oi.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===Ci||x===qi){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===Ci||x===Po)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},oi.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)},oi.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()},oi.prototype.doStop=function(){Jt.prototype.doStop.call(this),this.startObject=null},oi.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)}}},oi.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)},oi.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},oi.prototype.doNoLink=function(){},nt.Object.defineProperties(oi.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 Ci=new xn(oi,"Either",0),qi=new xn(oi,"ForwardsOnly",0),Po=new xn(oi,"BackwardsOnly",0);oi.className="LinkingTool",oi.Either=Ci,oi.ForwardsOnly=qi,oi.BackwardsOnly=Po;function Cr(){Jt.call(this),this.name="Relinking";var a=new ir;a.figure="Diamond",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new ir,a.figure="Diamond",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new rn}Je(Cr,Jt),Cr.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)}},Cr.prototype.makeAdornment=function(a,y){var x=new Br;return x.type=Dn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Cr.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},Cr.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 Br&&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=wi),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=wi),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},Cr.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=za),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}},Cr.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()},Cr.prototype.doStop=function(){Jt.prototype.doStop.call(this),this.handle=null},Cr.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()}}},Cr.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},Cr.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(Cr.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 Br))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Cr.className="RelinkingTool",bi("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),bi("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 ir;a.figure="Rectangle",a.desiredSize=br,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new ir,a.figure="Diamond",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new ft,this.Yq=new Mn}Je(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 Br,E.type=Dn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Al)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);Zt.B(he.x,_e.x)&&Zt.B(he.y,_e.y)&&(_e=y.i(x-1)),Zt.B(he.x,_e.x)?(this.om(se,ho),se.cursor="n-resize"):Zt.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),Zt.B(he.x,_e.x)&&Zt.B(he.y,_e.y)&&(he=y.i(te+1)),Zt.B(he.x,_e.x)?(this.om(se,ho),se.cursor="n-resize"):Zt.B(he.y,_e.y)&&(this.om(se,rs),se.cursor="w-resize")):ne!==te&&(this.om(se,Vo),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(tr)},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&&(To(this,ne,b,E,te,!0)||To(this,ne,b,E,te,!1))){var se=y.points.copy();To(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&&(To(this,b,E,te,ne,!0)||To(this,b,E,te,ne,!1))&&(se=y.points.copy(),To(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(),Zt.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 To(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);Zt.B(te.x,E.x)&&Zt.B(E.y,ne.y)?(Zt.B(te.x,y.i(b-2).x)&&!Zt.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),Zt.B(ne.y,y.i(b+2).y)&&!Zt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Zt.B(te.y,E.y)&&Zt.B(E.x,ne.x)?(Zt.B(te.y,y.i(b-2).y)&&!Zt.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),Zt.B(ne.x,y.i(b+2).x)&&!Zt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Zt.B(te.x,E.x)&&Zt.B(E.x,ne.x)?(Zt.B(te.x,y.i(b-2).x)&&!Zt.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),Zt.B(ne.x,y.i(b+2).x)&&!Zt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Zt.B(te.y,E.y)&&Zt.B(E.y,ne.y)&&(Zt.B(te.y,y.i(b-2).y)&&!Zt.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),Zt.B(ne.y,y.i(b+2).y)&&!Zt.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(tr,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(tr,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 Vo: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 Br))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 xn(Ki,"None",0),rs=new xn(Ki,"Horizontal",1),ho=new xn(Ki,"Vertical",2),Vo=new xn(Ki,"All",3);Ki.className="LinkReshapingTool",Ki.None=Xr,Ki.Horizontal=rs,Ki.Vertical=ho,Ki.All=Vo,bi("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Co(){Nr.call(this),this.name="Resizing",this.o=new Pn(1,1).freeze(),this.j=new Pn(9999,9999).freeze(),this.yg=new Pn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new ir;a.alignmentFocus=tr,a.figure="Rectangle",a.desiredSize=br,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 Pn,this.Tn=new ft,this.rt=new Pn(0,0),this.qt=new Pn(1/0,1/0),this.pt=new Pn(1,1)}Je(Co,Nr),Co.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)}},Co.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Br,y.type=Dn.Spot,y.locationSpot=tr;var x=new ja;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Pr)),y.add(this.makeHandle(a,$r)),y.add(this.makeHandle(a,io)),y.add(this.makeHandle(a,ps)),y.add(this.makeHandle(a,ua)),y.add(this.makeHandle(a,Os)),y.add(this.makeHandle(a,$s)),y.add(this.makeHandle(a,ma))}else if(nu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Co.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Co.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=tr),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 Dn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Co.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},Co.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))},Co.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Co.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Co.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Co.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)}},Co.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()},Co.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 Xi){var b=new Mn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ce;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Co.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=tr);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(),Zt.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},Co.prototype.computeReshape=function(){var a=Ln;return this.adornedObject instanceof ir&&(a=Cv(this.adornedObject)),!(a===fi||this.diagram.lastInput.shift)},Co.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},Co.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},Co.prototype.computeCellSize=function(){var a=new Pn(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},nt.Object.defineProperties(Co.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 Br))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 Br)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}}}),Co.className="ResizingTool",bi("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Gr(){Nr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new ft,this.ue=null;var a=new ir;a.figure="Ellipse",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new ft(NaN,NaN),this.u=0,this.F=50}Je(Gr,Nr),Gr.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)}},Gr.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Br,y.type=Dn.Position,y.locationSpot=tr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(nu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Gr.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},Gr.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)},Gr.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(tr)},Gr.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)},Gr.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},Gr.prototype.stopTransaction=function(){var a=this.diagram,y=Nr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Gr.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Gr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Gr.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()},Gr.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()}},Gr.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(Gr.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 Br))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 Br)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}}}),Gr.className="RotatingTool",bi("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Ko(){Nr.call(this),this.name="ClickSelecting"}Je(Ko,Nr),Ko.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Ko.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Ko.className="ClickSelectingTool";function Gi(){Nr.call(this),this.name="Action",this.pk=null}Je(Gi,Nr),Gi.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},Gi.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()},Gi.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))}},Gi.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()},Gi.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())},Gi.prototype.doStop=function(){this.pk=null},Gi.className="ActionTool";function $o(){Nr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new ft(0,0)}Je($o,Nr),$o.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)},$o.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},$o.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 Ei)x.Zc()&&(nu(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Yt(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($o.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}}}),$o.className="ClickCreatingTool";function vo(){Nr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ei;a.layerName="Tool",a.selectable=!1;var y=new ir;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Je(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=Pn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Pn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},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 rn(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),lr?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new Mn,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},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 Oo(){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(Kt.document,"scroll",a.Kw,!1),a.stopTool()}}Je(Oo,Nr),Oo.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())},Oo.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Kt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Oo.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Oo.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Oo.prototype.doMouseMove=function(){this.move()},Oo.prototype.doMouseUp=function(){this.move(),this.stopTool()},Oo.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(Oo.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Oo.className="PanningTool",bi("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),bi("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),bi("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),bi("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),bi("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Vs(){this.F=this.u=this.j=this.o=null}nt.Object.defineProperties(Vs.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}}}),Vs.className="HTMLInfo";function dr(a,y,x){this.text=a,this.hx=y,this.visible=x}dr.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()}}Je(Fo,Nr);function Eo(a){var y=new Vs;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},Oa=y,a.tu=function(){a.stopTool()},y=Bi("div");var x=Bi("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var b=Bi("style");Kt.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",Kt.document.body&&(Kt.document.body.appendChild(y),Kt.document.body.appendChild(x)),ku=y,ol=x,Ks=!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 nn||(a instanceof Wt?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 Br){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&qr(this)},Fo.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Br){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}qr(this)};function qr(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Vs||(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=Oa,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Wt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Br&&!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 Br){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 Vs&&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 Br?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Vs&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Vr(a){var y=new Mn;return y.add(new dr("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new dr("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new dr("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new dr("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new dr("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new dr("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new dr("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new dr("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new dr("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new dr("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new dr("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new dr("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new dr("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=Vr(this)),ku.innerHTML="",ol.addEventListener("pointerdown",this.tu,!1);var y=this,x=Bi("ul");x.className="goCXul",ku.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,te=E.visible;if(typeof E.hx=="function"&&(typeof te!="function"||te(a))){te=Bi("li"),te.className="goCXli";var ne=Bi("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(se){return this.ky(a),y.stopTool(),se.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}ku.style.display="block",ol.style.display="block"},Fo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Oa){ku.style.display="none",ol.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ol,"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 Br?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Ks===!1&&Oa===null&&ts&&Eo(this),Oa},set:function(a){a===null&&(Ks=!0),Oa=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Oa=null,Ks=!1,ol=null,ku=null;Fo.className="ContextMenuTool",bi("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function lo(){Nr.call(this),this.name="TextEditing",this.Zh=new Lo,this.ia=null,this.V=gl,this.vj=null,this.qa=ql,this.u=1,this.F=!0,this.o=null,this.j=new Vs,this.kt=null,Tu(this,this.j)}Je(lo,Nr);function Tu(a,y){if(ts){var x=Bi("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(Ia)):E==="Tab"?(a.acceptText(Au),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==ql){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!==ql){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 Lo&&te instanceof lo)if(te.state===xo)x.style.border="3px solid red",x.focus();else{var ne=b.ga(tr),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)}}}lo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||aa&&aa!==this&&(aa.acceptText(Rs),aa&&aa!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Lo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===gl&&!y.isSelected||this.starting===ta&&2>a.lastInput.clickCount)):!1},lo.prototype.doStart=function(){aa=this,this.textBlock!==null&&this.doActivate()},lo.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 Lo&&(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 rn(this.textBlock.ga(Pr),this.textBlock.ga(io));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},lo.prototype.doCancel=function(){this.stopTool()},lo.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},lo.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Rs)},lo.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 Ia:case Au:(Ia!==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))}}lo.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)},lo.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},lo.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=ql,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},lo.prototype.doStop=function(){aa=null},lo.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)))},lo.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},nt.Object.defineProperties(lo.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)}}}),lo.prototype.measureTemporaryTextBlock=lo.prototype.Lx;var qo=new xn(lo,"LostFocus",0),Rs=new xn(lo,"MouseDown",1),Au=new xn(lo,"Tab",2),Ia=new xn(lo,"Enter",3),$c=new xn(lo,"SingleClick",0),gl=new xn(lo,"SingleClickSelected",1),ta=new xn(lo,"DoubleClick",2),ql=new xn(lo,"StateNone",0),yc=new xn(lo,"StateActive",1),Sc=new xn(lo,"StateEditing",2),Td=new xn(lo,"StateValidating",3),xo=new xn(lo,"StateInvalid",4),Ds=new xn(lo,"StateValidated",5),aa=null;lo.className="TextEditingTool",lo.LostFocus=qo,lo.MouseDown=Rs,lo.Tab=Au,lo.Enter=Ia,lo.SingleClick=$c,lo.SingleClickSelected=gl,lo.DoubleClick=ta,lo.StateNone=ql,lo.StateActive=yc,lo.StateEditing=Sc,lo.StateValidating=Td,lo.StateInvalid=xo,lo.StateValidated=Ds,bi("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 kn,this.ce=new ca,this.ce.Yd=this,this.Ei=new kn,this.pu=new kn,this.Sr=new kn,this.pr=new kn,a&&Object.assign(this,a)}Gs.prototype.Xe=function(a){this.H=a},Gs.prototype.canStart=function(){return!0};function xs(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),da(a.H),a.zb=!0)}function Ql(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!==Ea&&b!==null&&(delete b.start.scale,delete b.end.scale),Kt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Xa(x),Ep(x),a.zb=!1,y.start(),y.bc&&(sh(a),x.Ya(),_p(y,0),Fl(x,!0),du(a),x.R("AnimationStarting",a)))}))}}function El(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function rh(a,y,x,b){a.isTicking||El(a)||y instanceof Fn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}et=Gs.prototype,et.fv=function(a){return this.ce.fv(a)},et.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 Wt&&he.diagram!==null||he instanceof nn){se=!0;break e}}se=!1}se?Id(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(sh(E),Fl(E.H),du(E)),Kt.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Kt.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 du(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}et.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),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)},et.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},et.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),sl(this,a))},et.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),sl(this,a))};function mf(a,y,x){!a.zb||y.D(x)||El(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 sl(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 on;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 rn(te(ne,b.width,E.width-b.width,se),te(ne,b.height,E.height-b.height,se))}),y.add("width",function(x,b,E,te,ne,se){x.width=te(ne,b,E-b,se)}),y.add("height",function(x,b,E,te,ne,se){x.height=te(ne,b,E-b,se)}),y.add("fill",function(x,b,E,te,ne,se){x.fill=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&&En(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 xn(Gs,"Default",1),Dd=new xn(Gs,"AnimateLocations",2),wp=new xn(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 ca(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=Wn,this.vc=new on,this.Tt=new on,this.yl=new kn,this.Ut=new kn,this.dw=Yh,a&&Object.assign(this,a)}ca.prototype.suspend=function(){this.Xk=!0},ca.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),Fl(this.H),du(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}et=ca.prototype,et.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof nn?a=x:x instanceof Wt&&(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)}),du(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Lh(y,this),this)},et.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},et.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof nn?this.H=a:a instanceof Wt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ei){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 nn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Nh(b),av(),b=[Tl.j,Tl.u,Tl.o,Tl.F],Nh(E),av(),E=[Tl.j,Tl.u,Tl.o,Tl.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 Wt&&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 Ei?se.Ku.location=wc(y.location):te&&(se.Ku[x]=wc(b))}function wc(a){return a instanceof ft||a instanceof Pn?a.copy():a}et.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},et.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function 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),Fl(a.H,!0),du(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 Wt&&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)}}}et.stop=function(){return this.bc?(this.Ml(!0),this):this},et.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,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 Ei&&(ne.location=Ee.location),se.nv&&ne instanceof Ei&&ne.Zb(!1)}if(y.As.clear(),Rd(y,!1),y.Ya(),y.N(),Fl(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()}Fl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),du(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())}},et.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Xi&&(b=y.placeholder),b!==null?(x=b.ga(Pr),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 Xi)for(a=a.memberParts;a.next();)b=a.value,b instanceof Xn&&this.Cj(b,y)},et.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Xi&&(x=y.placeholder),x!==null){var b=x.ga(Pr);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 Xi)for(a=a.memberParts;a.next();)b=a.value,b instanceof Xn&&this.Aj(b,y)}},et.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},nt.Object.defineProperties(ca.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&En(a,">= 1",ca,"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:wt("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}}}),ca.prototype.getTemporaryState=ca.prototype.Ez,ca.prototype.stop=ca.prototype.stop,ca.prototype.add=ca.prototype.add,ca.prototype.addTemporaryPart=ca.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}ca.className="Animation",ca.EaseLinear=function(a,y,x,b){return x*a/b+y},ca.EaseInOutQuad=ed,ca.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},ca.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},ca.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},ca.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 fu(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))}fu.prototype.copy=function(){var a=new fu(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(fu.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 xn(fu,"Default",1),bc=new xn(fu,"Immediate",2),td=new xn(fu,"Bundled",3);fu.className="AnimationTrigger",fu.Default=bp,fu.Immediate=bc,fu.Bundled=td;function Ys(a){Ri(this),this.H=null,this.Pa=new Mn,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}et=Ys.prototype,et.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},et.Xe=function(a){this.H=a},et.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,te=0,ne=0,se=this.Pa.iterator;se.next();){var he=se.value;he instanceof Xi?E++:he instanceof Xn?b++:he instanceof Fn?te++:he instanceof Br?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&&mr(b)&&(se+=" #"+mr(b)),x instanceof Xn?se+=" "+Li(b):x instanceof Fn&&(se+=" "+Li(x.fromNode)+" "+Li(x.toNode));return y+" "+this.Pa.count+": "+se},et.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=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),Bn(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},et.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Mn||b instanceof kn||(b=new kn),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),Bn(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},et.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Mn||E instanceof kn||(E=new kn),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},et.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var se=this.Pa.s,he=se.length;he--;){var _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},et.og=function(a,y,x,b,E,te){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Mn||E instanceof kn)&&(te=E),E=!0),te instanceof Mn||te instanceof kn||(te=new kn),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),Bn(se,Ne.oe),he.h(a.x+y,a.y),Bn(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},et.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Un();for(var E=Un(),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 Br&&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}et.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=kh(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,se=rn.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(rn.free(se),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function 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=rn.alloc(),Ee=0;Ee<te;Ee++){var Ne=E[Ee];b.contains(Ne)&&a.Oj(y,Ne,x,se,he,_e,!1)}rn.free(_e),y.globalAlpha=ne}}}et.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 ml?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),se.width*E>x.Oq||se.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,te=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(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))}},et.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Ro,a,this,y,x,b,E)},et.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&_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},et.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,_a(y),a};function yf(a,y,x){if(y=Jg(a,y,x),x instanceof Xi&&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(Ys.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===""&&wt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&wt("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)&&En(a,"0 <= value <= 1",Ys,"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))}}}),Ys.prototype.findObjectsNear=Ys.prototype.og,Ys.prototype.findObjectsIn=Ys.prototype.Cf,Ys.prototype.findObjectsAt=Ys.prototype.ji,Ys.prototype.findObjectAt=Ys.prototype.ic,Ys.className="Layer";function nn(a,y){if(hm||(xa(),hm=!0),Ri(this),ah=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ts){var x=this,b=function(){x.removeEventListener(Kt.document,"DOMContentLoaded",b,!1),x.setRTL()};Kt.document.body!==null?this.setRTL():x.addEventListener(Kt.document,"DOMContentLoaded",b,!1)}this.ol=null,kf.add("Model",so);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 Zo,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"||Kt.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 Mn,a.pj=new on,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 Fi,a.zu=new ft(NaN,NaN).freeze(),a.ut=new rn(NaN,NaN,NaN,NaN).freeze(),a.rj=new $i(0,0,0,0).freeze(),a.sj=Yh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ea,a.zk=As,a.Fg=Ea,a.pq=As,a.yt=Pr,a.Bt=Pr,a.Fc=!0,a.pn=!1,a.De=new kn,a.Eh=new on,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new $i(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new ea,a.bq.diagram=a,a.Qg=new ea,a.Qg.diagram=a,a.cj=new ea,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new kn,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 on,a.Xn=new Mn,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new $i(5).freeze(),a.Hw=new kn().freeze(),a.Nt=999999999,a.nw=new kn().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 kn,a.ow=new kn,a.Xh=null,a.aw=new Pn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new ft,bounds:new rn,Py:new Pn,bA:new Pn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new rn(NaN,NaN,NaN,NaN).freeze(),a.wo=new Pn(NaN,NaN).freeze(),a.Sp=new rn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new on;var y=new Xn,x=new Lo;x.bind(new vs("text","",Li)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Xn,x=new Lo,x.stroke="brown",x.bind(new vs("text","",Li)),y.add(x),a.Lg.add("Comment",y),y=new Xn,y.selectable=!1,y.avoidable=!1,x=new ir,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Pn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new on,y=new Xi,y.selectionObjectName="GROUPPANEL",y.type=Dn.Vertical,x=new Lo,x.font="bold 12pt sans-serif",x.bind(new vs("text","",Li)),y.add(x),x=new Dn(Dn.Auto),x.name="GROUPPANEL";var b=new ir;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new ja,b.padding=new $i(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new on,y=new Fn,x=new ir,x.isPanelMain=!0,y.add(x),x=new ir,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 ir,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Br,y.type=Dn.Auto,x=new ir,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new ja,x.margin=new $i(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Br,y.type=Dn.Link,x=new ir,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 so,a.toolManager=new bo,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=hi,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}nn.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 kn().freeze(),a.nw=new kn().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(),Mr=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function Qg(){return null}nn.prototype.reset=function(){this.clear(),this.vb=!0,qg(this),Vu(this),this.Wg=!0,$g(this),this.layout=new Zo,this.Wg=!1,this.model=cy(),this.model.undoManager=new No,this.vb=this.rn=!1,this.N()},nn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Kt.document.body);var y=Bi("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},nn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Kt.document.body);var y=0;if(ts){var x=um;y=Pc,x===null&&(x=um=Bi("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Pc=Bi("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||lr||(y=11)}this.Db=y,this.Gw=!0},nn.prototype.qb=function(a){a.classType===nn&&(this.autoScale=a)},nn.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(ts){if(y!=null||wt("Diagram setup requires an argument DIV."),a.Ka!==null&&wt("Diagram has already completed setup."),typeof y=="string"?a.Ka=Kt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:wt("No DIV or DIV id supplied: "+y),a.Ka===null&&wt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&wt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Kt.ResizeObserver){var x=zn(function(){a.$b()},250);a.ol=new Kt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Kt.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=Kt.go;var E=new tu(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Kt.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 tu(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,ts){E=Bi("div");var te=Bi("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",te.style.position="absolute",te.style.width="1px",te.style.height="1px",a.Ka.appendChild(E),E.appendChild(te),E.onscroll=tm,E.addEventListener("pointerdown",nm),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=zn(function(){a.Yh=null,a.N()},300),a.Ov=zn(function(){Ep(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var se=Rl(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(),pu(se,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Rl(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():pu(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=Kt.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(),pu(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=Kt.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 nn&&_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(),pu(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)}}nn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},nn.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(Kt,"resize",a.Ov,!1)}function Xa(a){30<a.Sq&&(a.Yh=1)}function Rd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),gi&&gi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}nn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Kt.devicePixelRatio||1},nn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},nn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},nn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},nn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},nn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},nn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},nn.prototype.doFocus=function(){this.focus()},nn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Kt.scrollX||Kt.pageXOffset,y=Kt.scrollY||Kt.pageYOffset;this.ta.focus(),Kt.scrollTo(a,y)}},nn.prototype.Oy=function(){this.H.R("GainedFocus")},nn.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===Ea&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function $g(a){var y=new Ys;y.name="Background",a.Al(y),y=new Ys,y.name="",a.Al(y),y=new Ys,y.name="Foreground",a.Al(y),y=new Ys,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Ys,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Ys,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 Dn(Dn.Grid);y.name="GRID";var x=new ir;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new ir,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new ir,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ir,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new ir,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new ir,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ei,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)}nn.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,$e=E.right,st=E.bottom;E=this.scale;var Et=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Et=Et+a.scrollWidth-a.clientWidth;break;case"reverse":Et=a.scrollWidth-Et-a.clientWidth}var St=Et;Ge<he||Ye<_e?(Et=ft.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==St&&(Et.x=St/E+ne,this.ju=St),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Et.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=Et,ft.free(Et),this.Ee=this.qr=!1):(Et=ft.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Ne&&(this.position=Et.h(St+ne,this.position.y)),Ee>$e&&(this.position=Et.h(-(y.scrollWidth-this.Aa)+St-this.Aa/E+Ee,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=Et.h(this.position.x,a.scrollTop+se)),te>st&&(this.position=Et.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),ft.free(Et),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,Ee=b.right,$e=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<=$e&&(x.style.width="1px"),Ye>=_e&&se>=b&&te<=st&&(x.style.height="1px"))}},nn.prototype.computeBounds=function(a){return a===void 0&&(a=new rn),da(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}nn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(gn(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 rn(NaN,NaN,0,0):x};function $l(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=rn.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,rn.free(b),ft.free(E),ft.free(x)}x=a.yh,y&&a.Fg!==Ea&&(x=a.Fg);var te=x!==Ea?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()?tr:he),Mp(a,a.documentBounds,E,ne,se,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,Zt.B(te.x,x)&&Zt.B(te.y,b)&&Zt.B(te.width,E)&&Zt.B(te.height,ne)||a.onViewportBoundsChanged(new rn(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===Ll?(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}nn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Yh,this.scale=nd(this,Ll),a!==Yh&&($l(this,!1),Mp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},et=nn.prototype,et.BA=function(a,y){y===void 0&&(y=Ll);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Ll||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)}},et.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))},et.zz=function(a){if(a instanceof Wt){this.eq=a;var y=ft.alloc();this.fq=this.op(a.ga(Pr,y)),ft.free(y)}else this.eq=null,this.fq=hi};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(Pr,_e),se=_e.x-a.fq.x/a.scale,he=_e.y-a.fq.y/a.scale,E=er,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)}et.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 Ei)return a}else if(a=lh(this,a,function(x){return x.part}),a instanceof Ei)return a;return null},et.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),da(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),da(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}et.lz=function(a,y,x){return y===void 0&&(y=!0),Fd(this,a,function(b){return b.part},y?function(b){return b instanceof Ei&&b.canSelect()}:null,x)};function Fd(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Mn||E instanceof kn||(E=new kn),da(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}et.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Mn||b instanceof kn||(b=new kn),da(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},et.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Sf(this,a,function(E){return E instanceof Ei&&(!x||E.canSelect())},y,b)},et.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Mn||E instanceof kn||(E=new kn),da(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},et.Nu=function(a,y,x,b,E,te){var ne=new kn;da(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 Mn||E instanceof kn||(E=new kn),da(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}et.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Bd(this,a,y,function(te){return te instanceof Ei&&(!b||te.canSelect())},x,E)},et.og=function(a,y,x,b,E,te){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Mn||E instanceof kn)&&(te=E),E=!0),te instanceof Mn||te instanceof kn||(te=new kn),da(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 Mn||E instanceof kn)&&(te=E),E=!0),te instanceof Mn||te instanceof kn||(te=new kn),da(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}nn.prototype.acceptEvent=function(a){return Rl(this,a,a instanceof MouseEvent)};function Rl(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),lr&&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,lr&&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 pu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}nn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Rl(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(),pu(x,a)},nn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Rl(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(),pu(x,a)},nn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Rl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),pu(x,a)},nn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Rl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),pu(x,a)},nn.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?Bn(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))}}nn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function im(a){a.ld||da(a),a.Va()}nn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},et=nn.prototype,et.Pz=function(){return this.kg},et.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Fl(this),this.hf=!1,this.du=new ft(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&_i(function(){b.ld=!1,xs(y,"Model"),a(b)},1)},et.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Kt.requestAnimationFrame(function(){y.kg&&y.bd()})}},et.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Fl(this))};function Cc(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||sd(a)||(y&&da(a),x&&$l(a,!1))}function Fl(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];Cs(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)),da(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,da(a),a.ou||im(a),Cc(a,!0,!1),ne=!1,te?(x=rn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Np(a)),a.R("LayoutCompleted"),Cc(a,!0,!1),rn.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ea?a.scale=nd(a,a.Fg):a.yh!==Ea?a.scale=nd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),$l(a,!0)),te&&ne&&a.eb("Initial Layout"),da(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Np(a){if(a.Fg!==Ea)a.scale=nd(a,a.Fg);else if(a.yh!==Ea)a.scale=nd(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}$l(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 da(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 kn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Xi&&b.U&65536&&(b.U=b.U^65536)})}}et.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Xi||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Xi&&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 Br&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function jd(a,y){for(var x=Un(),b=Un(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof Xi?(kl(te)||Fa(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)}et.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},et.gc=function(a){if(this.Ka!==null){if(this.ta===null&&wt("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&&(Fi.prototype.Cd=Fi.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&&(Fi.prototype.Cd=Fi.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=gi&&gi.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&&wt("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 rn(te.x,te.y,b.width/E,b.height/E),$e=Ye.copy();$e.Co(x),Zu(a,$e),da(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 Et=Fi.alloc();Et.reset(),Et.translate(x.left,x.top),Et.scale(E),te.x===0&&te.y===0||Et.translate(-te.x,-te.y),y.setTransform(Et.m11,Et.m12,Et.m21,Et.m22,Et.dx,Et.dy),y.yc(),y instanceof ml&&Xy(y,Et.m11,Et.m12,Et.m21,Et.m22,Et.dx,Et.dy),Fi.free(Et),Vh(a,y),y.globalAlpha=a.pb;var St=a.Qj("Grid");if(ne){var Tt=new kn,At=ne.iterator;for(At.reset();At.next();){var Ot=At.value;Ot instanceof Ei&&(_e||Ot.layer!==St)&&(Ot.Gj(),Tt.add(Ot))}for(_e=0;_e<Ge;_e++)Xg(Ne[_e],y,a,Tt,he);Tt.each(function(en){return en.Gj()})}else for(Tt=0;Tt<Ge;Tt++){var Gt=Ne[Tt];Gt===St?_e&&Gt.gc(y,a,!0):Gt.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 ml&&(a.ib.Nj.PA(),a.redraw())}}}et.Gf=function(a){return this.Rg[a]},et.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},et.Tx=function(){this.Rg=new di,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(lr||Vi),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))}et.Ql=function(a){return this.on[a]},et.sA=function(a,y){this.on[a]=y},et.Sx=function(){this.on=new di,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return this.nm(a)},et.nm=function(a){return rd(this,a),this};function rd(a,y){var x=a instanceof Dn,b=a instanceof nn,E;for(E in y){E===""&&wt("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])),Yt(te)?ne=E.substr(se+1):wt("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!xi(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&xi(a.toolManager,ne))te=a.toolManager;else if(b&&sm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof pi&&ne==="Changed"){a.Pe(y[ne]);continue}else wt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof Wt&&te.Vw(ne)}}et.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new on,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},et.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},nn.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=rn.alloc(),zp(this,this.computeBounds(b)),rn.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=Un(),a=Un(),Ye=Math.abs(te),Ge=Math.abs(y);var $e=Ee===0?0:E-Ye;Ee=ft.allocAt($e,0),Ye=ft.allocAt(Ye+$e,se),a.push(new rn(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),Bn(Ee,st),Bn(Ye,st),b.push(new rn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),$e=Ne===0?0:se-Ge,Ee.h(0,$e),Ye.h(E,Ge+$e),a.push(new rn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),Bn(Ee,st),Bn(Ye,st),b.push(new rn(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 rn(Math.min(Ee.x,Ye.x),Math.min(Ee.y,Ye.y),Math.abs(Ee.x-Ye.x),Math.abs(Ee.y-Ye.y))),Bn(Ee,st),Bn(Ye,st),b.push(new rn(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&&wt("No div specified"),this.ta===null&&wt("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=rn.alloc(),Ye=ne.Pa.s,st=Ye.length,$e=he.length;for(var Et=0;Et<st;Et++){var St=Ye[Et],Tt=yd(St,St.actualBounds);e:{for(var At=2/Ee,Ot=4/Ee,Gt=0;Gt<$e;Gt++){var en=he[Gt];if(en.width!==0&&en.height!==0&&Tt.Vu(en.x-At,en.y-At,en.width+Ot,en.height+Ot)){Tt=!0;break e}}Tt=!1}Tt&&ne.Oj(E,St,this,Ne,Ee,Ge,!0)}rn.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&&(Xa(this),this.bd(),Rd(this,!0))}else x?(Xa(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 $e=a.ku,st=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Et=a.documentBounds,St=0,Tt=0,At=0,Ot=0,Gt=Ee.width,en=Ee.height,Zn=a.rj;a.contentAlignment.sb()?(Et.width>Gt&&(St=Zn.left,Tt=Zn.right),Et.height>en&&(At=Zn.top,Ot=Zn.bottom)):(St=Zn.left,Tt=Zn.right,At=Zn.top,Ot=Zn.bottom);var ui=Et.width+St+Tt,ri=Et.height+At+Ot;Zn=a.scale;var Rn=ui>he/Zn,wn=ri>_e/Zn;if(!(te||a.gf||a.Be||Rn||wn))return!0;St=Et.x-St,he=Ee.x,Tt=Et.right+Tt,_e=Ee.right+ne,At=Et.y-At;var Yi=Ee.y;Et=Et.bottom+Ot,Ee=Ee.bottom+se;var zi="1px";if(Ot="1px",a.scrollMode===Yh&&(Rn||wn)&&(Rn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Rn=1,St+1<he&&(Rn=Math.max((he-St)*Zn+a.Aa,Rn)),Tt>_e+1&&(Rn=Math.max((Tt-_e)*Zn+a.Aa,Rn)),Gt+ne+1<ui&&(Rn=Math.max((ui-Gt)*Zn+a.Aa,Rn)),zi=Rn.toString()+"px"),wn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Rn=1,At+1<Yi&&(Rn=Math.max((Yi-At)*Zn+a.ya,Rn)),Et>Ee+1&&(Rn=Math.max((Et-Ee)*Zn+a.ya,Rn)),en+se+1<ri&&(Rn=Math.max((ri-en)*Zn+a.ya,Rn)),Ot=Rn.toString()+"px")),Rn=zi!=="1px",wn=Ot!=="1px",Rn&&wn||!Rn&&!wn||(wn&&(_e-=a.Db),Rn&&(Ee-=a.Db),ui<Gt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,St+1<he&&(ne=Math.max((he-St)*Zn+a.Aa,ne)),Tt>_e+1&&(ne=Math.max((Tt-_e)*Zn+a.Aa,ne)),Gt+1<ui&&(ne=Math.max((ui-Gt)*Zn+a.Aa,ne)),zi=ne.toString()+"px"),Rn=zi!=="1px",ne=a.ya,Rn!==a.Be&&(ne=Rn?a.ya-a.Db:a.ya+a.Db),ri<en+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,At+1<Yi&&(se=Math.max((Yi-At)*Zn+ne,se)),Et>Ee+1&&(se=Math.max((Et-Ee)*Zn+ne,se)),en+1<ri&&(se=Math.max((ri-en)*Zn+ne,se)),Ot=se.toString()+"px"),wn=Ot!=="1px"),a.qr&&Rn===a.Be&&wn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Rn!==a.Be&&(zi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Rn,st.style.width=zi,wn!==a.gf&&(Ot==="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=Ot,a.gu=!0,te&&(a.pn=!0),y=$e.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Gt+1<ui?y=(a.position.x-St)*Zn:St+1<he?y=$e.scrollWidth-$e.clientWidth:Tt>_e+1&&(y=a.position.x*Zn)),a.tn)switch(a.bu){case"negative":y=-($e.scrollWidth-y-$e.clientWidth);break;case"reverse":y=$e.scrollWidth-y-$e.clientWidth}return $e.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(en+1<ri?$e.scrollTop=(a.position.y-At)*Zn:At+1<Yi?$e.scrollTop=$e.scrollHeight-$e.clientHeight:Et>Ee+1&&($e.scrollTop=a.position.y*Zn)),he=a.Aa,_e=a.ya,$e.style.width=he+(a.gf?a.Db:0)+"px",$e.style.height=_e+(a.Be?a.Db:0)+"px",x!==he||b!==_e||a.animationManager.zb?(x=rn.allocAt(E,Ne,Ge,Ye),a.onViewportBoundsChanged(x,a.viewportBounds,Zn,te),rn.free(x),!1):!0}et=nn.prototype,et.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&wt("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&&wt('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(es,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},et.oi=function(a){this.partManager.oi(a);var y=this;gd(a,function(x){ad(y,x)}),(a instanceof Br||a instanceof Xi&&a.placeholder!==null)&&a.v(),a.data!==null&&gd(a,function(x){ly(y.partManager,x)}),Fa(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()},et.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()},et.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(Jo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}et.Is=function(a,y){if(y===void 0&&(y=!1),gn(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 kn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},et.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},nn.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 on;if(a!==null)if(gn(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 Xi&&(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 Br||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=Un(),he=Un(),_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 $e=he[Ge];if(Ye=$e.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=$e.value.point,Ye.dragComputation===null)y.add(Ye,a.Pd(b,Ye,ne)),nc(Ye,ne.x-st.x,ne.y-st.y);else{$e=ft.allocAt(0,0),(Ee=Ye.i(0))&&Ee.w()&&$e.assign(Ee);var Et=Ee=ft.alloc().assign($e).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Et=ft.alloc(),_f(a,Ye,Ee,Et,b)),Ee.assign(Ye.dragComputation(Ye,Ee,Et)).re($e),y.add(Ye,a.Pd(b,Ye,Ee)),nc(Ye,Ee.x-st.x,Ee.y-st.y),ft.free($e),ft.free(Ee),Et!==Ee&&ft.free(Et)}else Ee!==null&&(E.assign(Ee.location),Et=y.I(Ee),Et!==null&&E.re(Et.point)),st!==null&&(_e.assign(st.location),Et=y.I(st),Et!==null&&_e.re(Et.point)),Ee!==null&&st!==null?E.Xa(_e)?(Ee=$e.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()):($e=$e.value.point,Ee=Ee!==null?E:st!==null?_e:ne,y.add(Ye,a.Pd(b,Ye,Ee)),nc(Ye,Ee.x-$e.x,Ee.y-$e.y))}else(Ye.fromNode===null||Ye.toNode===null)&&(Ee=$e.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||(da(a),Lc(a,y))}}nn.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),Zt.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}et=nn.prototype,et.Pd=function(a,y,x){if(x===void 0)return new Th(Wn);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&&wt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&wt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&wt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&wt("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&&wt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}et.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(es,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},et.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(Jo,"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(es,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},et.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(Jo,"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(es,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},et.kA=function(a){if(a.diagram!==this&&wt("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(Jo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},et.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},et.Yw=function(a){return this.pf===null&&(this.pf=new Mn),this.pf.add(a),this.model.Pe(a),this},et.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},et.Pe=function(a){return this.zg===null&&(this.zg=new Mn),this.zg.add(a),this},et.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},et.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ha&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},et.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var se=new 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)},et.g=function(a,y,x,b,E){this.cb(Ro,a,this,y,x,b,E)},nn.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 Wt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===es){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof Dn)if(typeof se=="number"&&he instanceof Wt){y?ne.pc(se):ne.Gb(se,he);var _e=ne.part;_e!==null&&_e.Wb()}else typeof se=="number"&&he instanceof Es&&(he.isRow?c1(ne,se,y?void 0:he):d1(ne,se,y?void 0:he));else if(ne instanceof Ys){var Ee=a.oldParam===!0;typeof se=="number"&&he instanceof Ei&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(Ee?se:-1,he,Ee)):ne.oi(se,he,Ee))}else ne instanceof nn?typeof se=="number"&&he instanceof Ys&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):wt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Jo){var Ne=a.object,Ge=a.oldParam,Ye=a.oldValue;if(Ne instanceof Dn)typeof Ge=="number"&&Ye instanceof Wt?y?Ne.Gb(Ge,Ye):Ne.pc(Ge):typeof Ge=="number"&&Ye instanceof Es&&(Ye.isRow?c1(Ne,Ge,y?Ye:void 0):d1(Ne,Ge,y?Ye:void 0));else if(Ne instanceof Ys){var $e=a.newParam===!0;typeof Ge=="number"&&Ye instanceof Ei&&(y?0>Ne.Pa.indexOf(Ye)&&Ne.oi(Ge,Ye,$e):(Ye.isSelected=!1,Ye.isHighlighted=!1,Ye.Wb(),Ne.pc($e?Ge:-1,Ye,$e)))}else Ne instanceof nn?typeof Ge=="number"&&Ye instanceof Ys&&(y?(Ye.Xe(this),this.Wa.Gb(Ge,Ye)):this.Wa.mb(Ge)):wt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==ha&&wt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},nn.prototype.Ea=function(a){return this.undoManager.Ea(a)},nn.prototype.eb=function(a){return this.undoManager.eb(a)},nn.prototype.Kf=function(){return this.undoManager.Kf()},nn.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}},nn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},nn.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&&(El(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(ga)?se=0:_e.Hf(is)&&(se=te-1):se=_e.sb()?_e.x*(te-1):te/2),isNaN(he)&&(_e.$c()?_e.Hf(ws)?he=0:_e.Hf(Pa)&&(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),$l(a,!1),b.zb&&(El(b)||b.ce.add(b.H,"scale",y,a.Ca))}}nn.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!==Ea||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof bo&&(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=Pn.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/Zt.vx(te,Ee):E=E*Ee/Zt.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=rn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){rn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,rn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=ft.alloc(),Zt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Pn.free(b),x.part.location=y,ft.free(y)}}nn.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)}},nn.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))},nn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),gn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Ei||wt("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 Ei||wt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},nn.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},et=nn.prototype,et.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},et.Jz=function(a){a=new kn().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 Ei||wt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},et.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=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}wt("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):wt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),ft.free(te)},et.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},et.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},et.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},et.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,se=y.m12,he=y.m21,_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 rn(te,Ye,Ge-te,y-Ye)},et.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),Bn(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 so}nn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===ha&&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===ha){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),da(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Ql(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;_i(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 $a){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof kn&&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 $a){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 kn&&x.Bg.remove(a),Hf(b));break}}}}}nn.prototype.Wd=function(){this.partManager.Wd()},nn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},nn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},nn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},nn.prototype.Vb=function(a){return this.partManager.Vb(a)},nn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},et=nn.prototype,et.Lc=function(a){return this.partManager.Lc(a)},et.ii=function(a){return this.partManager.ii(a)},et.Kc=function(a){return this.partManager.Kc(a)},et.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:Ii(ti(y)))},et.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:Ii(ti(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),$l(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}et.Va=function(){if(this.Zi){var a=rn.alloc();zp(this,this.computeBounds(a)),rn.free(a)}},et.rz=function(){for(var a=new kn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},et.qz=function(){return this.ai.iterator},et.Uz=function(a){da(this),a&&Pf(this,!0),this.ld?Up(this,!1):(this.Jk=!0,Fl(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||xs(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),da(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||Ql(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)}}et.yz=function(){for(var a=new Mn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function nv(a){function y(E){var te=E.toLowerCase(),ne=new Mn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new on,b=new on;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;wt("Unknown DiagramEvent name: "+y)}et.Bj=function(a,y){return a=Cf(this,a),a!==null&&a.add(y),this},et.am=function(a,y){a=Cf(this,a),a!==null&&a.remove(y)},et.R=function(a,y,x){var b=Cf(this,a),E=new Eu;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}et.Yj=function(a,y){return Lf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},nn.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=rn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var te=a.nodes;te.next();){var ne=te.value,se=ne.layer;se!==null&&se.visible&&!se.isTemporary&&Mf(a,ne,b,y)}rn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=rn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof Xn&&Mf(a,ne,b,y);rn.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 Xi)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)}nn.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=_i(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=rn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),zp(a,y),rn.free(y),a.Fc=!0,a.bd(),Gp(a))}},a.vp))}nn.prototype.ug=function(){this.vk!==-1&&(Kt.clearTimeout(this.vk),this.vk=-1)},nn.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var b=this.viewportBounds,E=this.scale;b=rn.allocAt(0,0,b.width*E,b.height*E);var te=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(Wn)||(y=new ft(y.x+te.x/E,y.y+te.y/E)),rn.free(b),ft.free(te),y},et=nn.prototype,et.Cs=function(){return null},et.av=function(){return null},et.bs=function(a,y){this.pj.add(a,y)},et.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Xi&&(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):Kt.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 Kt.requestAnimationFrame(function(){b()}),null}et.Wz=function(a){return ts?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},et.Jx=function(a){return a===void 0&&(a={}),zd(this,this.Xz,a)},et.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"&&wt('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"&&wt("properties argument must be an Object.");var E=y.size||null,te=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(te="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new Pn(1/0,1/0):new Pn(2e3,2e3));var se=y.position||null,he=y.parts||null,_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,$e=y.showTemporary;$e===void 0&&($e=!Ne),y=y.showGrid,y===void 0&&(y=$e),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof _e=="number"?_e=new $i(_e):_e instanceof $i||wt("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 tu(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 Pn(Ne.width,Ne.height),a.Ca,a.pa,he,Ee,$e,y),b.context):(a.Xm=!1,xf(a,st,_e,new Pn(Ne.width,Ne.height),a.Ca,a.pa,he,Ee,$e,y),a.Xm=!0,Ne.context);var Et=a.Pp,St=a.documentBounds.copy();if(St.Fv(a.yb),$e)for(var Tt=a.Wa.s,At=Tt.length,Ot=0;Ot<At;Ot++){var Gt=Tt[Ot];if(Gt.visible&&Gt.isTemporary){Gt=Gt.Pa.s;for(var en=Gt.length,Zn=0;Zn<en;Zn++){var ui=Gt[Zn];ui.isInDocumentBounds&&ui.isVisible()&&(ui=ui.actualBounds,ui.w()&&St.ed(ui))}}}if(Tt=new ft(St.x,St.y),he!==null){for(At=new rn(0,0,0,0),Ot=!0,Gt=he.iterator,Gt.reset();Gt.next();)en=Gt.value,en instanceof Ei&&(Zn=en.layer,Zn!==null&&!Zn.visible||Zn!==null&&!$e&&Zn.isTemporary||!en.isVisible()||(en=en.actualBounds,en.w()&&(Ot?(Ot=!1,At.assign(en)):At.ed(en))));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=Et)),At=se=0,_e!==null&&(se=_e.left+_e.right,At=_e.top+_e.bottom),Ot=Gt=0,E!==null&&(Gt=E.width,Ot=E.height,isFinite(Gt)&&(Gt=Math.max(0,Gt-se)),isFinite(Ot)&&(Ot=Math.max(0,Ot-At))),E!==null&&te!==null?(te==="NaN"&&(te=Et),E.w()?(E=Gt,St=Ot):isNaN(Ot)?(E=Gt,St=St.height*te):(E=St.width*te,St=Ot)):E!==null?E.w()?(te=Math.min(Gt/St.width,Ot/St.height),E=Gt,St=Ot):isNaN(Ot)?(te=Gt/St.width,E=Gt,St=St.height*te):(te=Ot/St.height,E=St.width*te,St=Ot):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/St.width,(ne.height-At)/St.height),te>Et?(te=Et,E=St.width,St=St.height):(E=ne.width,St=ne.height)):(E=St.width*te,St=St.height*te):(te=Et,E=St.width,St=St.height),_e!==null?(E+=se,St+=At):_e=new $i(0),ne!==null&&(Et=ne.width,ne=ne.height,isNaN(Et)&&(Et=2e3),isNaN(ne)&&(ne=2e3),isFinite(Et)&&(E=Math.min(E,Et)),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 Pn(Math.ceil(E),Math.ceil(St)),te,Tt,he,Ee,$e,y),b.context):(a.Xm=!1,xf(a,st,_e,new Pn(Math.ceil(E),Math.ceil(St)),te,Tt,he,Ee,$e,y),a.Xm=!0,Ne.context)}nt.Object.defineProperties(nn.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,Kt.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,Kt.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(Kt,"resize",this.Ov,!1),this.removeEventListener(Kt,"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)&&En(a,"0 <= value <= 1",nn,"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),$l(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),$l(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),$l(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),$l(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&En(a,">= 0",nn,"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&&En(a,">= 0",nn,"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 En(a,">= 0",nn,"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&&wt("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,xs(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(Kt,"pointermove",this.dk,!0),this.addEventListener(Kt,"pointerdown",this.ui,!0),this.addEventListener(Kt,"pointerup",this.fk,!0),this.addEventListener(Kt,"pointerout",this.ek,!0),this.addEventListener(Kt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Kt,"wheel",this.$j,!0),this.addEventListener(Kt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Kt,"pointermove",this.dk,!0),this.removeEventListener(Kt,"pointerdown",this.ui,!0),this.removeEventListener(Kt,"pointerup",this.fk,!0),this.removeEventListener(Kt,"pointerout",this.ek,!0),this.removeEventListener(Kt,"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(Kt,"wheel",this.$j,!0),this.removeEventListener(Kt,"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!==Dn.Grid&&wt("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||wt("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 $i(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&&$l(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,$l(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!==Ea&&$l(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()||wt("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()||wt("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)):En(a,"> 0",nn,"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)):En(a,"> 0",nn,"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),$l(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 $i(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&&wt("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!==Ps&&a!==Tf&&wt("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new Pn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new $i(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),nt.Object.defineProperties(nn,{licenseKey:{get:function(){return Xp.jc()},set:function(a){Xp.add(a.replace(/\s/g,""))}},version:{get:function(){return ud}}}),nn.prototype.makeImageData=nn.prototype.Jx,nn.prototype.makeImage=nn.prototype.Wz,nn.prototype.cacheGroupExternalLinks=nn.prototype.Fu,nn.prototype.addRenderer=nn.prototype.bs,nn.prototype.makeSVG=nn.prototype.av,nn.prototype.makeSvg=nn.prototype.Cs,nn.prototype.stopAutoScroll=nn.prototype.ug,nn.prototype.doAutoScroll=nn.prototype.gs,nn.prototype.isUnoccupied=nn.prototype.Yj,nn.prototype.raiseDiagramEvent=nn.prototype.R,nn.prototype.removeDiagramListener=nn.prototype.am,nn.prototype.addDiagramListener=nn.prototype.Bj,nn.prototype.findTreeRoots=nn.prototype.yz,nn.prototype.layoutDiagram=nn.prototype.Uz,nn.prototype.findTopLevelGroups=nn.prototype.qz,nn.prototype.findTopLevelNodesAndLinks=nn.prototype.rz,nn.prototype.ensureBounds=nn.prototype.Va,nn.prototype.findLinksByExample=nn.prototype.ls,nn.prototype.findNodesByExample=nn.prototype.ms,nn.prototype.findLinkForData=nn.prototype.Kc,nn.prototype.findNodeForData=nn.prototype.ii,nn.prototype.findPartForData=nn.prototype.Lc,nn.prototype.findLinkForKey=nn.prototype.findLinkForKey,nn.prototype.findNodeForKey=nn.prototype.Vb,nn.prototype.findPartForKey=nn.prototype.findPartForKey,nn.prototype.rebuildParts=nn.prototype.Wd,nn.prototype.transformViewToDoc=nn.prototype.Ps,nn.prototype.transformRectDocToView=nn.prototype.zA,nn.prototype.transformDocToView=nn.prototype.op,nn.prototype.centerRect=nn.prototype.es,nn.prototype.scrollToRect=nn.prototype.tv,nn.prototype.scroll=nn.prototype.scroll,nn.prototype.highlightCollection=nn.prototype.Jz,nn.prototype.highlight=nn.prototype.Iz,nn.prototype.selectCollection=nn.prototype.rA,nn.prototype.select=nn.prototype.select,nn.prototype.updateAllRelationshipsFromData=nn.prototype.rp,nn.prototype.updateAllTargetBindings=nn.prototype.updateAllTargetBindings,nn.prototype.commit=nn.prototype.commit,nn.prototype.rollbackTransaction=nn.prototype.Kf,nn.prototype.commitTransaction=nn.prototype.eb,nn.prototype.startTransaction=nn.prototype.Ea,nn.prototype.raiseChanged=nn.prototype.g,nn.prototype.raiseChangedEvent=nn.prototype.cb,nn.prototype.removeChangedListener=nn.prototype.ik,nn.prototype.addChangedListener=nn.prototype.Pe,nn.prototype.removeModelChangedListener=nn.prototype.mA,nn.prototype.addModelChangedListener=nn.prototype.Yw,nn.prototype.findLayer=nn.prototype.Qj,nn.prototype.removeLayer=nn.prototype.kA,nn.prototype.addLayerAfter=nn.prototype.Cy,nn.prototype.addLayerBefore=nn.prototype.Ww,nn.prototype.addLayer=nn.prototype.Al,nn.prototype.moveParts=nn.prototype.moveParts,nn.prototype.copyParts=nn.prototype.Kj,nn.prototype.removeParts=nn.prototype.Is,nn.prototype.remove=nn.prototype.remove,nn.prototype.add=nn.prototype.add,nn.prototype.clearDelayedGeometries=nn.prototype.bx,nn.prototype.setProperties=nn.prototype.nm,nn.prototype.attach=nn.prototype.Du,nn.prototype.set=nn.prototype.set,nn.prototype.resetInputOptions=nn.prototype.Sx,nn.prototype.setInputOption=nn.prototype.sA,nn.prototype.getInputOption=nn.prototype.Ql,nn.prototype.resetRenderingHints=nn.prototype.Tx,nn.prototype.setRenderingHint=nn.prototype.Xx,nn.prototype.getRenderingHint=nn.prototype.Gf,nn.prototype.maybeUpdate=nn.prototype.bd,nn.prototype.requestUpdate=nn.prototype.$b,nn.prototype.delayInitialization=nn.prototype.Xy,nn.prototype.isUpdateRequested=nn.prototype.Pz,nn.prototype.invalidateDocumentBounds=nn.prototype.Ya,nn.prototype.findObjectsNear=nn.prototype.og,nn.prototype.findPartsNear=nn.prototype.mz,nn.prototype.findObjectsIn=nn.prototype.Cf,nn.prototype.findPartsIn=nn.prototype.ux,nn.prototype.findObjectsAt=nn.prototype.ji,nn.prototype.findPartsAt=nn.prototype.lz,nn.prototype.findObjectAt=nn.prototype.ic,nn.prototype.findPartAt=nn.prototype.Ol,nn.prototype.focusObject=nn.prototype.zz,nn.prototype.alignDocument=nn.prototype.Jy,nn.prototype.zoomToRect=nn.prototype.BA,nn.prototype.zoomToFit=nn.prototype.zoomToFit,nn.prototype.diagramScroll=nn.prototype.kx,nn.prototype.focus=nn.prototype.focus;var kf=new on,um=null,ts=Kt.document!==void 0,ld=null,kc="",Ea=new xn(nn,"None",0),Ll=new xn(nn,"Uniform",1),Tc=new xn(nn,"UniformToFill",2),Ud=new xn(nn,"CycleAll",10),Wp=new xn(nn,"CycleNotDirected",11),Zp=new xn(nn,"CycleNotDirectedFast",12),Vp=new xn(nn,"CycleNotUndirected",13),Kp=new xn(nn,"CycleDestinationTree",14),Yp=new xn(nn,"CycleSourceTree",15),Yh=new xn(nn,"DocumentScroll",1),Hd=new xn(nn,"InfiniteScroll",2),Xh=new xn(nn,"TreeParentCollapsed",21),Ps=new xn(nn,"AllParentsCollapsed",22),Tf=new xn(nn,"AnyParentsCollapsed",23),Xp=new Mn,ud="2.3.10",hd="image",Gd=null,hm=!1;function xa(){if(ts){var a=Kt.document.createElement("canvas"),y=a.getContext("2d"),x=hn("7ca11abfd022028846");y[x]=hn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",_n.Dx+"4ae6247590da4bb21c324ba3a84e385776",Fi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Zt.za],E=1;5>E;E++)y[hn("7ca11abfd7330390")](hn(b[E-1]),10,15*E);for(y[x]=hn("39f046ebb36e4b"),x=1;5>x;x++)y[hn("7ca11abfd7330390")](hn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Fi.prototype.Cd=Fi.prototype.Eu),Gd=a}}nn.className="Diagram",nn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Kt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof nn?y.H:null},nn.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},nn.useDOM=function(a){ts=a?Kt.document!==void 0:!1},nn.isUsingDOM=function(){return ts},nn.None=Ea,nn.Uniform=Ll,nn.UniformToFill=Tc,nn.CycleAll=Ud,nn.CycleNotDirected=Wp,nn.CycleNotDirectedFast=Zp,nn.CycleNotUndirected=Vp,nn.CycleDestinationTree=Kp,nn.CycleSourceTree=Yp,nn.DocumentScroll=Yh,nn.InfiniteScroll=Hd,nn.TreeParentCollapsed=Xh,nn.AllParentsCollapsed=Ps,nn.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=Kt[hn("76a715b2f73f148a")][hn("72ba13b5")]||"";if(a.Rc=!0,ts){var b=nn[hn("76a115b6ed251eaf4692")];if(b)for(var E=Xp.iterator;E.next()&&(b=E.value,b=hn(b).split(hn("39e9")),!(6>b.length));){var te=hn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=hn(_n[hn("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=Kt[hn("74a900bae4370f8b51")][hn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[hn("73a612b6fb191d")](hn("3aad1ab6e022098b4dc4")),te=hn(b[2]),-1<ne&&(se=se[hn("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[hn("76ad18b4f73e")],se=x[hn("73a612b6fb191d")](hn("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[hn("73a612b6fb191d")](te),0>ne&&te!==hn("7da71ca0ad381e90")&&(ne=y[hn("73a612b6fb191d")](hn("76a715b2ef3e149757"))),0>ne&&(ne=y[hn("73a612b6fb191d")](hn("76a715b2ef3e149757"))),0>ne&&(ne=y[hn("73a612b6fb191d")](hn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[hn("73a612b6fb191d")](hn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[hn("73a612b6fb191d")](hn("35"))||y[hn("73a612b6fb191d")](hn("35"))===-1),!a.Rc||x[hn("73a612b6fb191d")](hn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[hn("73a612b6fb191d")](te)),!a.Rc)||(ne=Kt[hn("76a715b2f73f148a")][hn("69ad17a1e03e")],se=ne[hn("73a612b6fb191d")](hn("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[hn("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=Kt.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[hn("79a417a0f0181a8946")]=b,Kt.document[hn("78a712aa")]){Kt.document[hn("78a712aa")][hn("7bb806b6ed32388c4a875b")](ne),he=Kt.getComputedStyle(ne).getPropertyValue(hn("78a704b7e62456904c9b12701b6532a8"));var _e=Kt.getComputedStyle(ne).getPropertyValue(hn("75b817b0ea2202"));if(Kt.document[hn("78a712aa")][hn("68ad1bbcf533388c4a875b")](ne),he){if(ne=Kt[hn("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(hn("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[hn("76ad18b4f73e")],E=x[hn("73a612b6fb191d")](hn("35e7"))+2;E<Ee;E++)y+=x[E];x=y[hn("73a612b6fb191d")](hn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[hn("73a612b6fb191d")](hn("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 Pn(NaN,NaN).freeze(),this.gridSnapCellSpot=Pr,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"||Kt.Element&&a instanceof Element)var x=nn.call(this,a)||this;else x=nn.call(this)||this,y=a;return Me(x),y&&x.nm(y),x}Je(Te,nn);function Me(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=jr,a.layout=new ia}Te.prototype.reset=function(){nn.prototype.reset.call(this),Me(this)},Te.className="Palette";function Fe(a,y){if(typeof a=="string"||Kt.Element&&a instanceof Element)var x=nn.call(this,a)||this;else x=nn.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 Ei;var E=new ir;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 $i(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Lt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new ft(se.x-ne.width/2,se.y-ne.height/2)}},x.Pf=function(){b.Ya(),mt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&mt(b)},x.autoScale=Ll,x.vb=!1,y&&Object.assign(x,y),x}Je(Fe,nn),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 tu(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),rt(this)}finally{this.ta=a,this.ib=y}}}nn.prototype.redraw.call(this)},Fe.prototype.gc=function(){if(this.Ka===null&&wt("No div specified"),this.ta===null&&wt("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?rt(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 rt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=rn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Zu(y,E),rn.free(E),da(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=rn.alloc(),Ye=se.Pa.s,$e=Ye.length,st=0;st<$e;st++){var Et=Ye[st];(b||Et!==_e)&&se.Oj(E,Et,he,null,Ne,Ge,!1)}rn.free(Ge),E.globalAlpha=Ee}}}}}function mt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=Pn.alloc();E.h(x.width,x.height),b.desiredSize=E,Pn.free(E),a=2/a.scale,b instanceof ir&&(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(),mt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=b,this.R("ViewportBoundsChanged",this.fc,a))},nt.Object.defineProperties(Fe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Fe&&wt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),mt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),mt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),Fe.className="Overview";function Lt(){Ho.call(this),this.j=null}Je(Lt,Ho),Lt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new 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)},Lt.prototype.doActivate=function(){this.j=null,Ho.prototype.doActivate.call(this)},Lt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Lt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new 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)}}},Lt.className="OverviewDraggingTool";function Ct(){Ri(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}Ct.prototype.toString=function(){return"CommandHandler"},Ct.prototype.Xe=function(a){this.H=a},Ct.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=lr?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()},Ct.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Ct.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof bo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Ct.prototype.canStopCommand=function(){return!0},Ct.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=""}},Ct.prototype.canSelectAll=function(){return this.diagram.allowSelect},Ct.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 kn,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=""}},Ct.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Ct.prototype.copySelection=function(){var a=this.diagram,y=new kn;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)},Ct.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Ct.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Ct.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Ct.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 Mn,x.addAll(te),ld=x,kc=y.model.dataFormat}}y.R("ClipboardChanged",x)},Ct.prototype.pasteFromClipboard=function(){var a=new kn,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},Ct.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=""}},Ct.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)},Ct.prototype.undo=function(){this.diagram.undoManager.undo()},Ct.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Ct.prototype.redo=function(){this.diagram.undoManager.redo()},Ct.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Ct.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ea&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ct.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ea?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ct.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ea&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ct.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ea?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ct.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Ct.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Ct.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;xs(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()),Ql(y)},Ct.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Ct.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;xs(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=jt(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 Xi)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof Ei&&y.tv(he.actualBounds),he instanceof Xn&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof Xi&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof Ei&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){_i(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 jt(a,y,x){if(y.isVisible())return x;if(y instanceof Br)jt(a,y.adornedPart,x);else if(y instanceof Fn){var b=y.fromNode;b!==null&&jt(a,b,x),y=y.toNode,y!==null&&jt(a,y,x)}else y instanceof Xn&&(b=y.labeledLink,b!==null&&jt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),jt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),jt(a,y,x));return x}Ct.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ei)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Ct.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),xs(y.animationManager,"Collapse Tree");var x=new Mn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Xn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Ct.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},Ct.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),xs(y.animationManager,"Expand Tree");var x=new Mn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Xn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Ct.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},Ct.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new Mn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new Mn,he=E.iterator;he.next();){var _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 Xi)nu(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ye=y.copyNodeData(x);Yt(Ye)&&(y.xf(Ye),b=a.ii(Ye))}if(b!==null){Ne!==null&&this.isValidMember(Ne,b)&&(b.containingGroup=Ne);for(var $e=se.iterator;$e.next();){var st=$e.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=""}}}},Ct.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 cn(a){var y=Un();for(a=a.iterator;a.next();){var x=a.value;x instanceof Fn||y.push(x)}a=new kn,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}Ct.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},Ct.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var b=new Mn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof Xi&&te.canUngroup()&&b.add(te)}var ne=new Mn;if(0<b.count){y.clearSelection(!0);for(var se=b.iterator;se.next();){var he=se.value;he.expandSubGraph();var _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=""}},Ct.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 Xi))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Xi&&y.canUngroup())return!0;return!1},Ct.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=cn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Ct.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),xs(y.animationManager,"Collapse SubGraph");var x=new Mn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Xi&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Ct.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Xi&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Xi&&y.isSubGraphExpanded)return!0;return!1},Ct.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),xs(y.animationManager,"Expand SubGraph");var x=new Mn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Xi&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Ct.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Xi&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Xi&&!y.isSubGraphExpanded)return!0;return!1},Ct.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 Lo&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Ct.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 Lo))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 Lo&&x.editable}),a!==null))return!0;return!1},Ct.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 Wt?E=a.ga(tr):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)}},Ct.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)},Ct.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 on,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(Ct.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||wt("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}}}),Ct.className="CommandHandler",Qg=function(){return new Ct};function Wt(){Ri(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new ft(NaN,NaN).freeze(),this.jd=Ur,this.Ab=new Fi,this.wh=new Fi,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=zs,this.uc=new rn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new rn(NaN,NaN,NaN,NaN).freeze(),this.dc=new rn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=As,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,Ln,fi,Si,Ni,Qi,Lr,ur,Ir,uo;Wt.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=yn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Wt.prototype.Vw=function(a){var y=this.Dh;if(gn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Wt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Wt.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},Wt.prototype.copy=function(){return this.clone()},et=Wt.prototype,et.qb=function(a){a.classType===Fn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:wt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Wt&&(this.stretch=a)},et.toString=function(){return An(this.constructor)+"#"+mr(this)},et.th=function(){this.A!==null&&(this.A.nc=!0)};function ar(a){a.A===null?a.A=new Vd:a.A.nc&&(a.A=a.A.copy())}et.Xc=function(){if(this.ba===null){var a=new Jp;a.Xi=er,a.yj=er,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},et.cb=function(a,y,x,b,E,te,ne){var se=this.part;if(se!==null&&(se.gk(a,y,x,b,E,te,ne),x===this&&a===Ro&&la(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 on),ne=te.undoManager.transactionLevel===0,a.startCondition===bc?ne=!0:a.startCondition===td&&(ne=!1),ne?(te=new ca,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()):(xs(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Dn&&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 Dn&&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))}}et.ks=function(a){return this.bindingId===a?this:null},et.g=function(a,y,x){this.cb(Ro,a,this,y,x)},et.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Fi);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))}et.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Jn(a.x,a.y,0,0,0,b.height)<=y||Jn(a.x,a.y,0,b.height,b.width,b.height)<=y||Jn(a.x,a.y,b.width,b.height,b.width,0)<=y||Jn(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},et.se=function(){return!0},et.ca=function(a){var y=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=no(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 Br||this instanceof ir?no(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},et.gh=function(a){var y=this.naturalBounds;return no(0,0,y.width,y.height,a.x,a.y)},et.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=rn.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),rn.free(y),b},et.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},et.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=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=rn.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),rn.free(x),!se&&(Zt.us(a,b,E)||Zt.us(a,E,te)||Zt.us(a,te,ne)||Zt.us(a,ne,b))&&(se=!0)}return ft.free(b),ft.free(E),ft.free(te),ft.free(ne),se},et.ga=function(a,y){if(y===void 0&&(y=new ft),a instanceof li){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},et.mi=function(a){a===void 0&&(a=new rn);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),Er(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),Er(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),Er(a,b.x,b.y,0,0),ft.free(b),a},et.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},et.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},et.qs=function(a,y){return y===void 0&&(y=new ft),y.assign(a),this.oe.Cd(y),y},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,_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,Zt.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=Zt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},Wt.prototype.measure=function(a,y,x,b){if(kl(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 Dn;switch(qa(this,!0)){case Ln: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 Si:isFinite(a)&&a>x&&(E=a),ne=0,se&&(y=1/0);break;case Ni: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()||wt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Cs(this,!1)}},Wt.prototype.Wl=function(){},Wt.prototype.Dd=function(){return!1},Wt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=rn.alloc();te.assign(this.Ib),this.Ib.ka(),Fa(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 Lo&&(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()||wt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),hh(this,!1),rn.free(te)},et=Wt.prototype,et.eh=function(){};function La(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=qa(a,!0),x===b&&te===E&&(y=Ln),y){case Ln:(x>b||te>E)&&(Cs(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Tn:Cs(a,!0),a.measure(b,E,0,0);break;case Si:Cs(a,!0),a.measure(b,te,0,0);break;case Ni:Cs(a,!0),a.measure(x,E,0,0)}}}et.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||jv(x,!0),this.N(),yr(a,y)||(x.oh(),this.Pn(x)))},et.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof Xn&&W1(a,this))},et.gc=function(a,y){if(!Bl(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 Dn&&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 oo&&_e.type===Ul?(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 oo&&Ee.type===Ul?(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&&na(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 $e=Ge.m11,st=Ge.m21,Et=Ge.dx,St=Ge.m12,Tt=Ge.m22,At=Ge.dy,Ot,Gt=Ot=0;Ge=Ot*$e+Gt*st+Et;var en=Ot*St+Gt*Tt+At;Ot=Ye.width+Ne,Gt=0;var Zn=Ot*$e+Gt*st+Et;Ot=Ot*St+Gt*Tt+At,Gt=Math.min(Ge,Zn);var ui=Math.min(en,Ot),ri=Math.max(Ge+0,Zn)-Gt,Rn=Math.max(en+0,Ot)-ui;Ge=Gt,en=ui,Ot=Ye.width+Ne,Gt=Ye.height+Ne,Zn=Ot*$e+Gt*st+Et,Ot=Ot*St+Gt*Tt+At,Gt=Math.min(Ge,Zn),ui=Math.min(en,Ot),ri=Math.max(Ge+ri,Zn)-Gt,Rn=Math.max(en+Rn,Ot)-ui,Ge=Gt,en=ui,Ot=0,Gt=Ye.height+Ne,Zn=Ot*$e+Gt*st+Et,Ot=Ot*St+Gt*Tt+At,Gt=Math.min(Ge,Zn),ui=Math.min(en,Ot),ri=Math.max(Ge+ri,Zn)-Gt,Rn=Math.max(en+Rn,Ot)-ui,Ge=Gt,en=ui,Ne=y.viewportBounds,Ye=Ne.x,$e=Ne.y,Ge=!(Ge>Ne.width+Ye||Ye>ri+Ge||en>Ne.height+$e||$e>Rn+en)}if(Ge){if(Ge=(this.l&256)!==0,a.clipInsteadOfFill&&(Ge=!1),this instanceof Lo&&(a.font=this.font),Ge){if(en=se.se()?se.naturalBounds:se.actualBounds,ri=Math.max(ne.x,en.x),Rn=Math.max(ne.y,en.y),Ne=Math.min(ne.right,en.right)-ri,Ye=Math.min(ne.bottom,en.bottom)-Rn,$e=this.tb,$e!==null&&(ri=$e.x,Rn=$e.y,Ne=$e.width,Ye=$e.height),ri>ne.width+ne.x||ne.x>en.width+en.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(ri,Rn,Ne,Ye),a.clip()}if(Ee){if(!_e.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&(en=_e.shadowOffset,a.Ev(en.x*y.scale*this.scale*y.Mb,en.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(),Ml(this,a,_e,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),he&&Xs(this,se)&&this.shadowVisible===null&&ch(a),this.Ma!==null&&(a.yc(),al(this,a,_e,ne)),he&&(this.Ma!==null||this.areaBackground!==null||Xs(this,se))?(gu(this,!0),this.shadowVisible===null&&ch(a)):gu(this,!1),this.hh(a,y),he&&this.l&512&&Ah(a),Ee&&he&&ch(a),Ge&&(a.restore(),a.Vc(this instanceof Dn)),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 Xs(a,y){return y===null?!1:(Qh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Dn.Auto||y.type===Dn.Spot)&&y.Pb()!==a)}et.Dv=function(){};function Ml(a,y,x,b){os(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof oo&&a.areaBackground.type===Ul?(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 al(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 oo&&a.Ma.type===Ul?(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===Dn.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 Bl(a,y,x){if(!(y instanceof ml))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var b=a.panel,E=a.nk(y);if(a.kk(y,x,E))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):b&&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 Lo&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Dn;var se=a instanceof Dn?Qh(a):!1;a.l&4096&&na(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],Ml(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]),al(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],al(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&&Xs(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||Xs(a,E))?(gu(a,!0),a.shadowVisible===null&&ch(y)):gu(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),Ja(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)}et.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var te=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,te.x),E=Math.max(x.y,te.y);var ne=Math.min(x.right,te.right)-y;x=Math.min(x.bottom,te.bottom)-E,te=this.tb,te!==null&&(y=te.x,E=te.y,ne=te.width,x=te.height),te=b.getAttribute("clip-path");var se=null;te!==null&&(se=a.svg.getElementById(te.split("#")[1].slice(0,-1))),se===null?(te="CLIP"+eo++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Dn&&(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"),Ja(a,b)};function Ja(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=ti(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}et.hh=function(){},et.lv=function(){this.Uc=!0},et.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var b=this.transform,E=this instanceof Dn?Qh(this):!1;if(!(this instanceof Dn&&E))if(this instanceof $a){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 Dn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof ir){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],Ml(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 Dn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),al(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},et.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function 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,$e=0,st=0,Et=0;if(Et=st=0,E?(st=ne.x,Et=ne.y):b||(st-=_e/2,Et-=_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,$e=x.end.y*he+x.end.offsetY,Ne+=st,Ye+=st,Ge+=Et,$e+=Et,x.type===Dh)Ee=y.createLinearGradient(Ne,Ge,Ye,$e);else if(x.type===Ul)Et=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(st=0,Et=Math.max(se,he)/2):st=x.startRadius,Ee=y.createRadialGradient(Ne,Ge,st,Ye,$e,Et);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&&_i(function(){St.redraw()},600)}}b?y.fillStyle=Ee:y.strokeStyle=Ee}}}et.rg=function(a){if(a instanceof Dn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},et.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},et.If=function(){for(var a=this instanceof Dn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function na(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){eu(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)}eu(a,!1),jl(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,jl(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,jl(a,!1)))}et.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,tr),a.rotate(this.Kb,te.x,te.y),ft.free(te)}},et.v=function(a){if(!kl(this)){a===void 0&&(a=!1),Cs(this,!0),hh(this,!0);var y=this.panel;y===null||a||y.v()}},et.Uj=function(){kl(this)||(Cs(this,!0),hh(this,!0))};function Ra(a){if(!Fa(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)}}et.Uk=function(){!(this.l&2048)&&(eu(this,!0),jl(this,!0))},et.Wu=function(){jl(this,!0)},et.N=function(){var a=this.part;a!==null&&a.N()};function qa(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Dn.Table?Nu(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Dn.Auto&&b.Pb()===a?Js(a,Tn,y):x===Qi?b!==null?b.type===Dn.Spot&&b.Pb()===a?Js(a,Tn,y):(x=b.defaultStretch,x===Qi?Js(a,Ln,y):Js(a,x,y)):Js(a,Ln,y):Js(a,x,y)}function Nu(a,y,x,b){var E=a.stretch;if(E!==Qi)return Js(a,E,b);var te=E=null;switch(y.stretch){case Ni:te=!0;break;case Tn:te=!0}switch(x.stretch){case Si:E=!0;break;case Tn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===Si||y===Tn),te===null&&(te=y===Ni||y===Tn),E===!0&&te===!0?Js(a,Tn,b):E===!0?Js(a,Si,b):te===!0?Js(a,Ni,b):Js(a,Ln,b)}function Js(a,y,x){if(x)return y;if(y===Ln||(x=a.desiredSize,x.w()))return Ln;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Si)return Ln;if(y===Tn)return Ni}else{if(y===Ni)return Ln;if(y===Tn)return Si}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Ni)return Ln;if(y===Tn)return Si}else{if(y===Si)return Ln;if(y===Tn)return Ni}return y}function gu(a,y){a.l=y?a.l|512:a.l&-513}function la(a){return(a.l&1024)!==0}function Zd(a,y){a.l=y?a.l|1024:a.l&-1025}function eu(a,y){a.l=y?a.l|2048:a.l&-2049}function jl(a,y){a.l=y?a.l|4096:a.l&-4097}function kl(a){return(a.l&8192)!==0}function Cs(a,y){a.l=y?a.l|8192:a.l&-8193}function Fa(a){return(a.l&16384)!==0}function hh(a,y){a.l=y?a.l|16384:a.l&-16385}et.Gj=function(){this.svg=null},et.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},et.Av=function(){},et.zv=function(a){return this.pa=a,Ra(this),!0},et.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},et.kq=function(){return 0};function 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 Dn?a instanceof Xn?a.Bd():a.qm(a,function(x){dd(x)}):dd(a))}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new vs(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&wt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Mn),this.localBindings.add(E),this},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return iv(this,a),this},et.apply=function(a){return a(this),this},et.nm=function(a){return rd(this,a),this},et.pz=function(){return this.ih()},et.ih=function(){for(var a=this instanceof Dn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},et.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new on),this.animationTriggers.add(a.propertyName,a),this};function zl(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=yn(arguments),b=te(x),Yt(b)||wt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Kt.go[a]}if(b===null&&(E!=null&&E.constructor||wt("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 nn&&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?wt("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 Lo)a.text=y;else if(a instanceof ir)a.figure=y;else if(a instanceof $a)a.source=y;else if(a instanceof Dn)y=mu.I(y),y!==null&&(a.type=y);else if(a instanceof oo){var x=Vn(oo,y);x!==null?a.type=x:wt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof In?(y=Vn(In,y),y!==null&&(a.type=y)):a instanceof Fr&&(y=Vn(Fr,y),y!==null&&(a.type=y));else if(y instanceof Wt)a instanceof Dn||wt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Es){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 Es?Tm(b,y):wt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof xn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ks)a.type=y;else if(y instanceof vs)a instanceof Wt||a instanceof Es?a.bind(y):wt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof fu)a instanceof Wt?a.Jv(y):wt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof gs)a instanceof In&&a.type===In.o?a.figures.add(y):wt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Fr)a instanceof gs?a.segments.add(y):wt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Zo)a instanceof nn||a instanceof Xi?a.layout=y:wt("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 oo){x=new di;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 Es){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&wt("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)&&wt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new di;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);rd(a,E)}else rd(a,y);else wt('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(Wt.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&&(ar(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&&(ar(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:za},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===za&&(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:Wn},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:Qi},set:function(a){var y=this.stretch;y!==a&&(ar(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&&(ar(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)&&En(a,"0 <= value <= 1",Wt,"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 oo&&a.freeze(),ar(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 oo&&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 Ei)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&&wt("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 ir&&this.qc(),this.g("desiredSize",b,a),la(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 Pn(a,this.jd.height).freeze(),this.v(),this instanceof ir&&this.qc(),this.g("desiredSize",y,a),la(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 Pn(this.jd.width,a).freeze(),this.v(),this instanceof ir&&this.qc(),this.g("desiredSize",y,a),la(this)&&(a=this.part,a!==null&&Bo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:wi},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(),ar(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:zr},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(),ar(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 $i(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&&na(this),this.Ab}},oe:{get:function(){return this.l&4096&&na(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(ar(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Ln},set:function(a){this.reshapingBehavior!==a&&(ar(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()&&wt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Ra(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&&En(a,">= 0",Wt,"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&&En(a,">= 1",Wt,"columnSpan"),ar(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&&En(a,">= 0",Wt,"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&&En(a,">= 1",Wt,"rowSpan"),ar(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&&(ar(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||wt("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:er},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&&En(a,">= 0",Wt,"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&&En(a,">= 0",Wt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:er},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&&En(a,">= 0",Wt,"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&&En(a,">= 0",Wt,"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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(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&&(ar(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Wt.prototype.trigger=Wt.prototype.Jv,Wt.prototype.findBindingPanel=Wt.prototype.ih,Wt.prototype.findTemplateBinder=Wt.prototype.pz,Wt.prototype.setProperties=Wt.prototype.nm,Wt.prototype.apply=Wt.prototype.apply,Wt.prototype.attach=Wt.prototype.Du,Wt.prototype.set=Wt.prototype.set,Wt.prototype.isEnabledObject=Wt.prototype.If,Wt.prototype.isVisibleObject=Wt.prototype.Ed,Wt.prototype.isContainedBy=Wt.prototype.rg,Wt.prototype.getNearestIntersectionPoint=Wt.prototype.rs,Wt.prototype.getLocalPoint=Wt.prototype.qs,Wt.prototype.getDocumentScale=Wt.prototype.Df,Wt.prototype.getDocumentAngle=Wt.prototype.li,Wt.prototype.getDocumentBounds=Wt.prototype.mi,Wt.prototype.getDocumentPoint=Wt.prototype.ga,Wt.prototype.intersectsRect=Wt.prototype.Yc,Wt.prototype.containedInRect=Wt.prototype.fh,Wt.prototype.containsRect=Wt.prototype.Re,Wt.prototype.containsPoint=Wt.prototype.ca,Wt.prototype.raiseChanged=Wt.prototype.g,Wt.prototype.raiseChangedEvent=Wt.prototype.cb,Wt.prototype.addCopyProperty=Wt.prototype.Vw;var Af=null;Wt.className="GraphObject",Af=new on,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=zl(Dn,Dn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Dn){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"},zl(ir,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new li(0,0,2.76142374915397,2.761423749153969),spot2:new li(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 Dn&&(x=b.fb("ButtonBorder"),x instanceof ir)){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 Dn&&(x=b.fb("ButtonBorder"),x instanceof ir&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Dn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof ir){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 Dn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof ir){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 Dn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof ir){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 Dn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof ir))){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=zl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},zl(ir,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:nr},new vs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new vs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Br&&(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=zl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},zl(ir,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:nr},new vs("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 Br&&(x=x.adornedPart),x instanceof Xi){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 zl(Br,Dn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new ft(0,3),shadowBlur:5},zl(ir,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new li(0,0,4,6),spot2:new li(1,1,-4,-4)}))}),Jh("ContextMenu",function(){return zl(Br,Dn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new ft(0,3),shadowBlur:5},new vs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Jh("ContextMenuButton",function(){var a=zl("Button");a.stretch=Si;var y=a.fb("ButtonBorder");return y instanceof ir&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new li(0,0,2,3),y.spot2=new li(1,1,-2,-2)),a}),Jh("PanelExpanderButton",function(a){var y=dm(a,"COLLAPSIBLE"),x=zl("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},zl(ir,{name:"ButtonIcon",strokeWidth:2},new vs("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof ir&&(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=zl("Button",{desiredSize:new Pn(14,14)},zl(ir,{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 vs("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Dn){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=zl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new $i(0,1,0,0)});var y=zl(Dn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new $i(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}),Wt.None=Ln=new xn(Wt,"None",0),Wt.Default=Qi=new xn(Wt,"Default",0),Wt.Vertical=Ni=new xn(Wt,"Vertical",4),Wt.Horizontal=Si=new xn(Wt,"Horizontal",5),Wt.Fill=Tn=new xn(Wt,"Fill",3),Wt.Uniform=fi=new xn(Wt,"Uniform",1),Wt.UniformToFill=Lr=new xn(Wt,"UniformToFill",2),Wt.FlipVertical=ur=new xn(Wt,"FlipVertical",1),Wt.FlipHorizontal=Ir=new xn(Wt,"FlipHorizontal",2),Wt.FlipBoth=uo=new xn(Wt,"FlipBoth",3),Wt.make=zl,Wt.getBuilders=function(){var a=new on,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},Wt.defineBuilder=Jh,Wt.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 Wt))return y&&b.set(y),b;wt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Wt.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=wi,this.o=zr,this.hg=Qi,this.ob=this.Bi=1,this.Pf=Ln,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=Wn,this.rr=za,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=As,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?Kt.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new ml(this,x)}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),Yt(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 ml(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new fd,this.j=fm(this),this.Nj=fm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=eo++,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+")")}et=ml.prototype,et.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,$e=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,$e,a-Ee,y-Ne]),this.path.push(["A",x,x,0,1,$e,Ge,Ye])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),$e,a+x*Math.cos(E),y+x*Math.sin(E)])},et.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},et.Se=function(a){this.addPath(this.path,this.rb,a||0)},et.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},et.clearRect=function(){},et.clip=function(){this.Yl.clipPath=!0},et.closePath=function(){this.path.push(["z"])},et.createLinearGradient=function(a,y,x,b){var E=new Kd("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},et.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+eo++,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+")"},et.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)}et.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},Zt.$(b,se)&&Zt.$(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)},et.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},et.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},et.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},Nf(this,"fill",a,this.rb),this.addElement("rect",a)},et.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))},et.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},Nf(this,"fill",y,this.rb),this.addElement("text",y,a[0])},et.lineTo=function(a,y){this.path.push(["L",a,y])},et.moveTo=function(a,y){this.path.push(["M",a,y])},et.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},et.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},et.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},et.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},et.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||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]+")"}et.scale=function(a,y){this.rb.scale(a,y)},et.translate=function(a,y){this.rb.translate(a,y)},et.transform=function(){},et.yc=function(){},et.stroke=function(){$y(this,this.Yl)},et.jk=function(){this.clipInsteadOfFill||this.stroke()},et.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},et.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function 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"+eo++,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+")"}et.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=yn(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}et.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}et.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},et.fs=function(){this.Ct=!1},et.Vc=function(){},et.Wx=function(){},ml.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},ml.prototype.getImageData=function(){return null},ml.prototype.measureText=function(){return null};function 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()))}ml.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},ml.className="SVGContext",nn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Ku(this,Kt.document));var y=new Ku(this,Kt.document,!0);a===void 0&&(a=new di);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)},nn.prototype.makeSvg=nn.prototype.Cs,nn.prototype.av=function(a){return this.Cs(a)},nn.prototype.makeSVG=nn.prototype.av;function tu(a,y,x,b){this.ownerDocument=y=y===void 0?Kt.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}tu.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},tu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},tu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},tu.prototype.focus=function(){this.Oa.focus()},tu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},nt.Object.defineProperties(tu.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}}}),tu.className="CanvasSurface";function pd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&wt("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 Fi,this.isTemporary=!!x}et=pd.prototype,et.Wx=function(a){this.Z.imageSmoothingEnabled=a},et.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},et.beginPath=function(){this.Z.beginPath()},et.Se=function(){},et.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},et.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},et.clip=function(){this.Z.clip()},et.closePath=function(){this.Z.closePath()},et.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},et.createPattern=function(a,y){return this.Z.createPattern(a,y)},et.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},et.drawImage=function(a,y,x,b,E,te,ne,se,he){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,te,ne,se,he)},et.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},et.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.fillText=function(a,y,x){this.Z.fillText(a,y,x)},et.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},et.lineTo=function(a,y){this.Z.lineTo(a,y)},et.measureText=function(a){return this.Z.measureText(a)},et.moveTo=function(a,y){this.Z.moveTo(a,y)},et.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},et.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},et.restore=function(){this.Z.restore()},et.save=function(){this.yc(),this.Z.save()},pd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},et=pd.prototype,et.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},et.scale=function(a,y){this.El.scale(a,y)},et.translate=function(a,y){this.El.translate(a,y)},et.stroke=function(){this.Z.stroke()},et.transform=function(a,y,x,b,E,te){if(a!==1||y!==0||x!==0||b!==1||E!==0||te!==0){var ne=this.El,se=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*te+ne.dx,ne.dy=ne.m12*E+ne.m22*te+ne.dy,ne.m11=se,ne.m12=a,ne.m21=y,ne.m22=x}},et.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},et.ng=function(a,y){if(a instanceof oo&&a.type===Ul){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},et.jk=function(){this.Hm||this.stroke()},et.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},et.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},et.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},et.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},et.Hs=function(){},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 oo(a,y){Rf||(cv(),Rf=!0),Ri(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=jr,this.Lk=cs):this.Lk=a===Ul?this.Qd=tr:this.Qd=er,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}oo.prototype.copy=function(){var a=new oo;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},et=oo.prototype,et.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},et.ka=function(){return Object.isFrozen(this)&&wt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},et.qb=function(a){a.classType===oo&&(this.type=a)},et.toString=function(){var a="Brush(";if(this.type===qh)a+=this.color;else if(a=this.type===Dh?a+"Linear ":this.type===Ul?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+")"},et.addColorStop=function(a,y){return this._isFrozen&&zt(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&En(a,"0 <= loc <= 1",oo,"addColorStop:loc"),this.we===null&&(this.we=new on),this.we.add(a,y),this.na===qh&&(this.type=Dh),this.xe=null,this},et.Vz=function(a,y){if(this._isFrozen&&zt(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===Ul)&&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)}et.Wy=function(a,y){if(this._isFrozen&&zt(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===Ul)&&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=Ao.j;var b=Ao.u,E=Ao.o,te=Ao.F;return Nh(y),x===void 0&&(x=.5),"rgba("+Math.round((Ao.j-a)*x+a)+", "+Math.round((Ao.u-b)*x+b)+", "+Math.round((Ao.o-E)*x+E)+", "+Math.round((Ao.F-te)*x+te)+")"}et.Gx=function(){if(this.type===qh)return Df(this.color);if((this.type===Dh||this.type===Ul)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ul)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 oo?a.Gx():(Nh(a),128>(299*Ao.j+587*Ao.u+114*Ao.o)/1e3):!1}function Of(a,y){switch(y){case Bf:y=100*lv(Ao.j);var x=100*lv(Ao.u),b=100*lv(Ao.o);return Ba.j=.4124564*y+.3575761*x+.1804375*b,Ba.u=.2126729*y+.7151522*x+.072175*b,Ba.o=.0193339*y+.119192*x+.9503041*b,Ba.F=Ao.F,y=hv(Ba.j/If[0]),x=hv(Ba.u/If[1]),b=hv(Ba.o/If[2]),dh.j=116*x-16,dh.u=500*(y-x),dh.o=200*(x-b),dh.F=Ba.F,dh.j=Math.min(100,Math.max(0,dh.j+100*a)),a=(dh.j+16)/116,y=a-dh.o/200,Ba.j=If[0]*n1(dh.u/500+a),Ba.u=If[1]*(dh.j>gm*dv?Math.pow(a,3):dh.j/gm),Ba.o=If[2]*n1(y),Ba.F=dh.F,a=-.969266*Ba.j+1.8760108*Ba.u+.041556*Ba.o,y=.0556434*Ba.j+-.2040259*Ba.u+1.0572252*Ba.o,Ao.j=255*uv((3.2404542*Ba.j+-1.5371385*Ba.u+-.4985314*Ba.o)/100),Ao.u=255*uv(a/100),Ao.o=255*uv(y/100),Ao.F=Ba.F,Ao.j=Math.round(Ao.j),255<Ao.j?Ao.j=255:0>Ao.j&&(Ao.j=0),Ao.u=Math.round(Ao.u),255<Ao.u?Ao.u=255:0>Ao.u&&(Ao.u=0),Ao.o=Math.round(Ao.o),255<Ao.o?Ao.o=255:0>Ao.o&&(Ao.o=0),"rgba("+Ao.j+", "+Ao.u+", "+Ao.o+", "+Ao.F+")";case i1:return av(),Tl.o=Math.min(100,Math.max(0,Tl.o+100*a)),"hsla("+Tl.j+", "+Tl.u+"%, "+Tl.o+"%, "+Tl.F+")";default:wt("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,Ao.j=a[0],Ao.u=a[1],Ao.o=a[2],Ao.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ao.j=0,Ao.u=0,Ao.o=0,Ao.F=1)}}function av(){var a=Ao.j/255,y=Ao.u/255,x=Ao.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))}Tl.j=Math.round(ne),Tl.u=Math.round(100*a),Tl.o=Math.round(100*E),Tl.F=Ao.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 oo||wt("Value for "+y+" must be a color string or a Brush, not "+a))}function cv(){fv=ts?new tu(null,void 0,{willReadFrequently:!0}).context:null}nt.Object.defineProperties(oo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&zt(this,a),this.na=a,this.start.Mc()&&(a===Dh?this.start=jr:a===Ul&&(this.start=tr)),this.end.Mc()&&(a===Dh?this.end=cs:a===Ul&&(this.end=tr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&zt(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&zt(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&zt(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&zt(this,a),0>a&&En(a,">= zero",oo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&zt(this,a),0>a&&En(a,">= zero",oo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&zt(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&zt(this,a),this.cr=a,this.xe=null}}}),oo.prototype.isDark=oo.prototype.Gx,oo.prototype.darkenBy=oo.prototype.Wy,oo.prototype.lightenBy=oo.prototype.Vz,oo.prototype.addColorStop=oo.prototype.addColorStop;var dv=216/24389,gm=24389/27,If=[95.047,100,108.883],fv=null,Ao=new Qp,Tl=new Qp,Ba=new Qp,dh=new Qp,Rf=!1;oo.className="Brush";var qh;oo.Solid=qh=new xn(oo,"Solid",0);var Dh;oo.Linear=Dh=new xn(oo,"Linear",1);var Ul;oo.Radial=Ul=new xn(oo,"Radial",2);var Ff;oo.Pattern=Ff=new xn(oo,"Pattern",4);var Bf;oo.Lab=Bf=new xn(oo,"Lab",5);var i1;oo.HSL=i1=new xn(oo,"HSL",6),oo.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},oo.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)},oo.lighten=function(a){return e1(a)},oo.lightenBy=e1,oo.darken=function(a){return t1(a)},oo.darkenBy=t1,oo.mix=sv,oo.isDark=Df;function ks(){this.xa="Base"}ks.prototype.measure=function(){},ks.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},ks.prototype.arrange=function(){},ks.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},ks.prototype.iA=function(a){a.Uj()},ks.prototype.gc=function(){},nt.Object.defineProperties(ks.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Dn}}}),ks.prototype.remeasureObject=ks.prototype.iA,ks.prototype.arrangeElement=ks.prototype.Ly,ks.prototype.measureElement=ks.prototype.Yz,ks.className="PanelLayout";function mm(){this.xa="Base"}Je(mm,ks),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 ir&&_e.isGeometryPositioned&&(_e=_e.strokeWidth/2,Ge-=_e,Ye-=_e),Er(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 ir&&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"}Je(vm,ks),vm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=Un(),te=Oh(a);for(var he=0;he<se;he++){var _e=b[he];if(_e.visible||_e===te){var Ee=qa(_e,!1);if(Ee!==Ln&&Ee!==Si)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,$e=te+E.bottom,st=Ne.height,Et=qa(Ee,!1);(isNaN(Ee.desiredSize.height)&&Et===Tn||Et===Ni)&&(st=Math.max(x.height-Ye-$e,0)),Ye=st+Ye+$e,$e=Ee.alignment,$e.Xb()&&($e=a.defaultAlignment),$e.sb()||($e=tr),ne&&(se-=Ne.width+Ge.left+Ge.right),Ee.arrange(se+$e.offsetX+Ge.left,_e+$e.offsetY+Ge.top+(x.height*$e.y-Ye*$e.y),Ne.width,st),ne||(se+=Ne.width+Ge.left+Ge.right)}}};function ym(){this.xa="Base"}Je(ym,ks),ym.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=Un();for(var se=Oh(a),he=0;he<ne;he++){var _e=b[he];if(_e.visible||_e===se){var Ee=qa(_e,!1);if(Ee!==Ln&&Ee!==Ni)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,Kr(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,$e=te+E.right,st=Ne.width,Et=qa(Ee,!1);(isNaN(Ee.desiredSize.width)&&Et===Tn||Et===Si)&&(st=Math.max(x.width-Ye-$e,0)),Ye=st+Ye+$e,$e=Ee.alignment,$e.Xb()&&($e=a.defaultAlignment),$e.sb()||($e=tr),ne&&(se-=Ne.height+Ge.bottom+Ge.top),Ee.arrange(_e+$e.offsetX+Ge.left+(x.width*$e.x-Ye*$e.x),se+$e.offsetY+Ge.top,st,Ne.height),ne||(se+=Ne.height+Ge.bottom+Ge.top)}}};function Sm(){this.xa="Base"}Je(Sm,ks),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),$e=Math.max(ne+Ne,0),st=a.isClipping,Et=rn.allocAt(-_e.left,-_e.top,Ye,$e),St=rn.allocAt(0,0,te,ne);pv(he,St,!0),te=St.width,ne=St.height;for(var Tt=!0,At=Oh(a),Ot=0;Ot<se;Ot++){var Gt=b[Ot];Ge=y;var en=x;if(Gt!==he&&(Gt.visible||Gt===At)){_e=Gt.margin;var Zn=_e.left,ui=_e.top;switch(Ye=_e.right+_e.left,$e=_e.top+_e.bottom,_e=qa(Gt,!1),_e){case Tn:Ge=te,en=ne,ui=Zn=$e=Ye=0;break;case Si:Ge=te,Zn=Ye=0;break;case Ni:en=ne,ui=$e=0}Gt.measure(Ge,en,0,0),Ge=Gt.measuredBounds,Ye=Math.max(Ge.width+Ye,0),$e=Math.max(Ge.height+$e,0),_e=Gt.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=tr);var ri=Gt.alignmentFocus;if(ri.Xb()&&(ri=tr),en=null,Gt instanceof Dn&&Gt.$e!==""&&(en=Gt.fb(Gt.$e),en===Gt&&(en=null)),Zn=St.x-Zn,ui=St.y-ui,en!==null){for(Gt.arrange(0,0,Ge.width,Ge.height),Ge=en.actualBounds,Ge=ft.allocAt(Ge.x+(ri.x*Ge.width-ri.offsetX),Ge.y+(ri.y*Ge.height-ri.offsetY)),en=en.panel;en!==Gt;)en.transform.Ga(Ge),en=en.panel;Zn+=_e.x*te+_e.offsetX-Ge.x,ui+=_e.y*ne+_e.offsetY-Ge.y,ft.free(Ge)}else Zn+=_e.x*te+_e.offsetX-(ri.x*Ge.width+ri.offsetX),ui+=_e.y*ne+_e.offsetY-(ri.y*Ge.height+ri.offsetY);Tt?(Tt=!1,E.h(Zn,ui,Ye,$e)):Er(E,Zn,ui,Ye,$e)}}switch(Tt?E.assign(Et):st?E.Uu(St.x,St.y,St.width,St.height):Er(E,Et.x,Et.y,Et.width,Et.height),rn.free(Et),rn.free(St),_e=he.stretch,_e===Qi&&(_e=qa(he,!1)),_e){case Ln:return;case Tn:if(!isFinite(y)&&!isFinite(x))return;break;case Si:if(!isFinite(y))return;break;case Ni:if(!isFinite(x))return}for(Ge=he.measuredBounds,te=Ge.width,ne=Ge.height,Ye=Math.max(te+Ee,0),$e=Math.max(ne+Ne,0),_e=he.margin,St=rn.allocAt(-_e.left,-_e.top,Ye,$e),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,$e=_e.top+_e.bottom,Ge=x.measuredBounds,Ye=Math.max(Ge.width+Ye,0),$e=Math.max(Ge.height+$e,0),Ee=x.alignment,Ee.Xb()&&(Ee=a.defaultAlignment),Ee.sb()||(Ee=tr),x=x.alignmentFocus,x.Xb()&&(x=tr),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,$e)):Er(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,$e));Tt?E.assign(Et):st?E.Uu(St.x,St.y,St.width,St.height):Er(E,Et.x,Et.y,Et.width,Et.height),rn.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=rn.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=tr);var $e=Ne.alignmentFocus;if($e.Xb()&&($e=tr),_e=null,Ne instanceof Dn&&Ne.$e!==""&&(_e=Ne.fb(Ne.$e),_e===Ne&&(_e=null)),_e!==null){var st=_e.actualBounds;for($e=ft.allocAt(st.x+($e.x*st.width-$e.offsetX),st.y+($e.y*st.height-$e.offsetY)),_e=_e.panel;_e!==Ne;)_e.transform.Ga($e),_e=_e.panel;_e=Ee.x*ne.width+Ee.offsetX-$e.x,Ee=Ee.y*ne.height+Ee.offsetY-$e.y,ft.free($e)}else _e=Ee.x*ne.width+Ee.offsetX-($e.x*Ge+$e.offsetX),Ee=Ee.y*ne.height+Ee.offsetY-($e.y*Ye+$e.offsetY);_e+=ne.x-x.x,Ee+=ne.y-x.y,Ne.visible&&Ne.arrange(te+_e,he+Ee,Ge,Ye)}}rn.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Dn&&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"}Je(xm,ks),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 $e=0,st=null;he instanceof ir&&(st=he,$e=st.strokeWidth*st.scale);var Et=Math.max(_e.width+Ge,0);_e=Math.max(_e.height+Ye,0);var St=yv(he),Tt=St.x*Et+St.offsetX;St=St.y*_e+St.offsetY;var At=Sv(he),Ot=At.x*Et+At.offsetX;for(At=At.y*_e+At.offsetY,isFinite(y)&&(Ee=Math.max(Math.abs(Tt-Ot)-$e,0)),isFinite(x)&&(Ne=Math.max(Math.abs(St-At)-$e,0)),$e=Pn.alloc(),$e.h(0,0),a=Oh(a),At=0;At<se;At++)St=b[At],St===he||!St.visible&&St!==a||(_e=St.margin,Et=_e.right+_e.left,Tt=_e.top+_e.bottom,St.measure(Ee,Ne,0,0),_e=St.measuredBounds,Et=Math.max(_e.width+Et,0),_e=Math.max(_e.height+Tt,0),$e.h(Math.max(Et,$e.width),Math.max(_e,$e.height)));if(se===1)E.width=Et,E.height=_e,Pn.free($e);else{switch(St=yv(he),At=Sv(he),se=b=0,At.x!==St.x&&At.y!==St.y&&(b=$e.width/Math.abs(At.x-St.x),se=$e.height/Math.abs(At.y-St.y)),Pn.free($e),$e=0,st!==null&&($e=st.strokeWidth*st.scale,Cv(st)===fi&&(b=se=Math.max(b,se))),b+=Math.abs(St.offsetX)+Math.abs(At.offsetX)+$e,se+=Math.abs(St.offsetY)+Math.abs(At.offsetY)+$e,st=he.stretch,st===Qi&&(st=qa(he,!1)),st){case Ln:ne=te=0;break;case Tn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case Si:isFinite(y)&&(b=y),ne=0;break;case Ni: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=rn.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,Er(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=tr),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&&(no(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 rn(te.x,te.y,te.width,te.height))));rn.free(te)};function wm(){this.xa="Base",this.name="Table"}Je(wm,ks),wm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Un(),se=Un(),he=0;he<te;he++){var _e=b[he],Ee=_e instanceof Dn?_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 $e=Ne[Ye];Ee.type===Dn.TableRow?$e.row=_e.row:Ee.type===Dn.TableColumn&&($e.column=_e.column),ne.push($e)}}else ne.push(_e)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var st=[],Et=0;Et<te;Et++){var St=ne[Et];St.visible&&(Cs(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=Un(),At=Un(),Ot=Un(),Gt={count:0},en={count:0},Zn=y,ui=x,ri=a.rowDefs,Rn=a.colDefs,wn=null;te=ri.length;for(var Yi=0;Yi<te;Yi++)wn=ri[Yi],wn!==void 0&&(wn.actual=0);te=Rn.length;for(var zi=0;zi<te;zi++)wn=Rn[zi],wn!==void 0&&(wn.actual=0);for(var Wr=st.length,_o=0,Bs=0;Bs<Wr;Bs++)st[Bs]&&(_o=Math.max(_o,st[Bs].length));var Zs=Math.min(a.topIndex,Wr-1),Ma=Math.min(a.leftIndex,_o-1),js=0;Wr=st.length;for(var lc=Oh(a),ys=0;ys<Wr;ys++)if(st[ys]){_o=st[ys].length;var Fu=a.Fb(ys);Fu.actual=0;for(var ka=Fu.oc=0;ka<_o;ka++)if(st[ys][ka]){var uc=a.Eb(ka);Tt[ka]===void 0&&(uc.actual=0,uc.oc=0,Tt[ka]=!0);for(var Dl=st[ys][ka],ou=Dl.length,Sl=0;Sl<ou;Sl++){var ul=Dl[Sl];if(ul.visible||ul===lc){var Zc=1<ul.rowSpan||1<ul.columnSpan;Zc&&(ys<Zs||ka<Ma||At.push(ul));var Bu=ul.margin,ap=Bu.right+Bu.left,xl=Bu.top+Bu.bottom,Ta=Nu(ul,Fu,uc,!1),jg=ul.desiredSize,af=!isNaN(jg.height),Ju=!isNaN(jg.width)&&af;if(Zc||Ta===Ln||Ju||ys<Zs||ka<Ma||(Gt[ka]!==void 0||Ta!==Tn&&Ta!==Si||(Gt[ka]=-1,Gt.count++),en[ys]!==void 0||Ta!==Tn&&Ta!==Ni||(en[ys]=-1,en.count++),Ot.push(ul)),ul.measure(1/0,1/0,0,0),!(ys<Zs||ka<Ma)){var hl=ul.measuredBounds,bd=Math.max(hl.width+ap,0),wl=Math.max(hl.height+xl,0);if(ul.rowSpan===1&&(Ta===Ln||Ta===Si)){wn=a.Fb(ys);var Vc=wn.Wc();js=Math.max(wl-wn.actual,0),js+Vc>ui&&(js=Math.max(ui-Vc,0));var W0=wn.oa===0;wn.oc=wn.oc+js,wn.actual=wn.oa+js,ui=Math.max(ui-(js+(W0?Vc:0)),0)}if(ul.columnSpan===1&&(Ta===Ln||Ta===Ni)){wn=a.Eb(ka);var zg=wn.Wc();js=Math.max(bd-wn.actual,0),js+zg>Zn&&(js=Math.max(Zn-zg,0));var Uy=wn.oa===0;wn.oc=wn.oc+js,wn.actual=wn.oa+js,Zn=Math.max(Zn-(js+(Uy?zg:0)),0)}Zc&&ul.Uj()}}}}}Gn(Tt);var wh=0,Fh=0;te=a.columnCount;for(var lf=0;lf<te;lf++){var Kc=Rn[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=ri[lp];Yc!==void 0&&(Fh+=isNaN(Yc.Hc)?Yc.oc:Yc.Hc,Yc.oc!==0&&(Fh+=Yc.Wc()))}Zn=Math.max(y-wh,0);var _h=ui=Math.max(x-Fh,0),hc=Zn;te=Ot.length;for(var cl=0;cl<te;cl++){var qu=Ot[cl],Z0=a.Fb(qu.row),Bh=a.Eb(qu.column),up=qu.measuredBounds,ju=qu.margin,Pd=ju.right+ju.left,Qu=ju.top+ju.bottom;Gt[qu.column]=Bh.oc===0&&Gt[qu.column]!==void 0?Math.max(up.width+Pd,Gt[qu.column]):null,en[qu.row]=Z0.oc===0&&en[qu.row]!==void 0?Math.max(up.height+Qu,en[qu.row]):null}var uf=0,hp=0,_u;for(_u in en)_u!=="count"&&(uf+=en[_u]);for(_u in Gt)_u!=="count"&&(hp+=Gt[_u]);for(var ra=Pn.alloc(),Ug=0;Ug<te;Ug++){var Za=Ot[Ug];if(Za.visible||Za===lc){var Ss=a.Fb(Za.row),Va=a.Eb(Za.column),jh=0;isFinite(Va.width)?jh=Va.width:(isFinite(Zn)&&Gt[Za.column]!==null?hp===0?jh=Va.actual+Zn:jh=Gt[Za.column]/hp*hc:Gt[Za.column]!==null?jh=Zn:jh=Va.actual||Zn,jh=Math.max(0,jh-Va.Wc()));var cc=0;switch(isFinite(Ss.height)?cc=Ss.height:(isFinite(ui)&&en[Za.row]!==null?uf===0?cc=Ss.actual+ui:cc=en[Za.row]/uf*_h:en[Za.row]!==null?cc=ui:cc=Ss.actual||ui,cc=Math.max(0,cc-Ss.Wc())),ra.h(Math.max(Va.minimum,Math.min(jh,Va.maximum)),Math.max(Ss.minimum,Math.min(cc,Ss.maximum))),Ta=Nu(Za,Ss,Va,!1),Ta){case Si:ra.height=Math.max(ra.height,Ss.actual+ui);break;case Ni:ra.width=Math.max(ra.width,Va.actual+Zn)}var Cd=Za.margin,Hy=Cd.right+Cd.left,V0=Cd.top+Cd.bottom;Za.Uj(),Za.measure(ra.width,ra.height,Va.minimum,Ss.minimum);var cp=Za.measuredBounds,Ed=Math.max(cp.width+Hy,0),hf=Math.max(cp.height+V0,0);isFinite(Zn)&&(Ed=Math.min(Ed,ra.width)),isFinite(ui)&&(hf=Math.min(hf,ra.height));var dl=0;dl=Ss.actual,Ss.actual=Math.max(Ss.actual,hf),Ss.oc=Math.max(Ss.oc,hf),js=Ss.actual-dl,ui=Math.max(ui-js,0),en[Za.row]===null&&(_h=Math.max(_h-js,0)),dl=Va.actual,Va.actual=Math.max(Va.actual,Ed),Va.oc=Math.max(Va.oc,Ed),js=Va.actual-dl,Zn=Math.max(Zn-js,0),Gt[Za.column]===null&&(hc=Math.max(hc-js,0))}}Gn(Ot);var zh=Pn.alloc(),zu=Un(),Vl=Un();if(te=At.length,te!==0){for(var Xc=0;Xc<Wr;Xc++)if(st[Xc]){_o=st[Xc].length;var dp=a.Fb(Xc);zu[Xc]=dp.actual;for(var Jc=0;Jc<_o;Jc++)if(st[Xc][Jc]){var K0=a.Eb(Jc);Vl[Jc]=K0.actual}}}for(var fp=0;fp<te;fp++){var as=At[fp];if(as.visible||as===lc){var bu=a.Fb(as.row),su=a.Eb(as.column);switch(ra.h(Math.max(su.minimum,Math.min(y,su.maximum)),Math.max(bu.minimum,Math.min(x,bu.maximum))),Ta=Nu(as,bu,su,!1),Ta){case Tn:Vl[su.index]!==0&&(ra.width=Math.min(ra.width,Vl[su.index])),zu[bu.index]!==0&&(ra.height=Math.min(ra.height,zu[bu.index]));break;case Si:Vl[su.index]!==0&&(ra.width=Math.min(ra.width,Vl[su.index]));break;case Ni:zu[bu.index]!==0&&(ra.height=Math.min(ra.height,zu[bu.index]))}isFinite(su.width)&&(ra.width=su.width),isFinite(bu.height)&&(ra.height=bu.height),zh.h(0,0);for(var Y0=su.minimum,_l=bu.minimum,dc=1;dc<as.rowSpan&&!(as.row+dc>=a.rowCount);dc++)wn=a.Fb(as.row+dc),js=0,js=Ta===Tn||Ta===Ni?Math.max(wn.minimum,zu[as.row+dc]===0?wn.maximum:Math.min(zu[as.row+dc],wn.maximum)):Math.max(wn.minimum,isNaN(wn.Hc)?wn.maximum:Math.min(wn.Hc,wn.maximum)),zh.height+=js,_l+=wn.minimum;for(var au=1;au<as.columnSpan&&!(as.column+au>=a.columnCount);au++)wn=a.Eb(as.column+au),js=0,js=Ta===Tn||Ta===Si?Math.max(wn.minimum,Vl[as.column+au]===0?wn.maximum:Math.min(Vl[as.column+au],wn.maximum)):Math.max(wn.minimum,isNaN(wn.Hc)?wn.maximum:Math.min(wn.Hc,wn.maximum)),zh.width+=js,Y0+=wn.minimum;ra.width+=zh.width,ra.height+=zh.height;var pp=as.margin,qc=pp.right+pp.left,Hg=pp.top+pp.bottom;as.measure(ra.width,ra.height,Y0,_l);for(var gp=as.measuredBounds,$u=Math.max(gp.width+qc,0),Ld=Math.max(gp.height+Hg,0),Qc=0,mp=0;mp<as.rowSpan&&!(as.row+mp>=a.rowCount);mp++)wn=a.Fb(as.row+mp),Qc+=wn.total||0;if(Qc<Ld){var fc=Ld-Qc,bh=Ld-Qc;if(as.spanAllocation!==null)for(var pc=as.spanAllocation,Uh=0;Uh<as.rowSpan&&!(0>=fc)&&!(as.row+Uh>=a.rowCount);Uh++){wn=a.Fb(as.row+Uh);var gc=wn.oa||0,Md=pc(as,wn,bh);wn.actual=Math.min(wn.maximum,gc+Md),wn.oa!==gc&&(fc-=wn.oa-gc)}for(;0<fc;){var Uu=wn.oa||0;if(isNaN(wn.height)&&wn.maximum>Uu&&(wn.actual=Math.min(wn.maximum,Uu+fc),wn.oa!==Uu&&(fc-=wn.oa-Uu)),wn.index===0)break;wn=a.Fb(wn.index-1)}}for(var cf=0,mc=0;mc<as.columnSpan&&!(as.column+mc>=a.columnCount);mc++)wn=a.Eb(as.column+mc),cf+=wn.total||0;if(cf<$u){var df=$u-cf,Gy=$u-cf;if(as.spanAllocation!==null)for(var Hh=as.spanAllocation,kd=0;kd<as.columnSpan&&!(0>=df)&&!(as.column+kd>=a.columnCount);kd++){wn=a.Eb(as.column+kd);var Gg=wn.oa||0,Wy=Hh(as,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),Pn.free(zh),Pn.free(ra),zu!==void 0&&Gn(zu),Vl!==void 0&&Gn(Vl);var ff=0,pf=0,J0=a.desiredSize,gx=a.maxSize;Ta=qa(a,!0);var Wg=Fh=wh=0,Zg=0;te=a.columnCount;for(var q0=0;q0<te;q0++)Rn[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=Ta!==Ln&&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++)Rn[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++)ri[$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=Ta!==Ln&&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++)ri[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===Dn.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),Cs(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 $e=Math.min(a.leftIndex,Ee-1);if(0<se.length){for(;$e!==Ee&&(se[$e]===void 0||se[$e].oa===0);)$e++;$e=Math.max(Math.min($e,Ee-1),0),Ge=-se[$e].position}for(var st=0,Et=0;st!==_e&&he[st]===void 0;)st++;for(;Et!==_e&&se[Et]===void 0;)Et++;Ee=a.part,a.Fb(st),a.Eb(Et);for(var St=0;St<y.length;St++){var Tt=y[St];if(Tt instanceof Dn&&Tt.visible&&Qh(Tt)){if(Tt.type===Dn.TableRow){se=a.Fb(Tt.row);var At=a.Eb(Et)}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(Et,$e))),At=Tt.measuredBounds,Tt.Uk(),Tt.actualBounds.ka();var Ot=Tt.actualBounds,Gt=rn.allocAt(Ot.x,Ot.y,Ot.width,Ot.height);Ot.x=Tt.type===Dn.TableRow?te:se,Ot.y=Tt.type===Dn.TableColumn?E:he,Ot.width=At.width,Ot.height=At.height,Tt.actualBounds.freeze(),hh(Tt,!1),yr(Gt,Ot)||Ee===null||(Ee.oh(),Tt.Pn(Ee)),rn.free(Gt)}}for(St=Pn.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))),Ot=0;Ot<Ee;Ot++)if(ne[Tt][Ot]){Gt=a.Eb(Ot),se=Gt.position+Ge+te,Gt.oa!==0&&(se+=Gt.Io(Math.max(Et,$e)));for(var en=ne[Tt][Ot],Zn=en.length,ui=0;ui<Zn;ui++){var ri=en[ui],Rn=ri.measuredBounds;St.h(0,0);for(var wn=1;wn<ri.rowSpan&&!(Tt+wn>=a.rowCount);wn++){var Yi=a.Fb(Tt+wn);Yi.oa!==0&&(St.height+=Yi.total)}for(wn=1;wn<ri.columnSpan&&!(Ot+wn>=a.columnCount);wn++)Yi=a.Eb(Ot+wn),Yi.oa!==0&&(St.width+=Yi.total);var zi=Gt.oa+St.width,Wr=At.oa+St.height;wn=se,Yi=he;var _o=zi,Bs=Wr,Zs=se,Ma=he,js=zi,lc=Wr;se+zi>x.width&&(js=Math.max(x.width-se,0)),he+Wr>x.height&&(lc=Math.max(x.height-he,0));var ys=ri.alignment;if(ys.Xb()){ys=a.defaultAlignment,ys.sb()||(ys=tr);var Fu=ys.x,ka=ys.y,uc=ys.offsetX;ys=ys.offsetY;var Dl=Gt.alignment,ou=At.alignment;Dl.sb()&&(Fu=Dl.x,uc=Dl.offsetX),ou.sb()&&(ka=ou.y,ys=ou.offsetY)}else Fu=ys.x,ka=ys.y,uc=ys.offsetX,ys=ys.offsetY;(isNaN(Fu)||isNaN(ka))&&(ka=Fu=.5,ys=uc=0),Dl=Rn.width,ou=Rn.height;var Sl=ri.margin,ul=Sl.left+Sl.right,Zc=Sl.top+Sl.bottom,Bu=Nu(ri,At,Gt,!1);!isNaN(ri.desiredSize.width)||Bu!==Tn&&Bu!==Si||(Dl=Math.max(zi-ul,0)),!isNaN(ri.desiredSize.height)||Bu!==Tn&&Bu!==Ni||(ou=Math.max(Wr-Zc,0)),zi=ri.maxSize,Wr=ri.minSize,Dl=Math.min(zi.width,Dl),ou=Math.min(zi.height,ou),Dl=Math.max(Wr.width,Dl),ou=Math.max(Wr.height,ou),zi=ou+Zc,wn+=_o*Fu-(Dl+ul)*Fu+uc+Sl.left,Yi+=Bs*ka-zi*ka+ys+Sl.top,ri.visible&&(no(Zs,Ma,js,lc,wn,Yi,Rn.width,Rn.height)?ri.arrange(wn,Yi,Dl,ou):ri.arrange(wn,Yi,Dl,ou,new rn(Zs,Ma,js,lc)))}}}for(Pn.free(St),a=0;a<b;a++)x=y[a],te=x instanceof Dn?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"}Je(_m,ks),_m.prototype.measure=function(){},_m.prototype.arrange=function(){};function bm(){this.xa="Base"}Je(bm,ks),bm.prototype.measure=function(){},bm.prototype.arrange=function(){};function Pm(){this.xa="Base"}Je(Pm,ks),Pm.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&wt("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),$e=1;a.viewboxStretch===fi?Ne!==0&&se!==0&&($e=Math.min(Ge/Ne,Ye/se)):Ne!==0&&se!==0&&($e=Math.max(Ge/Ne,Ye/se)),$e===0&&($e=1e-4),b.Ca*=$e,Ee!==b.scale&&(Cs(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=tr),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"}Je($p,ks),$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=[],$e=a.O.s,st=$e.length,Et=0;Et<st;Et++){var St=$e[Et],Tt=[];if(Ye.push(Tt),St.visible){var At=St.interval;if(!(0>At)){St=mv(St.figure);for(var Ot=0;Ot<st;Ot++)if(Ot!==Et){var Gt=$e[Ot];Gt.visible&&mv(Gt.figure)===St&&(Gt=Gt.interval,Gt>At&&Tt.push(Gt))}}}}for($e=a.O.s,st=$e.length,Et=0;Et<st;Et++){var en=$e[Et];if(en.visible&&(Tt=en.interval||1,St=Math.abs(Tt),!(2>E*St*x))){if(At=en.segmentIndex,(!isFinite(At)||isNaN(At))&&(At=0),0>At&&(At=St-Math.min(-At,St)),At=Math.round(At%St),St=en.opacity,Ot=1,St!==1){if(St===0)continue;Ot=y.globalAlpha,y.globalAlpha=Ot*St}Gt=Ye[Et];var Zn=!1,ui=en.strokeDashArray;if(ui!==null&&(Zn=!0,y.js(ui,en.strokeDashOffset)),en.figure==="LineV"&&en.stroke!==null&&0<en.strokeWidth){for(y.lineWidth=en.strokeWidth,os(a,y,en.stroke,!1,!1,te,ne),y.beginPath(),ui=en=Math.floor((Ge-E)/E);ui<=en+_e;ui++){var ri=ui*E+Ge;0<=ri&&ri<=se&&Cm(ui,Tt,At,Gt)&&(y.moveTo(ri,0),y.lineTo(ri,he))}y.stroke(),y.Se()}else if(en.figure==="LineH"&&en.stroke!==null&&0<en.strokeWidth){for(y.lineWidth=en.strokeWidth,os(a,y,en.stroke,!1,!1,te,ne),y.beginPath(),ui=en=Math.floor((Ne-b)/b);ui<=en+Ee;ui++)ri=ui*b+Ne,0<=ri&&ri<=he&&Cm(ui,Tt,At,Gt)&&(y.moveTo(0,ri),y.lineTo(se,ri));y.stroke(),y.Se()}else if(en.figure==="BarV"&&en.fill!==null)for(os(a,y,en.fill,!0,!1,te,ne),en=en.width,isNaN(en)&&(en=E),ri=ui=Math.floor((Ge-E)/E);ri<=ui+_e;ri++){var Rn=ri*E+Ge;0<=Rn+en&&Rn<=se&&Cm(ri,Tt,At,Gt)&&y.fillRect(Rn,0,en,he)}else if(en.figure==="BarH"&&en.fill!==null)for(os(a,y,en.fill,!0,!1,te,ne),en=en.height,isNaN(en)&&(en=b),ri=ui=Math.floor((Ne-b)/b);ri<=ui+Ee;ri++)Rn=ri*b+Ne,0<=Rn+en&&Rn<=he&&Cm(ri,Tt,At,Gt)&&y.fillRect(0,Rn,se,en);Zn&&y.fs(),St!==1&&(y.globalAlpha=Ot)}}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"}Je(Em,ks),Em.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof Br||a instanceof Fn){var ne=null,se=null;if(a instanceof Fn&&(ne=a),a instanceof Br&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof Fn){var he=ne;if(te===0)Kr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var _e=a instanceof Br?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 $e=_e.measuredBounds;x.ed($e),Ye.push($e)}$e=Fi.alloc();for(var st=ft.alloc(),Et=ft.alloc(),St=0;St<te;St++){var Tt=b[St];if(Tt!==_e)if(Tt.isPanelMain&&Tt instanceof ir){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 Ot=Tt.segmentIndex,Gt=Tt.segmentFraction,en=Tt.alignmentFocus;en.Mc()&&(en=tr);var Zn=Tt.segmentOrientation,ui=Tt.segmentOffset;if(isNaN(Ot)){var ri=he.ua;At=Un(),ri.Qu(Gt,At);var Rn=ft.allocAt(At[0],At[1]);if(Rn.add(he.i(0)),ri.type===In.j?Rn.offset(-ri.startX,-ri.startY):(ri=ri.figures.first(),ri!==null&&Rn.offset(-ri.startX,-ri.startY)),ri=At[2],Zn!==za){var wn=he.computeAngle(Tt,Zn,ri);Tt.Kb=wn}wn=Rn.x-y.x;var Yi=Rn.y-y.y;ft.free(Rn),Gn(At)}else if(Ot<-Ne||Ot>=Ne)At=ft.alloc(),he.vg(),he.computeMidPoint(At),ri=he.midAngle,Zn!==za&&(wn=he.computeAngle(Tt,Zn,ri),Tt.Kb=wn),wn=At.x-y.x,Yi=At.y-y.y,ft.free(At);else{if(wn=0,0<=Ot?(Yi=Ee.M(Ot),At=Ot<Ne-1?Ee.M(Ot+1):Yi):(wn=Ne+Ot,Yi=Ee.M(wn),At=0<wn?Ee.M(wn-1):Yi),Yi.Xa(At)){0<=Ot?(ri=0<Ot?Ee.M(Ot-1):Yi,wn=Ot<Ne-2?Ee.M(Ot+2):At):(ri=wn<Ne-1?Ee.M(wn+1):Yi,wn=1<wn?Ee.M(wn-2):At),Rn=ri.Bf(Yi);var zi=At.Bf(wn);ri=Rn>zi+10?0<=Ot?ri.ab(Yi):Yi.ab(ri):zi>Rn+10?0<=Ot?At.ab(wn):wn.ab(At):0<=Ot?ri.ab(wn):wn.ab(ri)}else ri=0<=Ot?Yi.ab(At):At.ab(Yi);Zn!==za&&(wn=he.computeAngle(Tt,Zn,ri),Tt.Kb=wn),wn=Yi.x+(At.x-Yi.x)*Gt-y.x,Yi=Yi.y+(At.y-Yi.y)*Gt-y.y}Tt.measure(1/0,1/0,0,0),At=Tt.measuredBounds,Rn=Tt.naturalBounds;var Wr=0;Tt instanceof ir&&(Wr=Tt.strokeWidth),zi=Rn.width+Wr;var _o=Rn.height+Wr;$e.reset(),$e.translate(-At.x,-At.y),$e.scale(Tt.scale,Tt.scale),$e.rotate(Zn===za?Tt.angle:ri,zi/2,_o/2),Zn!==dg&&Zn!==pg||$e.rotate(90,zi/2,_o/2),Zn!==fg&&Zn!==gg||$e.rotate(-90,zi/2,_o/2),Zn===n0&&(45<ri&&135>ri||225<ri&&315>ri)&&$e.rotate(-ri,zi/2,_o/2),Rn=new rn(0,0,zi,_o),st.xi(Rn,en),$e.Ga(st),en=-st.x+Wr/2*Tt.scale,Tt=-st.y+Wr/2*Tt.scale,Et.assign(ui),Wr=isNaN(ui.x);var Bs=isNaN(ui.y);if(Wr||Bs){zi=zi/2+3,_o=_o/2+3;var Zs=45<=ri&&135>=ri,Ma=225<=ri&&315>=ri;Zn===za&&(Zs||Ma)?(Et.x=Bs?zi:ui.y,Et.y=Wr?_o:ui.x,Zs?0<=Ot||isNaN(Ot)&&.5>Gt||!Wr||(Et.y=-_o):Ma&&((0<=Ot||isNaN(Ot)&&.5>Gt)&&Wr&&(Et.y=-_o),Bs&&(Et.x=-zi))):(Wr&&(Et.x=0<=Ot||isNaN(Ot)&&.5>Gt?zi:-zi),Bs&&(Et.y=-_o),Et.rotate(ri))}else Et.rotate(ri);wn+=Et.x,Yi+=Et.y,Rn.set(At),Rn.h(wn+en,Yi+Tt,At.width,At.height),Ye.push(Rn),x.ed(Rn)}}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),Kr(E,x.width||0,x.height||0),Fi.free($e),ft.free(st),ft.free(Et)}}}},Em.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Br||a instanceof Fn){var b=a,E=null;a instanceof Br&&(E=a,b=E.adornedPart);var te=a instanceof Br?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,$e=Un();Ye.Qu(he,$e);var st=ft.allocAt($e[0],$e[1]);st.add(Ne.i(0)),Ye.type===In.j||(Ye=Ye.figures.first()),st.offset(-Ye.startX,-Ye.startY),Ye=$e[2],_e!==za&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=st.x;var Et=st.y;ft.free(st),Gn($e)}else if(se<-x||se>=x)$e=ft.alloc(),Ye=Ne,Et=$e,Ye.vg(),Ye.computeMidPoint(Et),Ye=Ne.midAngle,_e!==za&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=$e.x,Et=$e.y,ft.free($e);else{if(st=0,0<=se?($e=y.s[se],Et=se<x-1?y.s[se+1]:$e):(st=x+se,$e=y.s[st],Et=0<st?y.s[st-1]:$e),$e.Xa(Et)){0<=se?(Ye=0<se?y.s[se-1]:$e,st=se<x-2?y.s[se+2]:Et):(Ye=st<x-1?y.s[st+1]:$e,st=1<st?y.s[st-2]:Et);var St=Ye.Bf($e),Tt=Et.Bf(st);Ye=St>Tt+10?0<=se?Ye.ab($e):$e.ab(Ye):Tt>St+10?0<=se?Et.ab(st):st.ab(Et):0<=se?Ye.ab(st):st.ab(Ye)}else Ye=0<=se?$e.ab(Et):Et.ab($e);_e!==za&&(Ne=Ne.computeAngle(ne,_e,Ye),ne.angle=Ne),Ne=$e.x+(Et.x-$e.x)*he,Et=$e.y+(Et.y-$e.y)*he}if(Ge.ys())ne.location=new ft(Ne,Et);else{Ge.Mc()&&(Ge=tr),$e=Fi.alloc(),$e.reset(),$e.scale(ne.scale,ne.scale),$e.rotate(ne.angle,0,0);var At=ne.naturalBounds;st=rn.allocAt(0,0,At.width,At.height),St=ft.alloc(),St.xi(st,Ge),$e.Ga(St),Ge=-St.x,Tt=-St.y;var Ot=At.width,Gt=At.height;At=ft.alloc(),At.assign(Ee);var en=isNaN(Ee.x),Zn=isNaN(Ee.y);if(en||Zn){Ot=Ot/2+3,Gt=Gt/2+3;var ui=45<=Ye&&135>=Ye,ri=225<=Ye&&315>=Ye;_e===za&&(ui||ri)?(At.x=Zn?Ot:Ee.y,At.y=en?Gt:Ee.x,ui?0<=se||isNaN(se)&&.5>he||!en||(At.y=-Gt):ri&&((0<=se||isNaN(se)&&.5>he)&&en&&(At.y=-Gt),Zn&&(At.x=-Ot))):(en&&(At.x=0<=se||isNaN(se)&&.5>he?Ot:-Ot),Zn&&(At.y=-Gt),At.rotate(Ye))}else At.rotate(Ye);Ne+=At.x,Et+=At.y,$e.pp(st),Ge+=st.x,Tt+=st.y,se=ft.allocAt(Ne+Ge,Et+Tt),ne.move(se),ft.free(se),ft.free(At),ft.free(St),rn.free(st),Fi.free($e)}}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(kl(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Br&&a.type===Dn.Link&&a.adornedObject instanceof ir&&(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 Br&&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),Cs(b,!1)}}function eg(){this.xa="Base"}Je(eg,ks),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 rn(-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,$e=se.strokeWidth,st=Ye.flattenedSegments,Et=Ye.flattenedLengths,St=Ye.flattenedTotalLength,Tt=st.length,At=0,Ot=0,Gt=Un(),en=0;en<Tt;en++){var Zn=st[en],ui=[];Ot=At=0;for(var ri=Zn.length,Rn=0;Rn<ri;Rn+=2){var wn=Zn[Rn],Yi=Zn[Rn+1];if(Rn!==0){var zi=180*Math.atan2(Yi-Ot,wn-At)/Math.PI;0>zi&&(zi+=360),ui.push(zi)}At=wn,Ot=Yi}Gt.push(ui)}if(a.graduatedIntervals===null){for(var Wr=[],_o=a.O.s,Bs=_o.length,Zs=0;Zs<Bs;Zs++){var Ma=_o[Zs],js=[];if(Wr.push(js),Ma.visible){var lc=Ma.interval;if(!(0>lc)){for(var ys=0;ys<Bs;ys++)if(ys!==Zs){var Fu=_o[ys];if(Fu.visible&&Ma.constructor===Fu.constructor){var ka=Fu.interval;ka>lc&&js.push(ka)}}}}}a.graduatedIntervals=Wr}var uc=a.graduatedIntervals,Dl=a.O.s,ou=Dl.length,Sl=0,ul=0,Zc=St;a.graduatedMarks=[];for(var Bu,ap=0;ap<ou;ap++){var xl=Dl[ap];if(Bu=[],xl.visible&&xl!==se){var Ta=Math.abs(xl.interval),jg=a.graduatedTickUnit;if(!(2>jg*Ta*St/a.graduatedRange&&xl.graduatedSkip===null)){var af=Et[0][0],Ju=0,hl=0;ul=St*xl.graduatedStart-1e-4,Zc=St*xl.graduatedEnd+1e-4;var bd=jg*Ta,wl=a.graduatedTickBase;if(wl<a.graduatedMin){var Vc=(a.graduatedMin-wl)/bd;Vc=Vc%1===0?Vc:Math.floor(Vc+1),wl+=Vc*bd}else wl>a.graduatedMin+bd&&(wl-=Math.floor((wl-a.graduatedMin)/bd)*bd);for(var W0=uc[ap],zg=wl,Uy=1e-6*a.graduatedMax,wh=1;wl<=a.graduatedMax+Uy;wh++){e:{for(var Fh=W0.length,lf=0;lf<Fh;lf++){var Kc=(wl-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&&(wl>a.graduatedMax&&(wl=a.graduatedMax),xl.graduatedSkip===null||xl instanceof Lo&&!xl.graduatedSkip(wl,xl)||xl instanceof ir&&!xl.graduatedSkip(wl,xl))&&(Sl=(wl-a.graduatedMin)*St/a.graduatedRange,Sl>St&&(Sl=St),ul<=Sl&&Sl<=Zc)){for(var _h=Gt[Ju][hl],hc=Et[Ju][hl];Ju<Et.length;){for(;Sl>af&&hl<Et[Ju].length-1;)hl++,_h=Gt[Ju][hl],hc=Et[Ju][hl],af+=hc;if(Sl<=af)break;Ju++,hl=0,_h=Gt[Ju][hl],hc=Et[Ju][hl],af+=hc}var cl=st[Ju],qu=cl[2*hl],Z0=cl[2*hl+1],Bh=(Sl-(af-hc))/hc,up=new ft(qu+(cl[2*hl+2]-qu)*Bh+$e/2-Ye.bounds.x,Z0+(cl[2*hl+3]-Z0)*Bh+$e/2-Ye.bounds.y);up.scale(se.scale,se.scale);e:{var ju=_h,Pd=Gt[Ju];if(!(.5005>Bh&&.4995<Bh)){var Qu=ju;if(.5>Bh?0<hl?Qu=Pd[hl-1]:Zt.$(cl[0],cl[cl.length-2])&&Zt.$(cl[1],cl[cl.length-1])&&(Qu=Pd[Pd.length-1]):.5<Bh&&(hl+1<Pd.length?Qu=Pd[hl+1]:Zt.$(cl[0],cl[cl.length-2])&&Zt.$(cl[1],cl[cl.length-1])&&(Qu=Pd[0])),ju!==Qu){var uf=Math.abs(ju-Qu);if(180<uf&&(ju<Qu?ju+=360:Qu+=360,uf=Math.abs(ju-Qu)),5e-4>Bh||.9995<Bh){_h=(ju+Qu)/2%360;break e}if(10>uf){var hp=1-Math.abs(.5-Bh);_h=(ju*hp+Qu*(1-hp))%360;break e}}}_h=ju}if(xl instanceof Lo){var _u="";xl.graduatedFunction!==null?(_u=xl.graduatedFunction(wl,xl),_u=_u!=null?_u.toString():""):_u=(+wl.toFixed(2)).toString(),_u!==""&&Bu.push({$l:up,angle:_h,text:_u})}else Bu.push({$l:up,angle:_h})}wl=zg+wh*bd}}}a.graduatedMarks.push(Bu)}Gn(Gt);var ra=a.graduatedMarks;if(ra!==null)for(var Ug=b.length,Za=0;Za<Ug;Za++){var Ss=b[Za],Va=ra[Za];if(Ss.visible&&Ss!==se&&Va.length!==0){if(Ss instanceof ir){var jh=a,cc=E,Cd=Ss.alignmentFocus;Cd.Mc()&&(Cd=jr);var Hy=Ss.angle;Ss.Kb=0,Ss.measure(1/0,1/0,0,0),Ss.Kb=Hy;var V0=Ss.measuredBounds,cp=V0.width,Ed=V0.height,hf=rn.allocAt(0,0,cp,Ed),dl=ft.alloc();dl.xi(hf,Cd),rn.free(hf);for(var zh=-dl.x,zu=-dl.y,Vl=new rn,Xc=Va.length,dp=0;dp<Xc;dp++)for(var Jc=Va[dp],K0=Jc.$l.x,fp=Jc.$l.y,as=Jc.angle,bu=0;4>bu;bu++){switch(bu){case 0:dl.h(zh,zu);break;case 1:dl.h(zh+cp,zu);break;case 2:dl.h(zh,zu+Ed);break;case 3:dl.h(zh+cp,zu+Ed)}dl.rotate(as+Ss.angle),dl.offset(K0,fp),dp===0&&bu===0?Vl.h(dl.x,dl.y,0,0):Vl.Ye(dl),dl.offset(-K0,-fp),dl.rotate(-as-Ss.angle)}ft.free(dl),jh.graduatedBounds!==null&&jh.graduatedBounds.push(Vl),Er(cc,Vl.x,Vl.y,Vl.width,Vl.height)}else if(Ss instanceof Lo){var su=a,Y0=E;su.temporaryTextBlock===null&&(su.temporaryTextBlock=new Lo);var _l=su.temporaryTextBlock;S1(_l,Ss);var dc=Ss.alignmentFocus;dc.Mc()&&(dc=jr);for(var au=Ss.segmentOrientation,pp=Ss.segmentOffset,qc=new rn,Hg=0,gp=0,$u=0,Ld=0,Qc=0,mp=Va.length,fc=0;fc<mp;fc++){var bh=Va[fc];Hg=bh.$l.x,gp=bh.$l.y,$u=bh.angle,Qc=Ld=Ss.angle,au!==za&&(Qc=au===cg||au===t0?$u+Ss.angle:$u,Ld=Fn.computeAngle(au,Qc)),_l.Kb=Ld,_l.text=bh.text||"",_l.measure(1/0,1/0,0,0);var pc=_l.measuredBounds,Uh=_l.naturalBounds,gc=Uh.width,Md=Uh.height,Uu=Fi.alloc();Uu.reset(),Uu.translate(-pc.x,-pc.y),Uu.scale(_l.scale,_l.scale),Uu.rotate(Qc,gc/2,Md/2),au!==dg&&au!==pg||Uu.rotate(90,gc/2,Md/2),au!==fg&&au!==gg||Uu.rotate(-90,gc/2,Md/2),au===n0&&(45<$u&&135>$u||225<$u&&315>$u)&&Uu.rotate(-$u,gc/2,Md/2);var cf=rn.allocAt(0,0,gc,Md),mc=ft.alloc();mc.xi(cf,dc),Uu.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 rn(Hg,gp,pc.width,pc.height),Gg=new rn(pc.x,pc.y,pc.width,pc.height),Wy=new rn(Uh.x,Uh.y,Uh.width,Uh.height);bh.Sz=Ld,bh.lineCount=_l.lineCount,bh.lines=[_l.Cb,_l.Ih,_l.df,_l.Le,_l.Qc,_l.Qb,_l.ze],bh.actualBounds=kd,bh.measuredBounds=Gg,bh.naturalBounds=Wy,fc===0?qc.assign(kd):qc.ed(kd),ft.free(Hh),ft.free(mc),rn.free(cf),Fi.free(Uu)}su.graduatedBounds!==null&&su.graduatedBounds.push(qc),Er(Y0,qc.x,qc.y,qc.width,qc.height)}Cs(Ss,!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 ml,y.save(),y.beginPath(),y.rect(-1,-1,te+1,ne+1),y.clip(),y.Se(),te=a.Pb(),te.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var se=te.actualBounds,he=a.O.s,_e=a.graduatedMarks,Ee=he.length,Ne=0;Ne<Ee;Ne++){var Ge=he[Ne],Ye=_e[Ne],$e=Ye.length;if(Ge.visible&&Ge!==te&&Ye.length!==0){if(Ge instanceof ir){if(!(2>a.graduatedTickUnit*Ge.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ge.graduatedSkip===null)){var st=Ge.measuredBounds,Et=Ge.strokeWidth*Ge.scale,St=Ge.alignmentFocus;St.Mc()&&(St=jr);for(var Tt=0;Tt<$e;Tt++){var At=Ye[Tt].$l,Ot=Ye[Tt].angle,Gt=St,en=Ge.Ab;en.reset(),en.translate(At.x+se.x,At.y+se.y),en.rotate(Ot+Ge.angle,0,0),en.translate(-st.width*Gt.x+Gt.offsetX+Et/2,-st.height*Gt.y+Gt.offsetY+Et/2),en.scale(Ge.scale,Ge.scale),eu(Ge,!1),Ge.wh.set(Ge.Ab),Ge.Kk=Ge.scale,jl(Ge,!1),Ge.gc(y,x),E&&(a.svg.appendChild(Ge.svg),Ge.svg=null),Ge.Ab.reset()}}}else if(Ge instanceof Lo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Lo),st=a.temporaryTextBlock,S1(st,Ge),Et=0;Et<$e;Et++)St=Ye[Et],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,Ot=st.Ab,Ot.reset(),Ot.translate(Tt.x+se.x,Tt.y+se.y),Ot.translate(-At.x,-At.y),st.no(Ot,St.x,St.y,St.width,St.height),eu(st,!1),st.wh.set(st.Ab),st.Kk=st.scale,jl(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 Dn(a,y){if(Wt.call(this),this.na=null,a===void 0)this.na=Dn.Position;else if(typeof a=="string"){var x=mu.I(a);x!==null&&(this.na=x)}else a instanceof ks?this.na=a:a&&(this.na=Dn.Position,y=a);this.na===null&&wt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Dn.Grid?1048576:0),this.O=new Mn,this.yb=zs,this.Tm=As,this.Uf=Qi,this.$g=null,this.$e="",this.jg=new rn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=fi,this.jn=Zr,this.kn=Wn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Je(Dn,Wt),Dn.prototype.cloneProtected=function(a){Wt.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},Dn.prototype.Af=function(a){Wt.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},Dn.prototype.copy=function(){var a=Wt.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(es,"elements",a,null,E,null,ne)}}return a}return null},et=Dn.prototype,et.toString=function(){return"Panel("+this.type.name+")#"+mr(this)},et.Pn=function(a){Wt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},et.hh=function(a,y){if(this.na===Dn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Dn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Dn.Table)if(a.yc(),a instanceof ml){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===Dn.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(),$e=Ne.separatorStrokeWidth;isNaN($e)&&($e=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var st=Ne.separatorStroke;st===null&&(st=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(st===null||Ne.index===(x?he:_e))&&($e=0),Ye-=$e,$e=Ne.position+$e,Ye+=Ne.actual,$e+Ye>Ge&&(Ye=Ge-$e),0>=Ye||(Ge=a.yb,os(a,y,Ne.background,!0,!1,se,ne),x?y.fillRect(Ge.left,$e+Ge.top,ne.width-(Ge.left+Ge.right),Ye):y.fillRect($e+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"}et.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},et.kk=function(a,y,x){if(!Wt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Dn.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===Dn.Grid||this.na===Dn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},et.nk=function(){return!0},et.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,te=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var se=y[ne].actualBounds;E=ne===0?se.x:Math.min(se.x,E),te=ne===0?se.y:Math.min(se.y,te)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-te)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Wt.prototype.$o.call(this,a,y,x,b)},et.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,se=1/(ne.m11*ne.m22-ne.m12*ne.m21),he=ne.m22*se,_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,Zt.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=Zt.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 $e=null,st=this.isClipping&&this.na===Dn.Spot;st&&($e=ft.alloc(),Ge=this.Pb(),(_e=Ge.Sj(se,a,he,x,$e))&&(y=(se-$e.x)*(se-$e.x)+(a-$e.y)*(a-$e.y)));for(var Et=0;Et<Ye;Et++){var St=Ne[Et];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($e),ft.free($e)),ft.free(Ee),te&&E.transform(ne),_e},et.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Wt.prototype.Gj.call(this)},et.v=function(a){if(!kl(this)){Wt.prototype.v.call(this,a),a=null,(this.na===Dn.Auto||this.na===Dn.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=qa(E,!1);(E instanceof ja||E instanceof Dn||E instanceof Lo||te!==Ln)&&E.v(!0)}}}},et.Uj=function(){if(!kl(this)){Cs(this,!0),hh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},et.Uk=function(){if(!(this.l&2048)){eu(this,!0),jl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},et.Wu=function(){jl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},et.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var te=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var se=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,se.width)),isNaN(te.height)||(y=Math.min(te.height,se.height)),a=Math.max(x,a),y=Math.max(b,y);var he=this.yb;a=Math.max(a-he.left-he.right,0),y=Math.max(y-he.top-he.bottom,0);var _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),Kr(E,a,he),Kr(this.naturalBounds,a,he),this.Ge(0,0,a,he)},et.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function Oh(a){return a.part!==null?a.part.locationObject:null}et.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=qa(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=Ln),a){case Ln:(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 Si:this.v(!0),this.measure(x+se,te+ne,0,0);break;case Ni:this.v(!0),this.measure(y+se,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},et.gh=function(a){var y=this.naturalBounds,x=Oh(this);if(no(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)&&(Bn(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},et.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},et.qm=function(a,y){if(y(this,a),a instanceof Dn){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 Dn&&a1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Dn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}et.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Dn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=u1(a,y[E],x);if(te!==null)return te}}return null}et.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=tg(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Dn){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 Dn?x=Math.max(x,h1(E)):E instanceof ir&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}et.se=function(){return!(this.type===Dn.TableRow||this.type===Dn.TableColumn)};function Qh(a){return a.type===Dn.TableRow||a.type===Dn.TableColumn}et.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Fa(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:Bn(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),no(-(_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===Dn.Spot)?this.Pb():null,he&&(_e.se()?Bn(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()?Bn(se.set(a),Ge.transform):se.set(a),!he||Ge!==_e)){var Ye=null;if(Ge instanceof Dn?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=no(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||ft.free(ne),a)}return te||ft.free(ne),null},et.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,te=this.se(),ne=te?a:Bn(ft.allocAt(a.x,a.y),this.transform);if(E=no(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()?Bn(_e.set(a),Ne.transform):_e.set(a);var Ge=Ne;Ne=Ne instanceof Dn?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},et.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=Fi.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&Fi.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 Dn?Ee:null,Ge=Fi.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)),Fi.free(Ge))}}return te===void 0&&Fi.free(ne),b}return te===void 0&&Fi.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 Dn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}et.og=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,se=this.se(),he=se?a:Bn(ft.allocAt(a.x,a.y),this.transform),_e=se?y:Bn(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||Jn(he.x,he.y,0,0,0,ne.height)<=Ee||Jn(he.x,he.y,0,ne.height,ne.width,ne.height)<=Ee||Jn(he.x,he.y,ne.width,ne.height,ne.width,0)<=Ee||Jn(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 $e=Ge[Ye];if($e.visible||$e===Ee){var st=$e.actualBounds,Et=this.naturalBounds;(!se||!(st.x>Et.width||st.y>Et.height||0>st.x+st.width||0>st.y+st.height))&&($e.se()?(st=$e.transform,Bn(he.set(a),st),Bn(_e.set(y),st)):(he.set(a),_e.set(y)),st=$e,$e=$e instanceof Dn?$e:null,($e!==null?$e.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 ir&&(y=a.spot1,y===As&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Pr),y}function Sv(a){var y=null;return a instanceof ir&&(y=a.spot2,y===As&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=io),y}et.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},et.M=function(a){return this.O.M(a)},et.Gb=function(a,y){y instanceof Ei&&wt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&wt("Cannot make a Panel contain itself: "+this.toString()),wt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&wt("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!==Dn.Grid||y instanceof ir||wt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Dn.Graduated||y instanceof ir||y instanceof Lo||wt("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 on),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 wt("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),kl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Dn&&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(Jo,"elements",this,y,null,b,null),x.cb(es,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}et.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},et.mb=function(a){0<=a&&this.pc(a,!0)},et.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),Cs(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 Dn?b.qm(b,function(ne,se){Gv(te,se,y)}):Gv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(Jo,"elements",this,b,null,a,null))},et.Fb=function(a){0>a&&En(a,">= 0",Dn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Es;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(es,"rowdefs",this,null,x,null,a)}return y[a]},et.oA=function(a){if(0>a&&En(a,">= 0",Dn,"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(Jo,"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 Es?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Eb=function(a){0>a&&En(a,">= 0",Dn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Es;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(es,"coldefs",this,null,x,null,a)}return y[a]},et.jA=function(a){if(0>a&&En(a,">= 0",Dn,"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(Jo,"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 Es?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Tm(y,a),this},et.Hy=function(a,y){return(a=this.Fb(a))&&Tm(a,new Es(y)),this},et.By=function(a,y){return(a=this.Eb(a))&&Tm(a,new Es(y)),this},et.nz=function(a){if(0>a||this.type!==Dn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},et.fz=function(a){if(0>a||this.type!==Dn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},et.Fz=function(a,y){if(y===void 0&&(y=new ft(NaN,NaN)),this.type!==Dn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},et.Gz=function(a){if(this.type!==Dn.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 nu(a){var y=a.allBindings;if(y===null)a.data!==null&&wt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Mn;else if(y._isFrozen)return;var x=new Mn;xv(a,!1),a.qm(a,function(_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 Mn),Ye.srcBindings.add(Ge))),y.add(Ge)}if(Ee instanceof Dn&&Ee.type===Dn.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 $e=Ye.be.iterator;$e.next();){var st=$e.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();)$e=Ye.value,$e.xd=Ge,$e.to=1,$e.wl=Ge.index,y.add($e)}}});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 Mn),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,te=E.xd,te!==null){E.xd=null;var se=E.targetProperty,he=se.indexOf(".");0<he&&te instanceof Dn&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):bn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Es?(ne=mr(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof Wt?(ne=mr(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):wt("Unknown type of binding target: "+te)}y.freeze(),a instanceof Ei&&a.Zc()&&a.Va()}et.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Dn&&(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&&nu(y),y},et.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var te=this,ne=x.Ai;if(ne!==-1){if(te=this.ks(ne),te===null)continue}else x.xd!==null&&(te=x.xd);if(E==="/"?b=te.part:E==="."?b=te:E===".."&&(b=te.panel),E=x.to,E!==0){if(!(te instanceof Dn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},et.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Sx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,te=null;E<x&&(te=a[E],!(te instanceof Dn&&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 Dn)||te.data!==y[ne])return!0;E++,ne++}return!1}function tg(a){if(a.type===Dn.Spot||a.type===Dn.Auto)return Math.min(a.O.length,1);if(a.type===Dn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof ir&&b.isPanelMain))break}return x}return a.type===Dn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Dn&&Qh(a))?1:0}et.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 Dn){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),kl(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(nu(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 on),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 Dn){var E=y,te=x;b.type===Dn.TableRow?b.row=E:b.type===Dn.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=fs(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;wt("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,bn('No item template Panel found for category "'+y+'" on '+a),bn(" Using default item template."),a=new Dn,y=new Lo,y.bind(new vs("text","",Li)),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 Dn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Dn&&!te.isEnabled||km(a,te,x)}}}function Yu(a,y){y.name=a,mu.add(a,y)}nt.Object.defineProperties(Dn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Dn.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&&En(a,">= 0",Dn,"padding"),a=new $i(a)):(0>a.left&&En(a.left,">= 0",Dn,"padding:value.left"),0>a.right&&En(a.right,">= 0",Dn,"padding:value.right"),0>a.top&&En(a.top,">= 0",Dn,"padding:value.top"),0>a.bottom&&En(a.bottom,">= 0",Dn,"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:zs},set:function(a){typeof a=="number"&&(a=new $i(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Hl),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 oo)&&(a instanceof oo&&a.freeze(),this.T===null&&(this.T=new Hl),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 Hl),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)||wt("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 Hl),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 oo)&&(a instanceof oo&&a.freeze(),this.T===null&&(this.T=new Hl),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 Hl),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)||wt("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 Hl),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 Hl),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||wt("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()||wt("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),la(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),la(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 Hl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Hl),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 Hl),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 Hl),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)&&wt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Hl),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)&&wt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Hl),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 Ei&&!(this instanceof Br);nu(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 Ei&&(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 on}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ei||a.isPanelMain)&&wt("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(););ar(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&&(ar(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 Xi&&(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(Dn,{Position:{get:function(){return mu.I("Position")}},Horizontal:{get:function(){return mu.I("Horizontal")}},Vertical:{get:function(){return mu.I("Vertical")}},Spot:{get:function(){return mu.I("Spot")}},Auto:{get:function(){return mu.I("Auto")}},Table:{get:function(){return mu.I("Table")}},Viewbox:{get:function(){return mu.I("Viewbox")}},TableRow:{get:function(){return mu.I("TableRow")}},TableColumn:{get:function(){return mu.I("TableColumn")}},Link:{get:function(){return mu.I("Link")}},Grid:{get:function(){return mu.I("Grid")}},Graduated:{get:function(){return mu.I("Graduated")}}}),Dn.prototype.rebuildItemElements=Dn.prototype.mv,Dn.prototype.findItemPanelForData=Dn.prototype.sx,Dn.prototype.updateTargetBindings=Dn.prototype.La,Dn.prototype.copyTemplate=Dn.prototype.Uy,Dn.prototype.graduatedValueForPoint=Dn.prototype.Gz,Dn.prototype.graduatedPointForValue=Dn.prototype.Fz,Dn.prototype.findColumnForLocalX=Dn.prototype.fz,Dn.prototype.findRowForLocalY=Dn.prototype.nz,Dn.prototype.addColumnDefinition=Dn.prototype.By,Dn.prototype.addRowDefinition=Dn.prototype.Hy,Dn.prototype.addRowColumnDefinition=Dn.prototype.Gy,Dn.prototype.removeColumnDefinition=Dn.prototype.jA,Dn.prototype.getColumnDefinition=Dn.prototype.Eb,Dn.prototype.removeRowDefinition=Dn.prototype.oA,Dn.prototype.getRowDefinition=Dn.prototype.Fb,Dn.prototype.removeAt=Dn.prototype.mb,Dn.prototype.remove=Dn.prototype.remove,Dn.prototype.insertAt=Dn.prototype.Gb,Dn.prototype.elt=Dn.prototype.M,Dn.prototype.add=Dn.prototype.add,Dn.prototype.findObject=Dn.prototype.fb,Dn.prototype.findInVisualTree=Dn.prototype.Nl,Dn.prototype.walkVisualTreeFrom=Dn.prototype.qm,Dn.prototype.findMainElement=Dn.prototype.Pb;var g1=!1,m1=null,mu=new on;Dn.className="Panel",Dn.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 Hl(){this.Pc=[],this.Oc=[],this.j=this.ob=Nm,this.hb=this.Hb=0,this.Qp=zs,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Hl.prototype.copy=function(a){for(var y=new Hl,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},Hl.className="TablePanelSettings";function Es(a){Ri(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=As,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Pv,this.hg=Qi,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))}Es.prototype.copy=function(){var a=new Es;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=yn(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=yn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}et=Es.prototype,et.qb=function(a){a.classType===Es&&(this.sizing=a)},et.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+mr(this)},et.wi=function(a){this.Me=a},et.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},et.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Dn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,te=0;te<E;te++){var ne=b?y.rowDefs[te]:y.colDefs[te];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},et.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Ro,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Am(a){if(a.sizing===Pv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new vs(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&wt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Mn),this.be.add(E),this},nt.Object.defineProperties(Es.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&&En(a,">= 0",Es,"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&&En(a,">= 0",Es,"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))&&En(a,">= 0",Es,"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&&En(a,">= 0",Es,"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 $i(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 oo&&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)||wt("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 oo&&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}}}),Es.prototype.computeEffectiveSpacing=Es.prototype.Wc,Es.prototype.computeEffectiveSpacingTop=Es.prototype.Io;var Pv=new xn(Es,"Default",0),ng=new xn(Es,"None",1),Nm=new xn(Es,"ProportionalExtra",2);Es.className="RowColumnDefinition",Es.Default=Pv,Es.None=ng,Es.ProportionalExtra=Nm;function ir(a,y){Wt.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)}Je(ir,Wt),ir.prototype.cloneProtected=function(a){Wt.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=yn(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())}et=ir.prototype,et.th=function(){Wt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},et.qb=function(a){a===Ln||a===fi||a===Lr||a===Qi?this.geometryStretch=a:Wt.prototype.qb.call(this,a)},et.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+mr(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,$e,st=0,Et=Un(),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),$e=Math.sqrt(Ne*Ne+se*se),Et.push([Ne,Ye,Ge,$e]),st+=$e,se=_e,he=Ee;se=x[0],he=x[1],Ne=b.measuredBounds.width,b instanceof ir&&(Ne-=b.strokeWidth),1>Ne&&(Ne=1),E=x=Ne,_e=ne/2,Ee=_e!==0,St=0,$e=Et[St],Ne=$e[0],Ye=$e[1],Ge=$e[2],$e=$e[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(Et);return}E>$e?(Tt=E-$e,E=$e):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,$e-=E,Tt!==0){if(St++,St===Et.length){Gn(Et);return}$e=Et[St],Ne=$e[0],Ye=$e[1],Ge=$e[2],$e=$e[3],E=Tt}}Gn(Et)}}et.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var te=this.actualBounds,ne=this.naturalBounds;b!==null&&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===Dn.Link&&se instanceof Br&&se.category==="Selection"&&se.adornedObject instanceof ir&&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===In.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===In.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===In.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+Zt.wg*E,he-Ge,_e+E,he-Zt.wg*Ge,_e+E,he),a.bezierCurveTo(_e+E,he+Zt.wg*Ge,_e+Zt.wg*E,he+Ge,_e,he+Ge),a.bezierCurveTo(_e-Zt.wg*E,he+Ge,_e-E,he+Zt.wg*Ge,_e-E,he),a.bezierCurveTo(_e-E,he-Zt.wg*Ge,_e-Zt.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===In.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,$e=0;$e<Ne;$e++){var st=Ee[$e];switch(st.type){case ms:a.moveTo(st.endX,st.endY);break;case ro:a.lineTo(st.endX,st.endY);break;case bs:a.bezierCurveTo(st.point1X,st.point1Y,st.point2X,st.point2Y,st.endX,st.endY);break;case Da:a.quadraticCurveTo(st.point1X,st.point1Y,st.endX,st.endY);break;case Xo:if(st.radiusX===st.radiusY){var Et=Math.PI/180;a.arc(st.point1X,st.point1Y,st.radiusX,st.startAngle*Et,(st.startAngle+st.sweepAngle)*Et,0>st.sweepAngle,Ye!==null?Ye.endX:_e.startX,Ye!==null?Ye.endY:_e.startY)}else if(Ye=va(st,_e),Et=Ye.length,Et===0)a.lineTo(st.centerX,st.centerY);else for(var St=0;St<Et;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 Ka:if(St=Et=0,Ye!==null&&Ye.type===Xo){if(Ye=va(Ye,_e),Tt=Ye.length,Tt===0){a.lineTo(st.endX,st.endY);break}Ye=Ye[Tt-1]||null,Ye!==null&&(Et=Ye[6],St=Ye[7])}else Et=Ye!==null?Ye.endX:_e.startX,St=Ye!==null?Ye.endY:_e.startY;if(Ye=Is(st,_e,Et,St),Et=Ye.length,Et===0){a.lineTo(st.endX,st.endY);break}for(St=0;St<Et;St++)Tt=Ye[St],a.bezierCurveTo(Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7]);break;default:wt("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=Un(),te.type===In.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===In.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($e=_e[Ne],$e.type){case ms:jf(a,y,b,x),b.length=0,b.push($e.endX),b.push($e.endY),ne=$e.endX,E=$e.endY,he=ne,Ge=E;break;case ro:b.push($e.endX),b.push($e.endY),ne=$e.endX,E=$e.endY;break;case bs:Zt.Qe(ne,E,$e.point1X,$e.point1Y,$e.point2X,$e.point2Y,$e.endX,$e.endY,.5,b),ne=$e.endX,E=$e.endY;break;case Da:Zt.ep(ne,E,$e.point1X,$e.point1Y,$e.endX,$e.endY,.5,b),ne=$e.endX,E=$e.endY;break;case Xo:if(st=va($e,se),Ye=st.length,Ye===0){b.push($e.centerX),b.push($e.centerY),ne=$e.centerX,E=$e.centerY;break}for(Et=0;Et<Ye;Et++)St=st[Et],Zt.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 Ka:if(st=Is($e,se,ne,E),Ye=st.length,Ye===0){b.push($e.endX),b.push($e.endY),ne=$e.endX,E=$e.endY;break}for(Et=0;Et<Ye;Et++)St=st[Et],Zt.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:wt("Segment not of valid type: "+$e.type)}$e.isClosed&&(b.push(he),b.push(Ge),jf(a,y,b,x))}jf(a,y,b,x)}else if(te.type===In.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===In.F){if(E=new gs,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Fr(Xo),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(te.startX+te.endX)/2,ne.centerY=(te.startY+te.endY)/2,ne.radiusX=Math.abs(te.startX-te.endX)/2,ne.radiusY=Math.abs(te.startY-te.endY)/2,E.add(ne),te=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],Zt.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)}}}},et.kk=function(a,y,x){return!Wt.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},et.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Wt.prototype.nk.call(this,a)},et.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},et.ga=function(a,y){if(y===void 0&&(y=new ft),a instanceof li){a.Mc()&&wt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},et.mi=function(a){a===void 0&&(a=new rn);var y=this.naturalBounds,x=this.oe;y=rn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=ft.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),Er(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),Er(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),Er(a,b.x,b.y,0,0),rn.free(y),ft.free(b),a},et.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==In.j||y||(E+=2);var te=rn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return rn.free(te),!1;if(b=E+1e-4,x.type===In.j)return this.stroke===null||(b=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(rn.free(te),Zt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===In.u){y=x.startX;var ne=x.startY,se=x.endX;if(x=x.endY,te.x=Math.min(y,se),te.y=Math.min(ne,x),te.width=Math.abs(se-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return rn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),rn.free(te),a}if(x.type===In.F){ne=x.startX,E=x.startY,se=x.endX;var he=x.endY;if(x=Math.min(ne,se),y=Math.min(E,he),ne=Math.abs(se-ne)/2,E=Math.abs(he-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return rn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),rn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===In.o)return rn.free(te),this.fill===null?rl(x,a.x,a.y,E):Ns(x,a,E,1<this.strokeWidth,y);wt("Unknown Geometry type: "+x.type)},et.Wl=function(a,y,x,b){var E=this.desiredSize,te=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var se=this.figure,he=Ev[se];if(he===void 0){var _e=Zt.Ze[se];typeof _e=="string"&&(_e=Zt.Ze[_e]),typeof _e=="function"?(he=_e(null,100,100),Ev[se]=he):wt("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,_e=ne.width;var Ee=ne.height;switch(qa(this,!0)){case Ln:b=x=0;break;case Tn:_e=Math.max(a-te,0),Ee=Math.max(y-te,0);break;case Si:_e=Math.max(a-te,0),b=0;break;case Ni: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 Ln: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:wt(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&&Zt.$(this.ua.Sk,a-te)&&Zt.$(this.ua.Rk,y-te)||(this.ua=ir.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===Qi?Tn:y:y===Qi?Ev[a.figure].defaultStretch:y}et.eh=function(a,y,x,b){La(this,a,y,x,b)},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,_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===In.j)if(1.5>=this.strokeWidth)Ee=Zt.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=Un(),a=new ft,Zt.Ve(_e.startX+b,_e.startY+Ee,_e.endX+b,_e.endY+Ee,te,ne,se,he,a)&&y.push(a),a=new ft,Zt.Ve(_e.startX-b,_e.startY-Ee,_e.endX-b,_e.endY-Ee,te,ne,se,he,a)&&y.push(a),a=new ft,Zt.Ve(_e.startX+b,_e.startY+Ee,_e.startX-b,_e.startY-Ee,te,ne,se,he,a)&&y.push(a),a=new ft,Zt.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===In.u)Ee=Zt.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===In.F){y=rn.allocAt(Ye.x,Ye.y,Ye.width,Ye.height).Bc(Ne,Ne);e:if(y.width===0)Ee=Zt.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)Ee=Zt.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}rn.free(y)}else if(_e.type===In.o){Ge=ft.alloc();var $e=se-te,st=he-ne,Et=$e*$e+st*st,St=te,Tt=ne;if(0<Et&&Ye.contains(St,Tt)&&(Ge.x=St,Ge.y=Tt,this.ca(Ge)))for($e!==0&&.5>Math.abs($e)?(st*=.5/$e,$e=.5):st!==0&&.5>Math.abs(st)&&($e*=.5/st,st=.5),St-=$e,Tt-=st;Ye.contains(St,Tt);)St-=$e,Tt-=st;for(E.x=se,E.y=he,st=0;st<_e.figures.count;st++){var At=_e.figures.s[st],Ot=At.isFilled?St:te,Gt=At.isFilled?Tt:ne,en=At.segments;Ye=At.startX,$e=At.startY;for(var Zn=Ye,ui=$e,ri=0;ri<en.count;ri++){var Rn=en.s[ri],wn=Rn.type,Yi=Rn.endX,zi=Rn.endY,Wr=!1;switch(wn){case ms:Zn=Yi,ui=zi;break;case ro:Wr=Om(Ye,$e,Yi,zi,Ot,Gt,se,he,Ge);break;case bs:Wr=Zt.Eo(Ye,$e,Rn.point1X,Rn.point1Y,Rn.point2X,Rn.point2Y,Yi,zi,Ot,Gt,se,he,.6,Ge);break;case Da:Wr=Zt.Eo(Ye,$e,Ye+2/3*(Rn.point1X-Ye),$e+2/3*(Rn.point1Y-$e),Yi+2/3*(Rn.point1X-Yi),zi+2/3*(Rn.point1Y-zi),Yi,zi,Ot,Gt,se,he,.6,Ge);break;case Xo:case Ka:wn=Rn.type===Xo?va(Rn,At):Is(Rn,At,Ye,$e);var _o=wn.length;if(_o===0){Wr=Om(Ye,$e,Rn.type===Xo?Rn.centerX:Rn.endX,Rn.type===Xo?Rn.centerY:Rn.endY,Ot,Gt,se,he,Ge);break}for(zi=null,Yi=0;Yi<_o;Yi++){if(zi=wn[Yi],Yi===0&&Om(Ye,$e,zi[0],zi[1],Ot,Gt,se,he,Ge)){var Bs=Dm(Ot,Gt,Ge,Et,E);Bs<Et&&(Et=Bs,Ee=!0)}Zt.Eo(zi[0],zi[1],zi[2],zi[3],zi[4],zi[5],zi[6],zi[7],Ot,Gt,se,he,.6,Ge)&&(Bs=Dm(Ot,Gt,Ge,Et,E),Bs<Et&&(Et=Bs,Ee=!0))}Yi=zi[6],zi=zi[7];break;default:wt("Unknown Segment type: "+wn)}Ye=Yi,$e=zi,Wr&&(Wr=Dm(Ot,Gt,Ge,Et,E),Wr<Et&&(Et=Wr,Ee=!0)),Rn.isClosed&&(Yi=Zn,zi=ui,Om(Ye,$e,Yi,zi,Ot,Gt,se,he,Ge)&&(Rn=Dm(Ot,Gt,Ge,Et,E),Rn<Et&&(Et=Rn,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 wt("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(Zt.$(a,x)&&Zt.$(y,b)||Zt.$(E,ne)&&Zt.$(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||Zt.$(he.y,a))&&(he.y<y||Zt.$(he.y,y))&&(_e=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||Zt.$(he.x,y))&&(he.x<a||Zt.$(he.x,a))&&(_e=!0)),_e)}et.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var b=this.strokeWidth/2,E=!1,te=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},et.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Fi.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),Fi.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)}et.tx=function(a,y,x){function b(Et,St){for(var Tt=Et.length,At=0;At<Tt;At+=2)if(St.zd(Et[At],Et[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,Ti(a.x,a.y,se,he)<=E&&Ti(a.x,a.y,_e,he)<=E&&Ti(a.x,a.y,se,ne)<=E&&Ti(a.x,a.y,_e,ne)<=E)return!0}if(se=y.startX,he=y.startY,_e=y.endX,ne=y.endY,y.type===In.j){if(x=(se-_e)*(a.x-_e)+(he-ne)*(a.y-ne),Jn(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===In.u)return y=!1,x&&(y=Jn(a.x,a.y,se,he,se,ne)<=E||Jn(a.x,a.y,se,he,_e,he)<=E||Jn(a.x,a.y,_e,he,_e,ne)<=E||Jn(a.x,a.y,se,ne,_e,ne)<=E),y;if(y.type===In.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 Jn(a.x,a.y,se,he,_e,ne)<=E;if(x){if(a=Zt.$y(Ee,Ne,y,te),a*a<=E)return!0}else return!(Ti(y,te,-Ee,0)>=E||Ti(y,te,0,-Ne)>=E||Ti(y,te,0,Ne)>=E||Ti(y,te,Ee,0)>=E)}else if(y.type===In.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&&Jn(a.x,a.y,te,se,te,_e)>E&&Jn(a.x,a.y,te,se,he,se)>E&&Jn(a.x,a.y,he,_e,te,_e)>E&&Jn(a.x,a.y,he,_e,he,se)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?rl(y,a.x,a.y,te):Ns(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 ms:case ro:if(ne=Ne.endX,Ee=Ne.endY,a.zd(ne,Ee)>E)return!1;break;case bs:var Ge=Un();if(Zt.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 Da:if(Ge=Un(),Zt.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 Xo:case Ka:Ge=Ne.type===Xo?va(Ne,te):Is(Ne,te,ne,Ee);var Ye=Ge.length;if(Ye===0){if(ne=Ne.type===Xo?Ne.centerX:Ne.endX,Ee=Ne.type===Xo?Ne.centerY:Ne.endY,a.zd(ne,Ee)>E)return!1;break}Ne=null;for(var $e=Un(),st=0;st<Ye;st++)if(Ne=Ge[st],$e.length=0,Zt.Qe(Ne[0],Ne[1],Ne[2],Ne[3],Ne[4],Ne[5],Ne[6],Ne[7],.8,$e),b($e,a))return Gn($e),!1;Gn($e),Ne!==null&&(ne=Ne[6],Ee=Ne[7]);break;default:wt("Unknown Segment type: "+Ne.type)}}return!0}}}return!1},et.qc=function(){this.ua=null},et.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=cg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Os):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new li(1-Os.x,Os.y)))}ir.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=fh[a.toArrow];else a.fromArrow!=="None"?b=fh[a.fromArrow]:(b=Zt.Ze[a.figure],typeof b=="string"&&(b=Zt.Ze[b]),b===void 0&&wt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Zt.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 Zt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=In.parse(Zt.um[b],!1),fh[b]=a,x!==b&&(fh[x]=b),b}}return typeof y=="string"?y:y instanceof In?a:null}nt.Object.defineProperties(ir.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),la(this)&&(a=this.part,a!==null&&Bo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=In.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 oo&&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 oo&&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 En(a,"value >= 0",ir,"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"?En(a,'"butt", "round", or "square"',ir,"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"?En(a,'"miter", "bevel", or "round"',ir,"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)||wt("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=Zt.Ze[a];typeof x=="function"?x=a:(x=Zt.Ze[a.toLowerCase()])||wt("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?wt("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?wt("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:As},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:As},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:Qi},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))}}}),ir.prototype.intersectsRect=ir.prototype.Yc,ir.prototype.containedInRect=ir.prototype.fh,ir.prototype.getNearestIntersectionPoint=ir.prototype.rs,ir.prototype.getDocumentBounds=ir.prototype.mi,ir.prototype.getDocumentPoint=ir.prototype.ga;var fh=new di,Ev=new di;ir.className="Shape",ir.getFigureGenerators=function(){var a=new on,y;for(y in Zt.Ze)y!==y.toLowerCase()&&a.add(y,Zt.Ze[y]);return a.freeze(),a},ir.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Zt.Ze;b[a]=y,b[x]=a},ir.getArrowheadGeometries=function(){var a=new on;for(b in Zt.um)if(fh[b]===void 0){var y=In.parse(Zt.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 In&&a.add(x,b)}return a.freeze(),a},ir.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=In.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||wt("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=Qi,this.gg=this.fg=As}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 Lo(a,y){return Wt.call(this),jm||(Qa=ts?new tu(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}Je(Lo,Wt),Lo.prototype.cloneProtected=function(a){Wt.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())}et=Lo.prototype,et.th=function(){Wt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function S1(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}et.qb=function(a){a.classType===Lo?this.wrap=a:Wt.prototype.qb.call(this,a)},et.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},et.v=function(){Wt.prototype.v.call(this)},et.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,te=x.height,ne=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 ml&&(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 ur:a.translate(0,te),a.scale(1,-1);break;case uo: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 ur:a.scale(1,-1),a.translate(0,-te);break;case uo:a.scale(-1,-1),a.translate(-E,-te)}}},et.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 ml&&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 ml&&y.ad.classList.add("gojs-td"))}},et.kk=function(a,y,x){if(!Wt.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},et.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Wt.prototype.nk.call(this,a)},et.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},et.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;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,vu(se)),se=_e+1}te=ne}else ne=te.indexOf(`
`,0),0<=ne&&(te=te.substr(0,ne)),te=vu(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);vu(_e)>y&&1<_e.length;)_e=_e.substr(0,_e.length-1);_e+=sg,y=vu(_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),Kr(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},et.eh=function(a,y,x,b){La(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=vu(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=vu(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=vu(_e);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-he);vu(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=sg;var Ee=vu(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);vu(y)>x;){var Ne=1;for(_e=vu(y.substr(0,Ne)),Ee=0;_e<=x;)Ne++,Ee=_e,_e=vu(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=vu(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=vu(_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=vu(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 vu(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=Pn.alloc();Mv(a,te,y,he),E+=he.height,Pn.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(Lo.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:Ln},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:uu},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Xu(this),this.da.Yr=a,Ra(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Pn.alloc();Mv(this,this.ec,999999,a);var y=a.width;Pn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Kr(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 oo&&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&&En(a,"> 0",Lo,"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 xn(Lo,"None",0),_1=new xn(Lo,"WrapFit",1),Tv=new xn(Lo,"WrapDesiredSize",2),b1=new xn(Lo,"WrapBreakAll",3),Av=new xn(Lo,"OverflowClip",0),Fm=new xn(Lo,"OverflowEllipsis",1),og=new xn(Lo,"FormatTrim",0),P1=new xn(Lo,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new di,C1=0,Bm=new di,Dv=0,sg="...",E1="",Qa=null,jm=!1;Lo.className="TextBlock";function Ov(){this.nc=!1,this.Hd=null,this.Xf=Ln,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=uu,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},Lo.getEllipsis=function(){return sg},Lo.setEllipsis=function(a){sg=a,Bm=new di,Dv=0},Lo.getBaseline=function(){return Im},Lo.setBaseline=function(a){Im=a},Lo.getUnderline=function(){return Rm},Lo.setUnderline=function(a){Rm=a},Lo.isValidFont=function(a){if(jm||(Qa=ts?new tu(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},Lo.FormatNone=P1,Lo.FormatTrim=og,Lo.None=kv,Lo.OverflowClip=Av,Lo.OverflowEllipsis=Fm,Lo.WrapBreakAll=b1,Lo.WrapDesiredSize=Tv,Lo.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 $a(a,y){Wt.call(this),this.Eg=null,this.qo="",this.Xg=Aa,this.Nk=Tn,this.Zg=this.Hd=null,this.Mk=tr,this.Xf=Ln,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;Je($a,Wt),$a.prototype.cloneProtected=function(a){Wt.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},$a.prototype.qb=function(a){a===Ln||a===fi||a===Lr?this.imageStretch=a:Wt.prototype.qb.call(this,a)},$a.prototype.toString=function(){return"Picture("+this.source+")#"+mr(this)};function Hf(a){a===void 0&&(a=""),a!==""?Uf[a]&&(delete Uf[a],zm--):(Uf=new di,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()||(Cs(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=Un();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)}$a.prototype.hA=function(){if(this.source!==""){Hf(this.source);var a=this.source;this.source="",this.source=a}},$a.prototype.redraw=function(){this.N(),this.Uc=!0},$a.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 ml;b=this.naturalBounds;var te=0,ne=0,se=this.qn,he=se?+x.width:x.naturalWidth;if(se=se?+x.height:x.naturalHeight,he===void 0&&x.videoWidth&&(he=x.videoWidth),se===void 0&&x.videoHeight&&(se=x.videoHeight),he=he||b.width,se=se||b.height,he!==0&&se!==0){var _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,$e=this.Mk;switch(Ye){case Ln:if(this.sourceRect.w())break;Ne>=b.width&&(te=te+$e.offsetX+(Ne*$e.x-b.width*$e.x)),Ge>=b.height&&(ne=ne+$e.offsetY+(Ge*$e.y-b.height*$e.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 Lr:Ye===fi?(Ye=Math.min(b.height/Ge,b.width/Ne),Ne*=Ye,Ge*=Ye):Ye===Lr&&(Ye=Math.max(b.height/Ge,b.width/Ne),Ne*=Ye,Ge*=Ye,Ne>=b.width&&(te=(te+$e.offsetX+(Ne*$e.x-b.width*$e.x)/Ne)*he),Ge>=b.height&&(ne=(ne+$e.offsetY+(Ge*$e.y-b.height*$e.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,Et=he*se/st,St=x.__goCache;Ye=null;var Tt=wx;if(!E){if(x.sq&&St!==void 0&&4<st&&Et>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<Et;Ee++)Ye=E[Ee];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new tu(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?$e.offsetX+(b.width*$e.x-Ne*$e.x):0,$e=Ge<b.height?$e.offsetY+(b.height*$e.y-Ge*$e.y):0,this.flip){case Ir:a.translate(Math.min(b.width,Ne),0),a.scale(-1,1);break;case ur:a.translate(0,Math.min(b.height,Ge)),a.scale(1,-1);break;case uo: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,$e,Math.min(b.width,Ne),Math.min(b.height,Ge)),a instanceof ml&&(this.bt=[te/y,ne/y,Math.min(Ye.source.width,he/y),Math.min(Ye.source.height,se/y),E,$e,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,$e,Math.min(b.width,Ne),Math.min(b.height,Ge)),a instanceof ml&&(this.bt=[te,ne,he,se,E,$e,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 ur:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ge));break;case uo:a.scale(-1,-1),a.translate(-Math.min(b.width,Ne),-Math.min(b.height,Ge))}}}}},$a.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=qa(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===Si?(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===Ni?(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)),Kr(this.dc,a,y),this.Ge(0,0,a,y)},$a.prototype.eh=function(a,y,x,b){La(this,a,y,x,b)},nt.Object.defineProperties($a.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||wt("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 kn),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()||(Cs(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(ts){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<zm&&(Hf(),x=Uf),b=Bi("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}}}),$a.prototype.redraw=$a.prototype.redraw,$a.prototype.reloadSource=$a.prototype.hA;var zm=0,wx=4;$a.className="Picture",Uf=new di,$a.clearCache=Hf;function M1(){this.gi=null}function k1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new tu(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 In,this.mc=null}Gf.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new In,this.mc=null};function Wf(a,y,x,b,E,te){a.mc=new gs,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 Fr(ms);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 Fr(ro);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 Fr(bs);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 Fr(Da);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 Fr(Xo);se.startAngle=a,se.sweepAngle=y,se.centerX=x,se.centerY=b,se.radiusX=E,se.radiusY=te!==0?te:E,ne&&se.close(),this.mc.segments.add(se)};function bx(a,y,x,b,E,te,ne,se){var he;he===void 0&&(he=!1),y=new Fr(Ka,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=Zt.Ze;b[a]=y,b[x]=a}ba("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Zt.Mf[a];return b!==void 0||(b=new In(In.u),b.endX=y,b.endY=x,Zt.Nf<Zt.vm&&(Zt.Mf[a]=b,Zt.Nf++)),b}),ba("Square",function(a,y,x){a="s"+y+","+x;var b=Zt.Mf[a];return b!==void 0||(b=new In(In.u),b.endX=y,b.endY=x,b.defaultStretch=fi,Zt.Nf<Zt.vm&&(Zt.Mf[a]=b,Zt.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=Zt.Mf[b];if(E!==void 0)return E;var te=a*Zt.wg;return E=new In().add(new gs(a,0,!0).add(new Fr(ro,y-a,0)).add(new Fr(bs,y,a,y-te,0,y,te)).add(new Fr(ro,y,x-a)).add(new Fr(bs,y-a,x,y,x-te,y-te,x)).add(new Fr(ro,a,x)).add(new Fr(bs,0,x-a,te,x,0,x-te)).add(new Fr(ro,0,a)).add(new Fr(bs,a,0,0,te,te,0).close())),1<te&&(E.spot1=new li(0,0,te,te),E.spot2=new li(1,1,-te,-te)),Zt.Nf<Zt.vm&&(Zt.Mf[b]=E,Zt.Nf++),E}),ba("Border","RoundedRectangle"),ba("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Zt.Mf[a];return b!==void 0||(b=new In(In.F),b.endX=y,b.endY=x,b.spot1=Il,b.spot2=Ca,Zt.Nf<Zt.vm&&(Zt.Mf[a]=b,Zt.Nf++)),b}),ba("Circle",function(a,y,x){a="c"+y+","+x;var b=Zt.Mf[a];return b!==void 0||(b=new In(In.F),b.endX=y,b.endY=x,b.spot1=Il,b.spot2=Ca,b.defaultStretch=fi,Zt.Nf<Zt.vm&&(Zt.Mf[a]=b,Zt.Nf++)),b}),ba("TriangleRight",function(a,y,x){return new In().add(new gs(0,0).add(new Fr(ro,y,.5*x)).add(new Fr(ro,0,x).close())).pm(0,.25,.5,.75)}),ba("TriangleDown",function(a,y,x){return new In().add(new gs(0,0).add(new Fr(ro,y,0)).add(new Fr(ro,.5*y,x).close())).pm(.25,0,.75,.5)}),ba("TriangleLeft",function(a,y,x){return new In().add(new gs(y,x).add(new Fr(ro,0,.5*x)).add(new Fr(ro,y,0).close())).pm(.5,.25,1,.75)}),ba("TriangleUp",function(a,y,x){return new In().add(new gs(y,x).add(new Fr(ro,0,x)).add(new Fr(ro,.5*y,0).close())).pm(.25,.5,.75,1)}),ba("Triangle","TriangleUp"),ba("Diamond",function(a,y,x){return new In().add(new gs(.5*y,0).add(new Fr(ro,0,.5*x)).add(new Fr(ro,.5*y,x)).add(new Fr(ro,y,.5*x).close())).pm(.25,.25,.75,.75)}),ba("LineH",function(a,y,x){return a=new In(In.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 In(In.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 In().add(new gs(0,x/2,!1).add(new Fr(ro,y,x/2)).add(new Fr(ms,y/2,0)).add(new Fr(ro,y/2,x)))}),ba("XLine",function(a,y,x){return new In().add(new gs(0,x,!1).add(new Fr(ro,y,0)).add(new Fr(ms,0,0)).add(new Fr(ro,y,x)))}),ba("LineRight",function(a,y,x){return new In().add(new gs(.25*y,0,!1).add(new Fr(ro,.75*y,.5*x)).add(new Fr(ro,.25*y,x)))}),ba("LineDown",function(a,y,x){return new In().add(new gs(0,.25*x,!1).add(new Fr(ro,.5*y,.75*x)).add(new Fr(ro,y,.25*x)))}),ba("LineLeft",function(a,y,x){return new In().add(new gs(.75*y,0,!1).add(new Fr(ro,.25*y,.5*x)).add(new Fr(ro,.75*y,x)))}),ba("LineUp",function(a,y,x){return new In().add(new gs(0,.75*x,!1).add(new Fr(ro,.5*y,.25*x)).add(new Fr(ro,y,.75*x)))}),Zt.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=Ur,this.ir=null,this.jr="",this.lr=As,this.Gq="",this.Hq=Pr,this.Pq=ii,this.Kq=Mi,this.Up=null,this.Cq=127,this.zr=vi,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 Ei(a,y){a===void 0||a instanceof ks||typeof a=="string"?Dn.call(this,a):(Dn.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 rn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Je(Ei,Dn),Ei.prototype.cloneProtected=function(a){Dn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},et=Ei.prototype,et.Af=function(a){Dn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},et.toString=function(){var a=An(this.constructor)+"#"+mr(this);return this.data!==null&&(a+="("+Li(this.data)+")"),a};function el(a){a.P===null?a.P=new Iv:a.P.nc&&(a.P=a.P.copy())}et.th=function(){Dn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},et.gk=function(a,y,x,b,E,te,ne){var se=this.diagram;se!==null&&(a===es&&y==="elements"?E instanceof Dn?gd(E,function(he){ly(se.partManager,he),ad(se,he)}):Mc(se,E):a===Jo&&y==="elements"&&(E instanceof Dn?gd(E,function(he){uy(se.partManager,he,se)}):jp(se,E)),se.cb(a,y,x,b,E,te,ne))},et.La=function(a){if(Dn.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 Dn&&gd(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ei.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ei.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ei.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 on),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)))}}},Ei.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)}},Ei.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Un();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)}},Ei.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 Xi?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Br))break e;nu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Dn.Link),x.adornedObject=y)}if(x!==null){x.type===Dn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Px(this,a),y=this.adornments;y.next();)y.value.La()}},Ei.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=rn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),rn.free(b),Bv(a,!1)}}Ei.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new Fi);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},Ei.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=tr;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)}},Ei.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ei.prototype.moveTo=function(a,y,x){a=ft.allocAt(a,y),this.move(a,x),ft.free(a)},Ei.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())},Ei.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())},Ei.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new on),y.I(a)!==null)return y.I(a);var x=Dn.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()?tr: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}Ei.prototype.mi=function(a){return a===void 0&&(a=new rn),a.assign(this.actualBounds)},Ei.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 ir?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}Ei.prototype.arrange=function(){if(Fa(this)===!1)N1(this);else{hh(this,!1);var a=this.Ib,y=rn.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()||Zt.B(y.width,a.width)&&Zt.B(y.height,a.height)||0<=this.vw&&this.C(16),rn.free(y),Bv(this,!1)}},et=Ei.prototype,et.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=rn.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),rn.free(E)}!(this.G&65536)&&a.D(y)||B1(this,b,x),x.N(),!a.w()&&!y.w()||yr(a,y)||(this instanceof Xn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},et.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&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&&Fa(this)===!1&&(Gm(this),N1(this)),!0};function O1(a,y,x,b,E){y===null||a instanceof Br||(y=y.animationManager,y.zb&&rh(y,a,new ft(b,E),x))}et.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;Nc(this)||Fa(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)},et.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 Br||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}et.si=function(){return!0},et.Zc=function(){return!0},et.ph=function(){return!1},et.Dd=function(){return!0};function Fv(a,y,x,b){y.constructor===a.constructor||U1||(U1=!0,bn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),bn(" Old class: "+An(a.constructor)+", new class: "+An(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)}Ei.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},Ei.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},Ei.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},Ei.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},Ei.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},Ei.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},Ei.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},Ei.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},Ei.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}et=Ei.prototype,et.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}et.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},et.N=function(){var a=this.diagram;a!==null&&!Fa(this)&&!Nc(this)&&this.isVisible()&&this.Ib.w()&&a.N(yd(this,this.Ib))},et.v=function(){Dn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Xn&&this.labeledLink!==null&&Ra(this.labeledLink),a.$b(!0))},et.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},et.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},et.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},et.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof Xn&&(y=y.labeledLink,y!==null)?zv(a,y):0}et.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}et.Td=function(a){return a instanceof Xi?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}et.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Xi&&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 Xi&&Wm(y,!1),y instanceof Xn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ei.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Xn&&this.isLinkLabel)},Ei.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 Br)){if(a.add(y),y instanceof Xn){if(x&&y instanceof Xi)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(Ei.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Ji: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(Jo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(es,"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&&(el(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 Br?this.type!==Dn.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:ii},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),el(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Mi},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),el(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&&(el(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:Pr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),el(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,Fa(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 Br)){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 Br?this instanceof Br&&(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&&(nu(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&&(nu(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&&(el(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&&(el(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&&(el(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&&(el(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&&(el(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&&(el(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:Ur},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),el(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&&(el(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&&(el(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:As},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),el(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&&wt("Cannot make a Group a member of itself: "+this.toString()),wt("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 Xi&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof Xi&&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 Xi){for(x=new kn,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 wt("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&&(el(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&&(el(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&&(el(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:vi},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),el(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&&(el(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&&(el(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ei.prototype.invalidateLayout=Ei.prototype.C,Ei.prototype.findCommonContainingGroup=Ei.prototype.px,Ei.prototype.isMemberOf=Ei.prototype.Td,Ei.prototype.findTopLevelPart=Ei.prototype.sz,Ei.prototype.findSubGraphLevel=Ei.prototype.oz,Ei.prototype.ensureBounds=Ei.prototype.Va,Ei.prototype.getDocumentBounds=Ei.prototype.mi,Ei.prototype.findObject=Ei.prototype.fb,Ei.prototype.moveTo=Ei.prototype.moveTo,Ei.prototype.invalidateAdornments=Ei.prototype.Wb,Ei.prototype.clearAdornments=Ei.prototype.Ej,Ei.prototype.removeAdornment=Ei.prototype.Jf,Ei.prototype.addAdornment=Ei.prototype.bh,Ei.prototype.findAdornment=Ei.prototype.Pj,Ei.prototype.updateTargetBindings=Ei.prototype.La;var U1=!1;Ei.className="Part",Ei.LayoutNone=0,Ei.LayoutAdded=1,Ei.LayoutRemoved=2,Ei.LayoutShown=4,Ei.LayoutHidden=8,Ei.LayoutNodeSized=16,Ei.LayoutGroupLayout=32,Ei.LayoutNodeReplaced=64,Ei.LayoutStandard=127,Ei.LayoutAll=16777215;function Br(a,y){a===void 0||a instanceof ks||typeof a=="string"?Ei.call(this,a):(Ei.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)}Je(Br,Ei),Br.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Br.prototype.updateRelationshipsFromData=function(){},Br.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Fn&&y instanceof ir){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 ir&&(E.ua=a)}}},Br.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Fa(a))},Br.prototype.Zc=function(){return!1},Br.prototype.gk=function(a,y,x,b,E,te,ne){if(a===es&&y==="elements"){if(E instanceof ja)this.$a===null&&(this.$a=E);else if(E instanceof Dn){var se=E.Nl(function(he){return he instanceof ja});se instanceof ja&&this.$a===null&&(this.$a=se)}}else a===Jo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Dn&&this.$a.rg(b)&&(this.$a=null));Ei.prototype.gk.call(this,a,y,x,b,E,te,ne)},Br.prototype.updateAdornments=function(){},Br.prototype.Lj=function(){},nt.Object.defineProperties(Br.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}}}),Br.className="Adornment";function Hv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=hs,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 ks||typeof a=="string"?Ei.call(this,a):(Ei.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Mn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Je(Xn,Ei),Xn.prototype.cloneProtected=function(a){Ei.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},et=Xn.prototype,et.Af=function(a){Ei.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())}et.th=function(){Ei.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new kn),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}et.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},et.gk=function(a,y,x,b,E,te,ne){a===es&&y==="elements"?this.wc=null:a===Jo&&y==="elements"&&(this.wc=null),Ei.prototype.gk.call(this,a,y,x,b,E,te,ne)},et.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(vl(x.fromPort),vl(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(vl(x.fromPort),vl(x.toPort),x.bb())}}function vl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||vl(y.port)}}et.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(!Ei.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===Ps){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){Ei.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 kn,y=new kn;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 _r(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},et=Xn.prototype,et.Mo=function(a){a===void 0&&(a=null);var y=new _r(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},et.Sd=function(a){a===void 0&&(a=null);var y=new _r(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},et.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new kn,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 kn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new cr(x):Ji},et.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new kn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new cr(x):Ji},et.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new kn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new cr(x):Ji},et.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new _r(this.jb),E=this;return b.predicate=function(te){return!((te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)&&(te.fromNode!==a||te.toNode!==E||x!==null&&te.fromPortId!==x||y!==null&&te.toPortId!==y))},b},et.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new _r(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){vl(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=te)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,te=b?x:y,E.ci||(E.ci=te),!te.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===te&&(te.isTreeLeaf=!1):y===te&&(te.isTreeLeaf=!1))))}function Vm(a,y,x){vl(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var te=a.linkDisconnected;if(E=a.diagram,te!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),te(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):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)},et=Xn.prototype,et.Vo=function(a){Ei.prototype.Vo.call(this,a),a||(ag(this),a=this.Yk,a!==null&&eS(a,this))},et.Wo=function(a){Ei.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},et.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Ei.prototype.Lj.call(this)},et.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new on: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=Un()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Gn(x)}}}et.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},et.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink&&(a=b.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},et.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)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},et.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},et.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof 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},et.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new kn;return a(this,y),y},et.uz=function(){return Y1(this,this)};function Y1(a,y){return y=y.pg(),y===null?0:1+Y1(a,y)}et.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new _r(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},et.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Mn,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Mn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new cr(x):Ji},et.wz=function(a){a===void 0&&(a=1/0);var y=new kn;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 kn;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 kn;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:hs},set:function(a){typeof a=="number"&&(a=new $i(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),Ra(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 xn(Xn,"SpreadingNone",10),Km=new xn(Xn,"SpreadingEvenly",11),Wv=new xn(Xn,"SpreadingPacked",12);Xn.className="Node",Xn.SpreadingNone=Cx,Xn.SpreadingEvenly=Km,Xn.SpreadingPacked=Wv;function Xi(a,y){a===void 0||a instanceof ks||typeof a=="string"?Xn.call(this,a):(Xn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new kn,this.$a=null,this.Sc=new Zo,this.Sc.group=this,this.gl=new kn,this.tb=this.$p=null,y&&Object.assign(this,y)}Je(Xi,Xn),Xi.prototype.cloneProtected=function(a){Xn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof ja});y instanceof ja?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},et=Xi.prototype,et.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)}},et.gk=function(a,y,x,b,E,te,ne){if(a===es&&y==="elements"){if(E instanceof ja)this.$a===null?this.$a=E:this.$a!==E&&wt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Dn){var se=E.Nl(function(he){return he instanceof ja});se instanceof ja&&(this.$a===null?this.$a=se:this.$a!==se&&wt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Jo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Dn&&this.$a.rg(b)&&(this.$a=null));Xn.prototype.gk.call(this,a,y,x,b,E,te,ne)},et.Xl=function(a,y){Xn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Dn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Dn&&(a=a.Pb()),this.tb===null&&(this.tb=new rn),a.mi(this.tb),a instanceof ir&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},et.eh=function(a,y,x,b){this.nf=this.$a,Xn.prototype.eh.call(this,a,y,x,b)},et.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Fn||y.Va()}),Xn.prototype.Va.call(this)},et.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()&&Fa(y))return!1}else if(y instanceof Fn&&y.isVisible()&&Fa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof Xi&&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 Xi&&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())}et.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}Xn.prototype.Lj.call(this)},Xi.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=cn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Xi.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=cn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Xi.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},et=Xi.prototype,et.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()?(vl(x.fromPort),vl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(vl(x.fromPort),vl(x.toPort),x.bb()))}}},et.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new kn,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},et.iz=function(){var a=this.Rj();a.add(this);for(var y=new kn,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},et.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new kn;return a(this,y),y},et.Rj=function(){var a=new kn;return Oc(a,this,!0,0,!0),a.remove(this),a},et.Zb=function(a){Xn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Xi.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 Xi&&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}Xi.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 Xi&&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}Xi.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 kn,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(Xi.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&&wt("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)}}}),Xi.prototype.expandSubGraph=Xi.prototype.expandSubGraph,Xi.prototype.collapseSubGraph=Xi.prototype.collapseSubGraph,Xi.prototype.findSubGraphParts=Xi.prototype.Rj,Xi.prototype.findContainingGroupChain=Xi.prototype.hz,Xi.prototype.findExternalNodesConnected=Xi.prototype.iz,Xi.prototype.findExternalLinksConnected=Xi.prototype.Lu,Xi.prototype.ensureBounds=Xi.prototype.Va,Xi.className="Group";function ja(a){Wt.call(this),this.yb=zs,this.ko=new rn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Je(ja,Wt),ja.prototype.cloneProtected=function(a){Wt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},ja.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return no(0,0,y.width,y.height,a.x,a.y)},ja.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Xi||a instanceof Br)||wt("Placeholder is not inside a Group or Adornment."),a instanceof Xi){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Kr(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 ir&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,_e=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==Dn.Link&&(se=te.ga(a.category==="Selection"?Pr:a.locationSpot,ft.alloc()),a.location=se,ft.free(se)),isNaN(_e)||isNaN(ne)?(a=te.ga(Pr,ft.alloc()),_e=rn.allocAt(a.x,a.y,0,0),_e.Ye(te.ga(io,a)),_e.Ye(te.ga($r,a)),_e.Ye(te.ga(ps,a)),Kr(y,_e.width+b||0,_e.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),ft.free(a),rn.free(_e)):(Kr(y,_e+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},ja.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},ja.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Xi&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=rn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof Xi&&!y.isSubGraphExpanded?a.h(E.x-te.left,E.y-te.top,0,0):a.h(E.x-te.left,E.y-te.top,Math.max(E.width+te.left+te.right,0),Math.max(E.height+te.top+te.bottom,0)),rn.free(x),b&&y instanceof Xi&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Xi))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||kl(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(ja.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new $i(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),ja.className="Placeholder";function Fn(a){Ei.call(this,Dn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=za,this.Om=0,this.Qm=za,this.Rm=NaN,this.qj=qv,this.po=.5,this.wd=null,this.Nb=new Mn().freeze(),this.Tg=this.Mg=null,this.ml=new rn,this.ua=new In,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)}Je(Fn,Ei),Fn.prototype.cloneProtected=function(a){Ei.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},et=Fn.prototype,et.Af=function(a){Ei.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&vl(y),a=a.toPort,a!==null&&vl(a)},et.qb=function(a){a.classType===Fn?(a.value&2)===2?this.routing=a:a===Al||a===ic||a===Kf?this.curve=a:a===hg||a===$m||a===e0?this.adjusting=a:a!==qv&&a!==za&&wt("Unknown Link enum value for a Link property: "+a):Ei.prototype.qb.call(this,a)},et.Xc=function(){this.ba===null&&(this.ba=new Jp)},et.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Fa(a)||Nc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Fa(a)||Nc(a)))},et.zv=function(){return!1},et.Av=function(){},et.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 za: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=Zt.bp(y),90<a&&270>a&&(a-=180);break;case pg:a=Zt.bp(y+90),90<a&&270>a&&(a-=180);break;case gg:a=Zt.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=Zt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Zt.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}et=Fn.prototype,et.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ei.prototype.oh.call(this)},et.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},et.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new kn),a.wd.add(y),a.v()}et.Vo=function(a){if(Ei.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)}},et.Wo=function(a){if(Ei.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)}},et.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},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?Ei.prototype.move.call(this,a,!1):(a=ft.allocAt(x.x+b,x.y+E),Ei.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(hi),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()===Al))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()===Al){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Zt.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),Zt.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()===Al))return this.ua.wx(.5);if(this.computeCurve()===Al&&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),Zt.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var te;E<b/2&&x<a&&(te=y[x],!(E+te>b/2));)E+=te,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},et=Fn.prototype,et.i=function(a){return this.Nb.s[a]},et.dd=function(a,y){this.Nb.cd(a,y)},et.L=function(a,y,x){this.Nb.cd(a,new ft(y,x))},et.Kz=function(a,y){this.Nb.Gb(a,y)},et.m=function(a,y,x){this.Nb.Gb(a,new ft(y,x))},et.ne=function(a){this.Nb.add(a)},et.yf=function(a,y){this.Nb.add(new ft(a,y))},et.pv=function(a){this.Nb.mb(a)},et.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 Mn,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),Ra(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)}}et.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},et.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x=Math.min(se.x,x),b=Math.min(se.y,b)}se=ne=1/0;for(var he=y.s,_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)}},et.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))}et.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},et.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},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=wi,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=wi,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===Al;this.Wf=_e&&!Ee?Ne=!0:!1;var Ge=this.computeAdjusting()===za||_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,$e=te.y+he/3,st=Ye,Et=$e;Zt.B(he,0)?Et=0<se?Et-_e:Et+_e:(Ee=-se/he,Ne=Math.sqrt(_e*_e/(Ee*Ee+1)),0>_e&&(Ne=-Ne),st=(0>he?-1:1)*Ne+Ye,Et=Ee*(st-Ye)+$e),Ye=te.x+2*se/3,$e=te.y+2*he/3;var St=Ye,Tt=$e;Zt.B(he,0)?Tt=0<se?Tt-_e:Tt+_e:(St=(0>he?-1:1)*Ne+Ye,Tt=Ee*(St-Ye)+$e),this.Fj(),this.ne(te),this.yf(st,Et),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,Zt.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=rn.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))),rn.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=$e=0,(Ee||!se||_e)&&(Et=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&&(Et+=Math.abs(At)*(Ee?1:2)),Ye===0?$e=Et:Ye===90?st=Et:Ye===180?$e=-Et:Ye===270?st=-Et:($e=Et*Math.cos(Ye*Math.PI/180),st=Et*Math.sin(Ye*Math.PI/180)),ne.Mc()&&_e&&(Et=y.ga(tr,ft.alloc()),St=ft.allocAt(Et.x+1e3*$e,Et.y+1e3*st),this.getLinkPointFromPoint(a,y,Et,St,!0,Ne),ft.free(Et),ft.free(St))),Et=this.getLinkPoint(b,E,x,!1,Ee,a,y);var Ot=Tt=St=0;if(Ee||!he||_e){var Gt=this.computeEndSegmentLength(b,E,x,!1);Ot=this.getLinkDirection(b,E,Et,x,!1,Ee,a,y),_e&&(he||ne.D(x)||!Ee&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ot+=Ee?0:30,0>At&&(Ot+=180)),0>Ot?Ot+=360:360<=Ot&&(Ot-=360),_e&&(Gt+=Math.abs(At)*(Ee?1:2)),Ot===0?St=Gt:Ot===90?Tt=Gt:Ot===180?St=-Gt:Ot===270?Tt=-Gt:(St=Gt*Math.cos(Ot*Math.PI/180),Tt=Gt*Math.sin(Ot*Math.PI/180)),x.Mc()&&_e&&(x=E.ga(tr,ft.alloc()),ne=ft.allocAt(x.x+1e3*St,x.y+1e3*Tt),this.getLinkPointFromPoint(b,E,x,ne,!1,Et),ft.free(x),ft.free(ne))}x=Ne,(Ee||!se||_e)&&(x=new ft(Ne.x+$e,Ne.y+st)),ne=Et,(Ee||!he||_e)&&(ne=new ft(Et.x+St,Et.y+Tt)),!Ge&&!Ee&&se&&3<te&&this.adjustPoints(0,Ne,te-2,ne)?this.dd(te-1,Et):!Ge&&!Ee&&he&&3<te&&this.adjustPoints(1,x,te-1,Et)?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,Et)):(this.Fj(),this.ne(Ne),(Ee||!se||_e)&&this.ne(x),Ee&&this.addOrthoPoints(x,Ye,ne,Ot,a,b),(Ee||!he||_e)&&this.ne(ne),this.ne(Et))}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 rn(y.ga(Pr,he),y.ga(io,_e)),Ne=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Ne,!b,E,a,y,_e),(x.Hf(ga)||x.Hf(is))&&a.y>=Ee.y&&a.y<=Ee.y+Ee.height?se.y=a.y:(x.Hf(ws)||x.Hf(Pa))&&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(tr,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(tr,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=tr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===As?er:y)):(a=y||this.toPort,a===null?a=tr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===As?er:y)),a};function Vf(a){return a===er||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:tr}Fn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==za&&4<this.pointsCount?this.computeMidPoint(new ft):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(tr))},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=Fi.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&Fi.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=Fi.alloc(),Ne.set(ne),Ee instanceof Dn)se=Ee.Cf(a,y,x,b,E,Ne);else if(this.path===Ee){if(Ee instanceof ir)if(se=a,Ge=b,Ee.pickable===!1)se=!1;else if(Ne.multiply(Ee.transform),Ge)e:{var Ye=se,$e=Ne;if(Ee.fh(Ye,$e))se=!0;else{if($e===void 0&&($e=Ee.transform,Ye.Re(Ee.actualBounds))){se=!0;break e}se=Ye.left,Ge=Ye.right;var st=Ye.top;Ye=Ye.bottom;var Et=ft.alloc(),St=ft.alloc(),Tt=ft.alloc(),At=Fi.alloc();At.set($e),At.bv(Ee.transform),At.Vj(),St.x=Ge,St.y=st,St.transform(At),Et.x=se,Et.y=st,Et.transform(At),$e=!1,vd(Ee,Et,St,Tt)?$e=!0:(Et.x=Ge,Et.y=Ye,Et.transform(At),vd(Ee,Et,St,Tt)?$e=!0:(St.x=se,St.y=Ye,St.transform(At),vd(Ee,Et,St,Tt)?$e=!0:(Et.x=se,Et.y=st,Et.transform(At),vd(Ee,Et,St,Tt)&&($e=!0)))),Fi.free(At),ft.free(Et),ft.free(St),ft.free(Tt),se=$e}}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)),Fi.free(Ne)}}}return te===void 0&&Fi.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&Fi.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?Al:this.curve},Fn.prototype.computeCorner=function(){if(this.curve===Al)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(tr).ab(x.ga(tr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Al&&(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()===za&&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=Un(),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(!Zt.$(_e,0)){if(Zt.$(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),Zt.$(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),Zt.$(y,0)||(Zt.$(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 $e=(Ge-Ee)/(he-se);Ye=Math.sqrt(1+1/($e*$e))}else $e=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var st=y.x,Et=y.y,St=.5;_e!==0&&(St=((E-st)*(E-ne)+(te-Et)*(te-Ne))/_e);var Tt=E+St*(ne-E),At=te+St*(Ne-te);y=Math.sqrt((st-Tt)*(st-Tt)+(Et-At)*(Et-At)),Et<$e*(st-Tt)+At&&(y=-y),0<$e&&(y=-y),st=se+St*(he-se),St=Ee+St*(Ge-Ee),$e!==0?(y=st+y/Ye,this.L(a,y,St-(y-st)/$e)):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,Zt.B(E.y,te.y)?Zt.B(te.x,ne.x)?Ee=y.y:Zt.B(te.y,ne.y)&&(se=y.x):Zt.B(E.x,te.x)&&(Zt.B(te.y,ne.y)?se=y.x:Zt.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,Zt.B(E.y,te.y)?Zt.B(te.x,ne.x)?Ee=b.y:Zt.B(te.y,ne.y)&&(se=b.x):Zt.B(E.x,te.x)&&(Zt.B(te.y,ne.y)?se=b.x:Zt.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 $e=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)||(Zt.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)):Zt.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)):Zt.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)||(Zt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Ne.x,Ne.y,Ee.x,Ee.y,st)?($e=Ne=st.copy(),b=Ee.ab(st)):Zt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Ee.x,Ee.y,_e.x,_e.y,st)?($e=Ne=st.copy(),b=_e.ab(st)):Zt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,_e.x,_e.y,a.x,a.y,st)&&($e=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?Zt.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)):Zt.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)&&(Zt.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)):Zt.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)),$e!==null&&(b===0||b===180?this.yf(te.x,$e.y):this.yf($e.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=Jn(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=Jn(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 ir&&(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===Al&&3<=y&&!Zt.$(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=In.o,se=A1(a),this.computeShortLength(!0)!==0&&(E=Xd(this,E,!0,te)),Wf(se,E.x,E.y,!1),ne===Al&&3<=y&&!Zt.$(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,$e=this.i(Jv(this,_e,Ne,!1));if((!Zt.$(Ge.x,Ye.x)||!Zt.$(Ye.x,$e.x))&&(!Zt.$(Ge.y,Ye.y)||!Zt.$(Ye.y,$e.y))){var st=Ee;isNaN(st)&&(st=this.smoothness/3);var Et=Ge.x;Ge=Ge.y;var St=Ye.x;Ye=Ye.y;var Tt=$e.x;$e=$e.y;var At=st*qm(Et,Ge,St,Ye);st*=qm(St,Ye,Tt,$e),Zt.$(Ge,Ye)&&Zt.$(St,Tt)&&(St>Et?$e>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):$e>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)),Zt.$(Et,St)&&Zt.$(Ye,$e)&&(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)),(Zt.$(Et,St)&&Zt.$(St,Tt)||Zt.$(Ge,Ye)&&Zt.$(Ye,$e))&&(Et=.5*(Et+Tt),Ge=.5*(Ge+$e),te.x=Et,te.y=Ge,E.x=Et,E.y=Ge),(Ne===1||Ne===2&&Zt.$(ne.x,this.i(0).x)&&Zt.$(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,Wn)),_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,Wn)),$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,Wn)),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,Et=-he,Ge=Ee,St=this.i(_e),st=x,Zt.B(te.y,Ge.y)&&Zt.B(Ge.x,St.x))if($e=Math.min(ne,Math.abs(Ge.x-E.x)/2),$e=At=Math.min($e,Math.abs(St.y-Ge.y)/2),Zt.B($e,0))Jd(this,se,Ne,Et,te,Ge,st),te.assign(Ge);else{var Ot=Ge.x,Gt=Ge.y;Ye=Ot,Tt=Gt,Ge.x>te.x?Ot=Ge.x-$e:Ot=Ge.x+$e,St.y>Ge.y?Tt=Ge.y+At:Tt=Ge.y-At,St=ft.allocAt(Ot,Gt),Jd(this,se,Ne,Et,te,St,st),ft.free(St),Um(se,Ge.x+Ne,Ge.y+Et,Ye+Ne,Tt+Et),te.h(Ye,Tt)}else Zt.B(te.x,Ge.x)&&Zt.B(Ge.y,St.y)?($e=Math.min(ne,Math.abs(Ge.y-E.y)/2),$e=At=Math.min($e,Math.abs(St.x-Ge.x)/2),Zt.B(At,0)?(Jd(this,se,Ne,Et,te,Ge,st),te.assign(Ge)):(Ot=Ge.x,Gt=Ge.y,Ye=Ot,Tt=Gt,Ge.y>te.y?Gt=Ge.y-$e:Gt=Ge.y+$e,St.x>Ge.x?Ye=Ge.x+At:Ye=Ge.x-At,St=ft.allocAt(Ot,Gt),Jd(this,se,Ne,Et,te,St,st),ft.free(St),Um(se,Ge.x+Ne,Ge.y+Et,Ye+Ne,Tt+Et),te.h(Ye,Tt))):(Jd(this,se,Ne,Et,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=In.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),Zt.$(a,0)?y:Zt.$(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;Zt.$(y.x,te.x)&&Zt.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!Zt.$(y.x,te.x)&&!Zt.$(y.y,te.y))return x-1;for(var ne=te;Zt.$(y.x,te.x)&&Zt.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||Zt.$(y.y,te.y)&&Zt.$(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(Zt.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 $e=te.y+b;a.curve===ic?Wf(y,Ye,$e,!1):$h(y,Ge,Ne,Ye,Ne,Ye,$e)}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(Zt.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,$e=te.x+x,Ne+=b,a.curve===ic?Wf(y,$e,Ne,!1):$h(y,Ye,Ge,Ye,Ne,$e,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=Zt.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,$e=ne.x;ne=ne.y;var st=_e.x,Et=_e.y;if(Zt.B(Ee,Ge)){if(!Zt.B(Ne,Ye)&&Zt.B(ne,Et)&&Math.min(Ne,Ye)<ne&&Math.max(Ne,Ye)>ne&&Math.min($e,st)<Ee&&Math.max($e,st)>Ee&&!Zt.B($e,st)){se.x=Ee,se.y=ne,Ee=!0;break e}}else if(Zt.B(Ne,Ye)&&Zt.B($e,st)&&Math.min(Ee,Ge)<$e&&Math.max(Ee,Ge)>$e&&Math.min(ne,Et)<Ne&&Math.max(ne,Et)>Ne&&!Zt.B(ne,Et)){se.x=$e,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(!Ei.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(Ei.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&&(jn(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&&vl(x),ug(this),this.ff=a;var b=this.fromPort;b!==null&&vl(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.xv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.fromPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),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&&vl(x),ug(this),this.vf=a;var b=this.toPort;b!==null&&vl(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.Cv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.toPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),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:As},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&vl(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&En(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:As},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&vl(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&En(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?Ji: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 ir?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()===Al&&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),Zt.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);Zt.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);Zt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Zt.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new Mn,b=0;b<a.length/2;b++)E=new 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(!Yt(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new Mn,b=0;b<a.length;b++)E=a[b],x.add(new ft(E.x,E.y).freeze())}}else if(a instanceof Mn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else wt("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 xn(Fn,"Normal",1),Mx=new xn(Fn,"Orthogonal",2),kx=new xn(Fn,"AvoidsNodes",6),nS=new xn(Fn,"AvoidsNodesStraight",7),za=new xn(Fn,"None",0),Al=new xn(Fn,"Bezier",9),ic=new xn(Fn,"JumpGap",10),Kf=new xn(Fn,"JumpOver",11),hg=new xn(Fn,"End",17),$m=new xn(Fn,"Scale",18),e0=new xn(Fn,"Stretch",19),cg=new xn(Fn,"OrientAlong",21),dg=new xn(Fn,"OrientPlus90",22),fg=new xn(Fn,"OrientMinus90",23),Qv=new xn(Fn,"OrientOpposite",24),t0=new xn(Fn,"OrientUpright",25),pg=new xn(Fn,"OrientPlus90Upright",26),gg=new xn(Fn,"OrientMinus90Upright",27),n0=new xn(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=za,Fn.Bezier=Al,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){Ri(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){Ri(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=Un(),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 rn(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var rc=0,xd=1,Xf=999999,$v=Xf+1,ey=Xf+2;vg.className="PositionArray";function $d(){Ri(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 Xi?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(Pr,ft.alloc()),he=a.port.ga(io,ft.alloc());for(E=rn.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(Pr,se),Ne.ga($r,he),Ne.ga(io,ne),Ne.ga(ps,_e),Ye=Ge=Ee=Ne=0,b===Wv)for(var $e=0;$e<te.length;$e++){var st=te[$e];if(st!==null){var Et=st.link.computeThickness();switch(st.Nc){case 8:Ge+=Et;break;case 2:Ye+=Et;break;case 1:Ne+=Et;break;default:case 4:Ee+=Et}}}var St=$e=0,Tt=1,At=st=0;for(Et=0;Et<te.length;Et++){var Ot=te[Et];if(Ot!==null){if($e!==Ot.Nc){switch($e=Ot.Nc,$e){case 8:var Gt=ne;St=_e;break;case 2:Gt=_e,St=se;break;case 1:Gt=se,St=he;break;default:case 4:Gt=he,St=ne}switch(st=St.x-Gt.x,At=St.y-Gt.y,$e){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 en=Ot.Zo;if(b===Wv){switch(Ot=Ot.link.computeThickness(),Ot*=Tt,en.set(Gt),$e){case 8:en.x=Gt.x+st/2+Ge/2-St-Ot/2;break;case 2:en.y=Gt.y+At/2+Ye/2-St-Ot/2;break;case 1:en.x=Gt.x+st/2-Ne/2+St+Ot/2;break;default:case 4:en.y=Gt.y+At/2-Ee/2+St+Ot/2}St+=Ot}else{var Zn=.5;b===Km&&(Zn=(Ot.Uo+1)/(Ot.Gl+1)),en.x=Gt.x+st*Zn,en.y=Gt.y+At*Zn}}}for(ft.free(se),ft.free(he),ft.free(ne),ft.free(_e),Gt=a.pe,te=0;te<Gt.length;te++)b=Gt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,rn.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}$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,er,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 Zo(a){Ri(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)}Zo.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},Zo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Zo.prototype.qb=function(){},Zo.prototype.toString=function(){var a=An(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Zo.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())}}},Zo.prototype.createNetwork=function(){return new Mo(this)},Zo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof nn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Xi?y.lg(a.memberParts):y.lg(a.iterator),y},Zo.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")}},Zo.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()}},Zo.prototype.doLayout=function(a){var y=new kn;a instanceof nn?(Ic(this,y,a.nodes,!0,this.rh,!0,!1,!0),Ic(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Xi?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},Zo.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 Xi&&(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++}},Zo.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 Xi&&(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++}}},Zo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Xi&&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 Xi&&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()}Zo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new rn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Zo.prototype.ex=function(a){var y=new kn;return a instanceof nn?(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 Xi?Ic(this,y,a.memberParts,!1,null,!0,!0,!0):Ic(this,y,a.iterator,!1,null,!0,!0,!0),y},Zo.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(Pr),(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(Zo.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())}}}),Zo.prototype.collectParts=Zo.prototype.ex,Zo.prototype.getLayoutBounds=Zo.prototype.ni,Zo.prototype.invalidateLayout=Zo.prototype.C,Zo.className="Layout";function Mo(a){Ri(this),this.Sc=a,this.wf=new kn,this.ye=new kn,this.Es=new on,this.zs=new on}Mo.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 kn,this.ye=new kn,this.Es=new on,this.zs=new on},Mo.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},Mo.prototype.createVertex=function(){return new Ts(this)},Mo.prototype.createEdge=function(){return new yl(this)},Mo.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 Xi&&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))}}},Mo.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},et=Mo.prototype,et.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},et.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},et.Iu=function(a){if(a!==null&&uS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function uS(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}et.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},et.ki=function(a){return a===null?null:this.Es.I(a)},et.Bo=function(a){if(a!==null){ny(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ny(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}et.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},et.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),iy(this,a)}};function iy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}et.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},et.Lo=function(a){return a===null?null:this.zs.I(a)},et.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},et.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},et.Ko=function(){for(var a=Un(),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)},Mo.prototype.deleteArtificialVertexes=function(){for(var a=Un(),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=Un(),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=Un(),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)}Mo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new Mn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),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))}}Mo.prototype.dz=function(){for(var a=new kn,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(Mo.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}}}),Mo.prototype.findAllParts=Mo.prototype.dz,Mo.prototype.splitIntoSubNetworks=Mo.prototype.Zx,Mo.prototype.deleteSelfEdges=Mo.prototype.Ko,Mo.prototype.reverseEdge=Mo.prototype.gm,Mo.prototype.linkVertexes=Mo.prototype.Zj,Mo.prototype.findEdge=Mo.prototype.Lo,Mo.prototype.deleteLink=Mo.prototype.Yy,Mo.prototype.deleteEdge=Mo.prototype.Mj,Mo.prototype.addLink=Mo.prototype.Dy,Mo.prototype.addEdge=Mo.prototype.Bo,Mo.prototype.findVertex=Mo.prototype.ki,Mo.prototype.deleteNode=Mo.prototype.Zy,Mo.prototype.deleteVertex=Mo.prototype.Iu,Mo.prototype.addNode=Mo.prototype.Bl,Mo.prototype.addVertex=Mo.prototype.dh,Mo.prototype.addParts=Mo.prototype.lg,Mo.className="LayoutNetwork";function Ts(a){Ri(this),this.ob=a,this.j=new rn(0,0,10,10).freeze(),this.o=new ft(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Mn,this.mg=new Mn}Ts.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Mn,this.mg=new Mn},Ts.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+mr(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},Ts.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Yt(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 Xi)){x=rn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(tr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),rn.free(x);return}rn.free(x)}a.moveTo(y.x,y.y)}},Ts.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Ts.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Ts.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Ts.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(Ts.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=rn.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,te=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,te,b),rn.free(x),!(a instanceof Xi)&&(a=a.locationObject.ga(tr),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 kn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new kn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new kn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new Mn,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),Ts.prototype.deleteDestinationEdge=Ts.prototype.Jl,Ts.prototype.addDestinationEdge=Ts.prototype.zl,Ts.prototype.deleteSourceEdge=Ts.prototype.Kl,Ts.prototype.addSourceEdge=Ts.prototype.Cl,Ts.className="LayoutVertex",Ts.standardComparer=oy,Ts.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function yl(a){Ri(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}yl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},yl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+mr(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},yl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},yl.prototype.commit=function(){},yl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},nt.Object.defineProperties(yl.prototype,{network:{get:function(){return this.nb},set:function(a){this.nb=a}},data:{get:function(){return this.ub},set:function(a){this.ub!==a&&(this.ub=a)}},link:{get:function(){return this.$k},set:function(a){this.$k!==a&&(this.$k=a)}},fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}}}),yl.prototype.getOtherVertex=yl.prototype.Ax,yl.className="LayoutEdge";function ia(a){Zo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Pn(NaN,NaN).freeze(),this.tf=new Pn(10,10).freeze(),this.Jb=Sg,this.Rb=a0,this.nd=xg,this.hd=hS,a&&Object.assign(this,a)}Je(ia,Zo),ia.prototype.cloneProtected=function(a){Zo.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},ia.prototype.qb=function(a){a.classType===ia?a===xg||a===u0||a===sy||a===l0?this.sorting=a:a===a0||a===Du?this.arrangement=a:a===Sg||a===s0?this.alignment=a:wt("Unknown enum value: "+a):Zo.prototype.qb.call(this,a)},ia.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 Xi)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=rn.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 $e=Ye=this.arrangementOrigin.x,st=this.arrangementOrigin.y,Et=0,St=0,Tt=0;Tt<E.length;Tt++){var At=E[Tt],Ot=this.ni(At,_e),Gt=Math.ceil((Ot.width+se)/Ee)*Ee,en=Math.ceil((Ot.height+he)/Ne)*Ne;switch(Ge){case Du:var Zn=Math.abs($e-Ot.width);break;default:Zn=$e+Ot.width}switch((0<te&&Et>te-1||0<ne&&0<Et&&Zn-Ye>ne)&&(b.push(new rn(0,st,ne+se,St)),Et=0,$e=Ye,st+=St,St=0),St=Math.max(St,en),Ge){case Du:Ot=-Ot.width;break;default:Ot=0}switch(At.moveTo($e+Ot,st),Ge){case Du:$e-=Gt;break;default:$e+=Gt}Et++}b.push(new rn(0,st,ne+se,St)),rn.free(_e);break;case Sg:for(he=ne,Ee=te,Ne=y,Ge=x,ne=rn.alloc(),Ye=Math.max(this.cellSize.width,1),te=st=_e=0,se=ft.alloc(),$e=0;$e<E.length;$e++)St=E[$e],Et=this.ni(St,ne),St=ec(St,St.locationObject,St.locationSpot,se),_e=Math.max(_e,St.x),st=Math.max(st,Et.width-St.x),te=Math.max(te,St.y);switch($e=this.arrangement,$e){case Du:_e+=Ne;break;default:st+=Ne}Ye=isFinite(Ye)?Math.max(Ye+Ne,1):Math.max(_e+st,1);var ui=St=this.arrangementOrigin.x;for(Tt=this.arrangementOrigin.y,st=0,he>=_e&&(he-=_e),_e=At=0,Gt=Math.max(this.cellSize.height,1),Ot=te=0,en=!0,Et=ft.alloc(),Zn=0;Zn<E.length;Zn++){var ri=E[Zn],Rn=this.ni(ri,ne),wn=ec(ri,ri.locationObject,ri.locationSpot,se);if(0<st)switch($e){case Du:ui=(ui-St-(Rn.width-wn.x))/Ye,ui=Zt.$(Math.round(ui),ui)?Math.round(ui):Math.floor(ui),ui=ui*Ye+St;break;default:ui=(ui-St+wn.x)/Ye,ui=Zt.$(Math.round(ui),ui)?Math.round(ui):Math.ceil(ui),ui=ui*Ye+St}else switch($e){case Du:At=ui+wn.x+Rn.width;break;default:At=ui-wn.x}switch($e){case Du:var Yi=-(ui+wn.x)+At;break;default:Yi=ui+Rn.width-wn.x-At}if(0<Ee&&st>Ee-1||0<he&&0<st&&Yi>he){for(b.push(new rn(0,en?Tt-te:Tt,he+Ne,Ot+te+Ge)),ui=0;ui<st&&Zn!==st;ui++){Yi=E[Zn-st+ui];var zi=ec(Yi,Yi.locationObject,Yi.locationSpot,Et);Yi.moveTo(Yi.position.x,Yi.position.y+te-zi.y)}Ot+=Ge,Tt=en?Tt+Ot:Tt+(Ot+te),st=Ot=te=0,ui=St,en=!1}switch(ui===St&&(_e=$e===Du?Math.max(_e,Rn.width-wn.x):Math.min(_e,-wn.x)),te=Math.max(te,wn.y),Ot=Math.max(Ot,Rn.height-wn.y),isFinite(Gt)&&(Ot=Math.max(Ot,Math.max(Rn.height,Gt)-wn.y)),en?ri.moveTo(ui-wn.x,Tt-wn.y):ri.moveTo(ui-wn.x,Tt),$e){case Du:ui-=wn.x+Ne;break;default:ui+=Rn.width-wn.x+Ne}st++}if(b.push(new rn(0,Tt,he+Ne,(en?Ot:Ot+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(Et),$e===Du)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);rn.free(ne)}for(se=te=ne=E=0;se<b.length;se++)he=b[se],E=Math.min(E,he.x),ne=Math.min(ne,he.y),te=Math.max(te,he.x+he.width);this.arrangement===Du?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}},ia.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}nt.Object.defineProperties(ia.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!==Du||(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 xn(ia,"Position",0),Sg=new xn(ia,"Location",1),a0=new xn(ia,"LeftToRight",2),Du=new xn(ia,"RightToLeft",3),sy=new xn(ia,"Forward",4),l0=new xn(ia,"Reverse",5),xg=new xn(ia,"Ascending",6),u0=new xn(ia,"Descending",7);ia.className="GridLayout",ia.standardComparer=hS,ia.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},ia.Position=s0,ia.Location=Sg,ia.LeftToRight=a0,ia.RightToLeft=Du,ia.Forward=sy,ia.Reverse=l0,ia.Ascending=xg,ia.Descending=u0;function so(){this.On=new kn,this.Dn=new kn,this.Pa=new kn,this.cf=new on,this.bf=new on,this.aj=new on,this.H=null,this.tp=!1}et=so.prototype,et.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},et.Xe=function(a){this.H=a},et.oi=function(a){if(a instanceof Xn){if(this.On.add(a),a instanceof Xi){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 Br||this.Pa.add(a);y=a.data,y===null||a instanceof Br||(a instanceof Fn?this.bf.add(y,a):this.cf.add(y,a))},et.pc=function(a){if(a.Ej(),a instanceof Xn){if(this.On.remove(a),a instanceof Xi){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 Br||this.Pa.remove(a);y=a.data,y===null||a instanceof Br||(a instanceof Fn?this.bf.remove(y):this.cf.remove(y))},et.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof Xi)&&wt('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 Xi||wt('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||wt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Un(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Un(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Un(),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)}},so.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},so.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&&(nu(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)}}so.prototype.insertLink=function(){return null},so.prototype.resolveReferencesForData=function(){},so.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,bn('No Group template found for category "'+x+'"'),bn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,bn('No Node template found for category "'+x+'"'),bn(" Using default node template")),y=a.ny))),y}so.prototype.getLinkCategoryForData=function(){return""},so.prototype.setLinkCategoryForData=function(){},so.prototype.setFromNodeForLink=function(){},so.prototype.setToNodeForLink=function(){},so.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,bn('No Link template found for category "'+a+'"'),bn(" Using default link template")),x=y.my)),x},so.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},so.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},so.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Op(this.diagram,a,!1),this.unresolveReferencesForPart(a))},so.prototype.unresolveReferencesForPart=function(){},so.prototype.removeDataForLink=function(){},so.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},so.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)},so.prototype.findLinkForKey=function(){return null},et=so.prototype,et.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},et.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Xn?a:null)},et.Kc=function(a){return a===null?null:this.bf.I(a)},et.ms=function(a){for(var y=0;y<arguments.length;++y);y=new kn;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(Yt(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},et.ls=function(a){for(var y=0;y<arguments.length;++y);y=new kn;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(Yt(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(gn(te)){if(!gn(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(Yt(y)&&Yt(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}so.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===es){var ne=a.newValue;b==="nodeDataArray"&&Yt(ne)&&cS(this,ne),y.isModified=!0}else if(x===Jo){var se=a.oldValue;b==="nodeDataArray"&&Yt(se)&&this.ip(se),y.isModified=!0}else x===ha&&(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===es||x===Jo){var Ee=a.change===es,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 $e=Ye[a];if(Ee)Mm($e,Ge,Ne,!0);else if(!(0>Ne)){var st=Ne+tg($e);$e.pc(st,!0),wv($e,st,Ne)}}y.isModified=!0}}finally{y.aa=!0}}}}},so.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)},so.prototype.rp=function(){for(var a=this.H.model,y=new kn,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()},so.prototype.refreshDataBoundLinks=function(){},so.prototype.updateRelationshipsFromData=function(){},so.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=Un()),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(gn(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(gn(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}}}}so.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new on;if(gn(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 kn;for(var te=new on,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 on;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 Ei))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 Xi&&te instanceof Xi)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}so.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),Yt(b)&&(E.xf(b),x=y.Lc(b)))}else nu(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)),Yt(E)&&(x.data=E)));return x},nt.Object.defineProperties(so.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}}}),so.prototype.updateAllRelationshipsFromData=so.prototype.rp,so.prototype.findLinksByExample=so.prototype.ls,so.prototype.findNodesByExample=so.prototype.ms,so.prototype.findLinkForData=so.prototype.Kc,so.prototype.findNodeForData=so.prototype.ii,so.prototype.findPartForData=so.prototype.Lc,so.prototype.findNodeForKey=so.prototype.Vb,so.prototype.removeModeledPart=so.prototype.ip,so.prototype.removeModeledParts=so.prototype.Gs,so.prototype.rebuildParts=so.prototype.Wd;var pS=!1,gS=!1,mS=!1;so.className="PartManager";function Ws(a){so.apply(this,arguments)}Je(Ws,so),Ws.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},Ws.prototype.addModeledParts=function(a){for(so.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){nu(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=Nl(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=Nl(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=so.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(so.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 $e=a.newValue;if($e!==void 0){var st=this.Vb($e);st instanceof Xi?Ye.containingGroup=st:Ye.containingGroup=null}else Ye.containingGroup=null}}else if(E==="linkLabelKeys"){var Et=this.Kc(a.object);if(Et!==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=Et)})}}else if(E==="linkCategory"){var At=this.Kc(a.object),Ot=a.newValue;At!==null&&typeof Ot=="string"&&(At.category=Ot)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===es){var Gt=a.newValue;if(E==="linkDataArray"&&typeof Gt=="object"&&Gt!==null)yS(this,Gt);else if(E==="linkLabelKeys"&&Fc(Gt)){var en=this.Kc(a.object),Zn=this.Vb(Gt);en!==null&&Zn!==null&&(Zn.labeledLink=en)}x.isModified=!0}else if(b===Jo){var ui=a.oldValue;if(E==="linkDataArray"&&typeof ui=="object"&&ui!==null)this.ip(ui);else if(E==="linkLabelKeys"&&Fc(ui)){var ri=this.Vb(ui);ri!==null&&(ri.labeledLink=null)}x.isModified=!0}}else if(b===Ro){var Rn=a.propertyName;a.object!==x.model||Rn!=="linkFromKeyProperty"&&Rn!=="linkToKeyProperty"&&Rn!=="linkFromPortIdProperty"&&Rn!=="linkToPortIdProperty"&&Rn!=="linkLabelKeysProperty"&&Rn!=="nodeIsGroupProperty"&&Rn!=="nodeGroupKeyProperty"&&Rn!=="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 kn,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=Nl(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Nl(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 kn().addAll(y);var ne=new kn;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 Br)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Xi)&&(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 Xi&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof Xn&&(Nl(y,ne,!0)===x&&(te.link.fromNode=E),Nl(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(se){return function(he){return he===x?(E.labeledLink=se.link,!0):!1}}(te)))),te={link:te.link}}Iu(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Xi&&(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();)Ou(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Ou(y,x,b.data)),a instanceof Xi)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Ou(y,x,b)}}},Ws.prototype.copyPartData=function(a,y){var x=so.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(nu(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&&(nu(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 Gl(){so.apply(this,arguments),this.Sg=null}Je(Gl,so);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||!Pi(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(nu(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}}}Gl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Gl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Gl.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}},Gl.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))},Gl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Gl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Gl.prototype.doModelChanged=function(a){if(so.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}}}}},Gl.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)))}}},Gl.prototype.updateDataBindings=function(a,y){so.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Gl.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))}Iu(y,x)}a=y.mh(a),a!==void 0&&E instanceof Xn&&(a=this.Vb(a),c0(this,a,E))}},Gl.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(Jo,"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)&&Ou(y,x,E)}},Gl.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},Gl.prototype.findLinkForKey=Gl.prototype.findLinkForKey,Gl.className="TreePartManager";function pi(a,y){this.kl=new kn,this.il=new kn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,Ri(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new on,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 on,this.Lt=new Mn,this.Wg=!1,this.o=null,this.undoManager=new No,a!==void 0&&(gn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}pi.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},pi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},pi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},pi.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)+":"+Li(E)}}return y},pi.prototype.xA=function(a){a.change!==ha&&wt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof ds?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},pi.prototype.Qv=function(a,y){var x=this,b=!1,E=new kn,te=new kn,ne=new kn,se=this.vh;a.changes.each(function(Ne){Ne.model===x&&(Ne.modelChange==="nodeDataArray"?Ne.change===es?E.add(Ne.newValue):Ne.change===Jo&&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 pi||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},pi.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=eo++,b.set(Ne,Ge),E.set(Ne,y))}if(!Yt(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new on),se){var he=b.get(y);if(he)return he}else for(E||(E=new on),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 Pn||y instanceof rn||y instanceof $i||y instanceof li)he=y.copy(),ne(y,he);else{if(y instanceof oo||y instanceof In||y instanceof xn)return y;if(y instanceof Mn)he=new Mn().addAll(Jf(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof kn)he=new kn().addAll(Jf(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof on)he=new on().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}et=pi.prototype,et.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},et.rm=function(){var a="";return this.name!==""&&(a+=`,
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},et.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function xS(a,y){y=y.modelData,Yt(y)&&(a.dm(y),a.modelData=y)}et.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!bS(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+hy(this,this.modelData)),a+`,
"nodeDataArray": `+Rc(this,this.nodeDataArray,!0)},et.kv=function(a){xS(this,a),a=a.nodeDataArray,gn(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 kn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new on,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===es||te===Jo)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function _S(a,y){for(var x=new kn,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(Yt(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}et.Pv=function(a,y){var x=this,b=!1,E=new kn,te=new kn,ne=new kn,se=this.vh;a.changes.each(function(Ee){Ee.model===x&&(Ee.modelChange==="nodeDataArray"?Ee.change===es?E.add(Ee.newValue):Ee.change===Jo&&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 pi||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},et.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&wt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new on;if(Array.isArray(x))for(var E=0;E<x.length;E++){var te=x[E],ne=this.wa(te);ne!=null&&b.set(ne,te)}if(Array.isArray(y))for(E=y.length,te=0;te<E;te++){ne=y[te];var se=this.hc(ne);se===null&&(se=(se=b.get(ne))?se:this.copyNodeData({}),this.km(se,ne),this.xf(se))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],te=this.wa(E),te=this.hc(te),te!==null){for(var he in E)he==="__gohashid"||he===this.nodeKeyProperty||this.Wj()&&he===this.nodeIsGroupProperty||this.setDataProperty(te,he,E[he]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,he=0;he<x;he++)y=this.hc(a[he]),y!==null&&this.cm(y)},et.$x=function(a,y){a.change!==ha&&wt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof ds?(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 }'},et.yA=function(a,y){return this.$x(a,y)},et.np=function(a){return a===void 0&&(a=_g(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},et.toJSON=function(a){return this.np(a)},et.Zw=function(a){var y=null;if(typeof a=="string")try{y=Kt.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:wt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&wt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},et.Ky=function(a){return this.Zw(a)},pi.constructGraphLinksModel=function(){return new pi},et=pi.prototype,et.dm=function(a){if(gn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Yt(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:wt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Yt(a)){for(y in a)if(x=a[y],Yt(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new Mn,b=0;b<x.length/2;b++)E.add(new ft(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Nx(a)}return a},et.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):gn(a)?Rc(this,a):Yt(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 mi;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 Ua(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:Ua(x.x),y:Ua(x.y)};else if(x instanceof Pn)y={class:"go.Size",width:Ua(x.width),height:Ua(x.height)};else if(x instanceof rn)y={class:"go.Rect",x:Ua(x.x),y:Ua(x.y),width:Ua(x.width),height:Ua(x.height)};else if(x instanceof $i)y={class:"go.Margin",top:Ua(x.top),right:Ua(x.right),bottom:Ua(x.bottom),left:Ua(x.left)};else if(x instanceof li)x.sb()?y={class:"go.Spot",x:Ua(x.x),y:Ua(x.y),offsetX:Ua(x.offsetX),offsetY:Ua(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof oo){if(y={class:"go.Brush",type:x.type.name},x.type===qh?y.color=x.color:(x.type===Dh||x.type===Ul)&&(y.start=x.start,y.end=x.end,x.type===Ul&&(x.startRadius!==0&&(y.startRadius=Ua(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Ua(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 In?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Ua(x.startX)),x.startY!==0&&(y.startY=Ua(x.startY)),x.endX!==0&&(y.endX=Ua(x.endX)),x.endY!==0&&(y.endY=Ua(x.endY)),x.spot1.D(Pr)||(y.spot1=x.spot1),x.spot2.D(io)||(y.spot2=x.spot2),x.type===In.o&&(y.path=In.ia(x))):x instanceof xn&&(y={class:"go.EnumValue",classType:_g(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=fs(y,E);if(!bS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof Mn){var ne="[";for(te=te.iterator;te.next();){var se=te.value;1<ne.length&&(ne+=","),ne+=a.sm(se.x),ne+=",",ne+=a.sm(se.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function Ha(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(Ha(a.x),Ha(a.y));else if(y==="Size")x=new Pn(Ha(a.width),Ha(a.height));else if(y==="Rect")x=new rn(Ha(a.x),Ha(a.y),Ha(a.width),Ha(a.height));else if(y==="Margin")x=new $i(Ha(a.top),Ha(a.right),Ha(a.bottom),Ha(a.left));else if(y==="Spot")typeof a.enum=="string"?x=zo(a.enum):x=new li(Ha(a.x),Ha(a.y),Ha(a.offsetX),Ha(a.offsetY));else if(y==="Brush"){if(x=new oo,x.type=Vn(oo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof li&&(x.start=a.start),a.end instanceof li&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Ha(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Ha(a.endRadius)),a=a.colorStops,Yt(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=In.parse(a.path):x=new In,x.type=Vn(In,a.type),typeof a.startX=="number"&&(x.startX=Ha(a.startX)),typeof a.startY=="number"&&(x.startY=Ha(a.startY)),typeof a.endX=="number"&&(x.endX=Ha(a.endX)),typeof a.endY=="number"&&(x.endY=Ha(a.endY)),a.spot1 instanceof li&&(x.spot1=a.spot1),a.spot2 instanceof li&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=Vn(b,a.name)));return x}et.Pe=function(a){return this.Lt.add(a),this},et.ik=function(a){this.Lt.remove(a)},et.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},et.cb=function(a,y,x,b,E,te,ne){Ls(this,"",a,y,x,b,E,te,ne)},et.g=function(a,y,x,b,E){Ls(this,"",Ro,a,this,y,x,b,E)},et.Fs=function(a,y,x,b,E,te){Ls(this,"",Ro,y,a,x,b,E,te)};function Ls(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)}pi.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===es?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Yt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&jn(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&vn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!gn(b)&&a.propertyName&&(b=fs(a.object,a.propertyName)),gn(b)&&typeof x=="number"&&(a=a.newValue,y?jn(b,x):vn(b,x,a))):wt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Jo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Yt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&vn(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&jn(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!gn(b)&&a.propertyName&&(b=fs(a.object,a.propertyName)),gn(b)&&typeof x=="number"&&(a=a.oldValue,y?vn(b,x,a):jn(b,x))):wt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ha&&wt("unknown ChangedEvent: "+a.toString())},pi.prototype.Ea=function(a){return this.undoManager.Ea(a)},pi.prototype.eb=function(a){return this.undoManager.eb(a)},pi.prototype.Kf=function(){return this.undoManager.Kf()},pi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},et=pi.prototype,et.La=function(a,y){y===void 0&&(y=""),Ls(this,"SourceChanged",ha,y,a,null,null)},et.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=fs(a,y),y!==void 0)){if(Fc(y))return y;wt("Key value for node data "+a+" is not a number or a string: "+y)}}},et.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=fs(a,x);b!==y&&this.hc(y)===null&&(Wo(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Ls(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"}et.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},et.hc=function(a){return a===null&&wt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Fc(a)?this.kb.I(a):null},et.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){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)}}}}},et.xf=function(a){a!==null&&(kr(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&&wt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,vn(a.Tc,b,y)),Ls(a,"nodeDataArray",es,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}et.Fy=function(a){if(gn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},et.cm=function(a){a!==null&&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;jn(a.Tc,b)}Ls(a,"nodeDataArray",Jo,"nodeDataArray",a,y,null,b,null),a.qp(y)}et.nA=function(a){if(gn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},et.$z=function(a){if(a!==this.nodeDataArray&&gn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.wa(te);if(ne!==void 0){x.add(ne);var se=this.hc(ne);se!==te&&(se!==null?(this.Do(se,te),this.lm(te,se)):(te=this.cloneDeep(te),this.km(te,ne),this.xf(te)))}else ne=this.cloneDeep(te),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},et.jp=function(a,y){y!==void 0&&(a=wg(this,a),a instanceof kn&&this.Vf.add(y,a))},et.Lv=function(){},et.fm=function(){},et.em=function(){},et.qp=function(){};function Ou(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new kn,a.Vf.add(y,b)),b.add(x)}}function Iu(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof kn&&(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 kn?a:null)}et.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},pi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),Yt(a)&&Ri(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 Ri(b),b}if(x&&Yt(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=fs(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 pi||te instanceof No||te instanceof ds||te instanceof Io||(te=f0(a,te,!1)),Wo(x,b,te)}return Ri(x),x}return y instanceof ft||y instanceof Pn||y instanceof rn||y instanceof li||y instanceof $i?y.copy():y}pi.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 Wt&&(ES=!0,bn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),bn(" Is that really your intent?"));var b=fs(a,y);b!==x&&(Wo(a,y,x),this.Fs(a,y,b,x))},et=pi.prototype,et.set=function(a,y,x){this.setDataProperty(a,y,x)},et.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},et.Ay=function(a,y){this.ts(a,-1,y)},et.ts=function(a,y,x){0>y&&(y=a.length),vn(a,y,x),Ls(this,"",es,"",a,null,x,null,y)},et.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&wt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];jn(a,y),Ls(this,"",Jo,"",a,x,null,y,null)},et.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=fs(a,y),y===void 0))return"";if(typeof y=="string")return y;wt("getCategoryForNodeData found a non-string category for "+a+": "+y)},et.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=fs(a,x);b===void 0&&(b=""),b!==y&&(Wo(a,x,y),Ls(this,"nodeCategory",Ro,x,a,b,y))}else Wo(a,x,y)}},et.lm=function(a,y){this.jm(y,this.Ro(a))},et.Tl=function(){return!1},et.Wj=function(){return!1},et.ri=function(){return!1},et.xs=function(){return!1},et.Xj=function(){return!1};function cy(){return new pi}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 yu[a]?yu[a]:Kt.go!==void 0&&Kt.go[a]?Kt.go[a]:null}function fs(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(pi.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===""&&wt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&wt("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];Yt(E)||wt("Model.nodeDataArray must only contain Objects, not: "+E),kr(E)}for(this.Tc=a,b=new Mn,E=0;E<x;E++){var te=a[E],ne=this.wa(te);ne===void 0||this.kb.I(ne)!==null?b.add(te):this.kb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),te=this.wa(E),te!==void 0&&this.kb.add(te,E);for(Ls(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"}}}),pi.prototype.setCategoryForNodeData=pi.prototype.jm,pi.prototype.getCategoryForNodeData=pi.prototype.Ro,pi.prototype.removeArrayItem=pi.prototype.ov,pi.prototype.insertArrayItem=pi.prototype.ts,pi.prototype.addArrayItem=pi.prototype.Ay,pi.prototype.assignAllDataProperties=pi.prototype.Do,pi.prototype.set=pi.prototype.set,pi.prototype.clearUnresolvedReferences=pi.prototype.Qy,pi.prototype.mergeNodeDataArray=pi.prototype.$z,pi.prototype.removeNodeDataCollection=pi.prototype.nA,pi.prototype.removeNodeData=pi.prototype.cm,pi.prototype.addNodeDataCollection=pi.prototype.Fy,pi.prototype.addNodeData=pi.prototype.xf,pi.prototype.makeNodeDataKeyUnique=pi.prototype.$u,pi.prototype.findNodeDataForKey=pi.prototype.hc,pi.prototype.containsNodeData=pi.prototype.lb,pi.prototype.setKeyForNodeData=pi.prototype.km,pi.prototype.getKeyForNodeData=pi.prototype.wa,pi.prototype.updateTargetBindings=pi.prototype.La,pi.prototype.commit=pi.prototype.commit,pi.prototype.rollbackTransaction=pi.prototype.Kf,pi.prototype.commitTransaction=pi.prototype.eb,pi.prototype.startTransaction=pi.prototype.Ea,pi.prototype.raiseDataChanged=pi.prototype.Fs,pi.prototype.raiseChanged=pi.prototype.g,pi.prototype.raiseChangedEvent=pi.prototype.cb,pi.prototype.removeChangedListener=pi.prototype.ik,pi.prototype.addChangedListener=pi.prototype.Pe,pi.prototype.writeJsonValue=pi.prototype.sm,pi.prototype.replaceJsonObjects=pi.prototype.dm,pi.prototype.applyIncrementalJSON=pi.prototype.Ky,pi.prototype.applyIncrementalJson=pi.prototype.Zw,pi.prototype.toJSON=pi.prototype.toJSON,pi.prototype.toJson=pi.prototype.np,pi.prototype.toIncrementalJSON=pi.prototype.yA,pi.prototype.toIncrementalJson=pi.prototype.$x,pi.prototype.toIncrementalData=pi.prototype.xA,pi.prototype.clear=pi.prototype.clear;var ES=!1,yu={};pi.className="Model",pi.fromJSON=pi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Kt.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:wt("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=Kt[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof pi?y=a:wt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=pi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},pi.safePropertyValue=fs,pi.safePropertySet=Wo,yu.Brush=oo,yu.ChangedEvent=Io,yu.Geometry=In,yu.Margin=$i,yu.Panel=Dn,yu.Point=ft,yu.Rect=rn,yu.Size=Pn,yu.Spot=li,yu.Transaction=ds,yu.UndoManager=No;function vs(a,y,x,b){Ri(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 kn}vs.prototype.copy=function(){var a=new vs;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},et=vs.prototype,et.qb=function(a){a.classType===vs&&(this.mode=a)},et.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.Kx=function(a){return a===void 0&&(a=null),this.mode=bg,this.backConverter=a,this},et.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},et.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function LS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}et.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")bn("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=fs(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){}}}},et.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=fs(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,$e=b.panel.itemArray;he.ov($e,Ye),he.ts($e,Ye,Ge)}}}catch(st){}}finally{this.st.remove(a)}}}},nt.Object.defineProperties(vs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&zt(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&zt(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&zt(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&zt(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&zt(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&zt(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&zt(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&zt(this),this.el=a}}}),vs.prototype.updateSource=vs.prototype.sp,vs.prototype.updateTarget=vs.prototype.Mv,vs.prototype.ofModel=vs.prototype.dA,vs.prototype.ofObject=vs.prototype.cp,vs.prototype.makeTwoWay=vs.prototype.Kx;var Dx="Binding",MS=new xn(vs,"OneWay",1),bg=new xn(vs,"TwoWay",2);vs.className="Binding",vs.parseEnum=function(a,y){return function(x){return x=Vn(a,x),x===null?y:x}},vs.toString=Li,vs.OneWay=MS,vs.TwoWay=bg;function Ar(a,y,x){pi.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new kn,this.wb=new on,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&&(gn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Je(Ar,pi),Ar.constructGraphLinksModel=pi.constructGraphLinksModel,Ar.prototype.cloneProtected=function(a){pi.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},et=Ar.prototype,et.clear=function(){pi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},et.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;var x=a.length,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Li(E)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Nl(this,E,!0)+"-->"+Nl(this,E,!1)}return y},et.Qv=function(a,y){this.linkKeyProperty===""&&wt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=pi.prototype.Qv.call(this,a,y),b=this,E=new kn,te=new kn,ne=new kn,se=this.vh;a.changes.each(function(Ee){Ee.model===b&&(Ee.modelChange==="linkDataArray"?Ee.change===es?E.add(Ee.newValue):Ee.change===Jo&&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 pi||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},et.rm=function(){var a=pi.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},et.gp=function(a){pi.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},et.Rv=function(){var a=pi.prototype.Rv.call(this),y=`,
"linkDataArray": `+Rc(this,this.linkDataArray,!0);return a+y},et.kv=function(a){pi.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 kn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];d0(a,y,E,E,x)}return x}et.Pv=function(a,y){this.linkKeyProperty===""&&wt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=pi.prototype.Pv.call(this,a,y),b=this,E=new kn,te=new kn,ne=new kn,se=this.vh;a.changes.each(function(Ee){Ee.model===b&&(Ee.modelChange==="linkDataArray"?Ee.change===es?E.add(Ee.newValue):Ee.change===Jo&&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 pi||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},et.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&wt("applyIncrementalJson cannot change Model properties"),pi.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)},Ar.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===es){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Yt(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===Jo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Yt(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}}pi.prototype.changeState.call(this,a,y)}},et=Ar.prototype,et.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),Wo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},et.yx=function(a){return Nl(this,a,!0)},et.wv=function(a,y){qf(this,a,y,!0)},et.Bx=function(a){return Nl(this,a,!1)},et.Bv=function(a,y){qf(this,a,y,!1)};function Nl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=fs(y,a),a!==void 0))){if(Fc(a))return a;wt((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=fs(y,E);te!==x&&(Iu(a,te,y),Wo(y,E,x),a.hc(x)===null&&Ou(a,x,y),Ls(a,b?"linkFromKey":"linkToKey",Ro,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Wo(y,E,x)}}et.zx=function(a){return p0(this,a,!0)},et.xv=function(a,y){Qf(this,a,y,!0)},et.Cx=function(a){return p0(this,a,!1)},et.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=fs(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=fs(y,E);te===void 0&&(te=""),te!==x&&(Wo(y,E,x),Ls(a,b?"linkFromPortId":"linkToPortId",Ro,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Wo(y,E,x)}}et.Ef=function(a){if(a===null)return g0;var y=this.je;return y===""?g0:(a=fs(a,y),a===void 0?g0:a)},et.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=fs(a,x);if(b===void 0&&(b=g0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)Iu(this,b[te],a);for(Wo(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&Ou(this,ne,a)}Ls(this,"linkLabelKeys",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Wo(a,x,y)}},et.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=fs(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&&Ou(this,y,a),Ls(this,"linkLabelKeys",es,x,a,null,y,null,E)))}else wt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},et.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=fs(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Iu(this,y,a),Ls(this,"linkLabelKeys",Jo,x,a,y,null,E,null)))}else b!==void 0&&wt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},et.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=fs(a,y),y!==void 0)){if(Fc(y))return y;wt("Key value for link data "+a+" is not a number or a string: "+y)}}},et.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=fs(a,x);b!==y&&this.jh(y)===null&&(Wo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Ls(this,"linkKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},et.jh=function(a){return a===null&&wt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Fc(a)?this.wb.I(a):null},et.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){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)}}}}},et.Jc=function(a){return a===null?!1:this.$f.contains(a)},et.fi=function(a){a!==null&&(kr(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&&wt("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)),Ls(a,"linkDataArray",es,"linkDataArray",a,null,y,null,b),fy(a,y)}et.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},et.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(Ls(a,"linkDataArray",Jo,"linkDataArray",a,y,null,b,null),x=Nl(a,y,!0),Iu(a,x,y),x=Nl(a,y,!1),Iu(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],Iu(a,x,y)}et.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},et.Zz=function(a){if(this.linkKeyProperty===""&&wt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&gn(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=Nl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Ou(a,x,y),x=Nl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Ou(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&&Ou(a,x,y)}et.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):f0(this,a,!0),Yt(a)&&(Ri(a),this.lf!==""&&Wo(a,this.lf,void 0),this.mf!==""&&Wo(a,this.mf,void 0),this.je!==""&&Wo(a,this.je,[])),a},et.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!fs(a,y)},et.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=fs(a,y),y!==void 0)){if(Fc(y))return y;wt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},et.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=fs(a,x);b!==y&&(Iu(this,b,a),Wo(a,x,y),this.hc(y)===null&&Ou(this,y,a),Ls(this,"nodeGroupKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},Ar.prototype.copyNodeData=function(a){return a===null?null:(a=pi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||fs(a,this.Je)===void 0||Wo(a,this.Je,void 0),a)},Ar.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=fs(a,y);b!==x&&(Wo(a,y,x),this.Fs(a,y,b,x))},et=Ar.prototype,et.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&fs(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},et.jp=function(a,y){pi.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(Nl(this,b,!0)===E){var ne=this.lf;Wo(b,ne,te),Ls(this,"linkFromKey",Ro,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(Nl(this,b,!1)===E&&(ne=this.mf,Wo(b,ne,te),Ls(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,Ls(this,"linkLabelKeys",es,he,b,E,te,_e,_e))}},et.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Wo(a,b,x),Ls(this,"nodeGroupKey",Ro,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.Lv=function(){pi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},et.fm=function(a){pi.prototype.fm.call(this,a),a=this.wa(a);var y=wg(this,a);if(y!==null){var x=Un();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Ls(this,"nodeGroupKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Nl(this,b,!0)===a&&(E=this.lf,Ls(this,"linkFromKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Nl(this,b,!1)===a&&(E=this.mf,Ls(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&&(Ls(this,"linkLabelKeys",es,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)Iu(this,a,x[y]);Gn(x)}},et.em=function(a){pi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Ou(this,y,a)},et.qp=function(a){pi.prototype.qp.call(this,a);var y=this.lh(a);Iu(this,y,a)},et.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=fs(a,y),y===void 0))return"";if(typeof y=="string")return y;wt("getCategoryForLinkData found a non-string category for "+a+": "+y)},Ar.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Ar.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=fs(a,x);b===void 0&&(b=""),b!==y&&(Wo(a,x,y),Ls(this,"linkCategory",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},Ar.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},et=Ar.prototype,et.lm=function(a,y){pi.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))}et.Wj=function(){return!0},et.ri=function(){return!0},et.xs=function(){return!0},et.Xj=function(){return!0},nt.Object.defineProperties(Ar.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];Yt(E)||wt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),kr(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Mn,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new kn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Ls(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"}}}),Ar.prototype.setCategoryForLinkData=Ar.prototype.lp,Ar.prototype.getCategoryForLinkData=Ar.prototype.ps,Ar.prototype.assignAllDataProperties=Ar.prototype.Do,Ar.prototype.setGroupKeyForNodeData=Ar.prototype.mp,Ar.prototype.getGroupKeyForNodeData=Ar.prototype.lh,Ar.prototype.isGroupForNodeData=Ar.prototype.Yu,Ar.prototype.copyLinkData=Ar.prototype.Jo,Ar.prototype.mergeLinkDataArray=Ar.prototype.Zz,Ar.prototype.removeLinkDataCollection=Ar.prototype.lA,Ar.prototype.removeLinkData=Ar.prototype.bm,Ar.prototype.addLinkDataCollection=Ar.prototype.Ey,Ar.prototype.addLinkData=Ar.prototype.fi,Ar.prototype.containsLinkData=Ar.prototype.Jc,Ar.prototype.makeLinkDataKeyUnique=Ar.prototype.Bs,Ar.prototype.findLinkDataForKey=Ar.prototype.jh,Ar.prototype.setKeyForLinkData=Ar.prototype.Ks,Ar.prototype.getKeyForLinkData=Ar.prototype.Ac,Ar.prototype.removeLabelKeyForLinkData=Ar.prototype.Qx,Ar.prototype.addLabelKeyForLinkData=Ar.prototype.Bu,Ar.prototype.setLabelKeysForLinkData=Ar.prototype.Ls,Ar.prototype.getLabelKeysForLinkData=Ar.prototype.Ef,Ar.prototype.setToPortIdForLinkData=Ar.prototype.Cv,Ar.prototype.getToPortIdForLinkData=Ar.prototype.Cx,Ar.prototype.setFromPortIdForLinkData=Ar.prototype.xv,Ar.prototype.getFromPortIdForLinkData=Ar.prototype.zx,Ar.prototype.setToKeyForLinkData=Ar.prototype.Bv,Ar.prototype.getToKeyForLinkData=Ar.prototype.Bx,Ar.prototype.setFromKeyForLinkData=Ar.prototype.wv,Ar.prototype.getFromKeyForLinkData=Ar.prototype.yx,Ar.prototype.clear=Ar.prototype.clear;var g0=Object.freeze([]);Ar.className="GraphLinksModel",yu.GraphLinksModel=Ar,pi.constructGraphLinksModel=pi.constructGraphLinksModel=function(){return new Ar},pi.initDiagramModel=cy=function(){return new Ar};function Ga(a,y){pi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(gn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Je(Ga,pi),Ga.constructGraphLinksModel=pi.constructGraphLinksModel,Ga.prototype.cloneProtected=function(a){pi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},et=Ga.prototype,et.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Li(E)}}return y},et.rm=function(){var a=pi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},et.gp=function(a){pi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},et.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&wt("applyIncrementalJson cannot change Model properties"),pi.prototype.fp.call(this,a)},et.Vl=function(a){return a},et.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=fs(a,y),y!==void 0)){if(Fc(y))return y;wt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},et.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var b=fs(a,x);b!==y&&(Iu(this,b,a),Wo(a,x,y),this.hc(y)===null&&Ou(this,y,a),Ls(this,"nodeParentKey",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},et.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=fs(a,y),y===void 0)?"":typeof y=="string"?y:(wt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ga.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ga.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=fs(a,x);b===void 0&&(b=""),b!==y&&(Wo(a,x,y),Ls(this,"parentLinkCategory",Ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Wo(a,x,y)}},Ga.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ga.prototype.copyNodeData=function(a){return a===null?null:(a=pi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||fs(a,this.Ke)===void 0||Wo(a,this.Ke,void 0),a)},Ga.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=fs(a,y);b!==x&&(Wo(a,y,x),this.Fs(a,y,b,x))},et=Ga.prototype,et.jp=function(a,y){pi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},et.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Wo(a,b,x),Ls(this,"nodeParentKey",Ro,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.fm=function(a){pi.prototype.fm.call(this,a),a=this.wa(a);var y=wg(this,a);if(y!==null){var x=Un();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Ls(this,"nodeParentKey",Ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Iu(this,a,x[y]);Gn(x)}},et.em=function(a){pi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Ou(this,y,a)},et.qp=function(a){pi.prototype.qp.call(this,a);var y=this.mh(a);Iu(this,y,a)},et.lm=function(a,y){pi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},et.Tl=function(){return!0},et.xs=function(){return!0},nt.Object.defineProperties(Ga.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"}}}),Ga.prototype.setParentLinkCategoryForNodeData=Ga.prototype.Ms,Ga.prototype.getParentLinkCategoryForNodeData=Ga.prototype.ss,Ga.prototype.setParentKeyForNodeData=Ga.prototype.qe,Ga.prototype.getParentKeyForNodeData=Ga.prototype.mh,Ga.className="TreeModel",yu.TreeModel=Ga;function Qo(a){Zo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Su,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=Su,this.K=Wa,this.nd=ep,this.hd=oy,this.tf=6,this.Nn=_0,a&&Object.assign(this,a)}Je(Qo,Zo),Qo.prototype.cloneProtected=function(a){Zo.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},Qo.prototype.qb=function(a){a.classType===Qo?a===x0||a===w0||a===y0||a===S0||a===ep?this.sorting=a:a===wd||a===$f||a===Wa||a===jc?this.direction=a:a===oc||a===Bc||a===Su||a===xu?this.arrangement=a:(a===ef||a===_0)&&(this.nodeDiameterFormula=a):Zo.prototype.qb.call(this,a)},Qo.prototype.createNetwork=function(){return new tp(this)},Qo.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Mn;y.addAll(a.iterator),a=new Mn;var x=new Mn,b=this.sort(y),E,te,ne=this.Jp,se=this.arrangement,he=this.nodeDiameterFormula,_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===xu&&he===ef?se=Su:se===xu&&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===xu&&a.reverse(),b=new Mn,b.addAll(a),b.addAll(x)):(this.arrangement===xu&&x.reverse(),b=new Mn,b.addAll(x),b.addAll(a))}he=b.length;for(var Ye=te=E=0;Ye<b.length;Ye++){var $e=Ne+Ge*te*(this.direction===Wa?1:-1)/he,st=b.M(Ye).diameter;isNaN(st)&&(st=zc(b.M(Ye),$e)),360>Ge&&(Ye===0||Ye===b.length-1)&&(st/=2),E+=st,te++}if(isNaN(_e)||se===xu){if(isNaN(y)&&(y=6),se!==Su&&se!==xu){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!==xu?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===Su||se===xu)&&(y=(Ye-E)/(360<=Ge?he:he-1));else if(se===Su||se===xu)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++)$e=b.M(E),st=b.M(E===he-1?0:E+1),isNaN($e.diameter)&&zc($e,0),isNaN(st.diameter)&&zc(st,0),ne=Math.max(ne,($e.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!==xu)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 Su: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 Su:Cg(this,a,_e,jc);break;case oc:Pg(this,a,Ee/2,_e,jc)}switch(b){case Bc:Eg(this,x,_e+ne,Wa);break;case Su:Cg(this,x,_e+ne,Wa);break;case oc:Pg(this,x,Ee/2,_e+ne,Wa)}}else{switch(b){case Bc:Eg(this,x,_e,jc);break;case Su:Cg(this,x,_e,jc);break;case oc:Pg(this,x,Ee/2,_e,jc)}switch(b){case Bc:Eg(this,a,_e+ne,Wa);break;case Su:Cg(this,a,_e+ne,Wa);break;case oc:Pg(this,a,Ee/2,_e+ne,Wa)}}}else switch(b){case Bc:Eg(this,y,_e,this.direction);break;case Su:Cg(this,y,_e,this.direction);break;case oc:Pg(this,y,Ee,_e,this.direction);break;case xu:DS(this,y,Ee,_e,this.direction)}else DS(this,y,Ee,_e-Ee/2,Wa)}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===Wa?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===Wa?x:-x,(_e.diameter+Ee.diameter)/2+ne),x+=b===Wa?_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===Wa?x:-x,ne),x+=b===Wa?_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===Wa?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===Wa?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===Wa?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===Wa)){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===Wa)){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}Qo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Qo.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))},Qo.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}}Qo.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:wt("Invalid sorting type.")}return a};function Ox(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Mn;for(var b=0;b<a.length;b++){var E=-1,te=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var se=a.M(ne).edgesCount;se>E&&(E=se,te=ne)}else for(ne=0;ne<a.length;ne++)se=y[ne],se>E&&(E=se,te=ne);for(x.add(a.M(te)),y[te]=-1,te=a.M(te),ne=te.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(te=te.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}Qo.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,te=b.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(te=[],x=0;x<y.length;x++)te[x]=0;x=[];var ne=[],se=[];b=[],E=new Mn;for(var he=0,_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=[],$e=0;$e<x.length;$e++)0>y[x[$e]].indexOf(x[$e===x.length-1?0:$e+1])&&Ye.push($e===x.length-1?0:$e+1);if(Ye.length===0)for($e=0;$e<x.length;$e++)Ye.push($e);for($e=0;$e<Ye.length;$e++){for(var st=Ye[$e],Et=y[_e],St=0,Tt=0;Tt<ne.length;Tt++){var At=te[ne[Tt]],Ot=te[se[Tt]];if(At<Ot){var Gt=At;At=Ot}else Gt=Ot;if(Gt<st&&st<=At)for(Ot=0;Ot<Et.length;Ot++){var en=Et[Ot];0>x.indexOf(en)||Gt<te[en]&&te[en]<At||Gt===te[en]||At===te[en]||St++}else for(Ot=0;Ot<Et.length;Ot++)en=Et[Ot],0>x.indexOf(en)||Gt<te[en]&&te[en]<At&&Gt!==te[en]&&At!==te[en]&&St++}for(Et=St,Tt=St=0;Tt<y[_e].length;Tt++)Gt=x.indexOf(y[_e][Tt]),0<=Gt&&(Gt=Math.abs(st-(Gt>=st?Gt+1:Gt)),St+=Gt<x.length+1-Gt?Gt:x.length+1-Gt);for(Tt=0;Tt<ne.length;Tt++)Gt=te[ne[Tt]],At=te[se[Tt]],Gt>=st&&Gt++,At>=st&&At++,Gt>At&&(Ot=At,At=Gt,Gt=Ot),At-Gt<(x.length+2)/2==(Gt<st&&st<=At)&&St++;(Et<Ee||Et===Ee&&St<Ne)&&(Ee=Et,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||($e=Ye>Ee?Ye-Ee:Ee-Ye,Ne+=Ye<Ee!=$e>ne-$e?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(Qo.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!==xu&&a!==Su&&a!==Bc&&a!==oc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Wa&&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 Su=new xn(Qo,"ConstantSpacing",0),Bc=new xn(Qo,"ConstantDistance",1),oc=new xn(Qo,"ConstantAngle",2),xu=new xn(Qo,"Packed",3),Wa=new xn(Qo,"Clockwise",4),jc=new xn(Qo,"Counterclockwise",5),wd=new xn(Qo,"BidirectionalLeft",6),$f=new xn(Qo,"BidirectionalRight",7),y0=new xn(Qo,"Forwards",8),S0=new xn(Qo,"Reverse",9),x0=new xn(Qo,"Ascending",10),w0=new xn(Qo,"Descending",11),ep=new xn(Qo,"Optimized",12),_0=new xn(Qo,"Pythagorean",13),ef=new xn(Qo,"Circular",14);Qo.className="CircularLayout",Qo.ConstantSpacing=Su,Qo.ConstantDistance=Bc,Qo.ConstantAngle=oc,Qo.Packed=xu,Qo.Clockwise=Wa,Qo.Counterclockwise=jc,Qo.BidirectionalLeft=wd,Qo.BidirectionalRight=$f,Qo.Forwards=y0,Qo.Reverse=S0,Qo.Ascending=x0,Qo.Descending=w0,Qo.Optimized=ep,Qo.Pythagorean=_0,Qo.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){Mo.call(this,a)}Je(tp,Mo),tp.prototype.createVertex=function(){return new Mg(this)},tp.prototype.createEdge=function(){return new b0(this)},tp.className="CircularNetwork";function Mg(a){Ts.call(this,a),this.u=this.Si=NaN}Je(Mg,Ts);function zc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===xu)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){yl.call(this,a)}Je(b0,yl),b0.className="CircularEdge";function fa(a){Zo.call(this),this.ah=null,this.An=0,this.$d=new Pn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}Je(fa,Zo),fa.prototype.cloneProtected=function(a){Zo.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},fa.prototype.createNetwork=function(){return new tf(this)},fa.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=Un(),Ee=0;Ee<se+y.vertexes.count+2;Ee++)_e[Ee]=null;se=0,ne.reset();for(var Ne=rn.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],$e=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]=$e,_e[Ge+1]=st,se++,Ge=Ye.x-Ne.x,Ye=Ye.y-Ne.y,Ee=Ee.vertexes.iterator;Ee.next();)$e=Ee.value,$e.centerX+=Ge,$e.centerY+=Ye}for(rn.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},fa.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},fa.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 Mn),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var se=te.value;E=se.fromVertex,ne=se.toVertex,E.network===b&&ne.network===b?b.Bo(se):E.network===b?(se=E.Hj,se===null&&(se=new Mn,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new Mn,ne.Hj=se),se.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,Zt.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=Zt.sqrt((se+Ye+_e*_e*4/(ne*ne))/Ye),ne=(se-1)*Ee/2,se=(se-1)*Ne/2,E.bounds=new rn(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 rn(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=Zt.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,$e){return Ye===null||$e===null||Ye===$e?0:$e.width*$e.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=Zt.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}fa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},fa.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,Zt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Zt.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,Zt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,Zt.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,Et){return st===null||Et===null||st===Et?0:st.centerX-Et.centerX}):y.sort(function(st,Et){return st===null||Et===null||st===Et?0:st.centerY-Et.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 $e=zS(ne,Ge);1>$e?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new P0),$e=b.random(),se=b.random(),he>_e?(b=Math.abs(Ge.bounds.right-ne.bounds.x),b=(1+b)*$e):he<_e?(b=Math.abs(Ge.bounds.x-ne.bounds.right),b=-(1+b)*$e):(b=Math.max(Ge.width,ne.width),b=(1+b)*$e-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)/($e*$e),b=(_e-he)/$e*se,_e=(Ye-Ee)/$e*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}fa.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},fa.prototype.moveFixedVertex=function(){},fa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},fa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=As,y.toSpot=As)}},fa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=rn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,rn.free(x)}x=rn.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}rn.free(x)},fa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},fa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},fa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},fa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},fa.prototype.electricalFieldX=function(){return 0},fa.prototype.electricalFieldY=function(){return 0},fa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},fa.prototype.gravitationalFieldX=function(){return 0},fa.prototype.gravitationalFieldY=function(){return 0},fa.prototype.isFixed=function(a){return a.isFixed},nt.Object.defineProperties(fa.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"&&wt('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())}}}),fa.className="ForceDirectedLayout";function HS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}HS.className="ForceDirectedSubnet";function tf(a){Mo.call(this,a)}Je(tf,Mo),tf.prototype.createVertex=function(){return new kg(this)},tf.prototype.createEdge=function(){return new Tg(this)},tf.className="ForceDirectedNetwork";function kg(a){Ts.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}Je(kg,Ts),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){yl.call(this,a),this.j=this.o=NaN}Je(Tg,yl),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 ao(a){Zo.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)}Je(ao,Zo),ao.prototype.cloneProtected=function(a){Zo.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},ao.prototype.qb=function(a){a.classType===ao?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:wt("Unknown enum value: "+a):Zo.prototype.qb.call(this,a)},ao.prototype.createNetwork=function(){return new ip(this)},ao.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 $e=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,tr,Ye),Ye.x+=Ne.actualBounds.x-st.x,Ye.y+=Ne.actualBounds.y-st.y):(ec(Ne,Ge,tr,Ye),Ye.w()||Ye.assign($e)):Ye.assign($e):st.w()?(ec(Ne,Ge,tr,Ye),Ye.w()||Ye.assign($e)):Ye.assign($e),Ne=b.rev?E.bounds:te.bounds,Ee=ft.alloc(),ne!==he?Ne.w()&&he.isVisible()?he.actualBounds.w()?(ec(he,se,tr,Ee),Ee.x+=he.actualBounds.x-Ne.x,Ee.y+=he.actualBounds.y-Ne.y):(ec(he,se,tr,Ee),Ee.w()||Ee.assign(_e)):Ee.assign(_e):Ne.w()?(ec(he,se,tr,Ee),Ee.w()||Ee.assign(_e)):Ee.assign(_e),this.K===90||this.K===270?(ne=Math.round((Ye.x-$e.x)/this.kc),he=Ye.x,se=Math.round((Ee.x-_e.x)/this.kc),_e=Ee.x):(ne=Math.round((Ye.y-$e.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 Et=st.fromPort,St=st.toPort;if(Et!==null&&St!==null){var Tt=st.fromNode;if(Ge=st.toNode,Tt!==null&&Ge!==null){var At=M0(this,!0),Ot=M0(this,!1),Gt=this.setsPortSpots?At:st.computeSpot(!0,Et);$e=this.setsPortSpots?Ot:st.computeSpot(!1,St);var en=st.isOrthogonal;Gt.$c()&&Gt.Hf(Ot)&&$e.$c()&&$e.Hf(At)?Ne=0:(At=st.getLinkPoint(Tt,Et,Gt,!0,en,Ge,St,ft.alloc()),Ot=st.getLinkDirection(Tt,Et,At,Gt,!0,en,Ge,St),ft.free(At),Gt.ys()||Ot!==qS(this,b,!0)?this.setsPortSpots&&Tt!==null&&Tt.ports.count===1&&b.rev&&(Ne+=1):Ne+=1,Gt=st.getLinkPoint(Ge,St,$e,!1,en,Tt,Et,ft.alloc()),st=st.getLinkDirection(Ge,St,Gt,$e,!1,en,Tt,Et),ft.free(Gt),$e.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)&&($e=a.createVertex(),$e.node=null,$e.Dj=1,$e.layer=Ye,$e.near=E,a.dh($e),E=a.Zj(E,$e,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=$e),st=1,Ne&&st--,Ye-Ee>st&&0<Ye){for(b.valid=!1,$e=a.createVertex(),$e.node=null,$e.Dj=2,$e.layer=Ye-1,a.dh($e),E=a.Zj(E,$e,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=$e,Ye--;Ye-Ee>st&&0<Ye;)$e=a.createVertex(),$e.node=null,$e.Dj=3,$e.layer=Ye-1,a.dh($e),E=a.Zj(E,$e,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=$e,Ye--;E=a.Zj($e,te,b.link),E.valid=!Ne,Ne&&($e.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},ao.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}ao.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},ao.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 tl(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 Wl(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 $e=he[Ge];if($e.valid&&$e.fromVertex.layer!==y){var st=$e.fromVertex.index,Et=$e.portToPos;$e=$e.portFromPos,Ee<Et&&(Ne>st||Ne===st&&Ye>$e)&&se++,Et<Ee&&(st>Ne||st===Ne&&$e>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++)$e=he[Ge],$e.valid&&$e.toVertex.layer!==y&&(st=$e.toVertex.index,Et=$e.portToPos,$e=$e.portFromPos,Ye<$e&&(Ne>st||Ne===st&&Ee>Et)&&se++,$e<Ye&&(st>Ne||st===Ne&&Et>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++)$e=At[Ge],$e.valid&&$e.fromVertex.layer!==y&&(st=$e.fromVertex.index,$e=$e.portFromPos,(Ne<st||Ne===st&&Ye<$e)&&Tt++,(st<Ne||st===Ne&&$e<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++)$e=At[Ge],$e.valid&&$e.toVertex.layer!==y&&(st=$e.toVertex.index,Et=$e.portToPos,(Ne<st||Ne===st&&Ee<Et)&&Tt++,(st<Ne||st===Ne&&Et<Ee)&&St++)}te[ne*E+he]=St,te[he*E+ne]=Tt}}return Hc(a,y,b),te}ao.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}ao.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($e,st){return $e-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)}}ao.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++}ao.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 $e=Ge[Ye],st=$e.fromVertex;Ee+=1,st.component!==1&&(te+=1,st=st.layer-_e.layer,$e=a.linkMinLength($e),b=Math.min(b,st-$e))}for(Ge=_e.destinationEdgesArrayAccess,E=Ge.length,Ye=0;Ye<E;Ye++)$e=Ge[Ye].toVertex,--Ee,$e.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++)$e=Ge[Ye].fromVertex,_e+=1,$e.component!==1?b+=1:Ee=!0;for(Ge=ne.destinationEdgesArrayAccess,Ne=Ge.length,Ye=0;Ye<Ne;Ye++)$e=Ge[Ye],st=$e.toVertex,--_e,st.component!==1&&(--b,st=ne.layer-st.layer,$e=a.linkMinLength($e),E=Math.min(E,st-$e));(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}ao.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))}ao.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=tl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)E0(this,b,1),iu(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=tl(this)),b=this.Ia;0<=b;b--)E0(this,b,-1),iu(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=tl(this))}for(Wl(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)E0(this,b,0),iu(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=tl(this)),b=this.Ia;0<=b;b--)E0(this,b,0),iu(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=tl(this))}Wl(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=iu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,1)||te;for(E=this.countCrossings(),E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,1)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,-1)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,0)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,0)||te;E>=a?Wl(this,y):(a=E,y=tl(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=iu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,1)||te;for(E=this.countCrossings(),E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,1)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,-1)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=iu(this,b,0)||te;for(E>=a?Wl(this,y):(a=E,y=tl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=iu(this,b,0)||te;E>=a?Wl(this,y):(a=E,y=tl(this))}}Wl(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 iu(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,$e=b[te].column,st=b[te+1].column,Et=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);Et=$e-Et+Tt,St=st-St+At;var Ot=b[te].sourceEdges.iterator;for(Ot.reset();Ot.next();)if(Tt=Ot.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(Ot=b[te].destinationEdges.iterator,Ot.reset();Ot.next();)if(Tt=Ot.value,At=Tt.toVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt===te+1&&(Ye+=1)}for(Ot=b[te+1].sourceEdges.iterator,Ot.reset();Ot.next();)if(Tt=Ot.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(Ot=b[te+1].destinationEdges.iterator,Ot.reset();Ot.next();)if(Tt=Ot.value,At=Tt.toVertex,Tt.valid&&At.layer===y){for(Tt=0;b[Tt]!==At;)Tt++;Tt===te&&(Ge+=1)}Tt=At=0,Ot=ne[b[te].index];var Gt=se[b[te].index],en=ne[b[te+1].index],Zn=se[b[te+1].index];Ot!==-1&&(At+=Math.abs(Ot-$e),Tt+=Math.abs(Ot-St)),Gt!==-1&&(At+=Math.abs(Gt-$e),Tt+=Math.abs(Gt-St)),en!==-1&&(At+=Math.abs(en-st),Tt+=Math.abs(en-Et)),Zn!==-1&&(At+=Math.abs(Zn-st),Tt+=Math.abs(Zn-Et)),(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=Et,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}ao.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 $e=Ge=0,st=0;if(0>=x)for(var Et=E[b].sourceEdges.iterator;Et.next();){var St=Et.value,Tt=St.fromVertex;if(St.valid&&Tt.layer!==y){var At=gy(St),Ot=St.portFromColOffset;St=St.portToColOffset,Tt=Tt.column,Ge+=(Math.abs(Ee+St-(Tt+Ot))+1)*At,$e+=(Math.abs(Ye+St-(Tt+Ot))+1)*At,st+=(Math.abs(Ne+St-(Tt+Ot))+1)*At}}if(0<=x)for(Et=E[b].destinationEdges.iterator;Et.next();)St=Et.value,Tt=St.toVertex,St.valid&&Tt.layer!==y&&(At=gy(St),Ot=St.portFromColOffset,St=St.portToColOffset,Tt=Tt.column,Ge+=(Math.abs(Ee+Ot-(Tt+St))+1)*At,$e+=(Math.abs(Ye+Ot-(Tt+St))+1)*At,st+=(Math.abs(Ne+Ot-(Tt+St))+1)*At);St=Ot=At=0,Et=ne[E[b].index],Tt=se[E[b].index],Et!==-1&&(At+=Math.abs(Et-Ee),Ot+=Math.abs(Et-Ye),St+=Math.abs(Et-Ne)),Tt!==-1&&(At+=Math.abs(Tt-Ee),Ot+=Math.abs(Tt-Ye),St+=Math.abs(Tt-Ne)),$e<Ge||$e===Ge&&Ot<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=tl(a),te=C0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=C0(a);ne>te?Wl(a,E):ne<te&&(te=ne,E=tl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=tl(a),te=C0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=C0(a),ne>te?Wl(a,E):ne<te&&(te=ne,E=tl(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=Un(),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 kn,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=ti(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 $e=Un();_e&&$e.push(te.get(Ye)),Ee&&$e.push(ne.get(Ye)),Ne&&$e.push(se.get(Ye)),Ge&&$e.push(he.get(Ye)),$e.sort(function(Et,St){return Et-St});var st=$e.length;st=($e[Math.floor((st-1)/2)]+$e[Math.ceil((st-1)/2)])/2,Gn($e),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=ti(_e.sourceEdgesArrayAccess),Ye=Ge.next();!Ye.done;Ye=Ge.next())Ye=Ye.value,Ye.valid&&Ne.push(Ye);_e.bo=Ne}for(_e=ti(_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}}}ao.prototype.verticalAlignment=function(a,y,x){Vx(a),a=ti(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=ti(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=ti(y),ne=te.next();!ne.done;ne=te.next()){var se=ti(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=ti(y),se=te.next();!se.done;se=te.next()){se=ti(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 $e=D0(Ee,Ne),st=$e.portFromPos,Et=$e.portToPos;$e.link!==null&&(Ee.node&&Ee.node!==$e.link.fromNode&&(st=ne?Ee.focusX:Ee.focusY),Ne.node&&Ne.node!==$e.link.toNode&&(Et=ne?Ne.focusX:Ne.focusY))}else $e=D0(Ne,Ee),st=$e.portToPos,Et=$e.portFromPos,$e.link!==null&&(Ee.node&&Ee.node!==$e.link.toNode&&(st=ne?Ee.focusX:Ee.focusY),Ne.node&&Ne.node!==$e.link.fromNode&&(Et=ne?Ne.focusX:Ne.focusY));Ge=b?Ee.qg+(Ge-st)-(Ye-Et):Ee.qg+st-Et,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=ti(y),ne=x.next();!ne.done;ne=x.next())for(te=ti(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 on,y=ti(y),ne=y.next();!ne.done;ne=y.next())for(x=ti(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&&wt("Could not determine previous vertex in layer"),y[x][a-1]}ao.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Un(),E=Un(),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}ao.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?ua:$s:a.K===90?y?$s:ua:a.K===180?y?ma:Os:y?Os:ma}ao.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()},ao.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new rn(0,0,x,Math.abs(this.Ta[0]))):y.push(new rn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new rn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new rn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new rn(0,0,Math.abs(this.Ta[0]),x)):y.push(new rn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new rn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new rn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},ao.prototype.commitLayers=function(){},ao.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===Al&&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===er&&(b=!0),se!==null&&he===er&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga(tr),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(tr),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,$e=this.ie,st=y.firstPickIndex+1;if(y.isOrthogonal){Ye=!0;var Et=y.pointsCount;4<Et&&y.points.removeRange(2,Et-3)}else if(y.curve===Al)Ge=!0,Et=y.pointsCount,4<Et&&y.points.removeRange(2,Et-3),Et===4&&(st=2);else{Et=y.pointsCount;var St=_e===er,Tt=he===er;2<Et&&St&&Tt?y.points.removeRange(1,Et-2):3<Et&&St&&!Tt?y.points.removeRange(1,Et-3):3<Et&&!St&&Tt?y.points.removeRange(2,Et-2):4<Et&&!St&&!Tt&&y.points.removeRange(2,Et-3)}if(x.rev){for(;Ne!==null&&Ee!==Ne;){var At=Et=null;for(St=Ne.sourceEdges.iterator;St.next()&&(Tt=St.value,Tt.link!==x.link||(Et=Tt.fromVertex,At=Tt.toVertex,Et.node!==null)););if(Et===null)break;if(Et!==Ee){St=y.i(st-1).x,Tt=y.i(st-1).y;var Ot=Et.centerX,Gt=Et.centerY;if(Ye)this.K===180||this.K===0?st===y.firstPickIndex+1?(y.m(st++,St,Tt),y.m(st++,St,Gt)):(At!==null?At.centerY:Tt)!==Gt&&(At=this.Ta[Et.layer-1]+this.Rf.x,y.m(st++,At,Tt),y.m(st++,At,Gt)):st===y.firstPickIndex+1?(y.m(st++,St,Tt),y.m(st++,Ot,Tt)):(At!==null?At.centerX:St)!==Ot&&(At=this.Ta[Et.layer-1]+this.Rf.y,y.m(st++,St,At),y.m(st++,Ot,At));else if(st===y.firstPickIndex+1){At=Math.max(10,this.he[Ne.layer]);var en=Math.max(10,this.Ld[Ne.layer]);if(Ge)this.K===180?Ot<=Ne.bounds.x?(Ne=Ne.bounds.x,y.m(st++,Ne-At,Gt),y.m(st++,Ne,Gt),y.m(st++,Ne+en,Gt)):(y.m(st++,Ot-At,Gt),y.m(st++,Ot,Gt),y.m(st++,Ot+en,Gt)):this.K===90?Gt>=Ne.bounds.bottom?(Ne=Ne.bounds.y+Ne.bounds.height,y.m(st++,Ot,Ne+en),y.m(st++,Ot,Ne),y.m(st++,Ot,Ne-At)):(y.m(st++,Ot,Gt+en),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt-At)):this.K===270?Gt<=Ne.bounds.y?(Ne=Ne.bounds.y,y.m(st++,Ot,Ne-At),y.m(st++,Ot,Ne),y.m(st++,Ot,Ne+en)):(y.m(st++,Ot,Gt-At),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt+en)):this.K===0&&(Ot>=Ne.bounds.right?(Ne=Ne.bounds.x+Ne.bounds.width,y.m(st++,Ne+en,Gt),y.m(st++,Ne,Gt),y.m(st++,Ne-At,Gt)):(y.m(st++,Ot+en,Gt),y.m(st++,Ot,Gt),y.m(st++,Ot-At,Gt)));else{y.m(st++,St,Tt);var Zn=0;this.K===180||this.K===0?((this.K===180?Ot>=Ne.bounds.right:Ot<=Ne.bounds.x)&&(Zn=(this.K===0?-At:en)/2),y.m(st++,St+Zn,Gt)):((this.K===270?Gt>=Ne.bounds.bottom:Gt<=Ne.bounds.y)&&(Zn=(this.K===90?-At:en)/2),y.m(st++,Ot,Tt+Zn)),y.m(st++,Ot,Gt)}}else At=Math.max(10,this.he[Et.layer]),en=Math.max(10,this.Ld[Et.layer]),Ge?this.K===180?(y.m(st++,Ot-At-$e,Gt),y.m(st++,Math.min(Ot-At+$e/2,Ot),Gt),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt),y.m(st++,Math.max(Ot+en-$e/2,Ot),Gt),y.m(st++,Ot+en+$e,Gt)):this.K===90?(y.m(st++,Ot,Gt+en+$e),y.m(st++,Ot,Math.max(Gt+en-$e/2,Gt)),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt),y.m(st++,Ot,Math.min(Gt-At+$e/2,Gt)),y.m(st++,Ot,Gt-At-$e)):this.K===270?(y.m(st++,Ot,Gt-At-$e),y.m(st++,Ot,Math.min(Gt-At+$e/2,Gt)),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt),y.m(st++,Ot,Math.max(Gt+en-$e/2,Gt)),y.m(st++,Ot,Gt+en+$e)):(y.m(st++,Ot+en+$e,Gt),y.m(st++,Math.max(Ot+en-$e/2,Ot),Gt),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt),y.m(st++,Math.min(Ot-At+$e/2,Ot),Gt),y.m(st++,Ot-At-$e,Gt)):y.m(st++,Ot,Gt)}Ne=Et}(se===null||_e!==er||Ye)&&(St=y.i(st-1).x,Tt=y.i(st-1).y,Ot=y.i(st).x,Gt=y.i(st).y,Ye?($e=this.Ld[Ee.layer],this.K===180||this.K===0?(Ye=Tt,Ye>=Ee.bounds.y&&Ye<=Ee.bounds.bottom&&(this.K===180?Ot>=Ee.bounds.x:Ot<=Ee.bounds.right)&&(Ne=Ee.centerX+(this.K===180?-$e:$e),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++,Ot,Ye)):(Ye=St,Ye>=Ee.bounds.x&&Ye<=Ee.bounds.right&&(this.K===270?Gt>=Ee.bounds.y:Gt<=Ee.bounds.bottom)&&(Ne=Ee.centerY+(this.K===270?-$e:$e),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,Gt)),y.m(st++,Ot,Gt)):Ge?(At=Math.max(10,this.he[Ee.layer]),en=Math.max(10,this.Ld[Ee.layer]),this.K===180&&Ot>=Ee.bounds.x?(Ne=Ee.bounds.x+Ee.bounds.width,y.L(st-2,Ne,Tt),y.L(st-1,Ne+en,Tt)):this.K===90&&Gt<=Ee.bounds.bottom?(Ne=Ee.bounds.y,y.L(st-2,St,Ne),y.L(st-1,St,Ne-At)):this.K===270&&Gt>=Ee.bounds.y?(Ne=Ee.bounds.y+Ee.bounds.height,y.L(st-2,St,Ne),y.L(st-1,St,Ne+en)):this.K===0&&Ot<=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]),en=Math.max(10,this.Ld[Ee.layer]),Ye=0,this.K===180||this.K===0?((this.K===180?Ot<=Ee.bounds.x:Ot>=Ee.bounds.right)&&(Ye=(this.K===0?en:-At)/2),y.m(st++,Ot+Ye,Tt)):((this.K===270?Gt<=Ee.bounds.y:Gt>=Ee.bounds.bottom)&&(Ye=(this.K===90?en:-At)/2),y.m(st++,St,Gt+Ye)),y.m(st++,Ot,Gt)))}else{for(;Ee!==null&&Ee!==Ne;){for(At=Et=null,Ee=Ee.destinationEdges.iterator;Ee.next()&&(St=Ee.value,St.link!==x.link||(Et=St.toVertex,At=St.fromVertex,At.node!==null&&(At=null),Et.node!==null)););if(Et===null)break;Et!==Ne&&(St=y.i(st-1).x,Tt=y.i(st-1).y,Ot=Et.centerX,Gt=Et.centerY,Ye?this.K===180||this.K===0?(At!==null?At.centerY:Tt)!==Gt&&(At=this.Ta[Et.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,Gt)):(At!==null?At.centerX:St)!==Ot&&(At=this.Ta[Et.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++,Ot,At)):(At=Math.max(10,this.he[Et.layer]),en=Math.max(10,this.Ld[Et.layer]),Ge?this.K===180?(y.m(st++,Ot+en+$e,Gt),y.m(st++,Math.max(Ot+en-$e/2,Ot),Gt),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt),y.m(st++,Math.min(Ot-At+$e/2,Ot),Gt),y.m(st++,Ot-At-$e,Gt)):this.K===90?(y.m(st++,Ot,Gt-At-$e),y.m(st++,Ot,Math.min(Gt-At+$e/2,Gt)),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt),y.m(st++,Ot,Math.max(Gt+en-$e/2,Gt)),y.m(st++,Ot,Gt+en+$e)):this.K===270?(y.m(st++,Ot,Gt+en+$e),y.m(st++,Ot,Math.max(Gt+en-$e/2,Gt)),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt),y.m(st++,Ot,Math.min(Gt-At+$e/2,Gt)),y.m(st++,Ot,Gt-At-$e)):(y.m(st++,Ot-At-$e,Gt),y.m(st++,Math.min(Ot-At+$e/2,Ot),Gt),y.m(st++,Ot,Gt),y.m(st++,Ot,Gt),y.m(st++,Math.max(Ot+en-$e/2,Ot),Gt),y.m(st++,Ot+en+$e,Gt)):this.K===180?(y.m(st++,Ot+en,Gt),y.m(st++,Ot-At,Gt)):this.K===90?(y.m(st++,Ot,Gt-At),y.m(st++,Ot,Gt+en)):this.K===270?(y.m(st++,Ot,Gt+en),y.m(st++,Ot,Gt-At)):(y.m(st++,Ot-At,Gt),y.m(st++,Ot+en,Gt)))),Ee=Et}Ye&&(St=y.i(st-1).x,Tt=y.i(st-1).y,Ot=y.i(st).x,Gt=y.i(st).y,this.K===180||this.K===0?Tt!==Gt&&(At=this.K===0?Math.min(Math.max((Ot+St)/2,this.Ta[Ne.layer]+this.Rf.x),Ot):Math.max(Math.min((Ot+St)/2,this.Ta[Ne.layer]+this.Rf.x),Ot),y.m(st++,At,Tt),y.m(st++,At,Gt)):St!==Ot&&(At=this.K===90?Math.min(Math.max((Gt+Tt)/2,this.Ta[Ne.layer]+this.Rf.y),Gt):Math.max(Math.min((Gt+Tt)/2,this.Ta[Ne.layer]+this.Rf.y),Gt),y.m(st++,St,At),y.m(st++,Ot,At)))}b!==null&&Ge&&4<=y.pointsCount&&(ne!==null&&(ne=_e===er?y.getLinkPointFromPoint(E,ne,ne.ga(tr),y.i(3),!0):y.i(0),_e===er&&(_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===er?y.getLinkPointFromPoint(te,se,se.ga(tr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===er&&(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()},ao.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Mn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var te=b.i(E),ne=b.i(E+1);if(this.B(te.y,ne.y)&&!this.B(te.x,ne.x)){var se=new 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 $e=this.linkSpacing*(Ee-(_e-1)/2);y++,Ye.uh(),Ye.L(Ge.index,te.x,te.y+$e),Ye.L(Ge.index+1,ne.x,ne.y+$e),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),$e=this.linkSpacing*(Ee-(_e-1)/2),y++,Ye.uh(),Ye.L(Ge.index,te.x+$e,te.y),Ye.L(Ge.index+1,ne.x+$e,ne.y),Ye.zf()}te=E}a=b}}}},et=ao.prototype,et.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},et.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},et.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},et.B=function(a,y){return a-=y,-1<a&&1>a},et.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&wt("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(ao.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()):wt("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 xn(ao,"CycleDepthFirst",0),xy=new xn(ao,"CycleGreedy",1),Ng=new xn(ao,"CycleFromLayers",2),T0=new xn(ao,"LayerOptimalLinkLength",0),wy=new xn(ao,"LayerLongestPathSink",1),_y=new xn(ao,"LayerLongestPathSource",2),A0=new xn(ao,"InitDepthFirstOut",0),by=new xn(ao,"InitDepthFirstIn",1),Py=new xn(ao,"InitNaive",2),Cy=new xn(ao,"AggressiveNone",0),N0=new xn(ao,"AggressiveLess",1),Ey=new xn(ao,"AggressiveMore",2),Yx=8;ao.className="LayeredDigraphLayout",ao.CycleDepthFirst=k0,ao.CycleGreedy=xy,ao.CycleFromLayers=Ng,ao.LayerOptimalLinkLength=T0,ao.LayerLongestPathSink=wy,ao.LayerLongestPathSource=_y,ao.InitDepthFirstOut=A0,ao.InitDepthFirstIn=by,ao.InitNaive=Py,ao.AggressiveNone=Cy,ao.AggressiveLess=N0,ao.AggressiveMore=Ey,ao.PackNone=0,ao.PackExpand=1,ao.PackStraighten=2,ao.PackMedian=4,ao.PackAll=15,ao.AlignNone=0,ao.AlignUpperLeft=1,ao.AlignUpperRight=2,ao.AlignLowerLeft=4,ao.AlignLowerRight=8,ao.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){Mo.call(this,a)}Je(ip,Mo),ip.prototype.createVertex=function(){return new Zl(this)},ip.prototype.createEdge=function(){return new Dg(this)},ip.className="LayeredDigraphNetwork";function Zl(a){Ts.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}Je(Zl,Ts);function rx(a,y){return a.index-y.index}function D0(a,y){if(!a.$n){for(var x=[],b=ti(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=ti(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;wt("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=ti(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=ti(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){Ts.prototype.Cl.call(this,a),this.bo=this.co=null},Zl.prototype.Kl=function(a){Ts.prototype.Kl.call(this,a),this.bo=this.co=null},Zl.prototype.zl=function(a){Ts.prototype.zl.call(this,a),this.$n=this.ao=null},Zl.prototype.Jl=function(a){Ts.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){yl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Je(Dg,yl),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 xr(a){Zo.call(this),this.Ub=new kn,this.Wn=F0,this.ud=vh,this.vo=j0,this.Bq=By,this.$v=[],this.td=!0,this.Rb=z0,this.$d=new Pn(10,10).freeze();var y=new sf(this);this.W=new ru(y),this.Y=new ru(y),this.ru=[],a&&Object.assign(this,a)}Je(xr,Zo),xr.prototype.cloneProtected=function(a){Zo.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},xr.prototype.qb=function(a){a.classType===xr?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:wt("Unknown enum value: "+a):Zo.prototype.qb.call(this,a)},xr.prototype.createNetwork=function(){return new sf(this)},xr.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 nn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Xi?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},xr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==U0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof nn&&(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 kn,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 ru&&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 ru&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof ru&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof ru&&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 ru&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new kn,this.isValidLayout=!0};function Jx(a){var y=new kn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}xr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case vh:x.sourceEdges.count===0&&this.Ub.add(x);break;case rf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:wt("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:wt("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 Mn,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 Mn,b=y.sourceVertexes;b.next();)E=b.value,sx(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:wt("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}xr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var te=E=0;te<x.length;te++)x[te]!==y&&(b[E++]=x[te]);a.children=b}}};function 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}}xr.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])}}xr.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])}}xr.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:wt("Unhandled sorting value "+a.sorting.toString())}},xr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},xr.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=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=rn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,rn.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}xr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,te=!1;x!==null&&(E=x.angle,te=x.alignment,te=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],$e=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-$e.width,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();){var st=Ye.value;st.fromSpot=ma,st.toSpot=Os}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=Os,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=Os,st.toSpot=ma;else for(Ne.h(a.bounds.x+a.commentMargin-$e.width,a.bounds.y+he),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=ma,st.toSpot=Os;he=0<=a.commentSpacing?he+($e.height+a.commentSpacing):he+(a.commentSpacing-$e.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Ne.h(a.bounds.x+he,a.bounds.y-a.commentMargin-$e.height),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=ua,st.toSpot=$s;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=$s,st.toSpot=ua;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=$s,st.toSpot=ua;else for(Ne.h(a.bounds.x+he,a.bounds.y+a.commentMargin-$e.height),Ye.move(Ne),Ye=Ye.Sd();Ye.next();)st=Ye.value,st.fromSpot=ua,st.toSpot=$s;he=0<=a.commentSpacing?he+($e.width+a.commentSpacing):he+(a.commentSpacing-$e.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)}},xr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case 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=wu(a);y=E===90||E===270;var te=0,ne=a.children,se=ne.length;for(x=0;x<se;x++)b=ne[x],te=Math.max(te,y?b.Da.width:b.Da.height);var he=a.alignment;b=he===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),$e=a.rowSpacing,st=0;(b||_e||a.hm||a.im&&a.maxGenerationCount===1)&&(st=Math.max(0,a.rowIndent)),b=a.width;var Et=a.height,St=0,Tt=0,At=0,Ot=null,Gt=null,en=0,Zn=0,ui=0,ri=0,Rn=0,wn=0,Yi=0,zi=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&&(zi=Math.max(zi,y?ne[Wr].Da.width:ne[Wr].Da.height));else se===1&&(zi=y?ne[0].Da.width:ne[0].Da.height);if(Ee){switch(he){case sc:Tt=135>E?cx(this,a,ne,zi,St,Tt):dx(this,a,ne,zi,St,Tt),zi=Tt.x,St=Tt.width,Tt=Tt.height;break;case ac:for(Ot=0;Ot<se;Ot++)Gt=ne[Ot],Ne=Gt.Da,At=wn===0?0:$e,y?(Gt.S.h(te-Ne.width,ri+At),St=Math.max(St,Ne.width),Tt=Math.max(Tt,ri+At+Ne.height),ri+=At+Ne.height):(Gt.S.h(ui+At,te-Ne.height),St=Math.max(St,ui+At+Ne.width),Tt=Math.max(Tt,Ne.height),ui+=At+Ne.width),wn++;break;case Rh:for(Ot=0;Ot<se;Ot++)Gt=ne[Ot],te=Gt.Da,Ne=wn===0?0:$e,y?(Gt.S.h(Ge/2+a.focus.x,ri+Ne),St=Math.max(St,te.width),Tt=Math.max(Tt,ri+Ne+te.height),ri+=Ne+te.height):(Gt.S.h(ui+Ne,Ge/2+a.focus.y),St=Math.max(St,ui+Ne+te.width),Tt=Math.max(Tt,te.height),ui+=Ne+te.width),wn++}Ot=ll(this,2),Gt=ll(this,2),y?(Ot[0].h(0,0),Ot[1].h(0,Tt),Gt[0].h(St,0)):(Ot[0].h(0,0),Ot[1].h(St,0),Gt[0].h(0,Tt)),Gt[1].h(St,Tt)}else for(Wr=0;Wr<se;Wr++){var _o=ne[Wr],Bs=_o.Da;if(y){0<Ne&&0<wn&&ui+Ge+Bs.width>Ne&&(ui<te&&_d(a,he,te-ui,0,Yi,Wr-1),Rn++,wn=0,Yi=Wr,At=Tt,ui=0,ri=135<E?-Tt-$e:Tt+$e),I0(this,_o,0,ri);var Zs=0;if(wn===0)Ot=_o.Yo,Gt=_o.kp,en=Bs.width,Zn=Bs.height,(Ot===null||Gt===null||E!==wu(_o))&&(Ot=ll(this,2),Gt=ll(this,2),Ot[0].h(0,0),Ot[1].h(0,Zn),Gt[0].h(en,0),Gt[1].h(en,Zn));else{var Ma=Un();Zn=fx(this,a,_o,Ot,Gt,en,Zn,Ma),Zs=Zn.x,Ot=Ma[0],Gt=Ma[1],en=Zn.width,Zn=Zn.height,Gn(Ma),ui<Bs.width&&0>Zs&&(nf(a,-Zs,0,Yi,Wr-1),R0(Ot,-Zs,0),R0(Gt,-Zs,0),Zs=0)}_o.S.h(Zs,ri),St=Math.max(St,en),Tt=Math.max(Tt,At+(Rn===0?0:$e)+Bs.height),ui=en}else 0<Ne&&0<wn&&ri+Ge+Bs.height>Ne&&(ri<te&&_d(a,he,0,te-ri,Yi,Wr-1),Rn++,wn=0,Yi=Wr,At=St,ri=0,ui=135<E?-St-$e:St+$e),I0(this,_o,ui,0),Zs=0,wn===0?(Ot=_o.Yo,Gt=_o.kp,en=Bs.width,Zn=Bs.height,(Ot===null||Gt===null||E!==wu(_o))&&(Ot=ll(this,2),Gt=ll(this,2),Ot[0].h(0,0),Ot[1].h(en,0),Gt[0].h(0,Zn),Gt[1].h(en,Zn))):(Ma=Un(),Zn=fx(this,a,_o,Ot,Gt,en,Zn,Ma),Zs=Zn.x,Ot=Ma[0],Gt=Ma[1],en=Zn.width,Zn=Zn.height,Gn(Ma),ri<Bs.height&&0>Zs&&(nf(a,0,-Zs,Yi,Wr-1),R0(Ot,0,-Zs),R0(Gt,0,-Zs),Zs=0)),_o.S.h(ui,Zs),Tt=Math.max(Tt,Zn),St=Math.max(St,At+(Rn===0?0:$e)+Bs.width),ri=Zn;wn++}switch(0<Rn&&(y?(Tt+=Math.max(0,x),ui<St&&_d(a,he,St-ui,0,Yi,se-1),0<st&&(_e||nf(a,st,0,0,se-1),St+=st)):(St+=Math.max(0,x),ri<Tt&&_d(a,he,0,Tt-ri,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<Rn?y?_e+=St/2-a.focus.x-Ye/2:st+=Tt/2-a.focus.y-Ye/2:y?(zi=ne[0].S.x+ne[0].la.x,_e+=zi+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-zi)/2-a.focus.x-Ye/2):(zi=ne[0].S.y+ne[0].la.y,st+=zi+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-zi)/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+=zi+Ge/2-a.focus.x:_e+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?st+=zi+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++)zi=ne[Ye],y?zi.S.h(zi.S.x+zi.la.x-_e,zi.S.y+(135<E?(Ee?-Tt:-zi.Da.height)+zi.la.y-x:Et+x+zi.la.y)):zi.S.h(zi.S.x+(135<E?(Ee?-St:-zi.Da.width)+zi.la.x-x:b+x+zi.la.x),zi.S.y+zi.la.y-st);if(se=ne=0,Ee?y?(St=Ty(a,St,_e),0>_e&&(_e=0),135<E&&(st+=Tt+x),Tt+=Et+x,he===Rh&&(ne+=Ge/2+a.focus.x),se+=Et+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,Et),Tt+Et+x),se+=Et+x):(135<E&&(_e+=St+x),St=Math.max(Math.max(St,b),St+b+x),a.comments===null?Et>Tt&&(Tt=Ny(he,0,Et-Tt),ne=Tt.x,se=Tt.y,Tt=Et,st=0):Tt=Ay(a,Tt,st),0>st&&(se-=st,st=0),ne+=b+x),0<Rn)E=ll(this,4),Rn=ll(this,4),y?(E[2].h(0,Et+x),E[3].h(E[2].x,Tt),Rn[2].h(St,E[2].y),Rn[3].h(Rn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(St,E[2].y),Rn[2].h(E[2].x,Tt),Rn[3].h(E[3].x,Rn[2].y));else{for(E=ll(this,Ot.length+2),Rn=ll(this,Gt.length+2),he=0;he<Ot.length;he++)Ee=Ot[he],E[he+2].h(Ee.x+ne,Ee.y+se);for(he=0;he<Gt.length;he++)Ee=Gt[he],Rn[he+2].h(Ee.x+ne,Ee.y+se)}y?(E[0].h(_e,0),E[1].h(E[0].x,Et),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])),Rn[0].h(_e+b,0),Rn[1].h(Rn[0].x,Et),Rn[2].y<Rn[1].y&&(Rn[2].x<Rn[0].x?Rn[2].assign(Rn[1]):Rn[1].assign(Rn[2])),Rn[3].y<Rn[2].y&&(Rn[3].x<Rn[0].x?Rn[3].assign(Rn[2]):Rn[2].assign(Rn[3])),E[2].y-=x/2,Rn[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])),Rn[0].h(0,st+Et),Rn[1].h(b,Rn[0].y),Rn[2].x<Rn[1].x&&(Rn[2].y<Rn[0].y?Rn[2].assign(Rn[1]):Rn[1].assign(Rn[2])),Rn[3].x<Rn[2].x&&(Rn[3].y<Rn[0].y?Rn[3].assign(Rn[2]):Rn[2].assign(Rn[3])),E[2].x-=x/2,Rn[2].x-=x/2),Ru(this,Ot),Ru(this,Gt),a.Yo=E,a.kp=Rn,a.la.h(_e,st),a.Da.h(St,Tt)}break;default:wt("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=wu(y),x=b===90||b===270;var te=0;E=y.children;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];te=Math.max(te,x?he.Da.width:he.Da.height)}var _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,$e=a.computeNodeIndent(y),st=Ee||Ne?0:$e/2,Et=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,Ot=0,Gt=0,en=0,Zn=0,ui=0,ri=0,Rn=0,wn=0,Yi=0;if(se&&!Og(_e)&&135<b&&E.reverse(),Og(_e))if(1<ne)for(var zi=0;zi<ne;zi++){var Wr=E[zi],_o=Wr.Da;zi%2===0&&zi!==ne-1?wn=Math.max(wn,(x?_o.width:_o.height)+a.computeBusNodeSpacing(Wr)-Ye):zi%2!==0&&(Yi=Math.max(Yi,(x?_o.width:_o.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:Ot=135>b?cx(a,y,E,wn,At,Ot):dx(a,y,E,wn,At,Ot),wn=Ot.x,At=Ot.width,Ot=Ot.height;break;case ac:for(Ge=0;Ge<ne;Ge++)st=E[Ge],Gt=st.Da,Yi=ri===0?0:Et,x?(st.S.h(te-Gt.width,Zn+Yi),At=Math.max(At,Gt.width),Ot=Math.max(Ot,Zn+Yi+Gt.height),Zn+=Yi+Gt.height):(st.S.h(en+Yi,te-Gt.height),At=Math.max(At,en+Yi+Gt.width),Ot=Math.max(Ot,Gt.height),en+=Yi+Gt.width),ri++;break;case Rh:for(te=0;te<ne;te++)Ge=E[te],st=Ge.Da,Gt=ri===0?0:Et,x?(Ge.S.h(Ye/2+y.focus.x,Zn+Gt),At=Math.max(At,st.width),Ot=Math.max(Ot,Zn+Gt+st.height),Zn+=Gt+st.height):(Ge.S.h(en+Gt,Ye/2+y.focus.y),At=Math.max(At,en+Gt+st.width),Ot=Math.max(Ot,st.height),en+=Gt+st.width),ri++}else for(Yi=0;Yi<ne;Yi++)zi=E[Yi],Wr=zi.Da,x?(0<Ge&&0<ri&&en+Ye+Wr.width>Ge&&(en<te&&_d(y,_e,te-en,0,Rn,Yi-1),ui++,ri=0,Rn=Yi,Gt=Ot,en=0,Zn=135<b?-Ot-Et:Ot+Et),_o=ri===0?st:Ye,I0(a,zi,0,Zn),zi.S.h(en+_o,Zn),At=Math.max(At,en+_o+Wr.width),Ot=Math.max(Ot,Gt+(ui===0?0:Et)+Wr.height),en+=_o+Wr.width):(0<Ge&&0<ri&&Zn+Ye+Wr.height>Ge&&(Zn<te&&_d(y,_e,0,te-Zn,Rn,Yi-1),ui++,ri=0,Rn=Yi,Gt=At,Zn=0,en=135<b?-At-Et:At+Et),_o=ri===0?st:Ye,I0(a,zi,en,0),zi.S.h(en,Zn+_o),Ot=Math.max(Ot,Zn+_o+Wr.height),At=Math.max(At,Gt+(ui===0?0:Et)+Wr.width),Zn+=_o+Wr.height),ri++;switch(0<ui&&(x?(Ot+=Math.max(0,he),en<At&&_d(y,_e,At-en,0,Rn,ne-1),0<St&&(Ne||nf(y,St,0,0,ne-1),At+=St)):(At+=Math.max(0,he),Zn<Ot&&_d(y,_e,0,Ot-Zn,Rn,ne-1),0<St&&(Ne||nf(y,0,St,0,ne-1),Ot+=St))),St=Ne=0,_e){case op:x?Ne+=At/2-y.focus.x-$e/2:St+=Ot/2-y.focus.y-$e/2;break;case of:0<ui?x?Ne+=At/2-y.focus.x-$e/2:St+=Ot/2-y.focus.y-$e/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-$e/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-$e/2);break;case yh:x?(Ne-=$e,At+=$e):(St-=$e,Ot+=$e);break;case Sh:x?(Ne+=At-y.width+$e,At+=$e):(St+=Ot-y.height+$e,Ot+=$e);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+=Ot+Ye/2-y.focus.y;break;case Rh:break;default:a=a.customAlignment(y,Ne,St,At,Ot),Ne=a[0],St=a[1],At=a[2],Ot=a[3]}for(a=0;a<ne;a++)$e=E[a],x?$e.S.h($e.S.x+$e.la.x-Ne,$e.S.y+(135<b?(se?-Ot:-$e.Da.height)+$e.la.y-he:Tt+he+$e.la.y)):$e.S.h($e.S.x+(135<b?(se?-At:-$e.Da.width)+$e.la.x-he:Ee+he+$e.la.x),$e.S.y+$e.la.y-St);x?(At=Ty(y,At,Ne),0>Ne&&(Ne=0),135<b&&(St+=Ot+he),Ot=Math.max(Math.max(Ot,Tt),Ot+Tt+he)):(135<b&&(Ne+=At+he),At=Math.max(Math.max(At,Ee),At+Ee+he),Ot=Ay(y,Ot,St),0>St&&(St=0)),y.la.h(Ne,St),y.Da.h(At,Ot)}}xr.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new rn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new rn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,_e=wu(y)===90,Ee=0,Ne=0,Ge=0,Ye=0;Ye<ne;Ye++)if(!(Ye%2!==0||1<ne&&Ye===ne-1)){var $e=x[Ye],st=$e.Da,Et=Ee===0?0:he;if(_e){var St=a.computeBusNodeSpacing($e)-se;$e.S.h(b-(st.width+St),Ge+Et),E=Math.max(E,st.width+St),te=Math.max(te,Ge+Et+st.height),Ge+=Et+st.height}else St=a.computeBusNodeSpacing($e)-se,$e.S.h(Ne+Et,b-(st.height+St)),te=Math.max(te,st.height+St),E=Math.max(E,Ne+Et+st.width),Ne+=Et+st.width;Ee++}for(Ee=0,$e=Ne,Ye=Ge,_e?(Ne=b+se,Ge=0):(Ne=0,Ge=b+se),st=0;st<ne;st++)if(st%2!==0){Et=x[st],St=Et.Da;var Tt=Ee===0?0:he;if(_e){var At=a.computeBusNodeSpacing(Et)-se;Et.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(Et)-se,Et.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($e),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($e,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 rn(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new rn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new rn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,_e=wu(y)===270,Ee=0,Ne=0,Ge=0,Ye=0;Ye<ne;Ye++)if(!(Ye%2!==0||1<ne&&Ye===ne-1)){var $e=x[Ye],st=$e.Da,Et=Ee===0?0:he;if(_e){var St=a.computeBusNodeSpacing($e)-se;Ge-=Et+st.height,$e.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($e)-se,Ne-=Et+st.width,$e.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,$e=Ne,Ye=Ge,_e?(Ne=b+se,Ge=0):(Ne=0,Ge=b+se),st=0;st<ne;st++)if(st%2!==0){Et=x[st],St=Et.Da;var Tt=Ee===0?0:he;if(_e){var At=a.computeBusNodeSpacing(Et)-se;Ge-=Tt+St.height,Et.S.h(Ne+At,Ge),E=Math.max(E,Ne+St.width+At),te=Math.max(te,Math.abs(Ge))}else At=a.computeBusNodeSpacing(Et)-se,Ne-=Tt+St.width,Et.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($e),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($e,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 rn(b,0,E,te)}xr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},xr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function 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:wt("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:wt("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=wu(y),_e=he===90||he===270,Ee=y.nodeSpacing;y=b;var Ne=E;b=te;var Ge=ne,Ye=x.Yo,$e=x.kp;ne=x.Da;var st=_e?Math.max(Ge,ne.height):Math.max(b,ne.width);if((Ye===null||he!==wu(x))&&(Ye=ll(a,2),$e=ll(a,2),_e?(Ye[0].h(0,0),Ye[1].h(0,ne.height),$e[0].h(ne.width,0),$e[1].h($e[0].x,Ye[1].y)):(Ye[0].h(0,0),Ye[1].h(ne.width,0),$e[0].h(0,ne.height),$e[1].h(Ye[1].x,$e[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 Et=Ye[E];he=Et.x,_e=Et.y,he+=b;var St=te;x+1<Ne.length&&(St=Ne[x+1]);var Tt=Et;Et=Tt.x,Tt=Tt.y,E+1<Ye.length&&(Tt=Ye[E+1],Et=Tt.x,Tt=Tt.y,Et+=b);var At=Ge;te.y===_e?At=he-te.x:te.y>_e&&te.y<Tt?At=he+(te.y-_e)/(Tt-_e)*(Et-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=ll(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=ll(a,b),he=0;he<b;he++)x[he].assign(Ee[he]);Ru(a,Ee),b=x}if(te=$e,he=Ge,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Ee=ll(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=ll(a,E),x=0;x<E;x++)te[x].assign(Ee[x]);Ru(a,Ee),E=te}return te=Math.max(0,Ge)+ne.width,ne=st,Ru(a,y),Ru(a,Ye),Ru(a,Ne),Ru(a,$e),se[0]=b,se[1]=E,new rn(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],Et=Ye[E],he=Et.x,_e=Et.y,_e+=Ge,St=te,x+1<Ne.length&&(St=Ne[x+1]),Tt=Et,Et=Tt.x,Tt=Tt.y,E+1<Ye.length&&(Tt=Ye[E+1],Et=Tt.x,Tt=Tt.y,Tt+=Ge),At=b,te.x===he?At=_e-te.y:te.x>he&&te.x<Et?At=_e+(te.x-he)/(Et-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++:Et<=he?E++:(St.x<=Et&&x++,Et<=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=ll(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=ll(a,b),he=0;he<b;he++)x[he].assign(Ee[he]);Ru(a,Ee),b=x}if(te=$e,he=Ge,Ne===null||2>Ne.length||te===null||2>te.length)E=null;else{for(Ee=ll(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=ll(a,E),x=0;x<E;x++)te[x].assign(Ee[x]);Ru(a,Ee),E=te}return te=st,ne=Math.max(0,Ge)+ne.height,Ru(a,y),Ru(a,Ye),Ru(a,Ne),Ru(a,$e),se[0]=b,se[1]=E,new rn(Ge,0,te,ne)}function ll(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 Ru(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}xr.prototype.arrangeTrees=function(){if(this.Rb===U0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof ru){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 ru&&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:wt("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:wt("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)}}}xr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},xr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},xr.prototype.Gu=function(){if(this.layerStyle===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 rn(0,te,x,se))):this.angle===90?(E.push(new rn(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new rn(te,0,se,x))):(E.push(new rn(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},xr.prototype.commitLayers=function(){},xr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},xr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof ru&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}xr.prototype.setPortSpots=function(a){var y=a.alignment;if(Wc(y)){var x=this.ud===vh,b=wu(a);switch(b){case 0:var E=Os;break;case 90:E=$s;break;case 180:E=ma;break;default:E=ua}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:ua;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=ma;break;case 90:he=ua;break;case 180:he=Os;break;default:he=$s}else y%2===0&&(he=b===90||b===270?Os:$s);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?Os:$s,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:ua,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=wu(a),this.ud===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=Os;break;case 90:b.fromSpot=$s;break;case 180:b.fromSpot=ma;break;default:b.fromSpot=ua}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=ma;break;case 90:b.toSpot=ua;break;case 180:b.toSpot=Os;break;default:b.toSpot=$s}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=Os;break;case 90:b.toSpot=$s;break;case 180:b.toSpot=ma;break;default:b.toSpot=ua}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=ma;break;case 90:b.fromSpot=ua;break;case 180:b.fromSpot=Os;break;default:b.fromSpot=$s}else b.fromSpot=a.childPortSpot}};function wu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}xr.prototype.computeLayerSpacing=function(a){var y=wu(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},xr.prototype.computeNodeIndent=function(a){var y=wu(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},nt.Object.defineProperties(xr.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==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()):wt("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 xn(xr,"PathDefault",-1),vh=new xn(xr,"PathDestination",0),rf=new xn(xr,"PathSource",1),rp=new xn(xr,"SortingForwards",10),Ig=new xn(xr,"SortingReverse",11),Rg=new xn(xr,"SortingAscending",12),Fg=new xn(xr,"SortingDescending",13),op=new xn(xr,"AlignmentCenterSubtrees",20),of=new xn(xr,"AlignmentCenterChildren",21),yh=new xn(xr,"AlignmentStart",22),Sh=new xn(xr,"AlignmentEnd",23),sc=new xn(xr,"AlignmentBus",24),xh=new xn(xr,"AlignmentBusBranching",25),ac=new xn(xr,"AlignmentTopLeftBus",26),Rh=new xn(xr,"AlignmentBottomRightBus",27),B0=new xn(xr,"CompactionNone",30),Bg=new xn(xr,"CompactionBlock",31),j0=new xn(xr,"StyleLayered",40),Oy=new xn(xr,"StyleLastParents",41),Iy=new xn(xr,"StyleAlternating",42),Ry=new xn(xr,"StyleRootOnly",43),z0=new xn(xr,"ArrangementVertical",50),Fy=new xn(xr,"ArrangementHorizontal",51),U0=new xn(xr,"ArrangementFixedRoots",52),By=new xn(xr,"LayerIndividual",60),jy=new xn(xr,"LayerSiblings",61),H0=new xn(xr,"LayerUniform",62);xr.className="TreeLayout",xr.PathDefault=F0,xr.PathDestination=vh,xr.PathSource=rf,xr.SortingForwards=rp,xr.SortingReverse=Ig,xr.SortingAscending=Rg,xr.SortingDescending=Fg,xr.AlignmentCenterSubtrees=op,xr.AlignmentCenterChildren=of,xr.AlignmentStart=yh,xr.AlignmentEnd=Sh,xr.AlignmentBus=sc,xr.AlignmentBusBranching=xh,xr.AlignmentTopLeftBus=ac,xr.AlignmentBottomRightBus=Rh,xr.CompactionNone=B0,xr.CompactionBlock=Bg,xr.StyleLayered=j0,xr.StyleLastParents=Oy,xr.StyleAlternating=Iy,xr.StyleRootOnly=Ry,xr.ArrangementVertical=z0,xr.ArrangementHorizontal=Fy,xr.ArrangementFixedRoots=U0,xr.LayerIndividual=By,xr.LayerSiblings=jy,xr.LayerUniform=H0;function sf(a){Mo.call(this,a)}Je(sf,Mo),sf.prototype.createVertex=function(){return new ru(this)},sf.prototype.createEdge=function(){return new sp(this)},sf.className="TreeNetwork";function ru(a){Ts.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 Pn(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=As,this.wr=!0,this.Dp=As}Je(ru,Ts),ru.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(ru.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)}}}),ru.className="TreeVertex";function sp(a){yl.call(this,a),this.$t=new ft(0,0)}Je(sp,yl),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:wt("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var te=wu(x),ne=y.computeLayerSpacing(x),se=x.rowSpacing;a.vg();var he=a.curve===Al,_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))):wt("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=wu(x),y!==wu(E)&&(ne=b.computeLayerSpacing(x),se=x.bounds,x=E.bounds,y===0&&x.left-se.right<ne+1||y===90&&x.top-se.bottom<ne+1||y===180&&se.left-x.right<ne+1||y===270&&se.top-x.bottom<ne+1||(a.vg(),x=a.curve===Al,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",bo.prototype.initializeStandardTools=function(){this.gb("Action",new Gi,this.mouseDownTools),this.gb("Relinking",new Cr,this.mouseDownTools),this.gb("LinkReshaping",new Ki,this.mouseDownTools),this.gb("Rotating",new Gr,this.mouseDownTools),this.gb("Resizing",new Co,this.mouseDownTools),this.gb("Linking",new oi,this.mouseMoveTools),this.gb("Dragging",new Ho,this.mouseMoveTools),this.gb("DragSelecting",new vo,this.mouseMoveTools),this.gb("Panning",new Oo,this.mouseMoveTools),this.gb("ContextMenu",new Fo,this.mouseUpTools),this.gb("TextEditing",new lo,this.mouseUpTools),this.gb("ClickCreating",new $o,this.mouseUpTools),this.gb("ClickSelecting",new Ko,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",Gl);var G0=Kt.go,zy={get licenseKey(){return nn.licenseKey},set licenseKey(a){nn.licenseKey=a},get version(){return nn.version},Group:Xi,EnumValue:xn,List:Mn,Set:kn,Map:on,Point:ft,Size:Pn,Rect:rn,Margin:$i,Spot:li,Geometry:In,PathFigure:gs,PathSegment:Fr,InputEvent:ea,DiagramEvent:Eu,ChangedEvent:Io,Model:pi,GraphLinksModel:Ar,TreeModel:Ga,Binding:vs,Transaction:ds,UndoManager:No,CommandHandler:Ct,Tool:Nr,DraggingTool:Ho,DraggingInfo:Th,DraggingOptions:ce,LinkingBaseTool:Jt,LinkingTool:oi,RelinkingTool:Cr,LinkReshapingTool:Ki,ResizingTool:Co,RotatingTool:Gr,ClickSelectingTool:Ko,ActionTool:Gi,ClickCreatingTool:$o,HTMLInfo:Vs,ContextMenuTool:Fo,DragSelectingTool:vo,PanningTool:Oo,TextEditingTool:lo,ToolManager:bo,Animation:ca,AnimationManager:Gs,AnimationTrigger:fu,Layer:Ys,Diagram:nn,Palette:Te,Overview:Fe,Brush:oo,GraphObject:Wt,Panel:Dn,RowColumnDefinition:Es,Shape:ir,TextBlock:Lo,Picture:$a,Part:Ei,Adornment:Br,Node:Xn,Link:Fn,Placeholder:ja,Layout:Zo,LayoutNetwork:Mo,LayoutVertex:Ts,LayoutEdge:yl,GridLayout:ia,PanelLayout:ks,CircularLayout:Qo,CircularNetwork:tp,CircularVertex:Mg,CircularEdge:b0,ForceDirectedLayout:fa,ForceDirectedNetwork:tf,ForceDirectedVertex:kg,ForceDirectedEdge:Tg,LayeredDigraphLayout:ao,LayeredDigraphNetwork:ip,LayeredDigraphVertex:Zl,LayeredDigraphEdge:Dg,TreeLayout:xr,TreeNetwork:sf,TreeVertex:ru,TreeEdge:sp};typeof G0=="object"&&G0.version&&bn("WARNING: a `go` object on the root object is already defined. "+("Debug"in G0?"debug ":"")+"version: "+G0.version+", replaced with version: "+zy.version),nn.prototype.go=zy,Kt.go=zy,typeof Sn.exports=="object"&&(Sn.exports=typeof Ie.g!="undefined"?Ie.g.go:self.go)}();var ke=typeof Ie.g!="undefined"?Ie.g.go:self.go;const Se=typeof Ie.g!="undefined"?Ie.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,De=Se.CommandHandler,Oe=Se.Tool,Ze=Se.DraggingTool,qe=Se.DraggingInfo,Xe=Se.LinkingBaseTool,vt=Se.LinkingTool,gt=Se.RelinkingTool,kt=Se.LinkReshapingTool,at=Se.ResizingTool,bt=Se.RotatingTool,ct=Se.ClickSelectingTool,Rt=Se.ActionTool,ut=Se.ClickCreatingTool,ot=Se.HTMLInfo,ht=Se.ContextMenuTool,yt=Se.DragSelectingTool,_t=Se.PanningTool,xt=Se.TextEditingTool,Ut=Se.ToolManager,Ht=Se.Animation,dn=Se.AnimationManager,Ft=Se.AnimationTrigger,fn=Se.Layer,It=Se.Diagram,Xt=Se.Palette,tn=Se.Overview,lt=Se.Brush,He=Se.GraphObject,ze=Se.Panel,it=Se.RowColumnDefinition,dt=Se.Shape,tt=Se.TextBlock,Ke=Se.TextBlockMetrics,je=Se.Picture,Re=Se.Part,Qe=Se.Adornment,Ve=Se.Node,We=Se.Link,pt=Se.Placeholder,Mt=Se.Layout,Qt=Se.LayoutNetwork,qt=Se.LayoutVertex,Bt=Se.LayoutEdge,$t=Se.GridLayout,Cn=Se.PanelLayout,mn=Se.CircularLayout,un=Se.CircularNetwork,Kn=Se.CircularVertex,pn=Se.CircularEdge,Hn=Se.ForceDirectedLayout,Qn=Se.ForceDirectedNetwork,Ai=Se.ForceDirectedVertex,ei=Se.ForceDirectedEdge,ki=Se.LayeredDigraphLayout,Wi=Se.LayeredDigraphNetwork,Ui=Se.LayeredDigraphVertex,rr=Se.LayeredDigraphEdge,vr=Se.TreeLayout,wr=Se.TreeNetwork,Oi=Se.TreeVertex,Zi=Se.TreeEdge,pr=Se.version},24334:function(Sn,ln,Ie){var ke,Se;(function(Be,Le){Sn.exports=Le(Be)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Ie.g!="undefined"?Ie.g:this,function(Be){"use strict";Be=Be||{};var Le=Be.Base64,Ce="2.6.4",xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=function(gt){for(var kt={},at=0,bt=gt.length;at<bt;at++)kt[gt.charAt(at)]=at;return kt}(xe),ye=String.fromCharCode,we=function(gt){if(gt.length<2){var kt=gt.charCodeAt(0);return kt<128?gt:kt<2048?ye(192|kt>>>6)+ye(128|kt&63):ye(224|kt>>>12&15)+ye(128|kt>>>6&63)+ye(128|kt&63)}else{var kt=65536+(gt.charCodeAt(0)-55296)*1024+(gt.charCodeAt(1)-56320);return ye(240|kt>>>18&7)+ye(128|kt>>>12&63)+ye(128|kt>>>6&63)+ye(128|kt&63)}},pe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,de=function(gt){return gt.replace(pe,we)},ge=function(gt){var kt=[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),bt=[xe.charAt(at>>>18),xe.charAt(at>>>12&63),kt>=2?"=":xe.charAt(at>>>6&63),kt>=1?"=":xe.charAt(at&63)];return bt.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(kt){return kt=="+"?"-":"_"}).replace(/=/g,"")},z=function(gt,kt){return kt?ee(ue(gt)):ue(gt)},oe=function(gt){return z(gt,!0)},re;Be.Uint8Array&&(re=function(gt,kt){for(var at="",bt=0,ct=gt.length;bt<ct;bt+=3){var Rt=gt[bt],ut=gt[bt+1],ot=gt[bt+2],ht=Rt<<16|ut<<8|ot;at+=xe.charAt(ht>>>18)+xe.charAt(ht>>>12&63)+(typeof ut!="undefined"?xe.charAt(ht>>>6&63):"=")+(typeof ot!="undefined"?xe.charAt(ht&63):"=")}return kt?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 kt=(7&gt.charCodeAt(0))<<18|(63&gt.charCodeAt(1))<<12|(63&gt.charCodeAt(2))<<6|63&gt.charCodeAt(3),at=kt-65536;return ye((at>>>10)+55296)+ye((at&1023)+56320);case 3:return ye((15&gt.charCodeAt(0))<<12|(63&gt.charCodeAt(1))<<6|63&gt.charCodeAt(2));default:return ye((31&gt.charCodeAt(0))<<6|63&gt.charCodeAt(1))}},me=function(gt){return gt.replace(ae,le)},ve=function(gt){var kt=gt.length,at=kt%4,bt=(kt>0?be[gt.charAt(0)]<<18:0)|(kt>1?be[gt.charAt(1)]<<12:0)|(kt>2?be[gt.charAt(2)]<<6:0)|(kt>3?be[gt.charAt(3)]:0),ct=[ye(bt>>>16),ye(bt>>>8&255),ye(bt&255)];return ct.length-=[0,0,2,1][at],ct.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,""))},De=function(gt){return me(Pe(gt))},Oe=function(gt){return String(gt).replace(/[-_]/g,function(kt){return kt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ze=function(gt){return De(Oe(gt))},qe;Be.Uint8Array&&(qe=function(gt){return Uint8Array.from(Ae(Oe(gt)),function(kt){return kt.charCodeAt(0)})});var Xe=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:Xe,fromUint8Array:re,toUint8Array:qe},typeof Object.defineProperty=="function"){var vt=function(gt){return{value:gt,enumerable:!1,writable:!0,configurable:!0}};Be.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",vt(function(){return Ze(this)})),Object.defineProperty(String.prototype,"toBase64",vt(function(gt){return z(this,gt)})),Object.defineProperty(String.prototype,"toBase64URI",vt(function(){return z(this,!0)}))}}return Be.Meteor&&(Base64=Be.Base64),Sn.exports?Sn.exports.Base64=Be.Base64:(ke=[],Se=function(){return Be.Base64}.apply(ln,ke),Se!==void 0&&(Sn.exports=Se)),{Base64:Be.Base64}})},2859:function(Sn,ln,Ie){"use strict";Ie.d(ln,{hP:function(){return tn}});var ke=function(lt,He){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ze,it){ze.__proto__=it}||function(ze,it){for(var dt in it)Object.prototype.hasOwnProperty.call(it,dt)&&(ze[dt]=it[dt])})(lt,He)};function Se(lt,He){function ze(){this.constructor=lt}ke(lt,He),lt.prototype=He===null?Object.create(He):(ze.prototype=He.prototype,new ze)}function Be(lt,He,ze,it){return new(ze||(ze=Promise))(function(dt,tt){function Ke(Qe){try{Re(it.next(Qe))}catch(Ve){tt(Ve)}}function je(Qe){try{Re(it.throw(Qe))}catch(Ve){tt(Ve)}}function Re(Qe){var Ve;Qe.done?dt(Qe.value):(Ve=Qe.value,Ve instanceof ze?Ve:new ze(function(We){We(Ve)})).then(Ke,je)}Re((it=it.apply(lt,He||[])).next())})}function Le(lt,He){var ze,it,dt,tt,Ke={label:0,sent:function(){if(1&dt[0])throw dt[1];return dt[1]},trys:[],ops:[]};return tt={next:je(0),throw:je(1),return:je(2)},typeof Symbol=="function"&&(tt[Symbol.iterator]=function(){return this}),tt;function je(Re){return function(Qe){return function(Ve){if(ze)throw new TypeError("Generator is already executing.");for(;Ke;)try{if(ze=1,it&&(dt=2&Ve[0]?it.return:Ve[0]?it.throw||((dt=it.return)&&dt.call(it),0):it.next)&&!(dt=dt.call(it,Ve[1])).done)return dt;switch(it=0,dt&&(Ve=[2&Ve[0],dt.value]),Ve[0]){case 0:case 1:dt=Ve;break;case 4:return Ke.label++,{value:Ve[1],done:!1};case 5:Ke.label++,it=Ve[1],Ve=[0];continue;case 7:Ve=Ke.ops.pop(),Ke.trys.pop();continue;default:if(dt=Ke.trys,!((dt=dt.length>0&&dt[dt.length-1])||Ve[0]!==6&&Ve[0]!==2)){Ke=0;continue}if(Ve[0]===3&&(!dt||Ve[1]>dt[0]&&Ve[1]<dt[3])){Ke.label=Ve[1];break}if(Ve[0]===6&&Ke.label<dt[1]){Ke.label=dt[1],dt=Ve;break}if(dt&&Ke.label<dt[2]){Ke.label=dt[2],Ke.ops.push(Ve);break}dt[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Ve=He.call(lt,Ke)}catch(We){Ve=[6,We],it=0}finally{ze=dt=0}if(5&Ve[0])throw Ve[1];return{value:Ve[0]?Ve[1]:void 0,done:!0}}([Re,Qe])}}}function Ce(){for(var lt=0,He=0,ze=arguments.length;He<ze;He++)lt+=arguments[He].length;var it=Array(lt),dt=0;for(He=0;He<ze;He++)for(var tt=arguments[He],Ke=0,je=tt.length;Ke<je;Ke++,dt++)it[dt]=tt[Ke];return it}var xe=function(){function lt(){}return lt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},lt.setAttributes=function(He,ze){for(var it=0,dt=ze;it<dt.length;it++){var tt=dt[it],Ke=tt[0],je=tt[1];He.setAttribute(Ke,je)}},lt.createRect=function(He,ze,it){var dt=document.createElementNS("http://www.w3.org/2000/svg","rect");return dt.setAttribute("width",He.toString()),dt.setAttribute("height",ze.toString()),it&&lt.setAttributes(dt,it),dt},lt.createLine=function(He,ze,it,dt,tt){var Ke=document.createElementNS("http://www.w3.org/2000/svg","line");return Ke.setAttribute("x1",He.toString()),Ke.setAttribute("y1",ze.toString()),Ke.setAttribute("x2",it.toString()),Ke.setAttribute("y2",dt.toString()),tt&&lt.setAttributes(Ke,tt),Ke},lt.createPolygon=function(He,ze){var it=document.createElementNS("http://www.w3.org/2000/svg","polygon");return it.setAttribute("points",He),ze&&lt.setAttributes(it,ze),it},lt.createCircle=function(He,ze){var it=document.createElementNS("http://www.w3.org/2000/svg","circle");return it.setAttribute("cx",(He/2).toString()),it.setAttribute("cy",(He/2).toString()),it.setAttribute("r",He.toString()),ze&&lt.setAttributes(it,ze),it},lt.createEllipse=function(He,ze,it){var dt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return dt.setAttribute("cx",(He/2).toString()),dt.setAttribute("cy",(ze/2).toString()),dt.setAttribute("rx",(He/2).toString()),dt.setAttribute("ry",(ze/2).toString()),it&&lt.setAttributes(dt,it),dt},lt.createGroup=function(He){var ze=document.createElementNS("http://www.w3.org/2000/svg","g");return He&&lt.setAttributes(ze,He),ze},lt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},lt.createMarker=function(He,ze,it,dt,tt,Ke,je){var Re=document.createElementNS("http://www.w3.org/2000/svg","marker");return lt.setAttributes(Re,[["id",He],["orient",ze],["markerWidth",it.toString()],["markerHeight",dt.toString()],["refX",tt.toString()],["refY",Ke.toString()]]),Re.appendChild(je),Re},lt.createText=function(He){var ze=document.createElementNS("http://www.w3.org/2000/svg","text");return ze.setAttribute("x","0"),ze.setAttribute("y","0"),He&&lt.setAttributes(ze,He),ze},lt.createTSpan=function(He,ze){var it=document.createElementNS("http://www.w3.org/2000/svg","tspan");return it.textContent=He,ze&&lt.setAttributes(it,ze),it},lt.createImage=function(He){var ze=document.createElementNS("http://www.w3.org/2000/svg","image");return He&&lt.setAttributes(ze,He),ze},lt.createPoint=function(He,ze){var it=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return it.x=He,it.y=ze,it},lt.createPath=function(He,ze){var it=document.createElementNS("http://www.w3.org/2000/svg","path");return it.setAttribute("d",He),ze&&lt.setAttributes(it,ze),it},lt}(),be=function(){function lt(){}return lt.addKey=function(He){lt.key=He},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(He,ze,it){var dt=this;return new Promise(function(tt){var Ke=it!==void 0?it:document.createElement("canvas");He===null&&(dt.markersOnly=!0,dt.naturalSize=!1);var je=document.createElementNS("http://www.w3.org/2000/svg","svg");je.setAttribute("xmlns","http://www.w3.org/2000/svg"),je.setAttribute("width",ze.width.baseVal.valueAsString),je.setAttribute("height",ze.height.baseVal.valueAsString),je.setAttribute("viewBox","0 0 "+ze.viewBox.baseVal.width.toString()+" "+ze.viewBox.baseVal.height.toString()),je.innerHTML=ze.innerHTML,dt.naturalSize===!0?(je.width.baseVal.value=He.naturalWidth,je.height.baseVal.value=He.naturalHeight):dt.width!==void 0&&dt.height!==void 0&&(je.width.baseVal.value=dt.width,je.height.baseVal.value=dt.height),Ke.width=je.width.baseVal.value,Ke.height=je.height.baseVal.value;var Re=je.outerHTML,Qe=Ke.getContext("2d");dt.markersOnly!==!0&&Qe.drawImage(He,0,0,Ke.width,Ke.height);var Ve=window.URL,We=new Image(Ke.width,Ke.height);We.setAttribute("crossOrigin","anonymous");var pt=new Blob([Re],{type:"image/svg+xml"}),Mt=Ve.createObjectURL(pt);We.onload=function(){Qe.drawImage(We,0,0),Ve.revokeObjectURL(Mt);var Qt=Ke.toDataURL(dt.imageType,dt.imageQuality);tt(Qt)},We.src=Mt})},lt}(),we=function(){},pe=function(){function lt(He){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+He+"_"}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(He){return this.styleSheet===void 0&&this.addStyleSheet(),He.name=""+this.classNamePrefix+He.localName,this.classes.push(He),this.styleSheet.sheet.insertRule("."+He.name+" {"+He.style+"}",this.styleSheet.sheet.cssRules.length),He},lt.prototype.addRule=function(He){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(He),this.styleSheet.sheet.insertRule(He.selector+" {"+He.style+"}",this.styleSheet.sheet.cssRules.length)},lt.prototype.addStyleSheet=function(){var He;this.styleSheet=document.createElement("style"),((He=this.styleSheetRoot)!==null&&He!==void 0?He: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 He;this.styleSheet&&(((He=this.styleSheetRoot)!==null&&He!==void 0?He:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},lt}(),de=function(lt,He){this.selector=lt,this.style=He},ge=function(lt,He){this.localName=lt,this.style=He},fe=function(){function lt(He,ze,it,dt,tt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=He,this.displayMode=ze,this.markerItems=it,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(He){var ze=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=He,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var it=document.createElement("div");it.className=this.toolbarBlockStyleClass.name,it.style.whiteSpace="nowrap",this.uiContainer.appendChild(it),this.addActionButton(it,'<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(it,'<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(it,'<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(it,'<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(it,'<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(it,'<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(it,'<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(it,'<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=""+ze.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",tt.typeName),Ke.innerHTML=tt.icon,Ke.addEventListener("click",function(){ze.markerToolbarButtonClicked(Ke,tt)}),ze.buttons.push(Ke),ze.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(He){this.buttonClickListeners.push(He)},lt.prototype.removeButtonClickListener=function(He){this.buttonClickListeners.indexOf(He)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(He),1)},lt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},lt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var He=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ze=0;ze<this.markerButtons.length;ze++)ze<He||ze===He&&this.markerButtons.length-1===He?this.markerButtonBlock.appendChild(this.markerButtons[ze]):(ze===He&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ze]))}},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 He=this;this.buttons.forEach(function(ze){ze.className=ze.className.replace(He.uiStyleSettings.toolbarButtonStyleColorsClassName?He.uiStyleSettings.toolbarButtonStyleColorsClassName:He.toolbarButtonStyleColorsClass.name,"").trim(),ze.className=ze.className.replace(He.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?He.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:He.toolbarActiveButtonStyleColorsClass.name,"").trim(),ze.className+=" "+(He.uiStyleSettings.toolbarButtonStyleColorsClassName?He.uiStyleSettings.toolbarButtonStyleColorsClassName:He.toolbarButtonStyleColorsClass.name)})},lt.prototype.addActionButton=function(He,ze,it){var dt=this,tt=document.createElement("div");switch(tt.className=""+this.toolbarButtonStyleClass.name,tt.innerHTML=ze,tt.setAttribute("data-action",it),tt.addEventListener("click",function(){dt.actionToolbarButtonClicked(tt,it)}),it){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}He.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 He=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ge("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*He)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*He)+`px;
padding: `+He+`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(He,ze){this.setActiveButton(He),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(it){return it("marker",ze)}),this.markerButtonOverflowBlock.style.display="none"},lt.prototype.actionToolbarButtonClicked=function(He,ze){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(it){return it("action",ze)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},lt.prototype.setActiveButton=function(He){this.resetButtonStyles(),He.className=He.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),He.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},lt.prototype.setActiveMarkerButton=function(He){var ze=this.markerButtons.find(function(it){return it.getAttribute("data-type-name")===He});ze&&this.setActiveButton(ze)},lt.prototype.setCurrentMarker=function(He){var ze=this;this.currentMarker=He,this.buttons.filter(function(it){return/delete|notes/.test(it.getAttribute("data-action"))}).forEach(function(it){ze.currentMarker===void 0?(it.style.fillOpacity="0.4",it.style.pointerEvents="none"):(it.style.fillOpacity="1",it.style.pointerEvents="all")})},lt}(),ue=function(){function lt(He,ze,it,dt){this.panels=[],this.panelButtons=[],this.markerjsContainer=He,this.displayMode=ze,this.uiStyleSettings=it,this.styles=dt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return lt.prototype.addStyles=function(){var He;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 ze=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: `+((He=this.uiStyleSettings.toolboxBackgroundColor)!==null&&He!==void 0?He:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ge("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ze)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ze)+`px;
padding: `+ze+`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(He){var ze;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=He,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ze=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ze!==void 0?ze:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},lt.prototype.setPanelButtons=function(He){var ze,it,dt=this;this.panels=He,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ze=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ze!==void 0?ze:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((it=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&it!==void 0?it:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(tt){var Ke;tt.uiStyleSettings=dt.uiStyleSettings;var je=document.createElement("div");je.className=dt.toolboxButtonStyleClass.name+" "+((Ke=dt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:dt.toolboxButtonStyleColorsClass.name),je.innerHTML=tt.icon,je.title=tt.title,je.addEventListener("click",function(){dt.panelButtonClick(tt)}),dt.panelButtons.push(je),dt.buttonRow.appendChild(je)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},lt.prototype.panelButtonClick=function(He){var ze=this,it=-1;if(He!==this.activePanel){it=this.panels.indexOf(He),this.panelRow.innerHTML="";var dt=He.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=He}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ze.displayMode==="inline"?ze.panelRow.style.display="none":ze.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(tt,Ke){var je,Re;tt.className=ze.toolboxButtonStyleClass.name+" "+(Ke===it?""+((je=ze.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&je!==void 0?je:ze.toolboxActiveButtonStyleColorsClass.name):""+((Re=ze.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Re!==void 0?Re:ze.toolboxButtonStyleColorsClass.name))})},lt}(),ee=function(lt,He){this.title=lt,this.icon=He},z=function(lt){function He(ze,it,dt,tt){var Ke=lt.call(this,ze,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=it,Ke.currentColor=dt,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return Se(He,lt),He.prototype.getUi=function(){var ze=this,it=document.createElement("div");return it.style.overflow="hidden",it.style.whiteSpace="nowrap",this.colors.forEach(function(dt){var tt=ze.getColorBox(dt);it.appendChild(tt),ze.colorBoxes.push(tt)}),it},He.prototype.getColorBox=function(ze){var it=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=ze===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){it.setCurrentColor(ze,Ke)});var je=document.createElement("div");return je.style.display="inline-block",je.style.width=tt-2+"px",je.style.height=tt-2+"px",je.style.backgroundColor=ze,je.style.borderRadius=tt/2+"px",ze==="transparent"&&(je.style.fill=this.uiStyleSettings.toolboxAccentColor,je.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(je),Ke},He.prototype.setCurrentColor=function(ze,it){var dt=this;this.currentColor=ze,this.colorBoxes.forEach(function(tt){tt.style.borderColor=tt===it?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ze)},He}(ee),oe=function(){function lt(He,ze,it){this._state="new",this._isSelected=!1,this._container=He,this._overlayContainer=ze,this.globalSettings=it,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(He){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(He,ze){},lt.prototype.dblClick=function(He,ze){},lt.prototype.manipulate=function(He){},lt.prototype.pointerUp=function(He){this.stateChanged()},lt.prototype.dispose=function(){},lt.prototype.addMarkerVisualToContainer=function(He){this.container.childNodes.length>0?this.container.insertBefore(He,this.container.childNodes[0]):this.container.appendChild(He)},lt.prototype.getState=function(){return{typeName:lt.typeName,state:this.state,notes:this.notes}},lt.prototype.restoreState=function(He){this._state=He.state,this.notes=He.notes},lt.prototype.scale=function(He,ze){},lt.prototype.colorChanged=function(He){this.onColorChanged&&this.onColorChanged(He),this.stateChanged()},lt.prototype.fillColorChanged=function(He){this.onFillColorChanged&&this.onFillColorChanged(He),this.stateChanged()},lt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var He=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),He.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(He)&&this.onStateChanged(this)}},lt.typeName="MarkerBase",lt}(),re=function(){function lt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return lt.prototype.findGripByVisual=function(He){return this.topLeft.ownsTarget(He)?this.topLeft:this.topCenter.ownsTarget(He)?this.topCenter:this.topRight.ownsTarget(He)?this.topRight:this.centerLeft.ownsTarget(He)?this.centerLeft:this.centerRight.ownsTarget(He)?this.centerRight:this.bottomLeft.ownsTarget(He)?this.bottomLeft:this.bottomCenter.ownsTarget(He)?this.bottomCenter:this.bottomRight.ownsTarget(He)?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(He){return He===this.visual||He===this.visual.childNodes[0]||He===this.visual.childNodes[1]},lt}(),le=function(){function lt(){}return lt.toITransformMatrix=function(He){return{a:He.a,b:He.b,c:He.c,d:He.d,e:He.e,f:He.f}},lt.toSVGMatrix=function(He,ze){return He.a=ze.a,He.b=ze.b,He.c=ze.c,He.d=ze.d,He.e=ze.e,He.f=ze.f,He},lt}(),me=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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(He,lt),Object.defineProperty(He.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"visual",{get:function(){return this._visual},set:function(ze){this._visual=ze;var it=xe.createTransform();this._visual.transform.baseVal.appendItem(it)},enumerable:!1,configurable:!0}),He.prototype.ownsTarget=function(ze){return!!lt.prototype.ownsTarget.call(this,ze)||!!(this.controlGrips.findGripByVisual(ze)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ze))},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.state==="new"&&(this.left=ze.x,this.top=ze.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var dt=this.unrotatePoint(ze);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(it),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(it)){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"},He.prototype.pointerUp=function(ze){var it=this.state;lt.prototype.pointerUp.call(this,ze),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ze),this._state="select",it==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},He.prototype.moveVisual=function(ze){this.visual.style.transform="translate("+ze.x+"px, "+ze.y+"px)"},He.prototype.manipulate=function(ze){var it=this.unrotatePoint(ze);this.state==="creating"?this.resize(ze):this.state==="move"?(this.left=this.manipulationStartLeft+(it.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(it.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(it):this.state==="rotate"&&this.rotate(ze)},He.prototype.resize=function(ze){var it=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:it=this.manipulationStartLeft+ze.x-this.manipulationStartX,dt=this.manipulationStartWidth+this.manipulationStartLeft-it;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:dt=this.manipulationStartWidth+ze.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:tt=this.manipulationStartTop+ze.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+ze.y-this.manipulationStartY}dt>=0?(this.left=it,this.width=dt):(this.left=it+dt,this.width=-dt),Ke>=0?(this.top=tt,this.height=Ke):(this.top=tt+Ke,this.height=-Ke),this.setSize()},He.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},He.prototype.rotate=function(ze){if(Math.abs(ze.x-this.centerX)>.1){var it=Math.sign(ze.x-this.centerX);this.rotationAngle=180*Math.atan((ze.y-this.centerY)/(ze.x-this.centerX))/Math.PI+90*it,this.applyRotation()}},He.prototype.applyRotation=function(){var ze=this.container.transform.baseVal.getItem(0);ze.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ze,0)},He.prototype.rotatePoint=function(ze){if(this.rotationAngle===0)return ze;var it=this.container.getCTM(),dt=xe.createPoint(ze.x,ze.y);return{x:(dt=dt.matrixTransform(it)).x,y:dt.y}},He.prototype.unrotatePoint=function(ze){if(this.rotationAngle===0)return ze;var it=this.container.getCTM();it=it.inverse();var dt=xe.createPoint(ze.x,ze.y);return{x:(dt=dt.matrixTransform(it)).x,y:dt.y}},He.prototype.select=function(){lt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},He.prototype.deselect=function(){lt.prototype.deselect.call(this),this.controlBox.style.display="none"},He.prototype.setupControlBox=function(){this.controlBox=xe.createGroup();var ze=xe.createTransform();ze.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ze),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"},He.prototype.adjustControlBox=function(){var ze=this.controlBox.transform.baseVal.getItem(0);ze.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ze,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()},He.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()},He.prototype.createGrip=function(){var ze=new ae;return ze.visual.transform.baseVal.appendItem(xe.createTransform()),this.controlBox.appendChild(ze.visual),ze},He.prototype.positionGrips=function(){var ze=this.controlGrips.topLeft.GRIP_SIZE,it=-ze/2,dt=it,tt=(this.width+this.CB_DISTANCE)/2-ze/2,Ke=(this.height+this.CB_DISTANCE)/2-ze/2,je=this.height+this.CB_DISTANCE-ze/2,Re=this.width+this.CB_DISTANCE-ze/2;this.positionGrip(this.controlGrips.topLeft.visual,it,dt),this.positionGrip(this.controlGrips.topCenter.visual,tt,dt),this.positionGrip(this.controlGrips.topRight.visual,Re,dt),this.positionGrip(this.controlGrips.centerLeft.visual,it,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Re,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,it,je),this.positionGrip(this.controlGrips.bottomCenter.visual,tt,je),this.positionGrip(this.controlGrips.bottomRight.visual,Re,je),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,tt,dt-3*this.CB_DISTANCE)},He.prototype.positionGrip=function(ze,it,dt){var tt=ze.transform.baseVal.getItem(0);tt.setTranslate(it,dt),ze.transform.baseVal.replaceItem(tt,0)},He.prototype.hideControlBox=function(){this.controlBox.style.display="none"},He.prototype.showControlBox=function(){this.controlBox.style.display=""},He.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))},He.prototype.restoreState=function(ze){lt.prototype.restoreState.call(this,ze);var it=ze;this.left=it.left,this.top=it.top,this.width=it.width,this.height=it.height,this.rotationAngle=it.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,it.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,it.containerTransformMatrix))},He.prototype.scale=function(ze,it){lt.prototype.scale.call(this,ze,it);var dt=this.rotatePoint({x:this.left,y:this.top}),tt=this.unrotatePoint({x:dt.x*ze,y:dt.y*it});this.left=tt.x,this.top=tt.y,this.width=this.width*ze,this.height=this.height*it,this.adjustControlBox()},He}(oe),ve=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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(He,lt),He.prototype.ownsTarget=function(ze){return!(!lt.prototype.ownsTarget.call(this,ze)&&ze!==this.visual)},He.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)},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.state==="new"&&(this.createVisual(),this.moveVisual(ze),this._state="creating")},He.prototype.manipulate=function(ze){lt.prototype.manipulate.call(this,ze)},He.prototype.resize=function(ze){lt.prototype.resize.call(this,ze),this.setSize()},He.prototype.setSize=function(){lt.prototype.setSize.call(this),xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},He.prototype.pointerUp=function(ze){lt.prototype.pointerUp.call(this,ze),this.setSize()},He.prototype.setStrokeColor=function(ze){this.strokeColor=ze,this.visual&&xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ze),this.stateChanged()},He.prototype.setFillColor=function(ze){this.fillColor=ze,this.visual&&xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},He.prototype.setStrokeWidth=function(ze){this.strokeWidth=ze,this.visual&&xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},He.prototype.setStrokeDasharray=function(ze){this.strokeDasharray=ze,this.visual&&xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},He.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))},He.prototype.restoreState=function(ze){var it=ze;this.fillColor=it.fillColor,this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.opacity=it.opacity,this.createVisual(),lt.prototype.restoreState.call(this,ze),this.setSize()},He.prototype.scale=function(ze,it){lt.prototype.scale.call(this,ze,it),this.setSize()},He.title="Rectangle marker",He}(me),Pe=function(lt){function He(ze,it,dt,tt){var Ke=lt.call(this,ze,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=it,Ke.currentWidth=dt,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return Se(He,lt),He.prototype.getUi=function(){var ze=this,it=document.createElement("div");return it.style.display="flex",it.style.overflow="hidden",it.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===ze.currentWidth?ze.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){ze.setCurrentWidth(dt,tt)}),it.appendChild(tt);var Ke=document.createElement("div");Ke.innerText=dt.toString(),Ke.style.marginRight="5px",tt.appendChild(Ke);var je=document.createElement("div");je.style.minHeight="20px",je.style.flexGrow="2",je.style.display="flex",je.style.alignItems="center";var Re=document.createElement("hr");Re.style.minWidth="20px",Re.style.border="0px",Re.style.borderTop=dt+"px solid "+ze.uiStyleSettings.toolboxColor,Re.style.flexGrow="2",je.appendChild(Re),tt.appendChild(je),ze.widthBoxes.push(tt)}),it},He.prototype.setCurrentWidth=function(ze,it){var dt=this;this.currentWidth=ze,this.widthBoxes.forEach(function(tt){tt.style.borderColor=tt===it?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},He}(ee),Ae=function(lt){function He(ze,it,dt,tt){var Ke=lt.call(this,ze,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=it,Ke.currentStyle=dt,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return Se(He,lt),He.prototype.getUi=function(){var ze=this,it=document.createElement("div");return it.style.display="flex",it.style.overflow="hidden",it.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/ze.styles.length-5+"%",tt.style.borderColor=dt===ze.currentStyle?ze.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){ze.setCurrentStyle(dt,tt)}),it.appendChild(tt);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var je=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ze.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(dt!==""?'stroke-dasharray="'+dt+'"':"")+` />
</svg>`;Ke.innerHTML=je,tt.appendChild(Ke),ze.styleBoxes.push(tt)}),it},He.prototype.setCurrentStyle=function(ze,it){var dt=this;this.currentStyle=ze,this.styleBoxes.forEach(function(tt){tt.style.borderColor=tt===it?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},He}(ee),De=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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(He,lt),Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=lt.prototype.getState.call(this);return ze.typeName=He.typeName,ze},He.typeName="FrameMarker",He.title="Frame marker",He.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',He}(ve),Oe=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 He(ze,it,dt){var tt=lt.call(this,ze,it,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(He,lt),He.prototype.ownsTarget=function(ze){return!!lt.prototype.ownsTarget.call(this,ze)||!(!this.grip1.ownsTarget(ze)&&!this.grip2.ownsTarget(ze))},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.manipulationStartX=ze.x,this.manipulationStartY=ze.y,this.state==="new"&&(this.x1=ze.x,this.y1=ze.y,this.x2=ze.x,this.y2=ze.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(it)?this.activeGrip=this.grip1:this.grip2.ownsTarget(it)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},He.prototype.pointerUp=function(ze){var it=this.state;lt.prototype.pointerUp.call(this,ze),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(ze),this._state="select",it==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},He.prototype.adjustVisual=function(){},He.prototype.manipulate=function(ze){this.state==="creating"?this.resize(ze):this.state==="move"?(this.x1=this.manipulationStartX1+ze.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ze.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ze.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ze.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ze)},He.prototype.resize=function(ze){switch(this.activeGrip){case this.grip1:this.x1=ze.x,this.y1=ze.y;break;case this.grip2:case void 0:this.x2=ze.x,this.y2=ze.y}this.adjustVisual(),this.adjustControlBox()},He.prototype.select=function(){lt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},He.prototype.deselect=function(){lt.prototype.deselect.call(this),this.controlBox.style.display="none"},He.prototype.setupControlBox=function(){this.controlBox=xe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},He.prototype.adjustControlBox=function(){this.positionGrips()},He.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},He.prototype.createGrip=function(){var ze=new ae;return ze.visual.transform.baseVal.appendItem(xe.createTransform()),this.controlBox.appendChild(ze.visual),ze},He.prototype.positionGrips=function(){var ze=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ze/2,this.y1-ze/2),this.positionGrip(this.grip2.visual,this.x2-ze/2,this.y2-ze/2)},He.prototype.positionGrip=function(ze,it,dt){var tt=ze.transform.baseVal.getItem(0);tt.setTranslate(it,dt),ze.transform.baseVal.replaceItem(tt,0)},He.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},lt.prototype.getState.call(this))},He.prototype.restoreState=function(ze){lt.prototype.restoreState.call(this,ze);var it=ze;this.x1=it.x1,this.y1=it.y1,this.x2=it.x2,this.y2=it.y2},He.prototype.scale=function(ze,it){lt.prototype.scale.call(this,ze,it),this.x1=this.x1*ze,this.y1=this.y1*it,this.x2=this.x2*ze,this.y2=this.y2*it,this.adjustVisual(),this.adjustControlBox()},He}(oe),qe=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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(He,lt),He.prototype.ownsTarget=function(ze){return!(!lt.prototype.ownsTarget.call(this,ze)&&ze!==this.visual&&ze!==this.selectorLine&&ze!==this.visibleLine)},He.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)},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},He.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()]]))},He.prototype.setStrokeColor=function(ze){this.strokeColor=ze,this.adjustVisual(),this.colorChanged(ze)},He.prototype.setStrokeWidth=function(ze){this.strokeWidth=ze,this.adjustVisual()},He.prototype.setStrokeDasharray=function(ze){this.strokeDasharray=ze,this.adjustVisual(),this.stateChanged()},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},lt.prototype.getState.call(this));return ze.typeName=He.typeName,ze},He.prototype.restoreState=function(ze){lt.prototype.restoreState.call(this,ze);var it=ze;this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.createVisual(),this.adjustVisual()},He.typeName="LineMarker",He.title="Line marker",He.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',He}(Ze),Xe=function(lt){function He(ze,it,dt,tt){var Ke=lt.call(this,ze,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=it,Ke.currentFont=dt,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return Se(He,lt),He.prototype.getUi=function(){var ze=this,it=document.createElement("div");return it.style.overflow="hidden",it.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/ze.fonts.length-5+"%",tt.style.borderColor=dt===ze.currentFont?ze.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){ze.setCurrentFont(dt,tt)}),it.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 je=document.createElement("div");je.style.whiteSpace="nowrap",je.style.overflow="hidden",je.style.textOverflow="ellipsis",je.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(je),tt.appendChild(Ke),ze.fontBoxes.push(tt)}),it},He.prototype.setCurrentFont=function(ze,it){var dt=this;this.currentFont=ze,this.fontBoxes.forEach(function(tt){tt.style.borderColor=tt===it?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},He}(ee),vt=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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 Xe("Font",dt.defaultFontFamilies,dt.defaultFontFamily),tt.fontFamilyPanel.onFontChanged=tt.setFont,tt}return Se(He,lt),He.prototype.ownsTarget=function(ze){if(lt.prototype.ownsTarget.call(this,ze)||ze===this.visual||ze===this.textElement||ze===this.bgRectangle)return!0;var it=!1;return this.textElement.childNodes.forEach(function(dt){dt===ze&&(it=!0)}),it},He.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()},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.isMoved=!1,this.pointerDownPoint=ze,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ze),this._state="creating")},He.prototype.renderText=function(){var ze=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(it){ze.textElement.appendChild(xe.createTSpan(it.trim()===""?" ":it.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},He.prototype.getTextScale=function(){var ze=this.textElement.getBBox(),it=1;if(ze.width>0&&ze.height>0){var dt=(1*this.width-this.width*this.padding*2/100)/ze.width,tt=(1*this.height-this.height*this.padding*2/100)/ze.height;it=Math.min(dt,tt)}return it},He.prototype.getTextPosition=function(ze){var it=this.textElement.getBBox(),dt=0,tt=0;return it.width>0&&it.height>0&&(dt=(this.width-it.width*ze)/2,tt=this.height/2-it.height*ze/2),{x:dt,y:tt}},He.prototype.sizeText=function(){var ze=this.textElement.getBBox(),it=this.getTextScale(),dt=this.getTextPosition(it);dt.y-=ze.y*it,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+dt.x+"px, "+dt.y+"px) scale("+it+", "+it+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(dt.x,dt.y),this.textElement.transform.baseVal.getItem(1).setScale(it,it))},He.prototype.manipulate=function(ze){lt.prototype.manipulate.call(this,ze),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ze.x-this.pointerDownPoint.x)>5||Math.abs(ze.y-this.pointerDownPoint.y)>5)},He.prototype.resize=function(ze){lt.prototype.resize.call(this,ze),this.isMoved=!0,this.setSize(),this.sizeText()},He.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()]]))},He.prototype.pointerUp=function(ze){var it=this.state;it==="creating"&&(this._suppressMarkerCreateEvent=!0),lt.prototype.pointerUp.call(this,ze),this.setSize(),(it==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},He.prototype.showTextEditor=function(){var ze=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(it){it.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var it=Number.parseFloat(ze.textEditor.style.fontSize);ze.textEditor.clientWidth>=Number.parseInt(ze.textEditor.style.maxWidth)&&it>.9;)it-=.1,ze.textEditor.style.fontSize=Math.max(it,.9)+"em"}),this.textEditor.addEventListener("keyup",function(it){it.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(it){if(it.clipboardData){var dt=it.clipboardData.getData("text"),tt=window.getSelection();if(!tt.rangeCount)return!1;tt.deleteFromDocument(),tt.getRangeAt(0).insertNode(document.createTextNode(dt)),it.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ze.textEditDivClicked(ze.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},He.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ze=this.getTextScale(),it=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),dt=this.textElement.getBBox(),tt={x:dt.width*ze,y:dt.height*ze};it.x-=tt.x/2,it.y-=tt.y/2,this.textEditor.style.top=it.y+"px",this.textEditor.style.left=it.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-it.x+"px",this.textEditor.style.fontSize=Math.max(16*ze,12)+"px",this.textElement.style.display="none"}},He.prototype.textEditDivClicked=function(ze){this.text=ze.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},He.prototype.select=function(){lt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},He.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),lt.prototype.deselect.call(this)},He.prototype.dblClick=function(ze,it){lt.prototype.dblClick.call(this,ze,it),this.showTextEditor()},He.prototype.setColor=function(ze){this.textElement&&xe.setAttributes(this.textElement,[["fill",ze]]),this.color=ze,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ze)},He.prototype.setFont=function(ze){this.textElement&&xe.setAttributes(this.textElement,[["font-family",ze]]),this.fontFamily=ze,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},He.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},He.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},lt.prototype.getState.call(this));return ze.typeName=He.typeName,ze},He.prototype.restoreState=function(ze){var it=ze;this.color=it.color,this.fontFamily=it.fontFamily,this.padding=it.padding,this.text=it.text,this.createVisual(),lt.prototype.restoreState.call(this,ze),this.setSize()},He.prototype.scale=function(ze,it){lt.prototype.scale.call(this,ze,it),this.setSize(),this.sizeText(),this.positionTextEditor()},He.typeName="TextMarker",He.title="Text marker",He.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>',He}(me),gt=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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(He,lt),He.prototype.ownsTarget=function(ze){return!(!lt.prototype.ownsTarget.call(this,ze)&&ze!==this.visual&&ze!==this.drawingImage)},He.prototype.createVisual=function(){this.visual=xe.createGroup(),this.drawingImage=xe.createImage(),this.visual.appendChild(this.drawingImage);var ze=xe.createTransform();this.visual.transform.baseVal.appendItem(ze),this.addMarkerVisualToContainer(this.visual)},He.prototype.pointerDown=function(ze,it){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(ze.x,ze.y),this.drawing=!0):lt.prototype.pointerDown.call(this,ze,it)},He.prototype.manipulate=function(ze){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ze.x,ze.y),this.canvasContext.stroke()):lt.prototype.manipulate.call(this,ze)},He.prototype.resize=function(ze){lt.prototype.resize.call(this,ze),xe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),xe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},He.prototype.pointerUp=function(ze){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):lt.prototype.pointerUp.call(this,ze)},He.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)},He.prototype.select=function(){this.state==="creating"&&this.finishCreation(),lt.prototype.select.call(this)},He.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),lt.prototype.deselect.call(this)},He.prototype.finishCreation=function(){for(var ze=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),it=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],dt=it[0],tt=it[1],Ke=it[2],je=it[3],Re=!1,Qe=0;Qe<this.canvasElement.height;Qe++)for(var Ve=0;Ve<this.canvasElement.width;Ve++)ze.data[Qe*this.canvasElement.width*4+4*Ve+3]>0&&(Re=!0,Qe<tt&&(tt=Qe),Ve<dt&&(dt=Ve),Qe>je&&(je=Qe),Ve>Ke&&(Ke=Ve));if(Re){this.left=dt/this.pixelRatio,this.top=tt/this.pixelRatio,this.width=(Ke-dt)/this.pixelRatio,this.height=(je-tt)/this.pixelRatio;var We=document.createElement("canvas");We.width=Ke-dt,We.height=je-tt,We.getContext("2d").putImageData(this.canvasContext.getImageData(dt,tt,Ke-dt,je-tt),0,0),this.drawingImgUrl=We.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},He.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})},He.prototype.setColor=function(ze){this.color=ze,this.colorChanged(ze)},He.prototype.setLineWidth=function(ze){this.lineWidth=ze},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=Object.assign({drawingImgUrl:this.drawingImgUrl},lt.prototype.getState.call(this));return ze.typeName=He.typeName,ze},He.prototype.restoreState=function(ze){this.createVisual(),lt.prototype.restoreState.call(this,ze),this.drawingImgUrl=ze.drawingImgUrl,this.setDrawingImage()},He.prototype.scale=function(ze,it){lt.prototype.scale.call(this,ze,it),this.setDrawingImage()},He.typeName="FreehandMarker",He.title="Freehand marker",He.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>',He}(me),kt=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,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=it,tt.setCurrentType=tt.setCurrentType.bind(tt),tt}return Se(He,lt),He.prototype.getUi=function(){var ze=this,it=document.createElement("div");it.style.display="flex",it.style.overflow="hidden",it.style.flexGrow="2";for(var dt=function(je){var Re="both";switch(je){case 0:Re="both";break;case 1:Re="start";break;case 2:Re="end";break;case 3:Re="none"}var Qe=document.createElement("div");if(Qe.style.display="flex",Qe.style.flexGrow="2",Qe.style.alignItems="center",Qe.style.justifyContent="space-between",Qe.style.padding="5px",Qe.style.borderWidth="2px",Qe.style.borderStyle="solid",Qe.style.borderColor=Re===tt.currentType?tt.uiStyleSettings.toolboxAccentColor:"transparent",Qe.addEventListener("click",function(){ze.setCurrentType(Re,Qe)}),it.appendChild(Qe),Re==="both"||Re==="start"){var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.alignItems="center",Ve.style.minHeight="20px",Ve.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>`,Ve.style.marginLeft="5px",Qe.appendChild(Ve)}var We=document.createElement("div");We.style.display="flex",We.style.alignItems="center",We.style.minHeight="20px",We.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",We.appendChild(pt),Qe.appendChild(We),Re==="both"||Re==="end"){var Mt=document.createElement("div");Mt.style.display="flex",Mt.style.alignItems="center",Mt.style.minHeight="20px",Mt.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>`,Mt.style.marginRight="5px",Qe.appendChild(Mt)}tt.typeBoxes.push(Qe)},tt=this,Ke=0;Ke<4;Ke++)dt(Ke);return it},He.prototype.setCurrentType=function(ze,it){var dt=this;this.currentType=ze,this.typeBoxes.forEach(function(tt){tt.style.borderColor=tt===it?dt.uiStyleSettings!==void 0?dt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},He}(ee),at=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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 kt("Arrow type","end"),tt.arrowTypePanel.onArrowTypeChanged=tt.setArrowType,tt}return Se(He,lt),He.prototype.ownsTarget=function(ze){return!(!lt.prototype.ownsTarget.call(this,ze)&&ze!==this.arrow1&&ze!==this.arrow2)},He.prototype.getArrowPoints=function(ze,it){var dt=this.arrowBaseWidth+2*this.strokeWidth,tt=this.arrowBaseHeight+2*this.strokeWidth;return ze-dt/2+","+(it+tt/2)+" "+ze+","+(it-tt/2)+" "+(ze+dt/2)+","+(it+tt/2)},He.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)},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.state==="creating"&&this.createTips()},He.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 ze=0;Math.abs(this.x1-this.x2)>.1&&(ze=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var it=this.arrow1.transform.baseVal.getItem(0);it.setRotate(ze,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(it,0);var dt=this.arrow2.transform.baseVal.getItem(0);dt.setRotate(ze+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(dt,0)}},He.prototype.setArrowType=function(ze){this.arrowType=ze,this.adjustVisual(),this.stateChanged()},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=Object.assign({arrowType:this.arrowType},lt.prototype.getState.call(this));return ze.typeName=He.typeName,ze},He.prototype.restoreState=function(ze){lt.prototype.restoreState.call(this,ze);var it=ze;this.arrowType=it.arrowType,this.createTips(),this.adjustVisual()},He.typeName="ArrowMarker",He.title="Arrow marker",He.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',He}(qe),bt=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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(He,lt),Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=lt.prototype.getState.call(this);return ze.typeName=He.typeName,ze},He.typeName="CoverMarker",He.title="Cover marker",He.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',He}(ve),ct=function(lt){function He(ze,it,dt,tt){var Ke=lt.call(this,ze,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=it,Ke.currentOpacity=dt,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return Se(He,lt),He.prototype.getUi=function(){var ze=this,it=document.createElement("div");return it.style.display="flex",it.style.overflow="hidden",it.style.flexGrow="2",it.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===ze.currentOpacity?ze.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){ze.setCurrentOpacity(dt,tt)}),it.appendChild(tt);var Ke=document.createElement("div");Ke.innerText=100*dt+"%",tt.appendChild(Ke),ze.opacityBoxes.push(tt)}),it},He.prototype.setCurrentOpacity=function(ze,it){var dt=this;this.currentOpacity=ze,this.opacityBoxes.forEach(function(tt){tt.style.borderColor=tt===it?dt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},He}(ee),Rt=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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 ct("Opacity",dt.defaultOpacitySteps,tt.opacity),tt.opacityPanel.onOpacityChanged=tt.setOpacity,tt}return Se(He,lt),He.prototype.setOpacity=function(ze){this.opacity=ze,this.visual&&xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=lt.prototype.getState.call(this);return ze.typeName=He.typeName,ze},He.typeName="HighlightMarker",He.title="Highlight marker",He.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>',He}(bt),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>',ht=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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 Xe("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(He,lt),He.prototype.ownsTarget=function(ze){return lt.prototype.ownsTarget.call(this,ze)||this.tipGrip.ownsTarget(ze)||this.tip===ze},He.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)},He.prototype.pointerDown=function(ze,it){this.state==="new"&&lt.prototype.pointerDown.call(this,ze,it),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(it)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):lt.prototype.pointerDown.call(this,ze,it)},He.prototype.pointerUp=function(ze){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,lt.prototype.pointerUp.call(this,ze);else{var it=this.state==="creating";lt.prototype.pointerUp.call(this,ze),this.setTipPoints(it),this.positionTip()}},He.prototype.manipulate=function(ze){if(this.tipMoving){var it=this.unrotatePoint(ze);this.tipPosition={x:it.x-this.manipulationStartLeft,y:it.y-this.manipulationStartTop},this.positionTip()}else lt.prototype.manipulate.call(this,ze)},He.prototype.setBgColor=function(ze){this.bgRectangle&&this.tip&&(xe.setAttributes(this.bgRectangle,[["fill",ze]]),xe.setAttributes(this.tip,[["fill",ze]])),this.bgColor=ze,this.fillColorChanged(ze)},He.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},He.prototype.setTipPoints=function(ze){ze===void 0&&(ze=!1);var it=Math.min(this.height/2,15),dt=this.height/5;ze&&(this.tipPosition={x:it+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,it=Math.min(this.width/2,15),this.tipBase1Position={x:it,y:0},this.tipBase2Position={x:it+dt,y:0}):(this.tipBase1Position={x:0,y:it},this.tipBase2Position={x:0,y:it+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,it=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-it-dt,y:0},this.tipBase2Position={x:this.width-it,y:0}):(this.tipBase1Position={x:this.width,y:it},this.tipBase2Position={x:this.width,y:it+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,it=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-it-dt,y:this.height},this.tipBase2Position={x:this.width-it,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-it-dt},this.tipBase2Position={x:this.width,y:this.height-it}):tt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(dt=this.width/5,it=Math.min(this.width/2,15),this.tipBase1Position={x:it,y:this.height},this.tipBase2Position={x:it+dt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-it},this.tipBase2Position={x:0,y:this.height-it-dt})},He.prototype.resize=function(ze){lt.prototype.resize.call(this,ze),this.positionTip()},He.prototype.positionTip=function(){xe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ze=this.tipGrip.visual.transform.baseVal.getItem(0);ze.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ze,0)},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),He.prototype.select=function(){this.positionTip(),lt.prototype.select.call(this)},He.prototype.getState=function(){var ze=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},lt.prototype.getState.call(this));return ze.typeName=He.typeName,ze},He.prototype.restoreState=function(ze){var it=ze;this.bgColor=it.bgColor,this.tipPosition=it.tipPosition,lt.prototype.restoreState.call(this,ze),this.createTip(),this.setTipPoints()},He.prototype.scale=function(ze,it){lt.prototype.scale.call(this,ze,it),this.tipPosition={x:this.tipPosition.x*ze,y:this.tipPosition.y*it},this.positionTip()},He.typeName="CalloutMarker",He.title="Callout marker",He.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>',He}(vt),yt=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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 ct("Opacity",dt.defaultOpacitySteps,tt.opacity),tt.opacityPanel.onOpacityChanged=tt.setOpacity,tt}return Se(He,lt),He.prototype.ownsTarget=function(ze){return!(!lt.prototype.ownsTarget.call(this,ze)&&ze!==this.visual)},He.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)},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.state==="new"&&(this.createVisual(),this.moveVisual(ze),this._state="creating")},He.prototype.manipulate=function(ze){lt.prototype.manipulate.call(this,ze)},He.prototype.resize=function(ze){lt.prototype.resize.call(this,ze),this.setSize()},He.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()]])},He.prototype.pointerUp=function(ze){lt.prototype.pointerUp.call(this,ze),this.setSize()},He.prototype.setStrokeColor=function(ze){this.strokeColor=ze,this.visual&&xe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ze),this.stateChanged()},He.prototype.setFillColor=function(ze){this.fillColor=ze,this.visual&&xe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ze),this.stateChanged()},He.prototype.setStrokeWidth=function(ze){this.strokeWidth=ze,this.visual&&xe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},He.prototype.setStrokeDasharray=function(ze){this.strokeDasharray=ze,this.visual&&xe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},He.prototype.setOpacity=function(ze){this.opacity=ze,this.visual&&xe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},lt.prototype.getState.call(this));return ze.typeName=He.typeName,ze},He.prototype.restoreState=function(ze){var it=ze;this.fillColor=it.fillColor,this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.opacity=it.opacity,this.createVisual(),lt.prototype.restoreState.call(this,ze),this.setSize()},He.prototype.scale=function(ze,it){lt.prototype.scale.call(this,ze,it),this.setSize()},He.typeName="EllipseMarker",He.title="Ellipse marker",He.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>',He}(me),_t=function(lt){function He(ze,it,dt){return lt.call(this,ze,it,dt)||this}return Se(He,lt),Object.defineProperty(He.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),He.prototype.ownsTarget=function(ze){return!(!lt.prototype.ownsTarget.call(this,ze)&&ze!==this.tip1&&ze!==this.tip2)},He.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)},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.state==="creating"&&this.createTips()},He.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 ze=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),it=this.tip1.transform.baseVal.getItem(0);it.setRotate(ze,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(it,0);var dt=this.tip2.transform.baseVal.getItem(0);dt.setRotate(ze+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(dt,0)}},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=lt.prototype.getState.call(this);return ze.typeName=He.typeName,ze},He.prototype.restoreState=function(ze){lt.prototype.restoreState.call(this,ze),this.createTips(),this.adjustVisual()},He.typeName="MeasurementMarker",He.title="Measurement marker",He.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>',He}(qe),xt=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,dt)||this;return tt.strokePanel.colors=dt.defaultColorSet,tt.fillColor="transparent",tt}return Se(He,lt),Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=lt.prototype.getState.call(this);return ze.typeName=He.typeName,ze},He.typeName="EllipseFrameMarker",He.title="Ellipse frame marker",He.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>',He}(yt),Ut=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(He){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(He)||(this.undoStack.push(He),JSON.stringify(this.lastRedoStep)!==JSON.stringify(He)&&this.redoStack.splice(0,this.redoStack.length))},lt.prototype.replaceLastUndoStep=function(He){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=He)},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 He=this.undoStack.pop();return He!==void 0&&this.redoStack.push(He),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}(),Ht=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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(He,lt),He.prototype.ownsTarget=function(ze){return!(!lt.prototype.ownsTarget.call(this,ze)&&ze!==this.visual&&ze!==this.selectorCurve&&ze!==this.visibleCurve&&!this.curveGrip.ownsTarget(ze))},He.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},He.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)},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ze.x,this.curveY=ze.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(it)&&(this.activeGrip=this.curveGrip,this._state="resize")},He.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()]]))},He.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)},He.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,lt.prototype.addControlGrips.call(this)},He.prototype.positionGrips=function(){lt.prototype.positionGrips.call(this);var ze=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ze/2,this.curveY-ze/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()))},He.prototype.manipulate=function(ze){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ze.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ze.y-this.manipulationStartY),lt.prototype.manipulate.call(this,ze)},He.prototype.resize=function(ze){this.activeGrip===this.curveGrip&&(this.curveX=ze.x,this.curveY=ze.y),lt.prototype.resize.call(this,ze),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},He.prototype.setStrokeColor=function(ze){this.strokeColor=ze,this.adjustVisual(),this.colorChanged(ze)},He.prototype.setStrokeWidth=function(ze){this.strokeWidth=ze,this.adjustVisual()},He.prototype.setStrokeDasharray=function(ze){this.strokeDasharray=ze,this.adjustVisual()},He.prototype.scale=function(ze,it){this.curveX=this.curveX*ze,this.curveY=this.curveY*it,lt.prototype.scale.call(this,ze,it)},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},lt.prototype.getState.call(this));return ze.typeName=He.typeName,ze},He.prototype.restoreState=function(ze){lt.prototype.restoreState.call(this,ze);var it=ze;this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.curveX=it.curveX,this.curveY=it.curveY,this.createVisual(),this.adjustVisual()},He.typeName="CurveMarker",He.title="Curve marker",He.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>',He}(Ze),dn=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,it,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 Xe("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(He,lt),He.prototype.ownsTarget=function(ze){return!(!lt.prototype.ownsTarget.call(this,ze)&&ze!==this.visual&&ze!==this.frame&&ze!==this.captionBg&&ze!==this.captionElement)},He.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()},He.prototype.setCaptionText=function(ze){this.captionText=ze,this.captionElement.textContent=this.captionText,this.sizeCaption()},He.prototype.pointerDown=function(ze,it){lt.prototype.pointerDown.call(this,ze,it),this.isMoved=!1,this.pointerDownPoint=ze,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ze),this._state="creating")},He.prototype.manipulate=function(ze){lt.prototype.manipulate.call(this,ze),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ze.x-this.pointerDownPoint.x)>5||Math.abs(ze.y-this.pointerDownPoint.y)>5)},He.prototype.resize=function(ze){lt.prototype.resize.call(this,ze),this.setSize()},He.prototype.sizeCaption=function(){var ze=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ze.width+2*this.PADDING,this.captionBoxHeight=ze.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')"]])},He.prototype.showTextEditor=function(){var ze=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(it){it.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(it){it.key==="Enter"&&ze.finishTextEditing(ze.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(it){it.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ze.finishTextEditing(ze.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ze.finishTextEditing(ze.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},He.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"))},He.prototype.finishTextEditing=function(ze){this.setCaptionText(ze.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},He.prototype.setFont=function(ze){this.captionElement&&xe.setAttributes(this.captionElement,[["font-family",ze]]),this.fontFamily=ze,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},He.prototype.setTextColor=function(ze){this.captionElement&&xe.setAttributes(this.captionElement,[["fill",ze]]),this.textColor=ze,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},He.prototype.setSize=function(){lt.prototype.setSize.call(this),xe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},He.prototype.pointerUp=function(ze){lt.prototype.pointerUp.call(this,ze),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},He.prototype.dblClick=function(ze,it){lt.prototype.dblClick.call(this,ze,it),this.showTextEditor()},He.prototype.setStrokeColor=function(ze){this.strokeColor=ze,this.frame&&xe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ze),this.stateChanged()},He.prototype.setFillColor=function(ze){this.fillColor=ze,this.captionBg&&xe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ze),this.stateChanged()},He.prototype.setStrokeWidth=function(ze){this.strokeWidth=ze,this.frame&&xe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},He.prototype.setStrokeDasharray=function(ze){this.strokeDasharray=ze,this.frame&&xe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),He.prototype.getState=function(){var ze=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 ze.typeName=this.typeName,ze},He.prototype.restoreState=function(ze){var it=ze;this.fillColor=it.fillColor,this.strokeColor=it.strokeColor,this.strokeWidth=it.strokeWidth,this.strokeDasharray=it.strokeDasharray,this.textColor=it.textColor,this.fontFamily=it.fontFamily,this.captionText=it.captionText,this.fontSize=it.fontSize,this.createVisual(),lt.prototype.restoreState.call(this,ze),this.setSize()},He.prototype.scale=function(ze,it){lt.prototype.scale.call(this,ze,it),this.setSize()},He.typeName="CaptionFrameMarker",He.title="Caption frame marker",He.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>',He}(me),Ft=function(){function lt(He,ze){ze===void 0&&(ze=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=He,this.cancelable=ze}return Object.defineProperty(lt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),lt.prototype.preventDefault=function(){this._defaultPrevented=!0},lt}(),fn=function(lt){function He(ze,it,dt){var tt=lt.call(this,ze,!1)||this;return tt.dataUrl=it,tt.state=dt,tt}return Se(He,lt),He}(Ft),It=function(lt){function He(ze,it,dt){dt===void 0&&(dt=!1);var tt=lt.call(this,ze,dt)||this;return tt.marker=it,tt}return Se(He,lt),He}(Ft),Xt=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(He,ze){this[He].push(ze)},lt.prototype.removeEventListener=function(He,ze){var it=this[He].indexOf(ze);it>-1&&this[He].splice(it,1)},lt}(),tn=function(){function lt(He){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Oe,this._isOpen=!1,this.undoRedoManager=new Ut,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Xt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=lt.instanceCounter++,this.styles=new pe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=He,this.targetRoot=document.body,this.width=He.clientWidth,this.height=He.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[De,gt,at,vt,xt,yt,Rt,ht,_t,bt,qe,Ht,dn]},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[De,gt,at,vt,yt,Rt,ht]},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[De,gt,at,vt,Rt]},enumerable:!1,configurable:!0}),Object.defineProperty(lt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(He){var ze=this;this._availableMarkerTypes.splice(0),He.forEach(function(it){if(typeof it=="string"){var dt=ze.ALL_MARKER_TYPES.find(function(tt){return tt.typeName===it});dt!==void 0&&ze._availableMarkerTypes.push(dt)}else ze._availableMarkerTypes.push(it)})},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(He){this._zoomLevel=He,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 He=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(ze){return ze(new Ft(He))})},lt.prototype.render=function(){return Be(this,void 0,void 0,function(){var He;return Le(this,function(ze){switch(ze.label){case 0:return this.setCurrentMarker(),(He=new ye).naturalSize=this.renderAtNaturalSize,He.imageType=this.renderImageType,He.imageQuality=this.renderImageQuality,He.markersOnly=this.renderMarkersOnly,He.width=this.renderWidth,He.height=this.renderHeight,[4,He.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ze.sent(),[4,He.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ze.sent()]}})})},lt.prototype.close=function(He){var ze=this;if(He===void 0&&(He=!1),this.isOpen){var it=!1;He||this.eventListeners.beforeclose.forEach(function(dt){var tt=new Ft(ze,!0);dt(tt),tt.defaultPrevented&&(it=!0)}),it||(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 Ft(ze))}),this.detachEvents(),this._isOpen=!1)}},lt.prototype.addMarkersToToolbar=function(){for(var He,ze=[],it=0;it<arguments.length;it++)ze[it]=arguments[it];(He=this._availableMarkerTypes).push.apply(He,ze)},lt.prototype.addRenderEventListener=function(He){this.addEventListener("render",function(ze){He(ze.dataUrl,ze.state)})},lt.prototype.removeRenderEventListener=function(He){},lt.prototype.addCloseEventListener=function(He){this.addEventListener("close",function(){He()})},lt.prototype.removeCloseEventListener=function(He){},lt.prototype.setupResizeObserver=function(){var He=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){He.resize(He.target.clientWidth,He.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return He.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},lt.prototype.onPopupTargetResize=function(){var He=1*this.target.clientWidth/this.target.clientHeight,ze=this.editorCanvas.clientWidth/He>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*He:this.editorCanvas.clientWidth,it=ze<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/He;this.resize(ze,it)},lt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},lt.prototype.resize=function(He,ze){this._isResizing=!0;var it=He/this.imageWidth,dt=ze/this.imageHeight;this.imageWidth=Math.round(He),this.imageHeight=Math.round(ze),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(it,dt),this._isResizing=!1},lt.prototype.scaleMarkers=function(He,ze){var it,dt=this;this._currentMarker&&this._currentMarker instanceof vt?this._currentMarker.scale(He,ze):(it=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(tt){tt!==dt._currentMarker&&tt.scale(He,ze)}),it!==void 0&&this.setCurrentMarker(it)},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 He=this.editingTarget.getBoundingClientRect(),ze=this.editorCanvas.getBoundingClientRect();this.left=He.left-ze.left,this.top=He.top-ze.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 He,ze=[],it=0;it<arguments.length;it++)ze[it]=arguments[it];this.defs=xe.createDefs(),this.addDefsToImage(),(He=this.defs).append.apply(He,ze)},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 He=document.createElement("a");He.href="https://markerjs.com/",He.target="_blank",He.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>',He.title="Powered by marker.js",He.style.display="grid",He.style.alignItems="center",He.style.justifyItems="center",He.style.padding="3px",He.style.width="20px",He.style.height="20px",this.logoUI.appendChild(He),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 He=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=He+"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(He){this.markerImage.removeChild(He.container),this.markers.indexOf(He)>-1&&this.markers.splice(this.markers.indexOf(He),1),He.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(He,ze){if(He==="marker"&&ze!==void 0)this.createNewMarker(ze);else if(He==="action")switch(ze){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 He=this;if(this._currentMarker!==void 0){var ze=!1;if(this.eventListeners.markerbeforedelete.forEach(function(dt){var tt=new It(He,He._currentMarker,!0);dt(tt),tt.defaultPrevented&&(ze=!0)}),!ze){var it=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 It(He,it))})}}},lt.prototype.clear=function(){var He=this,ze=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var je=new It(He,void 0,!0);Ke(je),je.defaultPrevented&&(ze=!0)}),!ze)){this.setCurrentMarker();for(var it=function(Ke){var je=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(Re){return Re(new It(He,je))})},dt=this,tt=this.markers.length-1;tt>=0;tt--)it(tt);this.addUndoStep()}},Object.defineProperty(lt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),lt.prototype.showNotesEditor=function(){var He;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=(He=this._currentMarker.notes)!==null&&He!==void 0?He:"",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 He=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ze=this.getState(),it=this.undoRedoManager.getLastUndoStep();if(!it||it.width===ze.width&&it.height===ze.height){var dt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ze),dt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(tt){return tt(new Ft(He))})}else this.undoRedoManager.replaceLastUndoStep(ze),this.eventListeners.statechange.forEach(function(tt){return tt(new Ft(He))})}},lt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},lt.prototype.undoStep=function(){var He=this,ze=this.undoRedoManager.undo();ze!==void 0&&(this.restoreState(ze),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(it){return it(new Ft(He))}))},lt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},lt.prototype.redoStep=function(){var He=this,ze=this.undoRedoManager.redo();ze!==void 0&&(this.restoreState(ze),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(it){return it(new Ft(He))}))},lt.prototype.stepZoom=function(){var He=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=He<this.zoomSteps.length-1?this.zoomSteps[He+1]:this.zoomSteps[0]},lt.prototype.panTo=function(He){this.contentDiv.scrollBy({left:this.prevPanPoint.x-He.x,top:this.prevPanPoint.y-He.y}),this.prevPanPoint=He},lt.prototype.startRenderAndClose=function(){return Be(this,void 0,void 0,function(){var He,ze,it=this;return Le(this,function(dt){switch(dt.label){case 0:return[4,this.render()];case 1:return He=dt.sent(),ze=this.getState(),this.eventListeners.render.forEach(function(tt){return tt(new fn(it,He,ze))}),this.close(!0),[2]}})})},lt.prototype.getState=function(He){He===!0&&this.setCurrentMarker();var ze={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(it){return ze.markers.push(it.getState())}),ze},lt.prototype.restoreState=function(He){var ze=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);He.markers.forEach(function(it){var dt=ze._availableMarkerTypes.find(function(Ke){return Ke.typeName===it.typeName});if(dt!==void 0){var tt=ze.addNewMarker(dt);tt.restoreState(it),ze.markers.push(tt)}}),He.width&&He.height&&(He.width!==this.imageWidth||He.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/He.width,this.imageHeight/He.height),this.eventListeners.restorestate.forEach(function(it){return it(new Ft(ze))})},lt.prototype.addNewMarker=function(He){var ze=xe.createGroup();return this.markerImage.appendChild(ze),new He(ze,this.overlayContainer,this.settings)},lt.prototype.createNewMarker=function(He){var ze,it=this;(ze=typeof He=="string"?this._availableMarkerTypes.find(function(dt){return dt.typeName===He}):He)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ze),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(ze.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(dt){return dt(new It(it,it._currentMarker))}))},lt.prototype.markerCreated=function(He){var ze=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(He),this.setCurrentMarker(He),He instanceof gt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(gt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(it){return it(new It(ze,ze._currentMarker))})},lt.prototype.colorChanged=function(He){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=He,this.settings.defaultStrokeColor=He)},lt.prototype.fillColorChanged=function(He){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=He)},lt.prototype.markerStateChanged=function(He){var ze=this;this.eventListeners.markerchange.forEach(function(it){return it(new It(ze,He))})},lt.prototype.setCurrentMarker=function(He){var ze=this;this._currentMarker!==He&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(it){return it(new It(ze,ze._currentMarker))})),this._currentMarker=He,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(it){return it(new It(ze,ze._currentMarker))}))},lt.prototype.onPointerDown=function(He){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||He.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ze=this.markers.find(function(it){return it.ownsTarget(He.target)});ze!==void 0?(this.setCurrentMarker(ze),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(He.clientX,He.clientY),He.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:He.clientX,y:He.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(He.clientX,He.clientY))},lt.prototype.onDblClick=function(He){if(this._isFocused||this.focus(),this.mode==="select"){var ze=this.markers.find(function(it){return it.ownsTarget(He.target)});ze!==void 0&&ze!==this._currentMarker&&this.setCurrentMarker(ze),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(He.clientX,He.clientY),He.target):this.setCurrentMarker()}},lt.prototype.onPointerMove=function(He){this.touchPoints!==1&&He.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||He.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(He.clientX,He.clientY)):this.zoomLevel>1&&this.panTo({x:He.clientX,y:He.clientY}))},lt.prototype.onPointerUp=function(He){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(He.clientX,He.clientY)),this.isDragging=!1,this.addUndoStep()},lt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},lt.prototype.onKeyUp=function(He){this._currentMarker===void 0||this.notesArea!==void 0||He.key!=="Delete"&&He.key!=="Backspace"||this.deleteSelectedMarker()},lt.prototype.clientToLocalCoordinates=function(He,ze){var it=this.markerImage.getBoundingClientRect();return{x:(He-it.left)/this.zoomLevel,y:(ze-it.top)/this.zoomLevel}},lt.prototype.onWindowResize=function(){this.positionUI()},lt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var He=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=He+"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(He){be.addKey(He)},lt.prototype.addEventListener=function(He,ze){this.eventListeners.addEventListener(He,ze)},lt.prototype.removeEventListener=function(He,ze){this.eventListeners.removeEventListener(He,ze)},lt.prototype.renderState=function(He){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(He),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(lt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),lt.prototype.focus=function(){var He=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ze){return ze(new Ft(He))}))},lt.prototype.blur=function(){var He=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ze){return ze(new Ft(He))}))},lt.instanceCounter=0,lt}()},66042:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return vt}});var ke=Ie(89490),Se=Ie(11036),Be=Ie(43403),Le=Ie(34280),Ce=Ie(59301),xe=Ce.createContext(null),be=Ce.createContext({}),ye=xe,we=Ie(87075),pe=Ie(71409),de=Ie(92310),ge=Ie.n(de),fe=Ie(77900),ue=Ie(10228),ee=Ie(26112),z=Ie(39224),oe=Ie(8654),re=["prefixCls","className","containerRef"],ae=function(kt){var at=kt.prefixCls,bt=kt.className,ct=kt.containerRef,Rt=(0,z.Z)(kt,re),ut=Ce.useContext(be),ot=ut.panel,ht=(0,oe.x1)(ot,ct);return Ce.createElement("div",(0,pe.Z)({className:ge()("".concat(at,"-content"),bt),role:"dialog",ref:ht},(0,ee.Z)(kt,{aria:!0}),{"aria-modal":"true"},Rt))},le=ae,me=Ie(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 De(gt,kt){var at,bt,ct,Rt=gt.prefixCls,ut=gt.open,ot=gt.placement,ht=gt.inline,yt=gt.push,_t=gt.forceRender,xt=gt.autoFocus,Ut=gt.keyboard,Ht=gt.classNames,dn=gt.rootClassName,Ft=gt.rootStyle,fn=gt.zIndex,It=gt.className,Xt=gt.id,tn=gt.style,lt=gt.motion,He=gt.width,ze=gt.height,it=gt.children,dt=gt.mask,tt=gt.maskClosable,Ke=gt.maskMotion,je=gt.maskClassName,Re=gt.maskStyle,Qe=gt.afterOpenChange,Ve=gt.onClose,We=gt.onMouseEnter,pt=gt.onMouseOver,Mt=gt.onMouseLeave,Qt=gt.onClick,qt=gt.onKeyDown,Bt=gt.onKeyUp,$t=gt.styles,Cn=gt.drawerRender,mn=Ce.useRef(),un=Ce.useRef(),Kn=Ce.useRef();Ce.useImperativeHandle(kt,function(){return mn.current});var pn=function(ti){var Ii=ti.keyCode,gr=ti.shiftKey;switch(Ii){case ue.Z.TAB:{if(Ii===ue.Z.TAB){if(!gr&&document.activeElement===Kn.current){var hr;(hr=un.current)===null||hr===void 0||hr.focus({preventScroll:!0})}else if(gr&&document.activeElement===un.current){var or;(or=Kn.current)===null||or===void 0||or.focus({preventScroll:!0})}}break}case ue.Z.ESC:{Ve&&Ut&&(ti.stopPropagation(),Ve(ti));break}}};Ce.useEffect(function(){if(ut&&xt){var ai;(ai=mn.current)===null||ai===void 0||ai.focus({preventScroll:!0})}},[ut]);var Hn=Ce.useState(!1),Qn=(0,Se.Z)(Hn,2),Ai=Qn[0],ei=Qn[1],ki=Ce.useContext(ye),Wi;typeof yt=="boolean"?Wi=yt?{}:{distance:0}:Wi=yt||{};var Ui=(at=(bt=(ct=Wi)===null||ct===void 0?void 0:ct.distance)!==null&&bt!==void 0?bt:ki==null?void 0:ki.pushDistance)!==null&&at!==void 0?at:180,rr=Ce.useMemo(function(){return{pushDistance:Ui,push:function(){ei(!0)},pull:function(){ei(!1)}}},[Ui]);Ce.useEffect(function(){if(ut){var ai;ki==null||(ai=ki.push)===null||ai===void 0||ai.call(ki)}else{var ti;ki==null||(ti=ki.pull)===null||ti===void 0||ti.call(ki)}},[ut]),Ce.useEffect(function(){return function(){var ai;ki==null||(ai=ki.pull)===null||ai===void 0||ai.call(ki)}},[]);var vr=dt&&Ce.createElement(fe.default,(0,pe.Z)({key:"mask"},Ke,{visible:ut}),function(ai,ti){var Ii=ai.className,gr=ai.style;return Ce.createElement("div",{className:ge()("".concat(Rt,"-mask"),Ii,Ht==null?void 0:Ht.mask,je),style:(0,ke.Z)((0,ke.Z)((0,ke.Z)({},gr),Re),$t==null?void 0:$t.mask),onClick:tt&&ut?Ve:void 0,ref:ti})}),wr=typeof lt=="function"?lt(ot):lt,Oi={};if(Ai&&Ui)switch(ot){case"top":Oi.transform="translateY(".concat(Ui,"px)");break;case"bottom":Oi.transform="translateY(".concat(-Ui,"px)");break;case"left":Oi.transform="translateX(".concat(Ui,"px)");break;default:Oi.transform="translateX(".concat(-Ui,"px)");break}ot==="left"||ot==="right"?Oi.width=ve(He):Oi.height=ve(ze);var Zi={onMouseEnter:We,onMouseOver:pt,onMouseLeave:Mt,onClick:Qt,onKeyDown:qt,onKeyUp:Bt},pr=Ce.createElement(fe.default,(0,pe.Z)({key:"panel"},wr,{visible:ut,forceRender:_t,onVisibleChanged:function(ti){Qe==null||Qe(ti)},removeOnLeave:!1,leavedClassName:"".concat(Rt,"-content-wrapper-hidden")}),function(ai,ti){var Ii=ai.className,gr=ai.style,hr=Ce.createElement(le,(0,pe.Z)({id:Xt,containerRef:ti,prefixCls:Rt,className:ge()(It,Ht==null?void 0:Ht.content),style:(0,ke.Z)((0,ke.Z)({},tn),$t==null?void 0:$t.content)},(0,ee.Z)(gt,{aria:!0}),Zi),it);return Ce.createElement("div",(0,pe.Z)({className:ge()("".concat(Rt,"-content-wrapper"),Ht==null?void 0:Ht.wrapper,Ii),style:(0,ke.Z)((0,ke.Z)((0,ke.Z)({},Oi),gr),$t==null?void 0:$t.wrapper)},(0,ee.Z)(gt,{data:!0})),Cn?Cn(hr):hr)}),et=(0,ke.Z)({},Ft);return fn&&(et.zIndex=fn),Ce.createElement(ye.Provider,{value:rr},Ce.createElement("div",{className:ge()(Rt,"".concat(Rt,"-").concat(ot),dn,(0,we.Z)((0,we.Z)({},"".concat(Rt,"-open"),ut),"".concat(Rt,"-inline"),ht)),style:et,tabIndex:-1,ref:mn,onKeyDown:pn},vr,Ce.createElement("div",{tabIndex:0,ref:un,style:Ae,"aria-hidden":"true","data-sentinel":"start"}),pr,Ce.createElement("div",{tabIndex:0,ref:Kn,style:Ae,"aria-hidden":"true","data-sentinel":"end"})))}var Oe=Ce.forwardRef(De),Ze=Oe,qe=function(kt){var at=kt.open,bt=at===void 0?!1:at,ct=kt.prefixCls,Rt=ct===void 0?"rc-drawer":ct,ut=kt.placement,ot=ut===void 0?"right":ut,ht=kt.autoFocus,yt=ht===void 0?!0:ht,_t=kt.keyboard,xt=_t===void 0?!0:_t,Ut=kt.width,Ht=Ut===void 0?378:Ut,dn=kt.mask,Ft=dn===void 0?!0:dn,fn=kt.maskClosable,It=fn===void 0?!0:fn,Xt=kt.getContainer,tn=kt.forceRender,lt=kt.afterOpenChange,He=kt.destroyOnClose,ze=kt.onMouseEnter,it=kt.onMouseOver,dt=kt.onMouseLeave,tt=kt.onClick,Ke=kt.onKeyDown,je=kt.onKeyUp,Re=kt.panelRef,Qe=Ce.useState(!1),Ve=(0,Se.Z)(Qe,2),We=Ve[0],pt=Ve[1],Mt=Ce.useState(!1),Qt=(0,Se.Z)(Mt,2),qt=Qt[0],Bt=Qt[1];(0,Le.Z)(function(){Bt(!0)},[]);var $t=qt?bt:!1,Cn=Ce.useRef(),mn=Ce.useRef();(0,Le.Z)(function(){$t&&(mn.current=document.activeElement)},[$t]);var un=function(Ai){var ei;if(pt(Ai),lt==null||lt(Ai),!Ai&&mn.current&&!((ei=Cn.current)!==null&&ei!==void 0&&ei.contains(mn.current))){var ki;(ki=mn.current)===null||ki===void 0||ki.focus({preventScroll:!0})}},Kn=Ce.useMemo(function(){return{panel:Re}},[Re]);if(!tn&&!We&&!$t&&He)return null;var pn={onMouseEnter:ze,onMouseOver:it,onMouseLeave:dt,onClick:tt,onKeyDown:Ke,onKeyUp:je},Hn=(0,ke.Z)((0,ke.Z)({},kt),{},{open:$t,prefixCls:Rt,placement:ot,autoFocus:yt,keyboard:xt,width:Ht,mask:Ft,maskClosable:It,inline:Xt===!1,afterOpenChange:un,ref:Cn},pn);return Ce.createElement(be.Provider,{value:Kn},Ce.createElement(Be.Z,{open:$t||tn||We,autoDestroy:!1,getContainer:Xt,autoLock:Ft&&($t||We)},Ce.createElement(Ze,Hn)))},Xe=qe,vt=Xe},91574:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Qt}});var ke=Ie(71409),Se=Ie(89490),Be=Ie(87075),Le=Ie(11036),Ce=Ie(28788),xe=Ie(39224),be=Ie(92310),ye=Ie.n(be),we=/margin|padding|width|height|max|min|offset/,pe={left:!0,top:!0},de={cssFloat:1,styleFloat:1,float:1};function ge(qt){return qt.nodeType===1?qt.ownerDocument.defaultView.getComputedStyle(qt,null):{}}function fe(qt,Bt,$t){if(Bt=Bt.toLowerCase(),$t==="auto"){if(Bt==="height")return qt.offsetHeight;if(Bt==="width")return qt.offsetWidth}return Bt in pe||(pe[Bt]=we.test(Bt)),pe[Bt]?parseFloat($t)||0:$t}function ue(qt,Bt){var $t=arguments.length,Cn=ge(qt);return Bt=de[Bt]?"cssFloat"in qt.style?"cssFloat":"styleFloat":Bt,$t===1?Cn:fe(qt,Bt,Cn[Bt]||qt.style[Bt])}function ee(qt,Bt,$t){var Cn=arguments.length;if(Bt=de[Bt]?"cssFloat"in qt.style?"cssFloat":"styleFloat":Bt,Cn===3)return typeof $t=="number"&&we.test(Bt)&&($t="".concat($t,"px")),qt.style[Bt]=$t,$t;for(var mn in Bt)Bt.hasOwnProperty(mn)&&ee(qt,mn,Bt[mn]);return ge(qt)}function z(qt){return qt===document.body?document.documentElement.clientWidth:qt.offsetWidth}function oe(qt){return qt===document.body?window.innerHeight||document.documentElement.clientHeight:qt.offsetHeight}function re(){var qt=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),Bt=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:qt,height:Bt}}function ae(){var qt=document.documentElement.clientWidth,Bt=window.innerHeight||document.documentElement.clientHeight;return{width:qt,height:Bt}}function le(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function me(qt){var Bt=qt.getBoundingClientRect(),$t=document.documentElement;return{left:Bt.left+(window.pageXOffset||$t.scrollLeft)-($t.clientLeft||document.body.clientLeft||0),top:Bt.top+(window.pageYOffset||$t.scrollTop)-($t.clientTop||document.body.clientTop||0)}}var ve=Ie(18929),Pe=Ie(59301),Ae=Ie(55311),De=Ie(8224),Oe=Ie(10228),Ze=Ie(43403),qe=Ie(77900),Xe=Pe.createContext(null),vt=function(Bt){var $t=Bt.visible,Cn=Bt.maskTransitionName,mn=Bt.getContainer,un=Bt.prefixCls,Kn=Bt.rootClassName,pn=Bt.icons,Hn=Bt.countRender,Qn=Bt.showSwitch,Ai=Bt.showProgress,ei=Bt.current,ki=Bt.transform,Wi=Bt.count,Ui=Bt.scale,rr=Bt.minScale,vr=Bt.maxScale,wr=Bt.closeIcon,Oi=Bt.onActive,Zi=Bt.onClose,pr=Bt.onZoomIn,et=Bt.onZoomOut,ai=Bt.onRotateRight,ti=Bt.onRotateLeft,Ii=Bt.onFlipX,gr=Bt.onFlipY,hr=Bt.onReset,or=Bt.toolbarRender,po=Bt.zIndex,$n=Bt.image,Ue=(0,Pe.useContext)(Xe),Je=pn.rotateLeft,nt=pn.rotateRight,Pt=pn.zoomIn,Nt=pn.zoomOut,sn=pn.close,Kt=pn.left,_n=pn.right,zn=pn.flipX,_i=pn.flipY,Bi="".concat(un,"-operations-operation");Pe.useEffect(function(){var An=function(xi){xi.keyCode===Oe.Z.ESC&&Zi()};return $t&&window.addEventListener("keydown",An),function(){window.removeEventListener("keydown",An)}},[$t]);var wt=function(Li,xi){Li.preventDefault(),Li.stopPropagation(),Oi(xi)},zt=Pe.useCallback(function(An){var Li=An.type,xi=An.disabled,bi=An.onClick,hn=An.icon;return Pe.createElement("div",{key:Li,className:ye()(Bi,"".concat(un,"-operations-operation-").concat(Li),(0,Be.Z)({},"".concat(un,"-operations-operation-disabled"),!!xi)),onClick:bi},hn)},[Bi,un]),En=Qn?zt({icon:Kt,onClick:function(Li){return wt(Li,-1)},type:"prev",disabled:ei===0}):void 0,bn=Qn?zt({icon:_n,onClick:function(Li){return wt(Li,1)},type:"next",disabled:ei===Wi-1}):void 0,Yt=zt({icon:_i,onClick:gr,type:"flipY"}),gn=zt({icon:zn,onClick:Ii,type:"flipX"}),yn=zt({icon:Je,onClick:ti,type:"rotateLeft"}),vn=zt({icon:nt,onClick:ai,type:"rotateRight"}),jn=zt({icon:Nt,onClick:et,type:"zoomOut",disabled:Ui<=rr}),Un=zt({icon:Pt,onClick:pr,type:"zoomIn",disabled:Ui===vr}),Gn=Pe.createElement("div",{className:"".concat(un,"-operations")},Yt,gn,yn,vn,jn,Un);return Pe.createElement(qe.default,{visible:$t,motionName:Cn},function(An){var Li=An.className,xi=An.style;return Pe.createElement(Ze.Z,{open:!0,getContainer:mn!=null?mn:document.body},Pe.createElement("div",{className:ye()("".concat(un,"-operations-wrapper"),Li,Kn),style:(0,Se.Z)((0,Se.Z)({},xi),{},{zIndex:po})},wr===null?null:Pe.createElement("button",{className:"".concat(un,"-close"),onClick:Zi},wr||sn),Qn&&Pe.createElement(Pe.Fragment,null,Pe.createElement("div",{className:ye()("".concat(un,"-switch-left"),(0,Be.Z)({},"".concat(un,"-switch-left-disabled"),ei===0)),onClick:function(hn){return wt(hn,-1)}},Kt),Pe.createElement("div",{className:ye()("".concat(un,"-switch-right"),(0,Be.Z)({},"".concat(un,"-switch-right-disabled"),ei===Wi-1)),onClick:function(hn){return wt(hn,1)}},_n)),Pe.createElement("div",{className:"".concat(un,"-footer")},Ai&&Pe.createElement("div",{className:"".concat(un,"-progress")},Hn?Hn(ei+1,Wi):"".concat(ei+1," / ").concat(Wi)),or?or(Gn,(0,Se.Z)((0,Se.Z)({icons:{prevIcon:En,nextIcon:bn,flipYIcon:Yt,flipXIcon:gn,rotateLeftIcon:yn,rotateRightIcon:vn,zoomOutIcon:jn,zoomInIcon:Un},actions:{onActive:Oi,onFlipY:gr,onFlipX:Ii,onRotateLeft:ti,onRotateRight:ai,onZoomOut:et,onZoomIn:pr,onReset:hr,onClose:Zi},transform:ki},Ue?{current:ei,total:Wi}:{}),{},{image:$n})):Gn)))})},gt=vt,kt=Ie(13697),at=Ie(16089),bt={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function ct(qt,Bt,$t,Cn){var mn=(0,Pe.useRef)(null),un=(0,Pe.useRef)([]),Kn=(0,Pe.useState)(bt),pn=(0,Le.Z)(Kn,2),Hn=pn[0],Qn=pn[1],Ai=function(Ui){Qn(bt),(0,kt.Z)(bt,Hn)||Cn==null||Cn({transform:bt,action:Ui})},ei=function(Ui,rr){mn.current===null&&(un.current=[],mn.current=(0,at.Z)(function(){Qn(function(vr){var wr=vr;return un.current.forEach(function(Oi){wr=(0,Se.Z)((0,Se.Z)({},wr),Oi)}),mn.current=null,Cn==null||Cn({transform:wr,action:rr}),wr})})),un.current.push((0,Se.Z)((0,Se.Z)({},Hn),Ui))},ki=function(Ui,rr,vr,wr,Oi){var Zi=qt.current,pr=Zi.width,et=Zi.height,ai=Zi.offsetWidth,ti=Zi.offsetHeight,Ii=Zi.offsetLeft,gr=Zi.offsetTop,hr=Ui,or=Hn.scale*Ui;or>$t?(or=$t,hr=$t/Hn.scale):or<Bt&&(or=Oi?or:Bt,hr=or/Hn.scale);var po=vr!=null?vr:innerWidth/2,$n=wr!=null?wr:innerHeight/2,Ue=hr-1,Je=Ue*pr*.5,nt=Ue*et*.5,Pt=Ue*(po-Hn.x-Ii),Nt=Ue*($n-Hn.y-gr),sn=Hn.x-(Pt-Je),Kt=Hn.y-(Nt-nt);if(Ui<1&&or===1){var _n=ai*or,zn=ti*or,_i=ae(),Bi=_i.width,wt=_i.height;_n<=Bi&&zn<=wt&&(sn=0,Kt=0)}ei({x:sn,y:Kt,scale:or},rr)};return{transform:Hn,resetTransform:Ai,updateTransform:ei,dispatchZoomChange:ki}}var Rt=Ie(48736);function ut(qt,Bt,$t,Cn){var mn=Bt+$t,un=($t-Cn)/2;if($t>Cn){if(Bt>0)return(0,Be.Z)({},qt,un);if(Bt<0&&mn<Cn)return(0,Be.Z)({},qt,-un)}else if(Bt<0||mn>Cn)return(0,Be.Z)({},qt,Bt<0?un:-un);return{}}function ot(qt,Bt,$t,Cn){var mn=ae(),un=mn.width,Kn=mn.height,pn=null;return qt<=un&&Bt<=Kn?pn={x:0,y:0}:(qt>un||Bt>Kn)&&(pn=(0,Se.Z)((0,Se.Z)({},ut("x",$t,qt,un)),ut("y",Cn,Bt,Kn))),pn}var ht=1,yt=1;function _t(qt,Bt,$t,Cn,mn,un,Kn){var pn=mn.rotate,Hn=mn.scale,Qn=mn.x,Ai=mn.y,ei=(0,Pe.useState)(!1),ki=(0,Le.Z)(ei,2),Wi=ki[0],Ui=ki[1],rr=(0,Pe.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),vr=function(et){!Bt||et.button!==0||(et.preventDefault(),et.stopPropagation(),rr.current={diffX:et.pageX-Qn,diffY:et.pageY-Ai,transformX:Qn,transformY:Ai},Ui(!0))},wr=function(et){$t&&Wi&&un({x:et.pageX-rr.current.diffX,y:et.pageY-rr.current.diffY},"move")},Oi=function(){if($t&&Wi){Ui(!1);var et=rr.current,ai=et.transformX,ti=et.transformY,Ii=Qn!==ai&&Ai!==ti;if(!Ii)return;var gr=qt.current.offsetWidth*Hn,hr=qt.current.offsetHeight*Hn,or=qt.current.getBoundingClientRect(),po=or.left,$n=or.top,Ue=pn%180!==0,Je=ot(Ue?hr:gr,Ue?gr:hr,po,$n);Je&&un((0,Se.Z)({},Je),"dragRebound")}},Zi=function(et){if(!(!$t||et.deltaY==0)){var ai=Math.abs(et.deltaY/100),ti=Math.min(ai,yt),Ii=ht+ti*Cn;et.deltaY>0&&(Ii=ht/Ii),Kn(Ii,"wheel",et.clientX,et.clientY)}};return(0,Pe.useEffect)(function(){var pr,et,ai,ti;if(Bt){ai=(0,De.Z)(window,"mouseup",Oi,!1),ti=(0,De.Z)(window,"mousemove",wr,!1);try{window.top!==window.self&&(pr=(0,De.Z)(window.top,"mouseup",Oi,!1),et=(0,De.Z)(window.top,"mousemove",wr,!1))}catch(Ii){(0,Rt.Kp)(!1,"[rc-image] ".concat(Ii))}}return function(){var Ii,gr,hr,or;(Ii=ai)===null||Ii===void 0||Ii.remove(),(gr=ti)===null||gr===void 0||gr.remove(),(hr=pr)===null||hr===void 0||hr.remove(),(or=et)===null||or===void 0||or.remove()}},[$t,Wi,Qn,Ai,pn,Bt]),{isMoving:Wi,onMouseDown:vr,onMouseMove:wr,onMouseUp:Oi,onWheel:Zi}}function xt(qt){return new Promise(function(Bt){if(!qt){Bt(!1);return}var $t=document.createElement("img");$t.onerror=function(){return Bt(!1)},$t.onload=function(){return Bt(!0)},$t.src=qt})}function Ut(qt){var Bt=qt.src,$t=qt.isCustomPlaceholder,Cn=qt.fallback,mn=(0,Pe.useState)($t?"loading":"normal"),un=(0,Le.Z)(mn,2),Kn=un[0],pn=un[1],Hn=(0,Pe.useRef)(!1),Qn=Kn==="error";(0,Pe.useEffect)(function(){var Wi=!0;return xt(Bt).then(function(Ui){!Ui&&Wi&&pn("error")}),function(){Wi=!1}},[Bt]),(0,Pe.useEffect)(function(){$t&&!Hn.current?pn("loading"):Qn&&pn("normal")},[Bt]);var Ai=function(){pn("normal")},ei=function(Ui){Hn.current=!1,Kn==="loading"&&Ui!==null&&Ui!==void 0&&Ui.complete&&(Ui.naturalWidth||Ui.naturalHeight)&&(Hn.current=!0,Ai())},ki=Qn&&Cn?{src:Cn}:{onLoad:Ai,src:Bt};return[ei,ki,Kn]}function Ht(qt,Bt){var $t=qt.x-Bt.x,Cn=qt.y-Bt.y;return Math.hypot($t,Cn)}function dn(qt,Bt,$t,Cn){var mn=Ht(qt,$t),un=Ht(Bt,Cn);if(mn===0&&un===0)return[qt.x,qt.y];var Kn=mn/(mn+un),pn=qt.x+Kn*(Bt.x-qt.x),Hn=qt.y+Kn*(Bt.y-qt.y);return[pn,Hn]}function Ft(qt,Bt,$t,Cn,mn,un,Kn){var pn=mn.rotate,Hn=mn.scale,Qn=mn.x,Ai=mn.y,ei=(0,Pe.useState)(!1),ki=(0,Le.Z)(ei,2),Wi=ki[0],Ui=ki[1],rr=(0,Pe.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),vr=function(et){rr.current=(0,Se.Z)((0,Se.Z)({},rr.current),et)},wr=function(et){if(Bt){et.stopPropagation(),Ui(!0);var ai=et.touches,ti=ai===void 0?[]:ai;ti.length>1?vr({point1:{x:ti[0].clientX,y:ti[0].clientY},point2:{x:ti[1].clientX,y:ti[1].clientY},eventType:"touchZoom"}):vr({point1:{x:ti[0].clientX-Qn,y:ti[0].clientY-Ai},eventType:"move"})}},Oi=function(et){var ai=et.touches,ti=ai===void 0?[]:ai,Ii=rr.current,gr=Ii.point1,hr=Ii.point2,or=Ii.eventType;if(ti.length>1&&or==="touchZoom"){var po={x:ti[0].clientX,y:ti[0].clientY},$n={x:ti[1].clientX,y:ti[1].clientY},Ue=dn(gr,hr,po,$n),Je=(0,Le.Z)(Ue,2),nt=Je[0],Pt=Je[1],Nt=Ht(po,$n)/Ht(gr,hr);Kn(Nt,"touchZoom",nt,Pt,!0),vr({point1:po,point2:$n,eventType:"touchZoom"})}else or==="move"&&(un({x:ti[0].clientX-gr.x,y:ti[0].clientY-gr.y},"move"),vr({eventType:"move"}))},Zi=function(){if($t){if(Wi&&Ui(!1),vr({eventType:"none"}),Cn>Hn)return un({x:0,y:0,scale:Cn},"touchZoom");var et=qt.current.offsetWidth*Hn,ai=qt.current.offsetHeight*Hn,ti=qt.current.getBoundingClientRect(),Ii=ti.left,gr=ti.top,hr=pn%180!==0,or=ot(hr?ai:et,hr?et:ai,Ii,gr);or&&un((0,Se.Z)({},or),"dragRebound")}};return(0,Pe.useEffect)(function(){var pr;return $t&&Bt&&(pr=(0,De.Z)(window,"touchmove",function(et){return et.preventDefault()},{passive:!1})),function(){var et;(et=pr)===null||et===void 0||et.remove()}},[$t,Bt]),{isTouching:Wi,onTouchStart:wr,onTouchMove:Oi,onTouchEnd:Zi}}var fn=["fallback","src","imgRef"],It=["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"],Xt=function(Bt){var $t=Bt.fallback,Cn=Bt.src,mn=Bt.imgRef,un=(0,xe.Z)(Bt,fn),Kn=Ut({src:Cn,fallback:$t}),pn=(0,Le.Z)(Kn,2),Hn=pn[0],Qn=pn[1];return Pe.createElement("img",(0,ke.Z)({ref:function(ei){mn.current=ei,Hn(ei)}},un,Qn))},tn=function(Bt){var $t=Bt.prefixCls,Cn=Bt.src,mn=Bt.alt,un=Bt.imageInfo,Kn=Bt.fallback,pn=Bt.movable,Hn=pn===void 0?!0:pn,Qn=Bt.onClose,Ai=Bt.visible,ei=Bt.icons,ki=ei===void 0?{}:ei,Wi=Bt.rootClassName,Ui=Bt.closeIcon,rr=Bt.getContainer,vr=Bt.current,wr=vr===void 0?0:vr,Oi=Bt.count,Zi=Oi===void 0?1:Oi,pr=Bt.countRender,et=Bt.scaleStep,ai=et===void 0?.5:et,ti=Bt.minScale,Ii=ti===void 0?1:ti,gr=Bt.maxScale,hr=gr===void 0?50:gr,or=Bt.transitionName,po=or===void 0?"zoom":or,$n=Bt.maskTransitionName,Ue=$n===void 0?"fade":$n,Je=Bt.imageRender,nt=Bt.imgCommonProps,Pt=Bt.toolbarRender,Nt=Bt.onTransform,sn=Bt.onChange,Kt=(0,xe.Z)(Bt,It),_n=(0,Pe.useRef)(),zn=(0,Pe.useContext)(Xe),_i=zn&&Zi>1,Bi=zn&&Zi>=1,wt=(0,Pe.useState)(!0),zt=(0,Le.Z)(wt,2),En=zt[0],bn=zt[1],Yt=ct(_n,Ii,hr,Nt),gn=Yt.transform,yn=Yt.resetTransform,vn=Yt.updateTransform,jn=Yt.dispatchZoomChange,Un=_t(_n,Hn,Ai,ai,gn,vn,jn),Gn=Un.isMoving,An=Un.onMouseDown,Li=Un.onWheel,xi=Ft(_n,Hn,Ai,Ii,gn,vn,jn),bi=xi.isTouching,hn=xi.onTouchStart,Vi=xi.onTouchMove,lr=xi.onTouchEnd,Mr=gn.rotate,xn=gn.scale,Vn=ye()((0,Be.Z)({},"".concat($t,"-moving"),Gn));(0,Pe.useEffect)(function(){En||bn(!0)},[En]);var mi=function(){yn("close")},di=function(){jn(ht+ai,"zoomIn")},gi=function(){jn(ht/(ht+ai),"zoomOut")},Di=function(){vn({rotate:Mr+90},"rotateRight")},Ji=function(){vn({rotate:Mr-90},"rotateLeft")},cr=function(){vn({flipX:!gn.flipX},"flipX")},_r=function(){vn({flipY:!gn.flipY},"flipY")},Rr=function(){yn("reset")},Mn=function(eo){var Tr=wr+eo;!Number.isInteger(Tr)||Tr<0||Tr>Zi-1||(bn(!1),yn(eo<0?"prev":"next"),sn==null||sn(Tr,wr))},Qr=function(eo){!Ai||!_i||(eo.keyCode===Oe.Z.LEFT?Mn(-1):eo.keyCode===Oe.Z.RIGHT&&Mn(1))},kn=function(eo){Ai&&(xn!==1?vn({x:0,y:0,scale:1},"doubleClick"):jn(ht+ai,"doubleClick",eo.clientX,eo.clientY))};(0,Pe.useEffect)(function(){var mr=(0,De.Z)(window,"keydown",Qr,!1);return function(){mr.remove()}},[Ai,_i,wr]);var Ri=Pe.createElement(Xt,(0,ke.Z)({},nt,{width:Bt.width,height:Bt.height,imgRef:_n,className:"".concat($t,"-img"),alt:mn,style:{transform:"translate3d(".concat(gn.x,"px, ").concat(gn.y,"px, 0) scale3d(").concat(gn.flipX?"-":"").concat(xn,", ").concat(gn.flipY?"-":"").concat(xn,", 1) rotate(").concat(Mr,"deg)"),transitionDuration:(!En||bi)&&"0s"},fallback:Kn,src:Cn,onWheel:Li,onMouseDown:An,onDoubleClick:kn,onTouchStart:hn,onTouchMove:Vi,onTouchEnd:lr,onTouchCancel:lr})),kr=(0,Se.Z)({url:Cn,alt:mn},un);return Pe.createElement(Pe.Fragment,null,Pe.createElement(Ae.Z,(0,ke.Z)({transitionName:po,maskTransitionName:Ue,closable:!1,keyboard:!0,prefixCls:$t,onClose:Qn,visible:Ai,classNames:{wrapper:Vn},rootClassName:Wi,getContainer:rr},Kt,{afterClose:mi}),Pe.createElement("div",{className:"".concat($t,"-img-wrapper")},Je?Je(Ri,(0,Se.Z)({transform:gn,image:kr},zn?{current:wr}:{})):Ri)),Pe.createElement(gt,{visible:Ai,transform:gn,maskTransitionName:Ue,closeIcon:Ui,getContainer:rr,prefixCls:$t,rootClassName:Wi,icons:ki,countRender:pr,showSwitch:_i,showProgress:Bi,current:wr,count:Zi,scale:xn,minScale:Ii,maxScale:hr,toolbarRender:Pt,onActive:Mn,onZoomIn:di,onZoomOut:gi,onRotateRight:Di,onRotateLeft:Ji,onFlipX:cr,onFlipY:_r,onClose:Qn,onReset:Rr,zIndex:Kt.zIndex!==void 0?Kt.zIndex+1:void 0,image:kr}))},lt=tn,He=Ie(62730),ze=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function it(qt){var Bt=Pe.useState({}),$t=(0,Le.Z)(Bt,2),Cn=$t[0],mn=$t[1],un=Pe.useCallback(function(pn,Hn){return mn(function(Qn){return(0,Se.Z)((0,Se.Z)({},Qn),{},(0,Be.Z)({},pn,Hn))}),function(){mn(function(Qn){var Ai=(0,Se.Z)({},Qn);return delete Ai[pn],Ai})}},[]),Kn=Pe.useMemo(function(){return qt?qt.map(function(pn){if(typeof pn=="string")return{data:{src:pn}};var Hn={};return Object.keys(pn).forEach(function(Qn){["src"].concat((0,He.Z)(ze)).includes(Qn)&&(Hn[Qn]=pn[Qn])}),{data:Hn}}):Object.keys(Cn).reduce(function(pn,Hn){var Qn=Cn[Hn],Ai=Qn.canPreview,ei=Qn.data;return Ai&&pn.push({data:ei,id:Hn}),pn},[])},[qt,Cn]);return[Kn,un,!!qt]}var dt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],tt=["src"],Ke=function(Bt){var $t,Cn=Bt.previewPrefixCls,mn=Cn===void 0?"rc-image-preview":Cn,un=Bt.children,Kn=Bt.icons,pn=Kn===void 0?{}:Kn,Hn=Bt.items,Qn=Bt.preview,Ai=Bt.fallback,ei=(0,Ce.Z)(Qn)==="object"?Qn:{},ki=ei.visible,Wi=ei.onVisibleChange,Ui=ei.getContainer,rr=ei.current,vr=ei.movable,wr=ei.minScale,Oi=ei.maxScale,Zi=ei.countRender,pr=ei.closeIcon,et=ei.onChange,ai=ei.onTransform,ti=ei.toolbarRender,Ii=ei.imageRender,gr=(0,xe.Z)(ei,dt),hr=it(Hn),or=(0,Le.Z)(hr,3),po=or[0],$n=or[1],Ue=or[2],Je=(0,ve.Z)(0,{value:rr}),nt=(0,Le.Z)(Je,2),Pt=nt[0],Nt=nt[1],sn=(0,Pe.useState)(!1),Kt=(0,Le.Z)(sn,2),_n=Kt[0],zn=Kt[1],_i=(($t=po[Pt])===null||$t===void 0?void 0:$t.data)||{},Bi=_i.src,wt=(0,xe.Z)(_i,tt),zt=(0,ve.Z)(!!ki,{value:ki,onChange:function(bi,hn){Wi==null||Wi(bi,hn,Pt)}}),En=(0,Le.Z)(zt,2),bn=En[0],Yt=En[1],gn=(0,Pe.useState)(null),yn=(0,Le.Z)(gn,2),vn=yn[0],jn=yn[1],Un=Pe.useCallback(function(xi,bi,hn,Vi){var lr=Ue?po.findIndex(function(Mr){return Mr.data.src===bi}):po.findIndex(function(Mr){return Mr.id===xi});Nt(lr<0?0:lr),Yt(!0),jn({x:hn,y:Vi}),zn(!0)},[po,Ue]);Pe.useEffect(function(){bn?_n||Nt(0):zn(!1)},[bn]);var Gn=function(bi,hn){Nt(bi),et==null||et(bi,hn)},An=function(){Yt(!1),jn(null)},Li=Pe.useMemo(function(){return{register:$n,onPreview:Un}},[$n,Un]);return Pe.createElement(Xe.Provider,{value:Li},un,Pe.createElement(lt,(0,ke.Z)({"aria-hidden":!bn,movable:vr,visible:bn,prefixCls:mn,closeIcon:pr,onClose:An,mousePosition:vn,imgCommonProps:wt,src:Bi,fallback:Ai,icons:pn,minScale:wr,maxScale:Oi,getContainer:Ui,current:Pt,count:po.length,countRender:Zi,onTransform:ai,toolbarRender:ti,imageRender:Ii,onChange:Gn},gr)))},je=Ke,Re=0;function Qe(qt,Bt){var $t=Pe.useState(function(){return Re+=1,String(Re)}),Cn=(0,Le.Z)($t,1),mn=Cn[0],un=Pe.useContext(Xe),Kn={data:Bt,canPreview:qt};return Pe.useEffect(function(){if(un)return un.register(mn,Kn)},[]),Pe.useEffect(function(){un&&un.register(mn,Kn)},[qt,Bt]),mn}var Ve=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],We=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],pt=function(Bt){var $t=Bt.src,Cn=Bt.alt,mn=Bt.onPreviewClose,un=Bt.prefixCls,Kn=un===void 0?"rc-image":un,pn=Bt.previewPrefixCls,Hn=pn===void 0?"".concat(Kn,"-preview"):pn,Qn=Bt.placeholder,Ai=Bt.fallback,ei=Bt.width,ki=Bt.height,Wi=Bt.style,Ui=Bt.preview,rr=Ui===void 0?!0:Ui,vr=Bt.className,wr=Bt.onClick,Oi=Bt.onError,Zi=Bt.wrapperClassName,pr=Bt.wrapperStyle,et=Bt.rootClassName,ai=(0,xe.Z)(Bt,Ve),ti=Qn&&Qn!==!0,Ii=(0,Ce.Z)(rr)==="object"?rr:{},gr=Ii.src,hr=Ii.visible,or=hr===void 0?void 0:hr,po=Ii.onVisibleChange,$n=po===void 0?mn:po,Ue=Ii.getContainer,Je=Ue===void 0?void 0:Ue,nt=Ii.mask,Pt=Ii.maskClassName,Nt=Ii.movable,sn=Ii.icons,Kt=Ii.scaleStep,_n=Ii.minScale,zn=Ii.maxScale,_i=Ii.imageRender,Bi=Ii.toolbarRender,wt=(0,xe.Z)(Ii,We),zt=gr!=null?gr:$t,En=(0,ve.Z)(!!or,{value:or,onChange:$n}),bn=(0,Le.Z)(En,2),Yt=bn[0],gn=bn[1],yn=Ut({src:$t,isCustomPlaceholder:ti,fallback:Ai}),vn=(0,Le.Z)(yn,3),jn=vn[0],Un=vn[1],Gn=vn[2],An=(0,Pe.useState)(null),Li=(0,Le.Z)(An,2),xi=Li[0],bi=Li[1],hn=(0,Pe.useContext)(Xe),Vi=!!rr,lr=function(){gn(!1),bi(null)},Mr=ye()(Kn,Zi,et,(0,Be.Z)({},"".concat(Kn,"-error"),Gn==="error")),xn=(0,Pe.useMemo)(function(){var gi={};return ze.forEach(function(Di){Bt[Di]!==void 0&&(gi[Di]=Bt[Di])}),gi},ze.map(function(gi){return Bt[gi]})),Vn=(0,Pe.useMemo)(function(){return(0,Se.Z)((0,Se.Z)({},xn),{},{src:zt})},[zt,xn]),mi=Qe(Vi,Vn),di=function(Di){var Ji=me(Di.target),cr=Ji.left,_r=Ji.top;hn?hn.onPreview(mi,zt,cr,_r):(bi({x:cr,y:_r}),gn(!0)),wr==null||wr(Di)};return Pe.createElement(Pe.Fragment,null,Pe.createElement("div",(0,ke.Z)({},ai,{className:Mr,onClick:Vi?di:wr,style:(0,Se.Z)({width:ei,height:ki},pr)}),Pe.createElement("img",(0,ke.Z)({},xn,{className:ye()("".concat(Kn,"-img"),(0,Be.Z)({},"".concat(Kn,"-img-placeholder"),Qn===!0),vr),style:(0,Se.Z)({height:ki},Wi),ref:jn},Un,{width:ei,height:ki,onError:Oi})),Gn==="loading"&&Pe.createElement("div",{"aria-hidden":"true",className:"".concat(Kn,"-placeholder")},Qn),nt&&Vi&&Pe.createElement("div",{className:ye()("".concat(Kn,"-mask"),Pt),style:{display:(Wi==null?void 0:Wi.display)==="none"?"none":void 0}},nt)),!hn&&Vi&&Pe.createElement(lt,(0,ke.Z)({"aria-hidden":!Yt,visible:Yt,prefixCls:Hn,onClose:lr,mousePosition:xi,src:zt,alt:Cn,imageInfo:{width:ei,height:ki},fallback:Ai,getContainer:Je,icons:sn,movable:Nt,scaleStep:Kt,minScale:_n,maxScale:zn,rootClassName:et,imageRender:_i,imgCommonProps:xn,toolbarRender:Bi},wt)))};pt.PreviewGroup=je;var Mt=pt,Qt=Mt},23425:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Ae}});var ke=Ie(87075),Se=Ie(71409),Be=Ie(28788),Le=Ie(89490),Ce=Ie(11036),xe=Ie(92310),be=Ie.n(xe),ye=Ie(18929),we=Ie(10228),pe=Ie(26112),de=Ie(48736),ge=Ie(59301),fe=Ie(17119),ue=[10,20,50,100],ee=function(Oe){var Ze=Oe.pageSizeOptions,qe=Ze===void 0?ue:Ze,Xe=Oe.locale,vt=Oe.changeSize,gt=Oe.pageSize,kt=Oe.goButton,at=Oe.quickGo,bt=Oe.rootPrefixCls,ct=Oe.disabled,Rt=Oe.buildOptionText,ut=Oe.showSizeChanger,ot=Oe.sizeChangerRender,ht=ge.useState(""),yt=(0,Ce.Z)(ht,2),_t=yt[0],xt=yt[1],Ut=function(){return!_t||Number.isNaN(_t)?void 0:Number(_t)},Ht=typeof Rt=="function"?Rt:function(ze){return"".concat(ze," ").concat(Xe.items_per_page)},dn=function(it){xt(it.target.value)},Ft=function(it){kt||_t===""||(xt(""),!(it.relatedTarget&&(it.relatedTarget.className.indexOf("".concat(bt,"-item-link"))>=0||it.relatedTarget.className.indexOf("".concat(bt,"-item"))>=0))&&(at==null||at(Ut())))},fn=function(it){_t!==""&&(it.keyCode===we.Z.ENTER||it.type==="click")&&(xt(""),at==null||at(Ut()))},It=function(){return qe.some(function(it){return it.toString()===gt.toString()})?qe:qe.concat([gt]).sort(function(it,dt){var tt=Number.isNaN(Number(it))?0:Number(it),Ke=Number.isNaN(Number(dt))?0:Number(dt);return tt-Ke})},Xt="".concat(bt,"-options");if(!ut&&!at)return null;var tn=null,lt=null,He=null;return ut&&ot&&(tn=ot({disabled:ct,size:gt,onSizeChange:function(it){vt==null||vt(Number(it))},"aria-label":Xe.page_size,className:"".concat(Xt,"-size-changer"),options:It().map(function(ze){return{label:Ht(ze),value:ze}})})),at&&(kt&&(He=typeof kt=="boolean"?ge.createElement("button",{type:"button",onClick:fn,onKeyUp:fn,disabled:ct,className:"".concat(Xt,"-quick-jumper-button")},Xe.jump_to_confirm):ge.createElement("span",{onClick:fn,onKeyUp:fn},kt)),lt=ge.createElement("div",{className:"".concat(Xt,"-quick-jumper")},Xe.jump_to,ge.createElement("input",{disabled:ct,type:"text",value:_t,onChange:dn,onKeyUp:fn,onBlur:Ft,"aria-label":Xe.page}),Xe.page,He)),ge.createElement("li",{className:Xt},tn,lt)},z=ee,oe=function(Oe){var Ze=Oe.rootPrefixCls,qe=Oe.page,Xe=Oe.active,vt=Oe.className,gt=Oe.showTitle,kt=Oe.onClick,at=Oe.onKeyPress,bt=Oe.itemRender,ct="".concat(Ze,"-item"),Rt=be()(ct,"".concat(ct,"-").concat(qe),(0,ke.Z)((0,ke.Z)({},"".concat(ct,"-active"),Xe),"".concat(ct,"-disabled"),!qe),vt),ut=function(){kt(qe)},ot=function(_t){at(_t,kt,qe)},ht=bt(qe,"page",ge.createElement("a",{rel:"nofollow"},qe));return ht?ge.createElement("li",{title:gt?String(qe):null,className:Rt,onClick:ut,onKeyDown:ot,tabIndex:0},ht):null},re=oe,ae=function(Oe,Ze,qe){return qe};function le(){}function me(De){var Oe=Number(De);return typeof Oe=="number"&&!Number.isNaN(Oe)&&isFinite(Oe)&&Math.floor(Oe)===Oe}function ve(De,Oe,Ze){var qe=typeof De=="undefined"?Oe:De;return Math.floor((Ze-1)/qe)+1}var Pe=function(Oe){var Ze=Oe.prefixCls,qe=Ze===void 0?"rc-pagination":Ze,Xe=Oe.selectPrefixCls,vt=Xe===void 0?"rc-select":Xe,gt=Oe.className,kt=Oe.current,at=Oe.defaultCurrent,bt=at===void 0?1:at,ct=Oe.total,Rt=ct===void 0?0:ct,ut=Oe.pageSize,ot=Oe.defaultPageSize,ht=ot===void 0?10:ot,yt=Oe.onChange,_t=yt===void 0?le:yt,xt=Oe.hideOnSinglePage,Ut=Oe.align,Ht=Oe.showPrevNextJumpers,dn=Ht===void 0?!0:Ht,Ft=Oe.showQuickJumper,fn=Oe.showLessItems,It=Oe.showTitle,Xt=It===void 0?!0:It,tn=Oe.onShowSizeChange,lt=tn===void 0?le:tn,He=Oe.locale,ze=He===void 0?fe.Z:He,it=Oe.style,dt=Oe.totalBoundaryShowSizeChanger,tt=dt===void 0?50:dt,Ke=Oe.disabled,je=Oe.simple,Re=Oe.showTotal,Qe=Oe.showSizeChanger,Ve=Qe===void 0?Rt>tt:Qe,We=Oe.sizeChangerRender,pt=Oe.pageSizeOptions,Mt=Oe.itemRender,Qt=Mt===void 0?ae:Mt,qt=Oe.jumpPrevIcon,Bt=Oe.jumpNextIcon,$t=Oe.prevIcon,Cn=Oe.nextIcon,mn=ge.useRef(null),un=(0,ye.Z)(10,{value:ut,defaultValue:ht}),Kn=(0,Ce.Z)(un,2),pn=Kn[0],Hn=Kn[1],Qn=(0,ye.Z)(1,{value:kt,defaultValue:bt,postState:function(kr){return Math.max(1,Math.min(kr,ve(void 0,pn,Rt)))}}),Ai=(0,Ce.Z)(Qn,2),ei=Ai[0],ki=Ai[1],Wi=ge.useState(ei),Ui=(0,Ce.Z)(Wi,2),rr=Ui[0],vr=Ui[1];(0,ge.useEffect)(function(){vr(ei)},[ei]);var wr=_t!==le,Oi="current"in Oe,Zi=Math.max(1,ei-(fn?3:5)),pr=Math.min(ve(void 0,pn,Rt),ei+(fn?3:5));function et(Ri,kr){var mr=Ri||ge.createElement("button",{type:"button","aria-label":kr,className:"".concat(qe,"-item-link")});return typeof Ri=="function"&&(mr=ge.createElement(Ri,(0,Le.Z)({},Oe))),mr}function ai(Ri){var kr=Ri.target.value,mr=ve(void 0,pn,Rt),eo;return kr===""?eo=kr:Number.isNaN(Number(kr))?eo=rr:kr>=mr?eo=mr:eo=Number(kr),eo}function ti(Ri){return me(Ri)&&Ri!==ei&&me(Rt)&&Rt>0}var Ii=Rt>pn?Ft:!1;function gr(Ri){(Ri.keyCode===we.Z.UP||Ri.keyCode===we.Z.DOWN)&&Ri.preventDefault()}function hr(Ri){var kr=ai(Ri);switch(kr!==rr&&vr(kr),Ri.keyCode){case we.Z.ENTER:$n(kr);break;case we.Z.UP:$n(kr-1);break;case we.Z.DOWN:$n(kr+1);break;default:break}}function or(Ri){$n(ai(Ri))}function po(Ri){var kr=ve(Ri,pn,Rt),mr=ei>kr&&kr!==0?kr:ei;Hn(Ri),vr(mr),lt==null||lt(ei,Ri),ki(mr),_t==null||_t(mr,Ri)}function $n(Ri){if(ti(Ri)&&!Ke){var kr=ve(void 0,pn,Rt),mr=Ri;return Ri>kr?mr=kr:Ri<1&&(mr=1),mr!==rr&&vr(mr),ki(mr),_t==null||_t(mr,pn),mr}return ei}var Ue=ei>1,Je=ei<ve(void 0,pn,Rt);function nt(){Ue&&$n(ei-1)}function Pt(){Je&&$n(ei+1)}function Nt(){$n(Zi)}function sn(){$n(pr)}function Kt(Ri,kr){if(Ri.key==="Enter"||Ri.charCode===we.Z.ENTER||Ri.keyCode===we.Z.ENTER){for(var mr=arguments.length,eo=new Array(mr>2?mr-2:0),Tr=2;Tr<mr;Tr++)eo[Tr-2]=arguments[Tr];kr.apply(void 0,eo)}}function _n(Ri){Kt(Ri,nt)}function zn(Ri){Kt(Ri,Pt)}function _i(Ri){Kt(Ri,Nt)}function Bi(Ri){Kt(Ri,sn)}function wt(Ri){var kr=Qt(Ri,"prev",et($t,"prev page"));return ge.isValidElement(kr)?ge.cloneElement(kr,{disabled:!Ue}):kr}function zt(Ri){var kr=Qt(Ri,"next",et(Cn,"next page"));return ge.isValidElement(kr)?ge.cloneElement(kr,{disabled:!Je}):kr}function En(Ri){(Ri.type==="click"||Ri.keyCode===we.Z.ENTER)&&$n(rr)}var bn=null,Yt=(0,pe.Z)(Oe,{aria:!0,data:!0}),gn=Re&&ge.createElement("li",{className:"".concat(qe,"-total-text")},Re(Rt,[Rt===0?0:(ei-1)*pn+1,ei*pn>Rt?Rt:ei*pn])),yn=null,vn=ve(void 0,pn,Rt);if(xt&&Rt<=pn)return null;var jn=[],Un={rootPrefixCls:qe,onClick:$n,onKeyPress:Kt,showTitle:Xt,itemRender:Qt,page:-1},Gn=ei-1>0?ei-1:0,An=ei+1<vn?ei+1:vn,Li=Ft&&Ft.goButton,xi=(0,Be.Z)(je)==="object"?je.readOnly:!je,bi=Li,hn=null;je&&(Li&&(typeof Li=="boolean"?bi=ge.createElement("button",{type:"button",onClick:En,onKeyUp:En},ze.jump_to_confirm):bi=ge.createElement("span",{onClick:En,onKeyUp:En},Li),bi=ge.createElement("li",{title:Xt?"".concat(ze.jump_to).concat(ei,"/").concat(vn):null,className:"".concat(qe,"-simple-pager")},bi)),hn=ge.createElement("li",{title:Xt?"".concat(ei,"/").concat(vn):null,className:"".concat(qe,"-simple-pager")},xi?rr:ge.createElement("input",{type:"text","aria-label":ze.jump_to,value:rr,disabled:Ke,onKeyDown:gr,onKeyUp:hr,onChange:hr,onBlur:or,size:3}),ge.createElement("span",{className:"".concat(qe,"-slash")},"/"),vn));var Vi=fn?1:2;if(vn<=3+Vi*2){vn||jn.push(ge.createElement(re,(0,Se.Z)({},Un,{key:"noPager",page:1,className:"".concat(qe,"-item-disabled")})));for(var lr=1;lr<=vn;lr+=1)jn.push(ge.createElement(re,(0,Se.Z)({},Un,{key:lr,page:lr,active:ei===lr})))}else{var Mr=fn?ze.prev_3:ze.prev_5,xn=fn?ze.next_3:ze.next_5,Vn=Qt(Zi,"jump-prev",et(qt,"prev page")),mi=Qt(pr,"jump-next",et(Bt,"next page"));dn&&(bn=Vn?ge.createElement("li",{title:Xt?Mr:null,key:"prev",onClick:Nt,tabIndex:0,onKeyDown:_i,className:be()("".concat(qe,"-jump-prev"),(0,ke.Z)({},"".concat(qe,"-jump-prev-custom-icon"),!!qt))},Vn):null,yn=mi?ge.createElement("li",{title:Xt?xn:null,key:"next",onClick:sn,tabIndex:0,onKeyDown:Bi,className:be()("".concat(qe,"-jump-next"),(0,ke.Z)({},"".concat(qe,"-jump-next-custom-icon"),!!Bt))},mi):null);var di=Math.max(1,ei-Vi),gi=Math.min(ei+Vi,vn);ei-1<=Vi&&(gi=1+Vi*2),vn-ei<=Vi&&(di=vn-Vi*2);for(var Di=di;Di<=gi;Di+=1)jn.push(ge.createElement(re,(0,Se.Z)({},Un,{key:Di,page:Di,active:ei===Di})));if(ei-1>=Vi*2&&ei!==3&&(jn[0]=ge.cloneElement(jn[0],{className:be()("".concat(qe,"-item-after-jump-prev"),jn[0].props.className)}),jn.unshift(bn)),vn-ei>=Vi*2&&ei!==vn-2){var Ji=jn[jn.length-1];jn[jn.length-1]=ge.cloneElement(Ji,{className:be()("".concat(qe,"-item-before-jump-next"),Ji.props.className)}),jn.push(yn)}di!==1&&jn.unshift(ge.createElement(re,(0,Se.Z)({},Un,{key:1,page:1}))),gi!==vn&&jn.push(ge.createElement(re,(0,Se.Z)({},Un,{key:vn,page:vn})))}var cr=wt(Gn);if(cr){var _r=!Ue||!vn;cr=ge.createElement("li",{title:Xt?ze.prev_page:null,onClick:nt,tabIndex:_r?null:0,onKeyDown:_n,className:be()("".concat(qe,"-prev"),(0,ke.Z)({},"".concat(qe,"-disabled"),_r)),"aria-disabled":_r},cr)}var Rr=zt(An);if(Rr){var Mn,Qr;je?(Mn=!Je,Qr=Ue?0:null):(Mn=!Je||!vn,Qr=Mn?null:0),Rr=ge.createElement("li",{title:Xt?ze.next_page:null,onClick:Pt,tabIndex:Qr,onKeyDown:zn,className:be()("".concat(qe,"-next"),(0,ke.Z)({},"".concat(qe,"-disabled"),Mn)),"aria-disabled":Mn},Rr)}var kn=be()(qe,gt,(0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)((0,ke.Z)({},"".concat(qe,"-start"),Ut==="start"),"".concat(qe,"-center"),Ut==="center"),"".concat(qe,"-end"),Ut==="end"),"".concat(qe,"-simple"),je),"".concat(qe,"-disabled"),Ke));return ge.createElement("ul",(0,Se.Z)({className:kn,style:it,ref:mn},Yt),gn,cr,je?hn:jn,Rr,ge.createElement(z,{locale:ze,rootPrefixCls:qe,disabled:Ke,selectPrefixCls:vt,changeSize:po,pageSize:pn,pageSizeOptions:pt,quickGo:Ii?$n:null,goButton:bi,showSizeChanger:Ve,sizeChangerRender:We}))},Ae=Pe},6551:function(Sn,ln,Ie){"use strict";Ie.d(ln,{ZP:function(){return be}});var ke=Ie(11036),Se=Ie(59301),Be=Ie(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}},37463:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Ac:function(){return un},Xo:function(){return pn},Wx:function(){return Qn},ZP:function(){return Bi},lk:function(){return le}});var ke=Ie(71409),Se=Ie(62730),Be=Ie(87075),Le=Ie(89490),Ce=Ie(11036),xe=Ie(39224),be=Ie(28788),ye=Ie(18929),we=Ie(48736),pe=Ie(59301),de=Ie(92310),ge=Ie.n(de),fe=Ie(34280),ue=Ie(49658),ee=Ie(8654),z=function(zt){var En=zt.className,bn=zt.customizeIcon,Yt=zt.customizeIconProps,gn=zt.children,yn=zt.onMouseDown,vn=zt.onClick,jn=typeof bn=="function"?bn(Yt):bn;return pe.createElement("span",{className:En,onMouseDown:function(Gn){Gn.preventDefault(),yn==null||yn(Gn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:vn,"aria-hidden":!0},jn!==void 0?jn:pe.createElement("span",{className:ge()(En.split(/\s+/).map(function(Un){return"".concat(Un,"-icon")}))},gn))},oe=z,re=function(zt,En,bn,Yt,gn){var yn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,vn=arguments.length>6?arguments[6]:void 0,jn=arguments.length>7?arguments[7]:void 0,Un=pe.useMemo(function(){if((0,be.Z)(Yt)==="object")return Yt.clearIcon;if(gn)return gn},[Yt,gn]),Gn=pe.useMemo(function(){return!!(!yn&&Yt&&(bn.length||vn)&&!(jn==="combobox"&&vn===""))},[Yt,yn,bn.length,vn,jn]);return{allowClear:Gn,clearIcon:pe.createElement(oe,{className:"".concat(zt,"-clear"),onMouseDown:En,customizeIcon:Un},"\xD7")}},ae=pe.createContext(null);function le(){return pe.useContext(ae)}function me(){var wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,zt=pe.useState(!1),En=(0,Ce.Z)(zt,2),bn=En[0],Yt=En[1],gn=pe.useRef(null),yn=function(){window.clearTimeout(gn.current)};pe.useEffect(function(){return yn},[]);var vn=function(Un,Gn){yn(),gn.current=window.setTimeout(function(){Yt(Un),Gn&&Gn()},wt)};return[bn,vn,yn]}function ve(){var wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,zt=pe.useRef(null),En=pe.useRef(null);pe.useEffect(function(){return function(){window.clearTimeout(En.current)}},[]);function bn(Yt){(Yt||zt.current===null)&&(zt.current=Yt),window.clearTimeout(En.current),En.current=window.setTimeout(function(){zt.current=null},wt)}return[function(){return zt.current},bn]}function Pe(wt,zt,En,bn){var Yt=pe.useRef(null);Yt.current={open:zt,triggerOpen:En,customizedTrigger:bn},pe.useEffect(function(){function gn(yn){var vn;if(!((vn=Yt.current)!==null&&vn!==void 0&&vn.customizedTrigger)){var jn=yn.target;jn.shadowRoot&&yn.composed&&(jn=yn.composedPath()[0]||jn),Yt.current.open&&wt().filter(function(Un){return Un}).every(function(Un){return!Un.contains(jn)&&Un!==jn})&&Yt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",gn),function(){return window.removeEventListener("mousedown",gn)}},[])}var Ae=Ie(10228);function De(wt){return wt&&![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(wt)}var Oe=Ie(26112),Ze=Ie(11780);function qe(wt,zt,En){var bn=(0,Le.Z)((0,Le.Z)({},wt),En?zt:{});return Object.keys(zt).forEach(function(Yt){var gn=zt[Yt];typeof gn=="function"&&(bn[Yt]=function(){for(var yn,vn=arguments.length,jn=new Array(vn),Un=0;Un<vn;Un++)jn[Un]=arguments[Un];return gn.apply(void 0,jn),(yn=wt[Yt])===null||yn===void 0?void 0:yn.call.apply(yn,[wt].concat(jn))})}),bn}var Xe=qe,vt=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],gt=function(zt,En){var bn=zt.prefixCls,Yt=zt.id,gn=zt.inputElement,yn=zt.autoFocus,vn=zt.autoComplete,jn=zt.editable,Un=zt.activeDescendantId,Gn=zt.value,An=zt.open,Li=zt.attrs,xi=(0,xe.Z)(zt,vt),bi=gn||pe.createElement("input",null),hn=bi,Vi=hn.ref,lr=hn.props;return(0,we.Kp)(!("maxLength"in bi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),bi=pe.cloneElement(bi,(0,Le.Z)((0,Le.Z)((0,Le.Z)({type:"search"},Xe(xi,lr,!0)),{},{id:Yt,ref:(0,ee.sQ)(En,Vi),autoComplete:vn||"off",autoFocus:yn,className:ge()("".concat(bn,"-selection-search-input"),lr==null?void 0:lr.className),role:"combobox","aria-expanded":An||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Yt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Yt,"_list"),"aria-activedescendant":An?Un:void 0},Li),{},{value:jn?Gn:"",readOnly:!jn,unselectable:jn?null:"on",style:(0,Le.Z)((0,Le.Z)({},lr.style),{},{opacity:jn?null:0})})),bi},kt=pe.forwardRef(gt),at=kt;function bt(wt){return Array.isArray(wt)?wt:wt!==void 0?[wt]:[]}var ct=typeof window!="undefined"&&window.document&&window.document.documentElement,Rt=ct;function ut(wt){return wt!=null}function ot(wt){return!wt&&wt!==0}function ht(wt){return["string","number"].includes((0,be.Z)(wt))}function yt(wt){var zt=void 0;return wt&&(ht(wt.title)?zt=wt.title.toString():ht(wt.label)&&(zt=wt.label.toString())),zt}function _t(wt,zt){Rt?pe.useLayoutEffect(wt,zt):pe.useEffect(wt,zt)}function xt(wt){var zt;return(zt=wt.key)!==null&&zt!==void 0?zt:wt.value}var Ut=function(zt){zt.preventDefault(),zt.stopPropagation()},Ht=function(zt){var En=zt.id,bn=zt.prefixCls,Yt=zt.values,gn=zt.open,yn=zt.searchValue,vn=zt.autoClearSearchValue,jn=zt.inputRef,Un=zt.placeholder,Gn=zt.disabled,An=zt.mode,Li=zt.showSearch,xi=zt.autoFocus,bi=zt.autoComplete,hn=zt.activeDescendantId,Vi=zt.tabIndex,lr=zt.removeIcon,Mr=zt.maxTagCount,xn=zt.maxTagTextLength,Vn=zt.maxTagPlaceholder,mi=Vn===void 0?function(qn){return"+ ".concat(qn.length," ...")}:Vn,di=zt.tagRender,gi=zt.onToggleOpen,Di=zt.onRemove,Ji=zt.onInputChange,cr=zt.onInputPaste,_r=zt.onInputKeyDown,Rr=zt.onInputMouseDown,Mn=zt.onInputCompositionStart,Qr=zt.onInputCompositionEnd,kn=zt.onInputBlur,Ri=pe.useRef(null),kr=(0,pe.useState)(0),mr=(0,Ce.Z)(kr,2),eo=mr[0],Tr=mr[1],Sr=(0,pe.useState)(!1),yo=(0,Ce.Z)(Sr,2),an=yo[0],On=yo[1],on="".concat(bn,"-selection"),ft=gn||An==="multiple"&&vn===!1||An==="tags"?yn:"",Wn=An==="tags"||An==="multiple"&&vn===!1||Li&&(gn||an);_t(function(){Tr(Ri.current.scrollWidth)},[ft]);var ii=function(Bn,Jn,Ti,ci,ni){return pe.createElement("span",{title:yt(Bn),className:ge()("".concat(on,"-item"),(0,Be.Z)({},"".concat(on,"-item-disabled"),Ti))},pe.createElement("span",{className:"".concat(on,"-item-content")},Jn),ci&&pe.createElement(oe,{className:"".concat(on,"-item-remove"),onMouseDown:Ut,onClick:ni,customizeIcon:lr},"\xD7"))},Mi=function(Bn,Jn,Ti,ci,ni,Pn){var wi=function(br){Ut(br),gi(!gn)};return pe.createElement("span",{onMouseDown:wi},di({label:Jn,value:Bn,disabled:Ti,closable:ci,onClose:ni,isMaxTag:!!Pn}))},vi=function(Bn){var Jn=Bn.disabled,Ti=Bn.label,ci=Bn.value,ni=!Gn&&!Jn,Pn=Ti;if(typeof xn=="number"&&(typeof Ti=="string"||typeof Ti=="number")){var wi=String(Pn);wi.length>xn&&(Pn="".concat(wi.slice(0,xn),"..."))}var ji=function(nr){nr&&nr.stopPropagation(),Di(Bn)};return typeof di=="function"?Mi(ci,Pn,Jn,ni,ji):ii(Bn,Pn,Jn,ni,ji)},hi=function(Bn){if(!Yt.length)return null;var Jn=typeof mi=="function"?mi(Bn):mi;return typeof di=="function"?Mi(void 0,Jn,!1,!1,void 0,!0):ii({title:Jn},Jn,!1)},Nn=pe.createElement("div",{className:"".concat(on,"-search"),style:{width:eo},onFocus:function(){On(!0)},onBlur:function(){On(!1)}},pe.createElement(at,{ref:jn,open:gn,prefixCls:bn,id:En,inputElement:null,disabled:Gn,autoFocus:xi,autoComplete:bi,editable:Wn,activeDescendantId:hn,value:ft,onKeyDown:_r,onMouseDown:Rr,onChange:Ji,onPaste:cr,onCompositionStart:Mn,onCompositionEnd:Qr,onBlur:kn,tabIndex:Vi,attrs:(0,Oe.Z)(zt,!0)}),pe.createElement("span",{ref:Ri,className:"".concat(on,"-search-mirror"),"aria-hidden":!0},ft,"\xA0")),Yn=pe.createElement(Ze.Z,{prefixCls:"".concat(on,"-overflow"),data:Yt,renderItem:vi,renderRest:hi,suffix:Nn,itemKey:xt,maxCount:Mr});return pe.createElement("span",{className:"".concat(on,"-wrap")},Yn,!Yt.length&&!ft&&pe.createElement("span",{className:"".concat(on,"-placeholder")},Un))},dn=Ht,Ft=function(zt){var En=zt.inputElement,bn=zt.prefixCls,Yt=zt.id,gn=zt.inputRef,yn=zt.disabled,vn=zt.autoFocus,jn=zt.autoComplete,Un=zt.activeDescendantId,Gn=zt.mode,An=zt.open,Li=zt.values,xi=zt.placeholder,bi=zt.tabIndex,hn=zt.showSearch,Vi=zt.searchValue,lr=zt.activeValue,Mr=zt.maxLength,xn=zt.onInputKeyDown,Vn=zt.onInputMouseDown,mi=zt.onInputChange,di=zt.onInputPaste,gi=zt.onInputCompositionStart,Di=zt.onInputCompositionEnd,Ji=zt.onInputBlur,cr=zt.title,_r=pe.useState(!1),Rr=(0,Ce.Z)(_r,2),Mn=Rr[0],Qr=Rr[1],kn=Gn==="combobox",Ri=kn||hn,kr=Li[0],mr=Vi||"";kn&&lr&&!Mn&&(mr=lr),pe.useEffect(function(){kn&&Qr(!1)},[kn,lr]);var eo=Gn!=="combobox"&&!An&&!hn?!1:!!mr,Tr=cr===void 0?yt(kr):cr,Sr=pe.useMemo(function(){return kr?null:pe.createElement("span",{className:"".concat(bn,"-selection-placeholder"),style:eo?{visibility:"hidden"}:void 0},xi)},[kr,eo,xi,bn]);return pe.createElement("span",{className:"".concat(bn,"-selection-wrap")},pe.createElement("span",{className:"".concat(bn,"-selection-search")},pe.createElement(at,{ref:gn,prefixCls:bn,id:Yt,open:An,inputElement:En,disabled:yn,autoFocus:vn,autoComplete:jn,editable:Ri,activeDescendantId:Un,value:mr,onKeyDown:xn,onMouseDown:Vn,onChange:function(an){Qr(!0),mi(an)},onPaste:di,onCompositionStart:gi,onCompositionEnd:Di,onBlur:Ji,tabIndex:bi,attrs:(0,Oe.Z)(zt,!0),maxLength:kn?Mr:void 0})),!kn&&kr?pe.createElement("span",{className:"".concat(bn,"-selection-item"),title:Tr,style:eo?{visibility:"hidden"}:void 0},kr.label):null,Sr)},fn=Ft,It=function(zt,En){var bn=(0,pe.useRef)(null),Yt=(0,pe.useRef)(!1),gn=zt.prefixCls,yn=zt.open,vn=zt.mode,jn=zt.showSearch,Un=zt.tokenWithEnter,Gn=zt.disabled,An=zt.prefix,Li=zt.autoClearSearchValue,xi=zt.onSearch,bi=zt.onSearchSubmit,hn=zt.onToggleOpen,Vi=zt.onInputKeyDown,lr=zt.onInputBlur,Mr=zt.domRef;pe.useImperativeHandle(En,function(){return{focus:function(Tr){bn.current.focus(Tr)},blur:function(){bn.current.blur()}}});var xn=ve(0),Vn=(0,Ce.Z)(xn,2),mi=Vn[0],di=Vn[1],gi=function(Tr){var Sr=Tr.which,yo=bn.current instanceof HTMLTextAreaElement;!yo&&yn&&(Sr===Ae.Z.UP||Sr===Ae.Z.DOWN)&&Tr.preventDefault(),Vi&&Vi(Tr),Sr===Ae.Z.ENTER&&vn==="tags"&&!Yt.current&&!yn&&(bi==null||bi(Tr.target.value)),!(yo&&!yn&&~[Ae.Z.UP,Ae.Z.DOWN,Ae.Z.LEFT,Ae.Z.RIGHT].indexOf(Sr))&&De(Sr)&&hn(!0)},Di=function(){di(!0)},Ji=(0,pe.useRef)(null),cr=function(Tr){xi(Tr,!0,Yt.current)!==!1&&hn(!0)},_r=function(){Yt.current=!0},Rr=function(Tr){Yt.current=!1,vn!=="combobox"&&cr(Tr.target.value)},Mn=function(Tr){var Sr=Tr.target.value;if(Un&&Ji.current&&/[\r\n]/.test(Ji.current)){var yo=Ji.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Sr=Sr.replace(yo,Ji.current)}Ji.current=null,cr(Sr)},Qr=function(Tr){var Sr=Tr.clipboardData,yo=Sr==null?void 0:Sr.getData("text");Ji.current=yo||""},kn=function(Tr){var Sr=Tr.target;if(Sr!==bn.current){var yo=document.body.style.msTouchAction!==void 0;yo?setTimeout(function(){bn.current.focus()}):bn.current.focus()}},Ri=function(Tr){var Sr=mi();Tr.target!==bn.current&&!Sr&&!(vn==="combobox"&&Gn)&&Tr.preventDefault(),(vn!=="combobox"&&(!jn||!Sr)||!yn)&&(yn&&Li!==!1&&xi("",!0,!1),hn())},kr={inputRef:bn,onInputKeyDown:gi,onInputMouseDown:Di,onInputChange:Mn,onInputPaste:Qr,onInputCompositionStart:_r,onInputCompositionEnd:Rr,onInputBlur:lr},mr=vn==="multiple"||vn==="tags"?pe.createElement(dn,(0,ke.Z)({},zt,kr)):pe.createElement(fn,(0,ke.Z)({},zt,kr));return pe.createElement("div",{ref:Mr,className:"".concat(gn,"-selector"),onClick:kn,onMouseDown:Ri},An&&pe.createElement("div",{className:"".concat(gn,"-prefix")},An),mr)},Xt=pe.forwardRef(It),tn=Xt,lt=Ie(65352),He=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ze=function(zt){var En=zt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:En,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:En,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:En,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:En,adjustY:1},htmlRegion:"scroll"}}},it=function(zt,En){var bn=zt.prefixCls,Yt=zt.disabled,gn=zt.visible,yn=zt.children,vn=zt.popupElement,jn=zt.animation,Un=zt.transitionName,Gn=zt.dropdownStyle,An=zt.dropdownClassName,Li=zt.direction,xi=Li===void 0?"ltr":Li,bi=zt.placement,hn=zt.builtinPlacements,Vi=zt.dropdownMatchSelectWidth,lr=zt.dropdownRender,Mr=zt.dropdownAlign,xn=zt.getPopupContainer,Vn=zt.empty,mi=zt.getTriggerDOMNode,di=zt.onPopupVisibleChange,gi=zt.onPopupMouseEnter,Di=(0,xe.Z)(zt,He),Ji="".concat(bn,"-dropdown"),cr=vn;lr&&(cr=lr(vn));var _r=pe.useMemo(function(){return hn||ze(Vi)},[hn,Vi]),Rr=jn?"".concat(Ji,"-").concat(jn):Un,Mn=typeof Vi=="number",Qr=pe.useMemo(function(){return Mn?null:Vi===!1?"minWidth":"width"},[Vi,Mn]),kn=Gn;Mn&&(kn=(0,Le.Z)((0,Le.Z)({},kn),{},{width:Vi}));var Ri=pe.useRef(null);return pe.useImperativeHandle(En,function(){return{getPopupElement:function(){var mr;return(mr=Ri.current)===null||mr===void 0?void 0:mr.popupElement}}}),pe.createElement(lt.Z,(0,ke.Z)({},Di,{showAction:di?["click"]:[],hideAction:di?["click"]:[],popupPlacement:bi||(xi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:_r,prefixCls:Ji,popupTransitionName:Rr,popup:pe.createElement("div",{onMouseEnter:gi},cr),ref:Ri,stretch:Qr,popupAlign:Mr,popupVisible:gn,getPopupContainer:xn,popupClassName:ge()(An,(0,Be.Z)({},"".concat(Ji,"-empty"),Vn)),popupStyle:kn,getTriggerDOMNode:mi,onPopupVisibleChange:di}),yn)},dt=pe.forwardRef(it),tt=dt,Ke=Ie(67900);function je(wt,zt){var En=wt.key,bn;return"value"in wt&&(bn=wt.value),En!=null?En:bn!==void 0?bn:"rc-index-key-".concat(zt)}function Re(wt){return typeof wt!="undefined"&&!Number.isNaN(wt)}function Qe(wt,zt){var En=wt||{},bn=En.label,Yt=En.value,gn=En.options,yn=En.groupLabel,vn=bn||(zt?"children":"label");return{label:vn,value:Yt||"value",options:gn||"options",groupLabel:yn||vn}}function Ve(wt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},En=zt.fieldNames,bn=zt.childrenAsData,Yt=[],gn=Qe(En,!1),yn=gn.label,vn=gn.value,jn=gn.options,Un=gn.groupLabel;function Gn(An,Li){Array.isArray(An)&&An.forEach(function(xi){if(Li||!(jn in xi)){var bi=xi[vn];Yt.push({key:je(xi,Yt.length),groupOption:Li,data:xi,label:xi[yn],value:bi})}else{var hn=xi[Un];hn===void 0&&bn&&(hn=xi.label),Yt.push({key:je(xi,Yt.length),group:!0,data:xi,label:hn}),Gn(xi[jn],!0)}})}return Gn(wt,!1),Yt}function We(wt){var zt=(0,Le.Z)({},wt);return"props"in zt||Object.defineProperty(zt,"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`."),zt}}),zt}var pt=function(zt,En,bn){if(!En||!En.length)return null;var Yt=!1,gn=function vn(jn,Un){var Gn=(0,Ke.Z)(Un),An=Gn[0],Li=Gn.slice(1);if(!An)return[jn];var xi=jn.split(An);return Yt=Yt||xi.length>1,xi.reduce(function(bi,hn){return[].concat((0,Se.Z)(bi),(0,Se.Z)(vn(hn,Li)))},[]).filter(Boolean)},yn=gn(zt,En);return Yt?typeof bn!="undefined"?yn.slice(0,bn):yn:null},Mt=pe.createContext(null),Qt=Mt;function qt(wt){var zt=wt.visible,En=wt.values;if(!zt)return null;var bn=50;return pe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(En.slice(0,bn).map(function(Yt){var gn=Yt.label,yn=Yt.value;return["number","string"].includes((0,be.Z)(gn))?gn:yn}).join(", ")),En.length>bn?", ...":null)}var Bt=["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"],$t=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Cn=function(zt){return zt==="tags"||zt==="multiple"},mn=pe.forwardRef(function(wt,zt){var En,bn=wt.id,Yt=wt.prefixCls,gn=wt.className,yn=wt.showSearch,vn=wt.tagRender,jn=wt.direction,Un=wt.omitDomProps,Gn=wt.displayValues,An=wt.onDisplayValuesChange,Li=wt.emptyOptions,xi=wt.notFoundContent,bi=xi===void 0?"Not Found":xi,hn=wt.onClear,Vi=wt.mode,lr=wt.disabled,Mr=wt.loading,xn=wt.getInputElement,Vn=wt.getRawInputElement,mi=wt.open,di=wt.defaultOpen,gi=wt.onDropdownVisibleChange,Di=wt.activeValue,Ji=wt.onActiveValueChange,cr=wt.activeDescendantId,_r=wt.searchValue,Rr=wt.autoClearSearchValue,Mn=wt.onSearch,Qr=wt.onSearchSplit,kn=wt.tokenSeparators,Ri=wt.allowClear,kr=wt.prefix,mr=wt.suffixIcon,eo=wt.clearIcon,Tr=wt.OptionList,Sr=wt.animation,yo=wt.transitionName,an=wt.dropdownStyle,On=wt.dropdownClassName,on=wt.dropdownMatchSelectWidth,ft=wt.dropdownRender,Wn=wt.dropdownAlign,ii=wt.placement,Mi=wt.builtinPlacements,vi=wt.getPopupContainer,hi=wt.showAction,Nn=hi===void 0?[]:hi,Yn=wt.onFocus,qn=wt.onBlur,Bn=wt.onKeyUp,Jn=wt.onKeyDown,Ti=wt.onMouseDown,ci=(0,xe.Z)(wt,Bt),ni=Cn(Vi),Pn=(yn!==void 0?yn:ni)||Vi==="combobox",wi=(0,Le.Z)({},ci);$t.forEach(function(zo){delete wi[zo]}),Un==null||Un.forEach(function(zo){delete wi[zo]});var ji=pe.useState(!1),br=(0,Ce.Z)(ji,2),nr=br[0],Zr=br[1];pe.useEffect(function(){Zr((0,ue.Z)())},[]);var zr=pe.useRef(null),Ur=pe.useRef(null),to=pe.useRef(null),Jr=pe.useRef(null),ko=pe.useRef(null),rn=pe.useRef(!1),Kr=me(),Hr=(0,Ce.Z)(Kr,3),sr=Hr[0],yr=Hr[1],fr=Hr[2];pe.useImperativeHandle(zt,function(){var zo,wo;return{focus:(zo=Jr.current)===null||zo===void 0?void 0:zo.focus,blur:(wo=Jr.current)===null||wo===void 0?void 0:wo.blur,scrollTo:function(Fi){var Hs;return(Hs=ko.current)===null||Hs===void 0?void 0:Hs.scrollTo(Fi)},nativeElement:zr.current||Ur.current}});var co=pe.useMemo(function(){var zo;if(Vi!=="combobox")return _r;var wo=(zo=Gn[0])===null||zo===void 0?void 0:zo.value;return typeof wo=="string"||typeof wo=="number"?String(wo):""},[_r,Vi,Gn]),fo=Vi==="combobox"&&typeof xn=="function"&&xn()||null,Er=typeof Vn=="function"&&Vn(),no=(0,ee.x1)(Ur,Er==null||(En=Er.props)===null||En===void 0?void 0:En.ref),Qs=pe.useState(!1),us=(0,Ce.Z)(Qs,2),Aa=us[0],oa=us[1];(0,fe.Z)(function(){oa(!0)},[]);var $i=(0,ye.Z)(!1,{defaultValue:di,value:mi}),ns=(0,Ce.Z)($i,2),ss=ns[0],zs=ns[1],hs=Aa?ss:!1,Ms=!bi&&Li;(lr||Ms&&hs&&Vi==="combobox")&&(hs=!1);var li=Ms?!1:hs,er=pe.useCallback(function(zo){var wo=zo!==void 0?zo:!hs;lr||(zs(wo),hs!==wo&&(gi==null||gi(wo)))},[lr,hs,zs,gi]),Pr=pe.useMemo(function(){return(kn||[]).some(function(zo){return[`
`,`\r
`].includes(zo)})},[kn]),jr=pe.useContext(Qt)||{},$r=jr.maxCount,jo=jr.rawValues,tr=function(wo,Us,Fi){if(!(ni&&Re($r)&&(jo==null?void 0:jo.size)>=$r)){var Hs=!0,Zt=wo;Ji==null||Ji(null);var In=pt(wo,kn,Re($r)?$r-jo.size:void 0),pl=Fi?null:In;return Vi!=="combobox"&&pl&&(Zt="",Qr==null||Qr(pl),er(!1),Hs=!1),Mn&&co!==Zt&&Mn(Zt,{source:Us?"typing":"effect"}),Hs}},pa=function(wo){!wo||!wo.trim()||Mn(wo,{source:"submit"})};pe.useEffect(function(){!hs&&!ni&&Vi!=="combobox"&&tr("",!1,!1)},[hs]),pe.useEffect(function(){ss&&lr&&zs(!1),lr&&!rn.current&&yr(!1)},[lr]);var ps=ve(),cs=(0,Ce.Z)(ps,2),io=cs[0],ws=cs[1],ga=pe.useRef(!1),is=function(wo){var Us=io(),Fi=wo.key,Hs=Fi==="Enter";if(Hs&&(Vi!=="combobox"&&wo.preventDefault(),hs||er(!0)),ws(!!co),Fi==="Backspace"&&!Us&&ni&&!co&&Gn.length){for(var Zt=(0,Se.Z)(Gn),In=null,pl=Zt.length-1;pl>=0;pl-=1){var Kl=Zt[pl];if(!Kl.disabled){Zt.splice(pl,1),In=Kl;break}}In&&An(Zt,{type:"remove",values:[In]})}for(var Ns=arguments.length,sa=new Array(Ns>1?Ns-1:0),rl=1;rl<Ns;rl++)sa[rl-1]=arguments[rl];if(hs&&(!Hs||!ga.current)){var bl;Hs&&(ga.current=!0),(bl=ko.current)===null||bl===void 0||bl.onKeyDown.apply(bl,[wo].concat(sa))}Jn==null||Jn.apply(void 0,[wo].concat(sa))},Pa=function(wo){for(var Us=arguments.length,Fi=new Array(Us>1?Us-1:0),Hs=1;Hs<Us;Hs++)Fi[Hs-1]=arguments[Hs];if(hs){var Zt;(Zt=ko.current)===null||Zt===void 0||Zt.onKeyUp.apply(Zt,[wo].concat(Fi))}wo.key==="Enter"&&(ga.current=!1),Bn==null||Bn.apply(void 0,[wo].concat(Fi))},Sa=function(wo){var Us=Gn.filter(function(Fi){return Fi!==wo});An(Us,{type:"remove",values:[wo]})},Na=function(){ga.current=!1},_s=pe.useRef(!1),nl=function(){yr(!0),lr||(Yn&&!_s.current&&Yn.apply(void 0,arguments),Nn.includes("focus")&&er(!0)),_s.current=!0},Hu=function(){rn.current=!0,yr(!1,function(){_s.current=!1,rn.current=!1,er(!1)}),!lr&&(co&&(Vi==="tags"?Mn(co,{source:"submit"}):Vi==="multiple"&&Mn("",{source:"blur"})),qn&&qn.apply(void 0,arguments))},fl=[];pe.useEffect(function(){return function(){fl.forEach(function(zo){return clearTimeout(zo)}),fl.splice(0,fl.length)}},[]);var Ol=function(wo){var Us,Fi=wo.target,Hs=(Us=to.current)===null||Us===void 0?void 0:Us.getPopupElement();if(Hs&&Hs.contains(Fi)){var Zt=setTimeout(function(){var Ns=fl.indexOf(Zt);if(Ns!==-1&&fl.splice(Ns,1),fr(),!nr&&!Hs.contains(document.activeElement)){var sa;(sa=Jr.current)===null||sa===void 0||sa.focus()}});fl.push(Zt)}for(var In=arguments.length,pl=new Array(In>1?In-1:0),Kl=1;Kl<In;Kl++)pl[Kl-1]=arguments[Kl];Ti==null||Ti.apply(void 0,[wo].concat(pl))},il=pe.useState({}),Pu=(0,Ce.Z)(il,2),eh=Pu[1];function lu(){eh({})}var As;Er&&(As=function(wo){er(wo)}),Pe(function(){var zo;return[zr.current,(zo=to.current)===null||zo===void 0?void 0:zo.getPopupElement()]},li,er,!!Er);var Gu=pe.useMemo(function(){return(0,Le.Z)((0,Le.Z)({},wt),{},{notFoundContent:bi,open:hs,triggerOpen:li,id:bn,showSearch:Pn,multiple:ni,toggleOpen:er})},[wt,bi,li,hs,bn,Pn,ni,er]),th=!!mr||Mr,uu;th&&(uu=pe.createElement(oe,{className:ge()("".concat(Yt,"-arrow"),(0,Be.Z)({},"".concat(Yt,"-arrow-loading"),Mr)),customizeIcon:mr,customizeIconProps:{loading:Mr,searchValue:co,open:hs,focused:sr,showSearch:Pn}}));var hu=function(){var wo;hn==null||hn(),(wo=Jr.current)===null||wo===void 0||wo.focus(),An([],{type:"clear",values:Gn}),tr("",!1,!1)},ua=re(Yt,hu,Gn,Ri,eo,lr,co,Vi),ma=ua.allowClear,Os=ua.clearIcon,$s=pe.createElement(Tr,{ref:ko}),Il=ge()(Yt,gn,(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(Yt,"-focused"),sr),"".concat(Yt,"-multiple"),ni),"".concat(Yt,"-single"),!ni),"".concat(Yt,"-allow-clear"),Ri),"".concat(Yt,"-show-arrow"),th),"".concat(Yt,"-disabled"),lr),"".concat(Yt,"-loading"),Mr),"".concat(Yt,"-open"),hs),"".concat(Yt,"-customize-input"),fo),"".concat(Yt,"-show-search"),Pn)),Ca=pe.createElement(tt,{ref:to,disabled:lr,prefixCls:Yt,visible:li,popupElement:$s,animation:Sr,transitionName:yo,dropdownStyle:an,dropdownClassName:On,direction:jn,dropdownMatchSelectWidth:on,dropdownRender:ft,dropdownAlign:Wn,placement:ii,builtinPlacements:Mi,getPopupContainer:vi,empty:Li,getTriggerDOMNode:function(wo){return Ur.current||wo},onPopupVisibleChange:As,onPopupMouseEnter:lu},Er?pe.cloneElement(Er,{ref:no}):pe.createElement(tn,(0,ke.Z)({},wt,{domRef:Ur,prefixCls:Yt,inputElement:fo,ref:Jr,id:bn,prefix:kr,showSearch:Pn,autoClearSearchValue:Rr,mode:Vi,activeDescendantId:cr,tagRender:vn,values:Gn,open:hs,onToggleOpen:er,activeValue:Di,searchValue:co,onSearch:tr,onSearchSubmit:pa,onRemove:Sa,tokenWithEnter:Pr,onInputBlur:Na}))),Yo;return Er?Yo=Ca:Yo=pe.createElement("div",(0,ke.Z)({className:Il},wi,{ref:zr,onMouseDown:Ol,onKeyDown:is,onKeyUp:Pa,onFocus:nl,onBlur:Hu}),pe.createElement(qt,{visible:sr&&!hs,values:Gn}),Ca,uu,ma&&Os),pe.createElement(ae.Provider,{value:Gu},Yo)}),un=mn,Kn=function(){return null};Kn.isSelectOptGroup=!0;var pn=Kn,Hn=function(){return null};Hn.isSelectOption=!0;var Qn=Hn,Ai=Ie(80547),ei=Ie(2738),ki=Ie(65283);function Wi(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Ui=["disabled","title","children","style","className"];function rr(wt){return typeof wt=="string"||typeof wt=="number"}var vr=function(zt,En){var bn=le(),Yt=bn.prefixCls,gn=bn.id,yn=bn.open,vn=bn.multiple,jn=bn.mode,Un=bn.searchValue,Gn=bn.toggleOpen,An=bn.notFoundContent,Li=bn.onPopupScroll,xi=pe.useContext(Qt),bi=xi.maxCount,hn=xi.flattenOptions,Vi=xi.onActiveValue,lr=xi.defaultActiveFirstOption,Mr=xi.onSelect,xn=xi.menuItemSelectedIcon,Vn=xi.rawValues,mi=xi.fieldNames,di=xi.virtual,gi=xi.direction,Di=xi.listHeight,Ji=xi.listItemHeight,cr=xi.optionRender,_r="".concat(Yt,"-item"),Rr=(0,Ai.Z)(function(){return hn},[yn,hn],function(hi,Nn){return Nn[0]&&hi[1]!==Nn[1]}),Mn=pe.useRef(null),Qr=pe.useMemo(function(){return vn&&Re(bi)&&(Vn==null?void 0:Vn.size)>=bi},[vn,bi,Vn==null?void 0:Vn.size]),kn=function(Nn){Nn.preventDefault()},Ri=function(Nn){var Yn;(Yn=Mn.current)===null||Yn===void 0||Yn.scrollTo(typeof Nn=="number"?{index:Nn}:Nn)},kr=pe.useCallback(function(hi){return jn==="combobox"?!1:Vn.has(hi)},[jn,(0,Se.Z)(Vn).toString(),Vn.size]),mr=function(Nn){for(var Yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,qn=Rr.length,Bn=0;Bn<qn;Bn+=1){var Jn=(Nn+Bn*Yn+qn)%qn,Ti=Rr[Jn]||{},ci=Ti.group,ni=Ti.data;if(!ci&&!(ni!=null&&ni.disabled)&&(kr(ni.value)||!Qr))return Jn}return-1},eo=pe.useState(function(){return mr(0)}),Tr=(0,Ce.Z)(eo,2),Sr=Tr[0],yo=Tr[1],an=function(Nn){var Yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;yo(Nn);var qn={source:Yn?"keyboard":"mouse"},Bn=Rr[Nn];if(!Bn){Vi(null,-1,qn);return}Vi(Bn.value,Nn,qn)};(0,pe.useEffect)(function(){an(lr!==!1?mr(0):-1)},[Rr.length,Un]);var On=pe.useCallback(function(hi){return jn==="combobox"?String(hi).toLowerCase()===Un.toLowerCase():Vn.has(hi)},[jn,Un,(0,Se.Z)(Vn).toString(),Vn.size]);(0,pe.useEffect)(function(){var hi=setTimeout(function(){if(!vn&&yn&&Vn.size===1){var Yn=Array.from(Vn)[0],qn=Rr.findIndex(function(Bn){var Jn=Bn.data;return Un?String(Jn.value).startsWith(Un):Jn.value===Yn});qn!==-1&&(an(qn),Ri(qn))}});if(yn){var Nn;(Nn=Mn.current)===null||Nn===void 0||Nn.scrollTo(void 0)}return function(){return clearTimeout(hi)}},[yn,Un]);var on=function(Nn){Nn!==void 0&&Mr(Nn,{selected:!Vn.has(Nn)}),vn||Gn(!1)};if(pe.useImperativeHandle(En,function(){return{onKeyDown:function(Nn){var Yn=Nn.which,qn=Nn.ctrlKey;switch(Yn){case Ae.Z.N:case Ae.Z.P:case Ae.Z.UP:case Ae.Z.DOWN:{var Bn=0;if(Yn===Ae.Z.UP?Bn=-1:Yn===Ae.Z.DOWN?Bn=1:Wi()&&qn&&(Yn===Ae.Z.N?Bn=1:Yn===Ae.Z.P&&(Bn=-1)),Bn!==0){var Jn=mr(Sr+Bn,Bn);Ri(Jn),an(Jn,!0)}break}case Ae.Z.TAB:case Ae.Z.ENTER:{var Ti,ci=Rr[Sr];ci&&!(ci!=null&&(Ti=ci.data)!==null&&Ti!==void 0&&Ti.disabled)&&!Qr?on(ci.value):on(void 0),yn&&Nn.preventDefault();break}case Ae.Z.ESC:Gn(!1),yn&&Nn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Nn){Ri(Nn)}}}),Rr.length===0)return pe.createElement("div",{role:"listbox",id:"".concat(gn,"_list"),className:"".concat(_r,"-empty"),onMouseDown:kn},An);var ft=Object.keys(mi).map(function(hi){return mi[hi]}),Wn=function(Nn){return Nn.label};function ii(hi,Nn){var Yn=hi.group;return{role:Yn?"presentation":"option",id:"".concat(gn,"_list_").concat(Nn)}}var Mi=function(Nn){var Yn=Rr[Nn];if(!Yn)return null;var qn=Yn.data||{},Bn=qn.value,Jn=Yn.group,Ti=(0,Oe.Z)(qn,!0),ci=Wn(Yn);return Yn?pe.createElement("div",(0,ke.Z)({"aria-label":typeof ci=="string"&&!Jn?ci:null},Ti,{key:Nn},ii(Yn,Nn),{"aria-selected":On(Bn)}),Bn):null},vi={role:"listbox",id:"".concat(gn,"_list")};return pe.createElement(pe.Fragment,null,di&&pe.createElement("div",(0,ke.Z)({},vi,{style:{height:0,width:0,overflow:"hidden"}}),Mi(Sr-1),Mi(Sr),Mi(Sr+1)),pe.createElement(ki.Z,{itemKey:"key",ref:Mn,data:Rr,height:Di,itemHeight:Ji,fullHeight:!1,onMouseDown:kn,onScroll:Li,virtual:di,direction:gi,innerProps:di?null:vi},function(hi,Nn){var Yn=hi.group,qn=hi.groupOption,Bn=hi.data,Jn=hi.label,Ti=hi.value,ci=Bn.key;if(Yn){var ni,Pn=(ni=Bn.title)!==null&&ni!==void 0?ni:rr(Jn)?Jn.toString():void 0;return pe.createElement("div",{className:ge()(_r,"".concat(_r,"-group"),Bn.className),title:Pn},Jn!==void 0?Jn:ci)}var wi=Bn.disabled,ji=Bn.title,br=Bn.children,nr=Bn.style,Zr=Bn.className,zr=(0,xe.Z)(Bn,Ui),Ur=(0,ei.Z)(zr,ft),to=kr(Ti),Jr=wi||!to&&Qr,ko="".concat(_r,"-option"),rn=ge()(_r,ko,Zr,(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)({},"".concat(ko,"-grouped"),qn),"".concat(ko,"-active"),Sr===Nn&&!Jr),"".concat(ko,"-disabled"),Jr),"".concat(ko,"-selected"),to)),Kr=Wn(hi),Hr=!xn||typeof xn=="function"||to,sr=typeof Kr=="number"?Kr:Kr||Ti,yr=rr(sr)?sr.toString():void 0;return ji!==void 0&&(yr=ji),pe.createElement("div",(0,ke.Z)({},(0,Oe.Z)(Ur),di?{}:ii(hi,Nn),{"aria-selected":On(Ti),className:rn,title:yr,onMouseMove:function(){Sr===Nn||Jr||an(Nn)},onClick:function(){Jr||on(Ti)},style:nr}),pe.createElement("div",{className:"".concat(ko,"-content")},typeof cr=="function"?cr(hi,{index:Nn}):sr),pe.isValidElement(xn)||to,Hr&&pe.createElement(oe,{className:"".concat(_r,"-option-state"),customizeIcon:xn,customizeIconProps:{value:Ti,disabled:Jr,isSelected:to}},to?"\u2713":null))}))},wr=pe.forwardRef(vr),Oi=wr,Zi=function(wt,zt){var En=pe.useRef({values:new Map,options:new Map}),bn=pe.useMemo(function(){var gn=En.current,yn=gn.values,vn=gn.options,jn=wt.map(function(An){if(An.label===void 0){var Li;return(0,Le.Z)((0,Le.Z)({},An),{},{label:(Li=yn.get(An.value))===null||Li===void 0?void 0:Li.label})}return An}),Un=new Map,Gn=new Map;return jn.forEach(function(An){Un.set(An.value,An),Gn.set(An.value,zt.get(An.value)||vn.get(An.value))}),En.current.values=Un,En.current.options=Gn,jn},[wt,zt]),Yt=pe.useCallback(function(gn){return zt.get(gn)||En.current.options.get(gn)},[zt]);return[bn,Yt]};function pr(wt,zt){return bt(wt).join("").toUpperCase().includes(zt)}var et=function(wt,zt,En,bn,Yt){return pe.useMemo(function(){if(!En||bn===!1)return wt;var gn=zt.options,yn=zt.label,vn=zt.value,jn=[],Un=typeof bn=="function",Gn=En.toUpperCase(),An=Un?bn:function(xi,bi){return Yt?pr(bi[Yt],Gn):bi[gn]?pr(bi[yn!=="children"?yn:"label"],Gn):pr(bi[vn],Gn)},Li=Un?function(xi){return We(xi)}:function(xi){return xi};return wt.forEach(function(xi){if(xi[gn]){var bi=An(En,Li(xi));if(bi)jn.push(xi);else{var hn=xi[gn].filter(function(Vi){return An(En,Li(Vi))});hn.length&&jn.push((0,Le.Z)((0,Le.Z)({},xi),{},(0,Be.Z)({},gn,hn)))}return}An(En,Li(xi))&&jn.push(xi)}),jn},[wt,bn,Yt,En,zt])},ai=Ie(6551),ti=Ie(11592),Ii=["children","value"],gr=["children"];function hr(wt){var zt=wt,En=zt.key,bn=zt.props,Yt=bn.children,gn=bn.value,yn=(0,xe.Z)(bn,Ii);return(0,Le.Z)({key:En,value:gn!==void 0?gn:En,children:Yt},yn)}function or(wt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ti.Z)(wt).map(function(En,bn){if(!pe.isValidElement(En)||!En.type)return null;var Yt=En,gn=Yt.type.isSelectOptGroup,yn=Yt.key,vn=Yt.props,jn=vn.children,Un=(0,xe.Z)(vn,gr);return zt||!gn?hr(En):(0,Le.Z)((0,Le.Z)({key:"__RC_SELECT_GRP__".concat(yn===null?bn:yn,"__"),label:yn},Un),{},{options:or(jn)})}).filter(function(En){return En})}var po=function(zt,En,bn,Yt,gn){return pe.useMemo(function(){var yn=zt,vn=!zt;vn&&(yn=or(En));var jn=new Map,Un=new Map,Gn=function(xi,bi,hn){hn&&typeof hn=="string"&&xi.set(bi[hn],bi)},An=function Li(xi){for(var bi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,hn=0;hn<xi.length;hn+=1){var Vi=xi[hn];!Vi[bn.options]||bi?(jn.set(Vi[bn.value],Vi),Gn(Un,Vi,bn.label),Gn(Un,Vi,Yt),Gn(Un,Vi,gn)):Li(Vi[bn.options],!0)}};return An(yn),{options:yn,valueOptions:jn,labelOptions:Un}},[zt,En,bn,Yt,gn])},$n=po;function Ue(wt){var zt=pe.useRef();zt.current=wt;var En=pe.useCallback(function(){return zt.current.apply(zt,arguments)},[]);return En}function Je(wt){var zt=wt.mode,En=wt.options,bn=wt.children,Yt=wt.backfill,gn=wt.allowClear,yn=wt.placeholder,vn=wt.getInputElement,jn=wt.showSearch,Un=wt.onSearch,Gn=wt.defaultOpen,An=wt.autoFocus,Li=wt.labelInValue,xi=wt.value,bi=wt.inputValue,hn=wt.optionLabelProp,Vi=isMultiple(zt),lr=jn!==void 0?jn:Vi||zt==="combobox",Mr=En||convertChildrenToData(bn);if(warning(zt!=="tags"||Mr.every(function(di){return!di.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),zt==="tags"||zt==="combobox"){var xn=Mr.some(function(di){return di.options?di.options.some(function(gi){return typeof("value"in gi?gi.value:gi.key)=="number"}):typeof("value"in di?di.value:di.key)=="number"});warning(!xn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(zt!=="combobox"||!hn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(zt==="combobox"||!Yt,"`backfill` only works with `combobox` mode."),warning(zt==="combobox"||!vn,"`getInputElement` only work with `combobox` mode."),noteOnce(zt!=="combobox"||!vn||!gn||!yn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Un&&!lr&&zt!=="combobox"&&zt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Gn||An,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),xi!=null){var Vn=toArray(xi);warning(!Li||Vn.every(function(di){return _typeof(di)==="object"&&("key"in di||"value"in di)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Vi||Array.isArray(xi),"`value` should be array when `mode` is `multiple` or `tags`")}if(bn){var mi=null;toNodeArray(bn).some(function(di){if(!React.isValidElement(di)||!di.type)return!1;var gi=di,Di=gi.type;if(Di.isSelectOption)return!1;if(Di.isSelectOptGroup){var Ji=toNodeArray(di.props.children).every(function(cr){return!React.isValidElement(cr)||!di.type||cr.type.isSelectOption?!0:(mi=cr.type,!1)});return!Ji}return mi=Di,!0}),mi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(mi.displayName||mi.name||mi,"`.")),warning(bi===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function nt(wt,zt){if(wt){var En=function bn(Yt){for(var gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yn=0;yn<Yt.length;yn++){var vn=Yt[yn];if(vn[zt==null?void 0:zt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!gn&&Array.isArray(vn[zt==null?void 0:zt.options])&&bn(vn[zt==null?void 0:zt.options],!0))break}};En(wt)}}var Pt=null,Nt=["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"],sn=["inputValue"];function Kt(wt){return!wt||(0,be.Z)(wt)!=="object"}var _n=pe.forwardRef(function(wt,zt){var En=wt.id,bn=wt.mode,Yt=wt.prefixCls,gn=Yt===void 0?"rc-select":Yt,yn=wt.backfill,vn=wt.fieldNames,jn=wt.inputValue,Un=wt.searchValue,Gn=wt.onSearch,An=wt.autoClearSearchValue,Li=An===void 0?!0:An,xi=wt.onSelect,bi=wt.onDeselect,hn=wt.dropdownMatchSelectWidth,Vi=hn===void 0?!0:hn,lr=wt.filterOption,Mr=wt.filterSort,xn=wt.optionFilterProp,Vn=wt.optionLabelProp,mi=wt.options,di=wt.optionRender,gi=wt.children,Di=wt.defaultActiveFirstOption,Ji=wt.menuItemSelectedIcon,cr=wt.virtual,_r=wt.direction,Rr=wt.listHeight,Mn=Rr===void 0?200:Rr,Qr=wt.listItemHeight,kn=Qr===void 0?20:Qr,Ri=wt.labelRender,kr=wt.value,mr=wt.defaultValue,eo=wt.labelInValue,Tr=wt.onChange,Sr=wt.maxCount,yo=(0,xe.Z)(wt,Nt),an=(0,ai.ZP)(En),On=Cn(bn),on=!!(!mi&&gi),ft=pe.useMemo(function(){return lr===void 0&&bn==="combobox"?!1:lr},[lr,bn]),Wn=pe.useMemo(function(){return Qe(vn,on)},[JSON.stringify(vn),on]),ii=(0,ye.Z)("",{value:Un!==void 0?Un:jn,postState:function(Pr){return Pr||""}}),Mi=(0,Ce.Z)(ii,2),vi=Mi[0],hi=Mi[1],Nn=$n(mi,gi,Wn,xn,Vn),Yn=Nn.valueOptions,qn=Nn.labelOptions,Bn=Nn.options,Jn=pe.useCallback(function(er){var Pr=bt(er);return Pr.map(function(jr){var $r,jo,tr,pa,ps;if(Kt(jr))$r=jr;else{var cs;tr=jr.key,jo=jr.label,$r=(cs=jr.value)!==null&&cs!==void 0?cs:tr}var io=Yn.get($r);if(io){var ws;if(jo===void 0&&(jo=io==null?void 0:io[Vn||Wn.label]),tr===void 0&&(tr=(ws=io==null?void 0:io.key)!==null&&ws!==void 0?ws:$r),pa=io==null?void 0:io.disabled,ps=io==null?void 0:io.title,0)var ga}return{label:jo,value:$r,key:tr,disabled:pa,title:ps}})},[Wn,Vn,Yn]),Ti=(0,ye.Z)(mr,{value:kr}),ci=(0,Ce.Z)(Ti,2),ni=ci[0],Pn=ci[1],wi=pe.useMemo(function(){var er,Pr=On&&ni===null?[]:ni,jr=Jn(Pr);return bn==="combobox"&&ot((er=jr[0])===null||er===void 0?void 0:er.value)?[]:jr},[ni,Jn,bn,On]),ji=Zi(wi,Yn),br=(0,Ce.Z)(ji,2),nr=br[0],Zr=br[1],zr=pe.useMemo(function(){if(!bn&&nr.length===1){var er=nr[0];if(er.value===null&&(er.label===null||er.label===void 0))return[]}return nr.map(function(Pr){var jr;return(0,Le.Z)((0,Le.Z)({},Pr),{},{label:(jr=typeof Ri=="function"?Ri(Pr):Pr.label)!==null&&jr!==void 0?jr:Pr.value})})},[bn,nr,Ri]),Ur=pe.useMemo(function(){return new Set(nr.map(function(er){return er.value}))},[nr]);pe.useEffect(function(){if(bn==="combobox"){var er,Pr=(er=nr[0])===null||er===void 0?void 0:er.value;hi(ut(Pr)?String(Pr):"")}},[nr]);var to=Ue(function(er,Pr){var jr=Pr!=null?Pr:er;return(0,Be.Z)((0,Be.Z)({},Wn.value,er),Wn.label,jr)}),Jr=pe.useMemo(function(){if(bn!=="tags")return Bn;var er=(0,Se.Z)(Bn),Pr=function($r){return Yn.has($r)};return(0,Se.Z)(nr).sort(function(jr,$r){return jr.value<$r.value?-1:1}).forEach(function(jr){var $r=jr.value;Pr($r)||er.push(to($r,jr.label))}),er},[to,Bn,Yn,nr,bn]),ko=et(Jr,Wn,vi,ft,xn),rn=pe.useMemo(function(){return bn!=="tags"||!vi||ko.some(function(er){return er[xn||"value"]===vi})||ko.some(function(er){return er[Wn.value]===vi})?ko:[to(vi)].concat((0,Se.Z)(ko))},[to,xn,bn,ko,vi,Wn]),Kr=function er(Pr){var jr=(0,Se.Z)(Pr).sort(function($r,jo){return Mr($r,jo,{searchValue:vi})});return jr.map(function($r){return Array.isArray($r.options)?(0,Le.Z)((0,Le.Z)({},$r),{},{options:$r.options.length>0?er($r.options):$r.options}):$r})},Hr=pe.useMemo(function(){return Mr?Kr(rn):rn},[rn,Mr,vi]),sr=pe.useMemo(function(){return Ve(Hr,{fieldNames:Wn,childrenAsData:on})},[Hr,Wn,on]),yr=function(Pr){var jr=Jn(Pr);if(Pn(jr),Tr&&(jr.length!==nr.length||jr.some(function(tr,pa){var ps;return((ps=nr[pa])===null||ps===void 0?void 0:ps.value)!==(tr==null?void 0:tr.value)}))){var $r=eo?jr:jr.map(function(tr){return tr.value}),jo=jr.map(function(tr){return We(Zr(tr.value))});Tr(On?$r:$r[0],On?jo:jo[0])}},fr=pe.useState(null),co=(0,Ce.Z)(fr,2),fo=co[0],Er=co[1],no=pe.useState(0),Qs=(0,Ce.Z)(no,2),us=Qs[0],Aa=Qs[1],oa=Di!==void 0?Di:bn!=="combobox",$i=pe.useCallback(function(er,Pr){var jr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},$r=jr.source,jo=$r===void 0?"keyboard":$r;Aa(Pr),yn&&bn==="combobox"&&er!==null&&jo==="keyboard"&&Er(String(er))},[yn,bn]),ns=function(Pr,jr,$r){var jo=function(){var Sa,Na=Zr(Pr);return[eo?{label:Na==null?void 0:Na[Wn.label],value:Pr,key:(Sa=Na==null?void 0:Na.key)!==null&&Sa!==void 0?Sa:Pr}:Pr,We(Na)]};if(jr&&xi){var tr=jo(),pa=(0,Ce.Z)(tr,2),ps=pa[0],cs=pa[1];xi(ps,cs)}else if(!jr&&bi&&$r!=="clear"){var io=jo(),ws=(0,Ce.Z)(io,2),ga=ws[0],is=ws[1];bi(ga,is)}},ss=Ue(function(er,Pr){var jr,$r=On?Pr.selected:!0;$r?jr=On?[].concat((0,Se.Z)(nr),[er]):[er]:jr=nr.filter(function(jo){return jo.value!==er}),yr(jr),ns(er,$r),bn==="combobox"?Er(""):(!Cn||Li)&&(hi(""),Er(""))}),zs=function(Pr,jr){yr(Pr);var $r=jr.type,jo=jr.values;($r==="remove"||$r==="clear")&&jo.forEach(function(tr){ns(tr.value,!1,$r)})},hs=function(Pr,jr){if(hi(Pr),Er(null),jr.source==="submit"){var $r=(Pr||"").trim();if($r){var jo=Array.from(new Set([].concat((0,Se.Z)(Ur),[$r])));yr(jo),ns($r,!0),hi("")}return}jr.source!=="blur"&&(bn==="combobox"&&yr(Pr),Gn==null||Gn(Pr))},Ms=function(Pr){var jr=Pr;bn!=="tags"&&(jr=Pr.map(function(jo){var tr=qn.get(jo);return tr==null?void 0:tr.value}).filter(function(jo){return jo!==void 0}));var $r=Array.from(new Set([].concat((0,Se.Z)(Ur),(0,Se.Z)(jr))));yr($r),$r.forEach(function(jo){ns(jo,!0)})},li=pe.useMemo(function(){var er=cr!==!1&&Vi!==!1;return(0,Le.Z)((0,Le.Z)({},Nn),{},{flattenOptions:sr,onActiveValue:$i,defaultActiveFirstOption:oa,onSelect:ss,menuItemSelectedIcon:Ji,rawValues:Ur,fieldNames:Wn,virtual:er,direction:_r,listHeight:Mn,listItemHeight:kn,childrenAsData:on,maxCount:Sr,optionRender:di})},[Sr,Nn,sr,$i,oa,ss,Ji,Ur,Wn,cr,Vi,_r,Mn,kn,on,di]);return pe.createElement(Qt.Provider,{value:li},pe.createElement(un,(0,ke.Z)({},yo,{id:an,prefixCls:gn,ref:zt,omitDomProps:sn,mode:bn,displayValues:zr,onDisplayValuesChange:zs,direction:_r,searchValue:vi,onSearch:hs,autoClearSearchValue:Li,onSearchSplit:Ms,dropdownMatchSelectWidth:Vi,OptionList:Oi,emptyOptions:!sr.length,activeValue:fo,activeDescendantId:"".concat(an,"_list_").concat(us)})))}),zn=_n;zn.Option=Qn,zn.OptGroup=pn;var _i=zn,Bi=_i},63158:function(Sn,ln,Ie){"use strict";var ke=Ie(71409),Se=Ie(87075),Be=Ie(11036),Le=Ie(39224),Ce=Ie(59301),xe=Ie(92310),be=Ie.n(xe),ye=Ie(18929),we=Ie(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,De=ge.onChange,Oe=ge.onKeyDown,Ze=(0,Le.Z)(ge,pe),qe=(0,ye.Z)(!1,{value:re,defaultValue:ae}),Xe=(0,Be.Z)(qe,2),vt=Xe[0],gt=Xe[1];function kt(Rt,ut){var ot=vt;return le||(ot=Rt,gt(ot),De==null||De(ot,ut)),ot}function at(Rt){Rt.which===we.Z.LEFT?kt(!1,Rt):Rt.which===we.Z.RIGHT&&kt(!0,Rt),Oe==null||Oe(Rt)}function bt(Rt){var ut=kt(!vt,Rt);Ae==null||Ae(ut,Rt)}var ct=be()(z,oe,(ue={},(0,Se.Z)(ue,"".concat(z,"-checked"),vt),(0,Se.Z)(ue,"".concat(z,"-disabled"),le),ue));return Ce.createElement("button",(0,ke.Z)({},Ze,{type:"button",role:"switch","aria-checked":vt,disabled:le,className:ct,ref:fe,onKeyDown:at,onClick:bt}),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",ln.Z=de},86351:function(Sn,ln,Ie){"use strict";Ie.d(ln,{R:function(){return Se},w:function(){return ke}});var ke={},Se="rc-table-internal-hook"},97347:function(Sn,ln,Ie){"use strict";Ie.d(ln,{L:function(){return z},Z:function(){return me}});var ke=Ie(11036),Se=Ie(87075),Be=Ie(62730),Le=Ie(28788),Ce=Ie(89490),xe=Ie(39224),be=Ie(11592),ye=Ie(48736),we=Ie(59301),pe=Ie(86351),de=Ie(54451);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 De=0,Oe=0;ve.forEach(function(bt){var ct=ge(Pe,bt.width);ct?De+=ct:Oe+=1});var Ze=Math.max(Pe,Ae),qe=Math.max(Ze-De,Oe),Xe=Oe,vt=qe/Oe,gt=0,kt=ve.map(function(bt){var ct=(0,Ce.Z)({},bt),Rt=ge(Pe,ct.width);if(Rt)ct.width=Rt;else{var ut=Math.floor(vt);ct.width=Xe===1?qe:ut,qe-=ut,Xe-=1}return gt+=ct.width,ct});if(gt<Ze){var at=Ze/gt;qe=Ze,kt.forEach(function(bt,ct){var Rt=Math.floor(bt.width*at);bt.width=ct===kt.length-1?qe:Rt,qe-=Rt})}return[kt,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,De=Pe.props,Oe=De.children,Ze=(0,xe.Z)(De,ue),qe=(0,Ce.Z)({key:Ae},Ze);return Oe&&(qe.children=z(Oe)),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,De,Oe){var Ze=De.fixed,qe=Ze===!0?"left":Ze,Xe="".concat(Pe,"-").concat(Oe),vt=De.children;return vt&&vt.length>0?[].concat((0,Be.Z)(Ae),(0,Be.Z)(re(vt,Xe).map(function(gt){return(0,Ce.Z)({fixed:qe},gt)}))):[].concat((0,Be.Z)(Ae),[(0,Ce.Z)((0,Ce.Z)({key:Xe},De),{},{fixed:qe})])},[])}function ae(ve){return ve.map(function(Pe){var Ae=Pe.fixed,De=(0,xe.Z)(Pe,ee),Oe=Ae;return Ae==="left"?Oe="right":Ae==="right"&&(Oe="left"),(0,Ce.Z)({fixed:Oe},De)})}function le(ve,Pe){var Ae=ve.prefixCls,De=ve.columns,Oe=ve.children,Ze=ve.expandable,qe=ve.expandedKeys,Xe=ve.columnTitle,vt=ve.getRowKey,gt=ve.onTriggerExpand,kt=ve.expandIcon,at=ve.rowExpandable,bt=ve.expandIconColumnIndex,ct=ve.direction,Rt=ve.expandRowByClick,ut=ve.columnWidth,ot=ve.fixed,ht=ve.scrollWidth,yt=ve.clientWidth,_t=we.useMemo(function(){var tn=De||z(Oe)||[];return oe(tn.slice())},[De,Oe]),xt=we.useMemo(function(){if(Ze){var tn=_t.slice();if(!tn.includes(pe.w)){var lt=bt||0;lt>=0&&(lt||ot==="left"||!ot)&&tn.splice(lt,0,pe.w),ot==="right"&&tn.splice(_t.length,0,pe.w)}var He=tn.indexOf(pe.w);tn=tn.filter(function(tt,Ke){return tt!==pe.w||Ke===He});var ze=_t[He],it;ot?it=ot:it=ze?ze.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",Xe),"fixed",it),"className","".concat(Ae,"-row-expand-icon-cell")),"width",ut),"render",function(Ke,je,Re){var Qe=vt(je,Re),Ve=qe.has(Qe),We=at?at(je):!0,pt=kt({prefixCls:Ae,expanded:Ve,expandable:We,record:je,onExpand:gt});return Rt?we.createElement("span",{onClick:function(Qt){return Qt.stopPropagation()}},pt):pt});return tn.map(function(tt){return tt===pe.w?dt:tt})}return _t.filter(function(tt){return tt!==pe.w})},[Ze,_t,vt,qe,kt,ct]),Ut=we.useMemo(function(){var tn=xt;return Pe&&(tn=Pe(tn)),tn.length||(tn=[{render:function(){return null}}]),tn},[Pe,xt,ct]),Ht=we.useMemo(function(){return ct==="rtl"?ae(re(Ut)):re(Ut)},[Ut,ct,ht]),dn=we.useMemo(function(){for(var tn=-1,lt=Ht.length-1;lt>=0;lt-=1){var He=Ht[lt].fixed;if(He==="left"||He===!0){tn=lt;break}}if(tn>=0)for(var ze=0;ze<=tn;ze+=1){var it=Ht[ze].fixed;if(it!=="left"&&it!==!0)return!0}var dt=Ht.findIndex(function(je){var Re=je.fixed;return Re==="right"});if(dt>=0)for(var tt=dt;tt<Ht.length;tt+=1){var Ke=Ht[tt].fixed;if(Ke!=="right")return!0}return!1},[Ht]),Ft=fe(Ht,ht,yt),fn=(0,ke.Z)(Ft,2),It=fn[0],Xt=fn[1];return[Ut,It,Xt,dn]}var me=le},4030:function(Sn,ln,Ie){"use strict";Ie.d(ln,{w2:function(){return ke.w},vP:function(){return rr.v},RQ:function(){return ke.R},ER:function(){return Qe},Q$:function(){return lr},TN:function(){return Tr}});var ke=Ie(86351),Se=Ie(11036),Be=Ie(6089),Le=Ie(34280),Ce=Ie(13697),xe=Ie(59301),be=Ie(4676);function ye(an){var On=xe.createContext(void 0),on=function(Wn){var ii=Wn.value,Mi=Wn.children,vi=xe.useRef(ii);vi.current=ii;var hi=xe.useState(function(){return{getValue:function(){return vi.current},listeners:new Set}}),Nn=(0,Se.Z)(hi,1),Yn=Nn[0];return(0,Le.Z)(function(){(0,be.unstable_batchedUpdates)(function(){Yn.listeners.forEach(function(qn){qn(ii)})})},[ii]),xe.createElement(On.Provider,{value:Yn},Mi)};return{Context:On,Provider:on,defaultValue:an}}function we(an,On){var on=(0,Be.Z)(typeof On=="function"?On:function(qn){if(On===void 0)return qn;if(!Array.isArray(On))return qn[On];var Bn={};return On.forEach(function(Jn){Bn[Jn]=qn[Jn]}),Bn}),ft=xe.useContext(an==null?void 0:an.Context),Wn=ft||{},ii=Wn.listeners,Mi=Wn.getValue,vi=xe.useRef();vi.current=on(ft?Mi():an==null?void 0:an.defaultValue);var hi=xe.useState({}),Nn=(0,Se.Z)(hi,2),Yn=Nn[1];return(0,Le.Z)(function(){if(!ft)return;function qn(Bn){var Jn=on(Bn);(0,Ce.Z)(vi.current,Jn,!0)||Yn({})}return ii.add(qn),function(){ii.delete(qn)}},[ft]),vi.current}var pe=Ie(71409),de=Ie(8654);function ge(){var an=xe.createContext(null);function On(){return xe.useContext(an)}function on(Wn,ii){var Mi=(0,de.Yr)(Wn),vi=function(Nn,Yn){var qn=Mi?{ref:Yn}:{},Bn=xe.useRef(0),Jn=xe.useRef(Nn),Ti=On();return Ti!==null?xe.createElement(Wn,(0,pe.Z)({},Nn,qn)):((!ii||ii(Jn.current,Nn))&&(Bn.current+=1),Jn.current=Nn,xe.createElement(an.Provider,{value:Bn.current},xe.createElement(Wn,(0,pe.Z)({},Nn,qn))))};return Mi?xe.forwardRef(vi):vi}function ft(Wn,ii){var Mi=(0,de.Yr)(Wn),vi=function(Nn,Yn){var qn=Mi?{ref:Yn}:{};return On(),xe.createElement(Wn,(0,pe.Z)({},Nn,qn))};return Mi?xe.memo(xe.forwardRef(vi),ii):xe.memo(vi,ii)}return{makeImmutable:on,responseImmutable:ft,useImmutableMark:On}}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,On){var on=React.useRef(0);on.current+=1;var ft=React.useRef(an),Wn=[];Object.keys(an||{}).map(function(Mi){var vi;(an==null?void 0:an[Mi])!==((vi=ft.current)===null||vi===void 0?void 0:vi[Mi])&&Wn.push(Mi)}),ft.current=an;var ii=React.useRef([]);return Wn.length&&(ii.current=Wn),React.useDebugValue(on.current),React.useDebugValue(ii.current.join(", ")),On&&console.log("".concat(On,":"),on.current,ii.current),on.current}var Ae=null,De=null,Oe=Ie(28788),Ze=Ie(89490),qe=Ie(87075),Xe=Ie(92310),vt=Ie.n(Xe),gt=Ie(80547),kt=Ie(97938),at=Ie(48736),bt=xe.createContext({renderWithProps:!1}),ct=bt,Rt="RC_TABLE_KEY";function ut(an){return an==null?[]:Array.isArray(an)?an:[an]}function ot(an){var On=[],on={};return an.forEach(function(ft){for(var Wn=ft||{},ii=Wn.key,Mi=Wn.dataIndex,vi=ii||ut(Mi).join("-")||Rt;on[vi];)vi="".concat(vi,"_next");on[vi]=!0,On.push(vi)}),On}function ht(an){return an!=null}function yt(an){return typeof an=="number"&&!Number.isNaN(an)}function _t(an){return an&&(0,Oe.Z)(an)==="object"&&!Array.isArray(an)&&!xe.isValidElement(an)}function xt(an,On,on,ft,Wn,ii){var Mi=xe.useContext(ct),vi=le(),hi=(0,gt.Z)(function(){if(ht(ft))return[ft];var Nn=On==null||On===""?[]:Array.isArray(On)?On:[On],Yn=(0,kt.Z)(an,Nn),qn=Yn,Bn=void 0;if(Wn){var Jn=Wn(Yn,an,on);_t(Jn)?(qn=Jn.children,Bn=Jn.props,Mi.renderWithProps=!0):qn=Jn}return[qn,Bn]},[vi,an,ft,On,Wn,on],function(Nn,Yn){if(ii){var qn=(0,Se.Z)(Nn,2),Bn=qn[1],Jn=(0,Se.Z)(Yn,2),Ti=Jn[1];return ii(Ti,Bn)}return Mi.renderWithProps?!0:!(0,Ce.Z)(Nn,Yn,!0)});return hi}function Ut(an,On,on,ft){var Wn=an+On-1;return an<=ft&&Wn>=on}function Ht(an,On){return we(ve,function(on){var ft=Ut(an,On||1,on.hoverStartRow,on.hoverEndRow);return[ft,on.onHover]})}var dn=Ie(70425),Ft=function(On){var on=On.ellipsis,ft=On.rowType,Wn=On.children,ii,Mi=on===!0?{showTitle:!0}:on;return Mi&&(Mi.showTitle||ft==="header")&&(typeof Wn=="string"||typeof Wn=="number"?ii=Wn.toString():xe.isValidElement(Wn)&&typeof Wn.props.children=="string"&&(ii=Wn.props.children)),ii};function fn(an){var On,on,ft,Wn,ii,Mi,vi,hi,Nn=an.component,Yn=an.children,qn=an.ellipsis,Bn=an.scope,Jn=an.prefixCls,Ti=an.className,ci=an.align,ni=an.record,Pn=an.render,wi=an.dataIndex,ji=an.renderIndex,br=an.shouldCellUpdate,nr=an.index,Zr=an.rowType,zr=an.colSpan,Ur=an.rowSpan,to=an.fixLeft,Jr=an.fixRight,ko=an.firstFixLeft,rn=an.lastFixLeft,Kr=an.firstFixRight,Hr=an.lastFixRight,sr=an.appendNode,yr=an.additionalProps,fr=yr===void 0?{}:yr,co=an.isSticky,fo="".concat(Jn,"-cell"),Er=we(ve,["supportSticky","allColumnsFixedLeft","rowHoverable"]),no=Er.supportSticky,Qs=Er.allColumnsFixedLeft,us=Er.rowHoverable,Aa=xt(ni,wi,ji,Yn,Pn,br),oa=(0,Se.Z)(Aa,2),$i=oa[0],ns=oa[1],ss={},zs=typeof to=="number"&&no,hs=typeof Jr=="number"&&no;zs&&(ss.position="sticky",ss.left=to),hs&&(ss.position="sticky",ss.right=Jr);var Ms=(On=(on=(ft=ns==null?void 0:ns.colSpan)!==null&&ft!==void 0?ft:fr.colSpan)!==null&&on!==void 0?on:zr)!==null&&On!==void 0?On:1,li=(Wn=(ii=(Mi=ns==null?void 0:ns.rowSpan)!==null&&Mi!==void 0?Mi:fr.rowSpan)!==null&&ii!==void 0?ii:Ur)!==null&&Wn!==void 0?Wn:1,er=Ht(nr,li),Pr=(0,Se.Z)(er,2),jr=Pr[0],$r=Pr[1],jo=(0,dn.zX)(function(ga){var is;ni&&$r(nr,nr+li-1),fr==null||(is=fr.onMouseEnter)===null||is===void 0||is.call(fr,ga)}),tr=(0,dn.zX)(function(ga){var is;ni&&$r(-1,-1),fr==null||(is=fr.onMouseLeave)===null||is===void 0||is.call(fr,ga)});if(Ms===0||li===0)return null;var pa=(vi=fr.title)!==null&&vi!==void 0?vi:Ft({rowType:Zr,ellipsis:qn,children:$i}),ps=vt()(fo,Ti,(hi={},(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)(hi,"".concat(fo,"-fix-left"),zs&&no),"".concat(fo,"-fix-left-first"),ko&&no),"".concat(fo,"-fix-left-last"),rn&&no),"".concat(fo,"-fix-left-all"),rn&&Qs&&no),"".concat(fo,"-fix-right"),hs&&no),"".concat(fo,"-fix-right-first"),Kr&&no),"".concat(fo,"-fix-right-last"),Hr&&no),"".concat(fo,"-ellipsis"),qn),"".concat(fo,"-with-append"),sr),"".concat(fo,"-fix-sticky"),(zs||hs)&&co&&no),(0,qe.Z)(hi,"".concat(fo,"-row-hover"),!ns&&jr)),fr.className,ns==null?void 0:ns.className),cs={};ci&&(cs.textAlign=ci);var io=(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},ns==null?void 0:ns.style),ss),cs),fr.style),ws=$i;return(0,Oe.Z)(ws)==="object"&&!Array.isArray(ws)&&!xe.isValidElement(ws)&&(ws=null),qn&&(rn||Kr)&&(ws=xe.createElement("span",{className:"".concat(fo,"-content")},ws)),xe.createElement(Nn,(0,pe.Z)({},ns,fr,{className:ps,style:io,title:pa,scope:Bn,onMouseEnter:us?jo:void 0,onMouseLeave:us?tr:void 0,colSpan:Ms!==1?Ms:null,rowSpan:li!==1?li:null}),sr,ws)}var It=xe.memo(fn);function Xt(an,On,on,ft,Wn){var ii=on[an]||{},Mi=on[On]||{},vi,hi;ii.fixed==="left"?vi=ft.left[Wn==="rtl"?On:an]:Mi.fixed==="right"&&(hi=ft.right[Wn==="rtl"?an:On]);var Nn=!1,Yn=!1,qn=!1,Bn=!1,Jn=on[On+1],Ti=on[an-1],ci=Jn&&!Jn.fixed||Ti&&!Ti.fixed||on.every(function(br){return br.fixed==="left"});if(Wn==="rtl"){if(vi!==void 0){var ni=Ti&&Ti.fixed==="left";Bn=!ni&&ci}else if(hi!==void 0){var Pn=Jn&&Jn.fixed==="right";qn=!Pn&&ci}}else if(vi!==void 0){var wi=Jn&&Jn.fixed==="left";Nn=!wi&&ci}else if(hi!==void 0){var ji=Ti&&Ti.fixed==="right";Yn=!ji&&ci}return{fixLeft:vi,fixRight:hi,lastFixLeft:Nn,firstFixRight:Yn,lastFixRight:qn,firstFixLeft:Bn,isSticky:ft.isSticky}}var tn=xe.createContext({}),lt=tn;function He(an){var On=an.className,on=an.index,ft=an.children,Wn=an.colSpan,ii=Wn===void 0?1:Wn,Mi=an.rowSpan,vi=an.align,hi=we(ve,["prefixCls","direction"]),Nn=hi.prefixCls,Yn=hi.direction,qn=xe.useContext(lt),Bn=qn.scrollColumnIndex,Jn=qn.stickyOffsets,Ti=qn.flattenColumns,ci=on+ii-1,ni=ci+1===Bn?ii+1:ii,Pn=Xt(on,on+ni-1,Ti,Jn,Yn);return xe.createElement(It,(0,pe.Z)({className:On,index:on,component:"td",prefixCls:Nn,record:null,dataIndex:null,align:vi,colSpan:ni,rowSpan:Mi,render:function(){return ft}},Pn))}var ze=Ie(39224),it=["children"];function dt(an){var On=an.children,on=(0,ze.Z)(an,it);return xe.createElement("tr",on,On)}function tt(an){var On=an.children;return On}tt.Row=dt,tt.Cell=He;var Ke=tt;function je(an){var On=an.children,on=an.stickyOffsets,ft=an.flattenColumns,Wn=we(ve,"prefixCls"),ii=ft.length-1,Mi=ft[ii],vi=xe.useMemo(function(){return{stickyOffsets:on,flattenColumns:ft,scrollColumnIndex:Mi!=null&&Mi.scrollbar?ii:null}},[Mi,ft,ii,on]);return xe.createElement(lt.Provider,{value:vi},xe.createElement("tfoot",{className:"".concat(Wn,"-summary")},On))}var Re=ae(je),Qe=Ke,Ve=Ie(29301),We=Ie(24514),pt=Ie(75152),Mt=Ie(26112);function Qt(an,On,on,ft,Wn,ii,Mi){an.push({record:On,indent:on,index:Mi});var vi=ii(On),hi=Wn==null?void 0:Wn.has(vi);if(On&&Array.isArray(On[ft])&&hi)for(var Nn=0;Nn<On[ft].length;Nn+=1)Qt(an,On[ft][Nn],on+1,ft,Wn,ii,Nn)}function qt(an,On,on,ft){var Wn=xe.useMemo(function(){if(on!=null&&on.size){for(var ii=[],Mi=0;Mi<(an==null?void 0:an.length);Mi+=1){var vi=an[Mi];Qt(ii,vi,0,On,on,ft,Mi)}return ii}return an==null?void 0:an.map(function(hi,Nn){return{record:hi,indent:0,index:Nn}})},[an,On,on,ft]);return Wn}function Bt(an,On,on,ft){var Wn=we(ve,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),ii=Wn.flattenColumns,Mi=Wn.expandableType,vi=Wn.expandedKeys,hi=Wn.childrenColumnName,Nn=Wn.onTriggerExpand,Yn=Wn.rowExpandable,qn=Wn.onRow,Bn=Wn.expandRowByClick,Jn=Wn.rowClassName,Ti=Mi==="nest",ci=Mi==="row"&&(!Yn||Yn(an)),ni=ci||Ti,Pn=vi&&vi.has(On),wi=hi&&an&&an[hi],ji=(0,dn.zX)(Nn),br=qn==null?void 0:qn(an,on),nr=br==null?void 0:br.onClick,Zr=function(Jr){Bn&&ni&&Nn(an,Jr);for(var ko=arguments.length,rn=new Array(ko>1?ko-1:0),Kr=1;Kr<ko;Kr++)rn[Kr-1]=arguments[Kr];nr==null||nr.apply(void 0,[Jr].concat(rn))},zr;typeof Jn=="string"?zr=Jn:typeof Jn=="function"&&(zr=Jn(an,on,ft));var Ur=ot(ii);return(0,Ze.Z)((0,Ze.Z)({},Wn),{},{columnsKey:Ur,nestExpandable:Ti,expanded:Pn,hasNestChildren:wi,record:an,onTriggerExpand:ji,rowSupportExpand:ci,expandable:ni,rowProps:(0,Ze.Z)((0,Ze.Z)({},br),{},{className:vt()(zr,br==null?void 0:br.className),onClick:Zr})})}function $t(an){var On=an.prefixCls,on=an.children,ft=an.component,Wn=an.cellComponent,ii=an.className,Mi=an.expanded,vi=an.colSpan,hi=an.isEmpty,Nn=we(ve,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Yn=Nn.scrollbarSize,qn=Nn.fixHeader,Bn=Nn.fixColumn,Jn=Nn.componentWidth,Ti=Nn.horizonScroll,ci=on;return(hi?Ti&&Jn:Bn)&&(ci=xe.createElement("div",{style:{width:Jn-(qn&&!hi?Yn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(On,"-expanded-row-fixed")},ci)),xe.createElement(ft,{className:ii,style:{display:Mi?null:"none"}},xe.createElement(It,{component:Wn,prefixCls:On,colSpan:vi},ci))}var Cn=$t;function mn(an){var On=an.prefixCls,on=an.record,ft=an.onExpand,Wn=an.expanded,ii=an.expandable,Mi="".concat(On,"-row-expand-icon");if(!ii)return xe.createElement("span",{className:vt()(Mi,"".concat(On,"-row-spaced"))});var vi=function(Nn){ft(on,Nn),Nn.stopPropagation()};return xe.createElement("span",{className:vt()(Mi,(0,qe.Z)((0,qe.Z)({},"".concat(On,"-row-expanded"),Wn),"".concat(On,"-row-collapsed"),!Wn)),onClick:vi})}function un(an,On,on){var ft=[];function Wn(ii){(ii||[]).forEach(function(Mi,vi){ft.push(On(Mi,vi)),Wn(Mi[on])})}return Wn(an),ft}function Kn(an,On,on,ft){return typeof an=="string"?an:typeof an=="function"?an(On,on,ft):""}function pn(an,On,on,ft,Wn){var ii=an.record,Mi=an.prefixCls,vi=an.columnsKey,hi=an.fixedInfoList,Nn=an.expandIconColumnIndex,Yn=an.nestExpandable,qn=an.indentSize,Bn=an.expandIcon,Jn=an.expanded,Ti=an.hasNestChildren,ci=an.onTriggerExpand,ni=vi[on],Pn=hi[on],wi;on===(Nn||0)&&Yn&&(wi=xe.createElement(xe.Fragment,null,xe.createElement("span",{style:{paddingLeft:"".concat(qn*ft,"px")},className:"".concat(Mi,"-row-indent indent-level-").concat(ft)}),Bn({prefixCls:Mi,expanded:Jn,expandable:Ti,record:ii,onExpand:ci})));var ji;return On.onCell&&(ji=On.onCell(ii,Wn)),{key:ni,fixedInfo:Pn,appendCellNode:wi,additionalCellProps:ji||{}}}function Hn(an){var On=an.className,on=an.style,ft=an.record,Wn=an.index,ii=an.renderIndex,Mi=an.rowKey,vi=an.indent,hi=vi===void 0?0:vi,Nn=an.rowComponent,Yn=an.cellComponent,qn=an.scopeCellComponent,Bn=Bt(ft,Mi,Wn,hi),Jn=Bn.prefixCls,Ti=Bn.flattenColumns,ci=Bn.expandedRowClassName,ni=Bn.expandedRowRender,Pn=Bn.rowProps,wi=Bn.expanded,ji=Bn.rowSupportExpand,br=xe.useRef(!1);br.current||(br.current=wi);var nr=Kn(ci,ft,Wn,hi),Zr=xe.createElement(Nn,(0,pe.Z)({},Pn,{"data-row-key":Mi,className:vt()(On,"".concat(Jn,"-row"),"".concat(Jn,"-row-level-").concat(hi),Pn==null?void 0:Pn.className,(0,qe.Z)({},nr,hi>=1)),style:(0,Ze.Z)((0,Ze.Z)({},on),Pn==null?void 0:Pn.style)}),Ti.map(function(to,Jr){var ko=to.render,rn=to.dataIndex,Kr=to.className,Hr=pn(Bn,to,Jr,hi,Wn),sr=Hr.key,yr=Hr.fixedInfo,fr=Hr.appendCellNode,co=Hr.additionalCellProps;return xe.createElement(It,(0,pe.Z)({className:Kr,ellipsis:to.ellipsis,align:to.align,scope:to.rowScope,component:to.rowScope?qn:Yn,prefixCls:Jn,key:sr,record:ft,index:Wn,renderIndex:ii,dataIndex:rn,render:ko,shouldCellUpdate:to.shouldCellUpdate},yr,{appendNode:fr,additionalProps:co}))})),zr;if(ji&&(br.current||wi)){var Ur=ni(ft,Wn,hi+1,wi);zr=xe.createElement(Cn,{expanded:wi,className:vt()("".concat(Jn,"-expanded-row"),"".concat(Jn,"-expanded-row-level-").concat(hi+1),nr),prefixCls:Jn,component:Nn,cellComponent:Yn,colSpan:Ti.length,isEmpty:!1},Ur)}return xe.createElement(xe.Fragment,null,Zr,zr)}var Qn=ae(Hn);function Ai(an){var On=an.columnKey,on=an.onColumnResize,ft=xe.useRef();return(0,Le.Z)(function(){ft.current&&on(On,ft.current.offsetWidth)},[]),xe.createElement(Ve.Z,{data:On},xe.createElement("td",{ref:ft,style:{padding:0,border:0,height:0}},xe.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var ei=Ie(29194);function ki(an){var On=an.prefixCls,on=an.columnsKey,ft=an.onColumnResize,Wn=xe.useRef(null);return xe.createElement("tr",{"aria-hidden":"true",className:"".concat(On,"-measure-row"),style:{height:0,fontSize:0},ref:Wn},xe.createElement(Ve.Z.Collection,{onBatchResize:function(Mi){(0,ei.Z)(Wn.current)&&Mi.forEach(function(vi){var hi=vi.data,Nn=vi.size;ft(hi,Nn.offsetWidth)})}},on.map(function(ii){return xe.createElement(Ai,{key:ii,columnKey:ii,onColumnResize:ft})})))}function Wi(an){var On=an.data,on=an.measureColumnWidth,ft=we(ve,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Wn=ft.prefixCls,ii=ft.getComponent,Mi=ft.onColumnResize,vi=ft.flattenColumns,hi=ft.getRowKey,Nn=ft.expandedKeys,Yn=ft.childrenColumnName,qn=ft.emptyNode,Bn=qt(On,Yn,Nn,hi),Jn=xe.useRef({renderWithProps:!1}),Ti=ii(["body","wrapper"],"tbody"),ci=ii(["body","row"],"tr"),ni=ii(["body","cell"],"td"),Pn=ii(["body","cell"],"th"),wi;On.length?wi=Bn.map(function(br,nr){var Zr=br.record,zr=br.indent,Ur=br.index,to=hi(Zr,nr);return xe.createElement(Qn,{key:to,rowKey:to,record:Zr,index:nr,renderIndex:Ur,rowComponent:ci,cellComponent:ni,scopeCellComponent:Pn,indent:zr})}):wi=xe.createElement(Cn,{expanded:!0,className:"".concat(Wn,"-placeholder"),prefixCls:Wn,component:ci,cellComponent:ni,colSpan:vi.length,isEmpty:!0},qn);var ji=ot(vi);return xe.createElement(ct.Provider,{value:Jn.current},xe.createElement(Ti,{className:"".concat(Wn,"-tbody")},on&&xe.createElement(ki,{prefixCls:Wn,columnsKey:ji,onColumnResize:Mi}),wi))}var Ui=ae(Wi),rr=Ie(54451),vr=["columnType"];function wr(an){for(var On=an.colWidths,on=an.columns,ft=an.columCount,Wn=we(ve,["tableLayout"]),ii=Wn.tableLayout,Mi=[],vi=ft||on.length,hi=!1,Nn=vi-1;Nn>=0;Nn-=1){var Yn=On[Nn],qn=on&&on[Nn],Bn=void 0,Jn=void 0;if(qn&&(Bn=qn[rr.v],ii==="auto"&&(Jn=qn.minWidth)),Yn||Jn||Bn||hi){var Ti=Bn||{},ci=Ti.columnType,ni=(0,ze.Z)(Ti,vr);Mi.unshift(xe.createElement("col",(0,pe.Z)({key:Nn,style:{width:Yn,minWidth:Jn}},ni))),hi=!0}}return xe.createElement("colgroup",null,Mi)}var Oi=wr,Zi=Ie(62730),pr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function et(an,On){return(0,xe.useMemo)(function(){for(var on=[],ft=0;ft<On;ft+=1){var Wn=an[ft];if(Wn!==void 0)on[ft]=Wn;else return null}return on},[an.join("_"),On])}var ai=xe.forwardRef(function(an,On){var on=an.className,ft=an.noData,Wn=an.columns,ii=an.flattenColumns,Mi=an.colWidths,vi=an.columCount,hi=an.stickyOffsets,Nn=an.direction,Yn=an.fixHeader,qn=an.stickyTopOffset,Bn=an.stickyBottomOffset,Jn=an.stickyClassName,Ti=an.onScroll,ci=an.maxContentScroll,ni=an.children,Pn=(0,ze.Z)(an,pr),wi=we(ve,["prefixCls","scrollbarSize","isSticky","getComponent"]),ji=wi.prefixCls,br=wi.scrollbarSize,nr=wi.isSticky,Zr=wi.getComponent,zr=Zr(["header","table"],"table"),Ur=nr&&!Yn?0:br,to=xe.useRef(null),Jr=xe.useCallback(function(co){(0,de.mH)(On,co),(0,de.mH)(to,co)},[]);xe.useEffect(function(){var co;function fo(Er){var no=Er,Qs=no.currentTarget,us=no.deltaX;us&&(Ti({currentTarget:Qs,scrollLeft:Qs.scrollLeft+us}),Er.preventDefault())}return(co=to.current)===null||co===void 0||co.addEventListener("wheel",fo,{passive:!1}),function(){var Er;(Er=to.current)===null||Er===void 0||Er.removeEventListener("wheel",fo)}},[]);var ko=xe.useMemo(function(){return ii.every(function(co){return co.width})},[ii]),rn=ii[ii.length-1],Kr={fixed:rn?rn.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(ji,"-cell-scrollbar")}}},Hr=(0,xe.useMemo)(function(){return Ur?[].concat((0,Zi.Z)(Wn),[Kr]):Wn},[Ur,Wn]),sr=(0,xe.useMemo)(function(){return Ur?[].concat((0,Zi.Z)(ii),[Kr]):ii},[Ur,ii]),yr=(0,xe.useMemo)(function(){var co=hi.right,fo=hi.left;return(0,Ze.Z)((0,Ze.Z)({},hi),{},{left:Nn==="rtl"?[].concat((0,Zi.Z)(fo.map(function(Er){return Er+Ur})),[0]):fo,right:Nn==="rtl"?co:[].concat((0,Zi.Z)(co.map(function(Er){return Er+Ur})),[0]),isSticky:nr})},[Ur,hi,nr]),fr=et(Mi,vi);return xe.createElement("div",{style:(0,Ze.Z)({overflow:"hidden"},nr?{top:qn,bottom:Bn}:{}),ref:Jr,className:vt()(on,(0,qe.Z)({},Jn,!!Jn))},xe.createElement(zr,{style:{tableLayout:"fixed",visibility:ft||fr?null:"hidden"}},(!ft||!ci||ko)&&xe.createElement(Oi,{colWidths:fr?[].concat((0,Zi.Z)(fr),[Ur]):[],columCount:vi+1,columns:sr}),ni((0,Ze.Z)((0,Ze.Z)({},Pn),{},{stickyOffsets:yr,columns:Hr,flattenColumns:sr}))))}),ti=xe.memo(ai),Ii=function(On){var on=On.cells,ft=On.stickyOffsets,Wn=On.flattenColumns,ii=On.rowComponent,Mi=On.cellComponent,vi=On.onHeaderRow,hi=On.index,Nn=we(ve,["prefixCls","direction"]),Yn=Nn.prefixCls,qn=Nn.direction,Bn;vi&&(Bn=vi(on.map(function(Ti){return Ti.column}),hi));var Jn=ot(on.map(function(Ti){return Ti.column}));return xe.createElement(ii,Bn,on.map(function(Ti,ci){var ni=Ti.column,Pn=Xt(Ti.colStart,Ti.colEnd,Wn,ft,qn),wi;return ni&&ni.onHeaderCell&&(wi=Ti.column.onHeaderCell(ni)),xe.createElement(It,(0,pe.Z)({},Ti,{scope:ni.title?Ti.colSpan>1?"colgroup":"col":null,ellipsis:ni.ellipsis,align:ni.align,component:Mi,prefixCls:Yn,key:Jn[ci]},Pn,{additionalProps:wi,rowType:"header"}))}))},gr=Ii;function hr(an){var On=[];function on(Mi,vi){var hi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;On[hi]=On[hi]||[];var Nn=vi,Yn=Mi.filter(Boolean).map(function(qn){var Bn={key:qn.key,className:qn.className||"",children:qn.title,column:qn,colStart:Nn},Jn=1,Ti=qn.children;return Ti&&Ti.length>0&&(Jn=on(Ti,Nn,hi+1).reduce(function(ci,ni){return ci+ni},0),Bn.hasSubColumns=!0),"colSpan"in qn&&(Jn=qn.colSpan),"rowSpan"in qn&&(Bn.rowSpan=qn.rowSpan),Bn.colSpan=Jn,Bn.colEnd=Bn.colStart+Jn-1,On[hi].push(Bn),Nn+=Jn,Jn});return Yn}on(an,0);for(var ft=On.length,Wn=function(vi){On[vi].forEach(function(hi){!("rowSpan"in hi)&&!hi.hasSubColumns&&(hi.rowSpan=ft-vi)})},ii=0;ii<ft;ii+=1)Wn(ii);return On}var or=function(On){var on=On.stickyOffsets,ft=On.columns,Wn=On.flattenColumns,ii=On.onHeaderRow,Mi=we(ve,["prefixCls","getComponent"]),vi=Mi.prefixCls,hi=Mi.getComponent,Nn=xe.useMemo(function(){return hr(ft)},[ft]),Yn=hi(["header","wrapper"],"thead"),qn=hi(["header","row"],"tr"),Bn=hi(["header","cell"],"th");return xe.createElement(Yn,{className:"".concat(vi,"-thead")},Nn.map(function(Jn,Ti){var ci=xe.createElement(gr,{key:Ti,flattenColumns:Wn,cells:Jn,stickyOffsets:on,rowComponent:qn,cellComponent:Bn,onHeaderRow:ii,index:Ti});return ci}))},po=ae(or),$n=Ie(97347);function Ue(an,On,on){var ft=(0,rr.g)(an),Wn=ft.expandIcon,ii=ft.expandedRowKeys,Mi=ft.defaultExpandedRowKeys,vi=ft.defaultExpandAllRows,hi=ft.expandedRowRender,Nn=ft.onExpand,Yn=ft.onExpandedRowsChange,qn=ft.childrenColumnName,Bn=Wn||mn,Jn=qn||"children",Ti=xe.useMemo(function(){return hi?"row":an.expandable&&an.internalHooks===ke.R&&an.expandable.__PARENT_RENDER_ICON__||On.some(function(nr){return nr&&(0,Oe.Z)(nr)==="object"&&nr[Jn]})?"nest":!1},[!!hi,On]),ci=xe.useState(function(){return Mi||(vi?un(On,on,Jn):[])}),ni=(0,Se.Z)(ci,2),Pn=ni[0],wi=ni[1],ji=xe.useMemo(function(){return new Set(ii||Pn||[])},[ii,Pn]),br=xe.useCallback(function(nr){var Zr=on(nr,On.indexOf(nr)),zr,Ur=ji.has(Zr);Ur?(ji.delete(Zr),zr=(0,Zi.Z)(ji)):zr=[].concat((0,Zi.Z)(ji),[Zr]),wi(zr),Nn&&Nn(!Ur,nr),Yn&&Yn(zr)},[on,ji,On,Nn,Yn]);return[ft,Ti,ji,Bn,Jn,br]}function Je(an,On,on){var ft=an.map(function(Wn,ii){return Xt(ii,ii,an,On,on)});return(0,gt.Z)(function(){return ft},[ft],function(Wn,ii){return!(0,Ce.Z)(Wn,ii)})}function nt(an){var On=(0,xe.useRef)(an),on=(0,xe.useState)({}),ft=(0,Se.Z)(on,2),Wn=ft[1],ii=(0,xe.useRef)(null),Mi=(0,xe.useRef)([]);function vi(hi){Mi.current.push(hi);var Nn=Promise.resolve();ii.current=Nn,Nn.then(function(){if(ii.current===Nn){var Yn=Mi.current,qn=On.current;Mi.current=[],Yn.forEach(function(Bn){On.current=Bn(On.current)}),ii.current=null,qn!==On.current&&Wn({})}})}return(0,xe.useEffect)(function(){return function(){ii.current=null}},[]),[On.current,vi]}function Pt(an){var On=(0,xe.useRef)(an||null),on=(0,xe.useRef)();function ft(){window.clearTimeout(on.current)}function Wn(Mi){On.current=Mi,ft(),on.current=window.setTimeout(function(){On.current=null,on.current=void 0},100)}function ii(){return On.current}return(0,xe.useEffect)(function(){return ft},[]),[Wn,ii]}function Nt(){var an=xe.useState(-1),On=(0,Se.Z)(an,2),on=On[0],ft=On[1],Wn=xe.useState(-1),ii=(0,Se.Z)(Wn,2),Mi=ii[0],vi=ii[1],hi=xe.useCallback(function(Nn,Yn){ft(Nn),vi(Yn)},[]);return[on,Mi,hi]}var sn=Ie(47273),Kt=(0,sn.Z)()?window:null;function _n(an,On){var on=(0,Oe.Z)(an)==="object"?an:{},ft=on.offsetHeader,Wn=ft===void 0?0:ft,ii=on.offsetSummary,Mi=ii===void 0?0:ii,vi=on.offsetScroll,hi=vi===void 0?0:vi,Nn=on.getContainer,Yn=Nn===void 0?function(){return Kt}:Nn,qn=Yn()||Kt,Bn=!!an;return xe.useMemo(function(){return{isSticky:Bn,stickyClassName:Bn?"".concat(On,"-sticky-holder"):"",offsetHeader:Wn,offsetSummary:Mi,offsetScroll:hi,container:qn}},[Bn,hi,Wn,Mi,On,qn])}function zn(an,On,on){var ft=(0,xe.useMemo)(function(){var Wn=On.length,ii=function(Nn,Yn,qn){for(var Bn=[],Jn=0,Ti=Nn;Ti!==Yn;Ti+=qn)Bn.push(Jn),On[Ti].fixed&&(Jn+=an[Ti]||0);return Bn},Mi=ii(0,Wn,1),vi=ii(Wn-1,-1,-1).reverse();return on==="rtl"?{left:vi,right:Mi}:{left:Mi,right:vi}},[an,On,on]);return ft}var _i=zn;function Bi(an){var On=an.className,on=an.children;return xe.createElement("div",{className:On},on)}var wt=Bi,zt=Ie(8224),En=Ie(16089),bn=Ie(76846);function Yt(an){var On=(0,bn.bn)(an),on=On.getBoundingClientRect(),ft=document.documentElement;return{left:on.left+(window.pageXOffset||ft.scrollLeft)-(ft.clientLeft||document.body.clientLeft||0),top:on.top+(window.pageYOffset||ft.scrollTop)-(ft.clientTop||document.body.clientTop||0)}}var gn=function(On,on){var ft,Wn,ii=On.scrollBodyRef,Mi=On.onScroll,vi=On.offsetScroll,hi=On.container,Nn=On.direction,Yn=we(ve,"prefixCls"),qn=((ft=ii.current)===null||ft===void 0?void 0:ft.scrollWidth)||0,Bn=((Wn=ii.current)===null||Wn===void 0?void 0:Wn.clientWidth)||0,Jn=qn&&Bn*(Bn/qn),Ti=xe.useRef(),ci=nt({scrollLeft:0,isHiddenScrollBar:!0}),ni=(0,Se.Z)(ci,2),Pn=ni[0],wi=ni[1],ji=xe.useRef({delta:0,x:0}),br=xe.useState(!1),nr=(0,Se.Z)(br,2),Zr=nr[0],zr=nr[1],Ur=xe.useRef(null);xe.useEffect(function(){return function(){En.Z.cancel(Ur.current)}},[]);var to=function(){zr(!1)},Jr=function(sr){sr.persist(),ji.current.delta=sr.pageX-Pn.scrollLeft,ji.current.x=0,zr(!0),sr.preventDefault()},ko=function(sr){var yr,fr=sr||((yr=window)===null||yr===void 0?void 0:yr.event),co=fr.buttons;if(!Zr||co===0){Zr&&zr(!1);return}var fo=ji.current.x+sr.pageX-ji.current.x-ji.current.delta,Er=Nn==="rtl";fo=Math.max(Er?Jn-Bn:0,Math.min(Er?0:Bn-Jn,fo));var no=!Er||Math.abs(fo)+Math.abs(Jn)<Bn;no&&(Mi({scrollLeft:fo/Bn*(qn+2)}),ji.current.x=sr.pageX)},rn=function(){En.Z.cancel(Ur.current),Ur.current=(0,En.Z)(function(){if(ii.current){var sr=Yt(ii.current).top,yr=sr+ii.current.offsetHeight,fr=hi===window?document.documentElement.scrollTop+window.innerHeight:Yt(hi).top+hi.clientHeight;yr-(0,pt.Z)()<=fr||sr>=fr-vi?wi(function(co){return(0,Ze.Z)((0,Ze.Z)({},co),{},{isHiddenScrollBar:!0})}):wi(function(co){return(0,Ze.Z)((0,Ze.Z)({},co),{},{isHiddenScrollBar:!1})})}})},Kr=function(sr){wi(function(yr){return(0,Ze.Z)((0,Ze.Z)({},yr),{},{scrollLeft:sr/qn*Bn||0})})};return xe.useImperativeHandle(on,function(){return{setScrollLeft:Kr,checkScrollBarVisible:rn}}),xe.useEffect(function(){var Hr=(0,zt.Z)(document.body,"mouseup",to,!1),sr=(0,zt.Z)(document.body,"mousemove",ko,!1);return rn(),function(){Hr.remove(),sr.remove()}},[Jn,Zr]),xe.useEffect(function(){if(ii.current){for(var Hr=[],sr=(0,bn.bn)(ii.current);sr;)Hr.push(sr),sr=sr.parentElement;return Hr.forEach(function(yr){return yr.addEventListener("scroll",rn,!1)}),window.addEventListener("resize",rn,!1),window.addEventListener("scroll",rn,!1),hi.addEventListener("scroll",rn,!1),function(){Hr.forEach(function(yr){return yr.removeEventListener("scroll",rn)}),window.removeEventListener("resize",rn),window.removeEventListener("scroll",rn),hi.removeEventListener("scroll",rn)}}},[hi]),xe.useEffect(function(){Pn.isHiddenScrollBar||wi(function(Hr){var sr=ii.current;return sr?(0,Ze.Z)((0,Ze.Z)({},Hr),{},{scrollLeft:sr.scrollLeft/sr.scrollWidth*sr.clientWidth}):Hr})},[Pn.isHiddenScrollBar]),qn<=Bn||!Jn||Pn.isHiddenScrollBar?null:xe.createElement("div",{style:{height:(0,pt.Z)(),width:Bn,bottom:vi},className:"".concat(Yn,"-sticky-scroll")},xe.createElement("div",{onMouseDown:Jr,ref:Ti,className:vt()("".concat(Yn,"-sticky-scroll-bar"),(0,qe.Z)({},"".concat(Yn,"-sticky-scroll-bar-active"),Zr)),style:{width:"".concat(Jn,"px"),transform:"translate3d(".concat(Pn.scrollLeft,"px, 0, 0)")}}))},yn=xe.forwardRef(gn);function vn(an){return null}var jn=vn;function Un(an){return null}var Gn=Un,An="rc-table",Li=[],xi={};function bi(){return"No Data"}function hn(an,On){var on=(0,Ze.Z)({rowKey:"key",prefixCls:An,emptyText:bi},an),ft=on.prefixCls,Wn=on.className,ii=on.rowClassName,Mi=on.style,vi=on.data,hi=on.rowKey,Nn=on.scroll,Yn=on.tableLayout,qn=on.direction,Bn=on.title,Jn=on.footer,Ti=on.summary,ci=on.caption,ni=on.id,Pn=on.showHeader,wi=on.components,ji=on.emptyText,br=on.onRow,nr=on.onHeaderRow,Zr=on.onScroll,zr=on.internalHooks,Ur=on.transformColumns,to=on.internalRefs,Jr=on.tailor,ko=on.getContainerWidth,rn=on.sticky,Kr=on.rowHoverable,Hr=Kr===void 0?!0:Kr,sr=vi||Li,yr=!!sr.length,fr=zr===ke.R,co=xe.useCallback(function(mo,Dr){return(0,kt.Z)(wi,mo)||Dr},[wi]),fo=xe.useMemo(function(){return typeof hi=="function"?hi:function(mo){var Dr=mo&&mo[hi];return Dr}},[hi]),Er=co(["body"]),no=Nt(),Qs=(0,Se.Z)(no,3),us=Qs[0],Aa=Qs[1],oa=Qs[2],$i=Ue(on,sr,fo),ns=(0,Se.Z)($i,6),ss=ns[0],zs=ns[1],hs=ns[2],Ms=ns[3],li=ns[4],er=ns[5],Pr=Nn==null?void 0:Nn.x,jr=xe.useState(0),$r=(0,Se.Z)(jr,2),jo=$r[0],tr=$r[1],pa=(0,$n.Z)((0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},on),ss),{},{expandable:!!ss.expandedRowRender,columnTitle:ss.columnTitle,expandedKeys:hs,getRowKey:fo,onTriggerExpand:er,expandIcon:Ms,expandIconColumnIndex:ss.expandIconColumnIndex,direction:qn,scrollWidth:fr&&Jr&&typeof Pr=="number"?Pr:null,clientWidth:jo}),fr?Ur:null),ps=(0,Se.Z)(pa,4),cs=ps[0],io=ps[1],ws=ps[2],ga=ps[3],is=ws!=null?ws:Pr,Pa=xe.useMemo(function(){return{columns:cs,flattenColumns:io}},[cs,io]),Sa=xe.useRef(),Na=xe.useRef(),_s=xe.useRef(),nl=xe.useRef();xe.useImperativeHandle(On,function(){return{nativeElement:Sa.current,scrollTo:function(Dr){var Do;if(_s.current instanceof HTMLElement){var ya=Dr.index,ls=Dr.top,Wu=Dr.key;if(yt(ls)){var cu;(cu=_s.current)===null||cu===void 0||cu.scrollTo({top:ls})}else{var Mu,Ya=Wu!=null?Wu:fo(sr[ya]);(Mu=_s.current.querySelector('[data-row-key="'.concat(Ya,'"]')))===null||Mu===void 0||Mu.scrollIntoView()}}else(Do=_s.current)!==null&&Do!==void 0&&Do.scrollTo&&_s.current.scrollTo(Dr)}}});var Hu=xe.useRef(),fl=xe.useState(!1),Ol=(0,Se.Z)(fl,2),il=Ol[0],Pu=Ol[1],eh=xe.useState(!1),lu=(0,Se.Z)(eh,2),As=lu[0],Gu=lu[1],th=xe.useState(new Map),uu=(0,Se.Z)(th,2),hu=uu[0],ua=uu[1],ma=ot(io),Os=ma.map(function(mo){return hu.get(mo)}),$s=xe.useMemo(function(){return Os},[Os.join("_")]),Il=_i($s,io,qn),Ca=Nn&&ht(Nn.y),Yo=Nn&&ht(is)||!!ss.fixed,zo=Yo&&io.some(function(mo){var Dr=mo.fixed;return Dr}),wo=xe.useRef(),Us=_n(rn,ft),Fi=Us.isSticky,Hs=Us.offsetHeader,Zt=Us.offsetSummary,In=Us.offsetScroll,pl=Us.stickyClassName,Kl=Us.container,Ns=xe.useMemo(function(){return Ti==null?void 0:Ti(sr)},[Ti,sr]),sa=(Ca||Fi)&&xe.isValidElement(Ns)&&Ns.type===Ke&&Ns.props.fixed,rl,bl,Cu;Ca&&(bl={overflowY:yr?"scroll":"auto",maxHeight:Nn.y}),Yo&&(rl={overflowX:"auto"},Ca||(bl={overflowY:"hidden"}),Cu={width:is===!0?"auto":is,minWidth:"100%"});var gs=xe.useCallback(function(mo,Dr){ua(function(Do){if(Do.get(mo)!==Dr){var ya=new Map(Do);return ya.set(mo,Dr),ya}return Do})},[]),Fr=Pt(null),va=(0,Se.Z)(Fr,2),Is=va[0],ms=va[1];function ro(mo,Dr){Dr&&(typeof Dr=="function"?Dr(mo):Dr.scrollLeft!==mo&&(Dr.scrollLeft=mo,Dr.scrollLeft!==mo&&setTimeout(function(){Dr.scrollLeft=mo},0)))}var bs=(0,Be.Z)(function(mo){var Dr=mo.currentTarget,Do=mo.scrollLeft,ya=qn==="rtl",ls=typeof Do=="number"?Do:Dr.scrollLeft,Wu=Dr||xi;if(!ms()||ms()===Wu){var cu;Is(Wu),ro(ls,Na.current),ro(ls,_s.current),ro(ls,Hu.current),ro(ls,(cu=wo.current)===null||cu===void 0?void 0:cu.setScrollLeft)}var Mu=Dr||Na.current;if(Mu){var Ya=fr&&Jr&&typeof is=="number"?is:Mu.scrollWidth,Jl=Mu.clientWidth;if(Ya===Jl){Pu(!1),Gu(!1);return}ya?(Pu(-ls<Ya-Jl),Gu(-ls>0)):(Pu(ls>0),Gu(ls<Ya-Jl))}}),Da=(0,Be.Z)(function(mo){bs(mo),Zr==null||Zr(mo)}),Xo=function(){if(Yo&&_s.current){var Dr;bs({currentTarget:(0,bn.bn)(_s.current),scrollLeft:(Dr=_s.current)===null||Dr===void 0?void 0:Dr.scrollLeft})}else Pu(!1),Gu(!1)},Ka=function(Dr){var Do,ya=Dr.width;(Do=wo.current)===null||Do===void 0||Do.checkScrollBarVisible();var ls=Sa.current?Sa.current.offsetWidth:ya;fr&&ko&&Sa.current&&(ls=ko(Sa.current,ls)||ls),ls!==jo&&(Xo(),tr(ls))},ea=xe.useRef(!1);xe.useEffect(function(){ea.current&&Xo()},[Yo,vi,cs.length]),xe.useEffect(function(){ea.current=!0},[]);var Eu=xe.useState(0),Io=(0,Se.Z)(Eu,2),ha=Io[0],Ro=Io[1],es=xe.useState(!0),Jo=(0,Se.Z)(es,2),ds=Jo[0],No=Jo[1];(0,Le.Z)(function(){(!Jr||!fr)&&(_s.current instanceof Element?Ro((0,pt.o)(_s.current).width):Ro((0,pt.o)(nl.current).width)),No((0,We.G)("position","sticky"))},[]),xe.useEffect(function(){fr&&to&&(to.body.current=_s.current)});var nh=xe.useCallback(function(mo){return xe.createElement(xe.Fragment,null,xe.createElement(po,mo),sa==="top"&&xe.createElement(Re,mo,Ns))},[sa,Ns]),Nr=xe.useCallback(function(mo){return xe.createElement(Re,mo,Ns)},[Ns]),vc=co(["table"],"table"),bo=xe.useMemo(function(){return Yn||(zo?is==="max-content"?"auto":"fixed":Ca||Fi||io.some(function(mo){var Dr=mo.ellipsis;return Dr})?"fixed":"auto")},[Ca,zo,io,Yn,Fi]),Gh,Lu={colWidths:$s,columCount:io.length,stickyOffsets:Il,onHeaderRow:nr,fixHeader:Ca,scroll:Nn},ih=xe.useMemo(function(){return yr?null:typeof ji=="function"?ji():ji},[yr,ji]),Wh=xe.createElement(Ui,{data:sr,measureColumnWidth:Ca||Yo||Fi}),Ph=xe.createElement(Oi,{colWidths:io.map(function(mo){var Dr=mo.width;return Dr}),columns:io}),Yl=ci!=null?xe.createElement("caption",{className:"".concat(ft,"-caption")},ci):void 0,Yr=(0,Mt.Z)(on,{data:!0}),Ho=(0,Mt.Z)(on,{aria:!0});if(Ca||Fi){var Pl;typeof Er=="function"?(Pl=Er(sr,{scrollbarSize:ha,ref:_s,onScroll:bs}),Lu.colWidths=io.map(function(mo,Dr){var Do=mo.width,ya=Dr===io.length-1?Do-ha:Do;return typeof ya=="number"&&!Number.isNaN(ya)?ya:0})):Pl=xe.createElement("div",{style:(0,Ze.Z)((0,Ze.Z)({},rl),bl),onScroll:Da,ref:_s,className:vt()("".concat(ft,"-body"))},xe.createElement(vc,(0,pe.Z)({style:(0,Ze.Z)((0,Ze.Z)({},Cu),{},{tableLayout:bo})},Ho),Yl,Ph,Wh,!sa&&Ns&&xe.createElement(Re,{stickyOffsets:Il,flattenColumns:io},Ns)));var Ch=(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({noData:!sr.length,maxContentScroll:Yo&&is==="max-content"},Lu),Pa),{},{direction:qn,stickyClassName:pl,onScroll:bs});Gh=xe.createElement(xe.Fragment,null,Pn!==!1&&xe.createElement(ti,(0,pe.Z)({},Ch,{stickyTopOffset:Hs,className:"".concat(ft,"-header"),ref:Na}),nh),Pl,sa&&sa!=="top"&&xe.createElement(ti,(0,pe.Z)({},Ch,{stickyBottomOffset:Zt,className:"".concat(ft,"-summary"),ref:Hu}),Nr),Fi&&_s.current&&_s.current instanceof Element&&xe.createElement(yn,{ref:wo,offsetScroll:In,scrollBodyRef:_s,onScroll:bs,container:Kl,direction:qn}))}else Gh=xe.createElement("div",{style:(0,Ze.Z)((0,Ze.Z)({},rl),bl),className:vt()("".concat(ft,"-content")),onScroll:bs,ref:_s},xe.createElement(vc,(0,pe.Z)({style:(0,Ze.Z)((0,Ze.Z)({},Cu),{},{tableLayout:bo})},Ho),Yl,Ph,Pn!==!1&&xe.createElement(po,(0,pe.Z)({},Lu,Pa)),Wh,Ns&&xe.createElement(Re,{stickyOffsets:Il,flattenColumns:io},Ns)));var Cl=xe.createElement("div",(0,pe.Z)({className:vt()(ft,Wn,(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"),il),"".concat(ft,"-ping-right"),As),"".concat(ft,"-layout-fixed"),Yn==="fixed"),"".concat(ft,"-fixed-header"),Ca),"".concat(ft,"-fixed-column"),zo),"".concat(ft,"-fixed-column-gapped"),zo&&ga),"".concat(ft,"-scroll-horizontal"),Yo),"".concat(ft,"-has-fix-left"),io[0]&&io[0].fixed),"".concat(ft,"-has-fix-right"),io[io.length-1]&&io[io.length-1].fixed==="right")),style:Mi,id:ni,ref:Sa},Yr),Bn&&xe.createElement(wt,{className:"".concat(ft,"-title")},Bn(sr)),xe.createElement("div",{ref:nl,className:"".concat(ft,"-container")},Gh),Jn&&xe.createElement(wt,{className:"".concat(ft,"-footer")},Jn(sr)));Yo&&(Cl=xe.createElement(Ve.Z,{onResize:Ka},Cl));var Eh=Je(io,Il,qn),Xl=xe.useMemo(function(){return{scrollX:is,prefixCls:ft,getComponent:co,scrollbarSize:ha,direction:qn,fixedInfoList:Eh,isSticky:Fi,supportSticky:ds,componentWidth:jo,fixHeader:Ca,fixColumn:zo,horizonScroll:Yo,tableLayout:bo,rowClassName:ii,expandedRowClassName:ss.expandedRowClassName,expandIcon:Ms,expandableType:zs,expandRowByClick:ss.expandRowByClick,expandedRowRender:ss.expandedRowRender,onTriggerExpand:er,expandIconColumnIndex:ss.expandIconColumnIndex,indentSize:ss.indentSize,allColumnsFixedLeft:io.every(function(mo){return mo.fixed==="left"}),emptyNode:ih,columns:cs,flattenColumns:io,onColumnResize:gs,hoverStartRow:us,hoverEndRow:Aa,onHover:oa,rowExpandable:ss.rowExpandable,onRow:br,getRowKey:fo,expandedKeys:hs,childrenColumnName:li,rowHoverable:Hr}},[is,ft,co,ha,qn,Eh,Fi,ds,jo,Ca,zo,Yo,bo,ii,ss.expandedRowClassName,Ms,zs,ss.expandRowByClick,ss.expandedRowRender,er,ss.expandIconColumnIndex,ss.indentSize,ih,cs,io,gs,us,Aa,oa,ss.rowExpandable,br,fo,hs,li,Hr]);return xe.createElement(ve.Provider,{value:Xl},Cl)}var Vi=xe.forwardRef(hn);function lr(an){return re(Vi,an)}var Mr=lr();Mr.EXPAND_COLUMN=ke.w,Mr.INTERNAL_HOOKS=ke.R,Mr.Column=jn,Mr.ColumnGroup=Gn,Mr.Summary=Qe;var xn=Mr,Vn=Ie(65283),mi=ye(null),di=ye(null);function gi(an,On,on){var ft=On||1;return on[an+ft]-(on[an]||0)}function Di(an){var On=an.rowInfo,on=an.column,ft=an.colIndex,Wn=an.indent,ii=an.index,Mi=an.component,vi=an.renderIndex,hi=an.record,Nn=an.style,Yn=an.className,qn=an.inverse,Bn=an.getHeight,Jn=on.render,Ti=on.dataIndex,ci=on.className,ni=on.width,Pn=we(di,["columnsOffset"]),wi=Pn.columnsOffset,ji=pn(On,on,ft,Wn,ii),br=ji.key,nr=ji.fixedInfo,Zr=ji.appendCellNode,zr=ji.additionalCellProps,Ur=zr.style,to=zr.colSpan,Jr=to===void 0?1:to,ko=zr.rowSpan,rn=ko===void 0?1:ko,Kr=ft-1,Hr=gi(Kr,Jr,wi),sr=Jr>1?ni-Hr:0,yr=(0,Ze.Z)((0,Ze.Z)((0,Ze.Z)({},Ur),Nn),{},{flex:"0 0 ".concat(Hr,"px"),width:"".concat(Hr,"px"),marginRight:sr,pointerEvents:"auto"}),fr=xe.useMemo(function(){return qn?rn<=1:Jr===0||rn===0||rn>1},[rn,Jr,qn]);fr?yr.visibility="hidden":qn&&(yr.height=Bn==null?void 0:Bn(rn));var co=fr?function(){return null}:Jn,fo={};return(rn===0||Jr===0)&&(fo.rowSpan=1,fo.colSpan=1),xe.createElement(It,(0,pe.Z)({className:vt()(ci,Yn),ellipsis:on.ellipsis,align:on.align,scope:on.rowScope,component:Mi,prefixCls:On.prefixCls,key:br,record:hi,index:ii,renderIndex:vi,dataIndex:Ti,render:co,shouldCellUpdate:on.shouldCellUpdate},nr,{appendNode:Zr,additionalProps:(0,Ze.Z)((0,Ze.Z)({},zr),{},{style:yr},fo)}))}var Ji=Di,cr=["data","index","className","rowKey","style","extra","getHeight"],_r=xe.forwardRef(function(an,On){var on=an.data,ft=an.index,Wn=an.className,ii=an.rowKey,Mi=an.style,vi=an.extra,hi=an.getHeight,Nn=(0,ze.Z)(an,cr),Yn=on.record,qn=on.indent,Bn=on.index,Jn=we(ve,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Ti=Jn.scrollX,ci=Jn.flattenColumns,ni=Jn.prefixCls,Pn=Jn.fixColumn,wi=Jn.componentWidth,ji=we(mi,["getComponent"]),br=ji.getComponent,nr=Bt(Yn,ii,ft,qn),Zr=br(["body","row"],"div"),zr=br(["body","cell"],"div"),Ur=nr.rowSupportExpand,to=nr.expanded,Jr=nr.rowProps,ko=nr.expandedRowRender,rn=nr.expandedRowClassName,Kr;if(Ur&&to){var Hr=ko(Yn,ft,qn+1,to),sr=Kn(rn,Yn,ft,qn),yr={};Pn&&(yr={style:(0,qe.Z)({},"--virtual-width","".concat(wi,"px"))});var fr="".concat(ni,"-expanded-row-cell");Kr=xe.createElement(Zr,{className:vt()("".concat(ni,"-expanded-row"),"".concat(ni,"-expanded-row-level-").concat(qn+1),sr)},xe.createElement(It,{component:zr,prefixCls:ni,className:vt()(fr,(0,qe.Z)({},"".concat(fr,"-fixed"),Pn)),additionalProps:yr},Hr))}var co=(0,Ze.Z)((0,Ze.Z)({},Mi),{},{width:Ti});vi&&(co.position="absolute",co.pointerEvents="none");var fo=xe.createElement(Zr,(0,pe.Z)({},Jr,Nn,{"data-row-key":ii,ref:Ur?null:On,className:vt()(Wn,"".concat(ni,"-row"),Jr==null?void 0:Jr.className,(0,qe.Z)({},"".concat(ni,"-row-extra"),vi)),style:(0,Ze.Z)((0,Ze.Z)({},co),Jr==null?void 0:Jr.style)}),ci.map(function(Er,no){return xe.createElement(Ji,{key:no,component:zr,rowInfo:nr,column:Er,colIndex:no,indent:qn,index:ft,renderIndex:Bn,record:Yn,inverse:vi,getHeight:hi})}));return Ur?xe.createElement("div",{ref:On},fo,Kr):fo}),Rr=ae(_r),Mn=Rr,Qr=xe.forwardRef(function(an,On){var on=an.data,ft=an.onScroll,Wn=we(ve,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),ii=Wn.flattenColumns,Mi=Wn.onColumnResize,vi=Wn.getRowKey,hi=Wn.expandedKeys,Nn=Wn.prefixCls,Yn=Wn.childrenColumnName,qn=Wn.scrollX,Bn=Wn.direction,Jn=we(mi),Ti=Jn.sticky,ci=Jn.scrollY,ni=Jn.listItemHeight,Pn=Jn.getComponent,wi=Jn.onScroll,ji=xe.useRef(),br=qt(on,Yn,hi,vi),nr=xe.useMemo(function(){var Kr=0;return ii.map(function(Hr){var sr=Hr.width,yr=Hr.key;return Kr+=sr,[yr,sr,Kr]})},[ii]),Zr=xe.useMemo(function(){return nr.map(function(Kr){return Kr[2]})},[nr]);xe.useEffect(function(){nr.forEach(function(Kr){var Hr=(0,Se.Z)(Kr,2),sr=Hr[0],yr=Hr[1];Mi(sr,yr)})},[nr]),xe.useImperativeHandle(On,function(){var Kr,Hr={scrollTo:function(yr){var fr;(fr=ji.current)===null||fr===void 0||fr.scrollTo(yr)},nativeElement:(Kr=ji.current)===null||Kr===void 0?void 0:Kr.nativeElement};return Object.defineProperty(Hr,"scrollLeft",{get:function(){var yr;return((yr=ji.current)===null||yr===void 0?void 0:yr.getScrollInfo().x)||0},set:function(yr){var fr;(fr=ji.current)===null||fr===void 0||fr.scrollTo({left:yr})}}),Hr});var zr=function(Hr,sr){var yr,fr=(yr=br[sr])===null||yr===void 0?void 0:yr.record,co=Hr.onCell;if(co){var fo,Er=co(fr,sr);return(fo=Er==null?void 0:Er.rowSpan)!==null&&fo!==void 0?fo:1}return 1},Ur=function(Hr){var sr=Hr.start,yr=Hr.end,fr=Hr.getSize,co=Hr.offsetY;if(yr<0)return null;for(var fo=ii.filter(function(Ms){return zr(Ms,sr)===0}),Er=sr,no=function(li){if(fo=fo.filter(function(er){return zr(er,li)===0}),!fo.length)return Er=li,1},Qs=sr;Qs>=0&&!no(Qs);Qs-=1);for(var us=ii.filter(function(Ms){return zr(Ms,yr)!==1}),Aa=yr,oa=function(li){if(us=us.filter(function(er){return zr(er,li)!==1}),!us.length)return Aa=Math.max(li-1,yr),1},$i=yr;$i<br.length&&!oa($i);$i+=1);for(var ns=[],ss=function(li){var er=br[li];if(!er)return 1;ii.some(function(Pr){return zr(Pr,li)>1})&&ns.push(li)},zs=Er;zs<=Aa;zs+=1)ss(zs);var hs=ns.map(function(Ms){var li=br[Ms],er=vi(li.record,Ms),Pr=function(jo){var tr=Ms+jo-1,pa=vi(br[tr].record,tr),ps=fr(er,pa);return ps.bottom-ps.top},jr=fr(er);return xe.createElement(Mn,{key:Ms,data:li,rowKey:er,index:Ms,style:{top:-co+jr.top},extra:!0,getHeight:Pr})});return hs},to=xe.useMemo(function(){return{columnsOffset:Zr}},[Zr]),Jr="".concat(Nn,"-tbody"),ko=Pn(["body","wrapper"]),rn={};return Ti&&(rn.position="sticky",rn.bottom=0,(0,Oe.Z)(Ti)==="object"&&Ti.offsetScroll&&(rn.bottom=Ti.offsetScroll)),xe.createElement(di.Provider,{value:to},xe.createElement(Vn.Z,{fullHeight:!1,ref:ji,prefixCls:"".concat(Jr,"-virtual"),styles:{horizontalScrollBar:rn},className:Jr,height:ci,itemHeight:ni||24,data:br,itemKey:function(Hr){return vi(Hr.record)},component:ko,scrollWidth:qn,direction:Bn,onVirtualScroll:function(Hr){var sr,yr=Hr.x;ft({currentTarget:(sr=ji.current)===null||sr===void 0?void 0:sr.nativeElement,scrollLeft:yr})},onScroll:wi,extraRender:Ur},function(Kr,Hr,sr){var yr=vi(Kr.record,Hr);return xe.createElement(Mn,{data:Kr,rowKey:yr,index:Hr,style:sr.style})}))}),kn=ae(Qr),Ri=kn,kr=function(On,on){var ft=on.ref,Wn=on.onScroll;return xe.createElement(Ri,{ref:ft,data:On,onScroll:Wn})};function mr(an,On){var on=an.data,ft=an.columns,Wn=an.scroll,ii=an.sticky,Mi=an.prefixCls,vi=Mi===void 0?An:Mi,hi=an.className,Nn=an.listItemHeight,Yn=an.components,qn=an.onScroll,Bn=Wn||{},Jn=Bn.x,Ti=Bn.y;typeof Jn!="number"&&(Jn=1),typeof Ti!="number"&&(Ti=500);var ci=(0,dn.zX)(function(wi,ji){return(0,kt.Z)(Yn,wi)||ji}),ni=(0,dn.zX)(qn),Pn=xe.useMemo(function(){return{sticky:ii,scrollY:Ti,listItemHeight:Nn,getComponent:ci,onScroll:ni}},[ii,Ti,Nn,ci,ni]);return xe.createElement(mi.Provider,{value:Pn},xe.createElement(xn,(0,pe.Z)({},an,{className:vt()(hi,"".concat(vi,"-virtual")),scroll:(0,Ze.Z)((0,Ze.Z)({},Wn),{},{x:Jn}),components:(0,Ze.Z)((0,Ze.Z)({},Yn),{},{body:on!=null&&on.length?kr:void 0}),columns:ft,internalHooks:ke.R,tailor:!0,ref:On})))}var eo=xe.forwardRef(mr);function Tr(an){return re(eo,an)}var Sr=Tr(),yo=null},54451:function(Sn,ln,Ie){"use strict";Ie.d(ln,{g:function(){return xe},v:function(){return Ce}});var ke=Ie(89490),Se=Ie(39224),Be=Ie(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(Sn,ln,Ie){"use strict";Ie.r(ln),Ie.d(ln,{ResizableTextArea:function(){return Xe},default:function(){return at}});var ke=Ie(71409),Se=Ie(87075),Be=Ie(89490),Le=Ie(62730),Ce=Ie(11036),xe=Ie(39224),be=Ie(92310),ye=Ie.n(be),we=Ie(36901),pe=Ie(66003),de=Ie(30292),ge=Ie(18929),fe=Ie(59301),ue=Ie(28788),ee=Ie(29301),z=Ie(34280),oe=Ie(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(bt){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=bt.getAttribute("id")||bt.getAttribute("data-reactid")||bt.getAttribute("name");if(ct&&le[Rt])return le[Rt];var ut=window.getComputedStyle(bt),ot=ut.getPropertyValue("box-sizing")||ut.getPropertyValue("-moz-box-sizing")||ut.getPropertyValue("-webkit-box-sizing"),ht=parseFloat(ut.getPropertyValue("padding-bottom"))+parseFloat(ut.getPropertyValue("padding-top")),yt=parseFloat(ut.getPropertyValue("border-bottom-width"))+parseFloat(ut.getPropertyValue("border-top-width")),_t=ae.map(function(Ut){return"".concat(Ut,":").concat(ut.getPropertyValue(Ut))}).join(";"),xt={sizingStyle:_t,paddingSize:ht,borderSize:yt,boxSizing:ot};return ct&&Rt&&(le[Rt]=xt),xt}function Pe(bt){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=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)),bt.getAttribute("wrap")?me.setAttribute("wrap",bt.getAttribute("wrap")):me.removeAttribute("wrap");var ot=ve(bt,ct),ht=ot.paddingSize,yt=ot.borderSize,_t=ot.boxSizing,xt=ot.sizingStyle;me.setAttribute("style","".concat(xt,";").concat(re)),me.value=bt.value||bt.placeholder||"";var Ut=void 0,Ht=void 0,dn,Ft=me.scrollHeight;if(_t==="border-box"?Ft+=yt:_t==="content-box"&&(Ft-=ht),Rt!==null||ut!==null){me.value=" ";var fn=me.scrollHeight-ht;Rt!==null&&(Ut=fn*Rt,_t==="border-box"&&(Ut=Ut+ht+yt),Ft=Math.max(Ut,Ft)),ut!==null&&(Ht=fn*ut,_t==="border-box"&&(Ht=Ht+ht+yt),dn=Ft>Ht?"":"hidden",Ft=Math.min(Ht,Ft))}var It={height:Ft,overflowY:dn,resize:"none"};return Ut&&(It.minHeight=Ut),Ht&&(It.maxHeight=Ht),It}var Ae=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],De=0,Oe=1,Ze=2,qe=fe.forwardRef(function(bt,ct){var Rt=bt,ut=Rt.prefixCls,ot=Rt.defaultValue,ht=Rt.value,yt=Rt.autoSize,_t=Rt.onResize,xt=Rt.className,Ut=Rt.style,Ht=Rt.disabled,dn=Rt.onChange,Ft=Rt.onInternalAutoSize,fn=(0,xe.Z)(Rt,Ae),It=(0,ge.Z)(ot,{value:ht,postState:function(Qn){return Qn!=null?Qn:""}}),Xt=(0,Ce.Z)(It,2),tn=Xt[0],lt=Xt[1],He=function(Qn){lt(Qn.target.value),dn==null||dn(Qn)},ze=fe.useRef();fe.useImperativeHandle(ct,function(){return{textArea:ze.current}});var it=fe.useMemo(function(){return yt&&(0,ue.Z)(yt)==="object"?[yt.minRows,yt.maxRows]:[]},[yt]),dt=(0,Ce.Z)(it,2),tt=dt[0],Ke=dt[1],je=!!yt,Re=function(){try{if(document.activeElement===ze.current){var Qn=ze.current,Ai=Qn.selectionStart,ei=Qn.selectionEnd,ki=Qn.scrollTop;ze.current.setSelectionRange(Ai,ei),ze.current.scrollTop=ki}}catch(Wi){}},Qe=fe.useState(Ze),Ve=(0,Ce.Z)(Qe,2),We=Ve[0],pt=Ve[1],Mt=fe.useState(),Qt=(0,Ce.Z)(Mt,2),qt=Qt[0],Bt=Qt[1],$t=function(){pt(De)};(0,z.Z)(function(){je&&$t()},[ht,tt,Ke,je]),(0,z.Z)(function(){if(We===De)pt(Oe);else if(We===Oe){var Hn=Pe(ze.current,!1,tt,Ke);pt(Ze),Bt(Hn)}else Re()},[We]);var Cn=fe.useRef(),mn=function(){oe.Z.cancel(Cn.current)},un=function(Qn){We===Ze&&(_t==null||_t(Qn),yt&&(mn(),Cn.current=(0,oe.Z)(function(){$t()})))};fe.useEffect(function(){return mn},[]);var Kn=je?qt:null,pn=(0,Be.Z)((0,Be.Z)({},Ut),Kn);return(We===De||We===Oe)&&(pn.overflowY="hidden",pn.overflowX="hidden"),fe.createElement(ee.Z,{onResize:un,disabled:!(yt||_t)},fe.createElement("textarea",(0,ke.Z)({},fn,{ref:ze,style:pn,className:ye()(ut,xt,(0,Se.Z)({},"".concat(ut,"-disabled"),Ht)),disabled:Ht,value:tn,onChange:He})))}),Xe=qe,vt=["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(bt,ct){var Rt,ut=bt.defaultValue,ot=bt.value,ht=bt.onFocus,yt=bt.onBlur,_t=bt.onChange,xt=bt.allowClear,Ut=bt.maxLength,Ht=bt.onCompositionStart,dn=bt.onCompositionEnd,Ft=bt.suffix,fn=bt.prefixCls,It=fn===void 0?"rc-textarea":fn,Xt=bt.showCount,tn=bt.count,lt=bt.className,He=bt.style,ze=bt.disabled,it=bt.hidden,dt=bt.classNames,tt=bt.styles,Ke=bt.onResize,je=bt.onClear,Re=bt.onPressEnter,Qe=bt.readOnly,Ve=bt.autoSize,We=bt.onKeyDown,pt=(0,xe.Z)(bt,vt),Mt=(0,ge.Z)(ut,{value:ot,defaultValue:ut}),Qt=(0,Ce.Z)(Mt,2),qt=Qt[0],Bt=Qt[1],$t=qt==null?"":String(qt),Cn=fe.useState(!1),mn=(0,Ce.Z)(Cn,2),un=mn[0],Kn=mn[1],pn=fe.useRef(!1),Hn=fe.useState(null),Qn=(0,Ce.Z)(Hn,2),Ai=Qn[0],ei=Qn[1],ki=(0,fe.useRef)(null),Wi=(0,fe.useRef)(null),Ui=function(){var zn;return(zn=Wi.current)===null||zn===void 0?void 0:zn.textArea},rr=function(){Ui().focus()};(0,fe.useImperativeHandle)(ct,function(){var _n;return{resizableTextArea:Wi.current,focus:rr,blur:function(){Ui().blur()},nativeElement:((_n=ki.current)===null||_n===void 0?void 0:_n.nativeElement)||Ui()}}),(0,fe.useEffect)(function(){Kn(function(_n){return!ze&&_n})},[ze]);var vr=fe.useState(null),wr=(0,Ce.Z)(vr,2),Oi=wr[0],Zi=wr[1];fe.useEffect(function(){if(Oi){var _n;(_n=Ui()).setSelectionRange.apply(_n,(0,Le.Z)(Oi))}},[Oi]);var pr=(0,pe.Z)(tn,Xt),et=(Rt=pr.max)!==null&&Rt!==void 0?Rt:Ut,ai=Number(et)>0,ti=pr.strategy($t),Ii=!!et&&ti>et,gr=function(zn,_i){var Bi=_i;!pn.current&&pr.exceedFormatter&&pr.max&&pr.strategy(_i)>pr.max&&(Bi=pr.exceedFormatter(_i,{max:pr.max}),_i!==Bi&&Zi([Ui().selectionStart||0,Ui().selectionEnd||0])),Bt(Bi),(0,de.rJ)(zn.currentTarget,zn,_t,Bi)},hr=function(zn){pn.current=!0,Ht==null||Ht(zn)},or=function(zn){pn.current=!1,gr(zn,zn.currentTarget.value),dn==null||dn(zn)},po=function(zn){gr(zn,zn.target.value)},$n=function(zn){zn.key==="Enter"&&Re&&Re(zn),We==null||We(zn)},Ue=function(zn){Kn(!0),ht==null||ht(zn)},Je=function(zn){Kn(!1),yt==null||yt(zn)},nt=function(zn){Bt(""),rr(),(0,de.rJ)(Ui(),zn,_t)},Pt=Ft,Nt;pr.show&&(pr.showFormatter?Nt=pr.showFormatter({value:$t,count:ti,maxLength:et}):Nt="".concat(ti).concat(ai?" / ".concat(et):""),Pt=fe.createElement(fe.Fragment,null,Pt,fe.createElement("span",{className:ye()("".concat(It,"-data-count"),dt==null?void 0:dt.count),style:tt==null?void 0:tt.count},Nt)));var sn=function(zn){var _i;Ke==null||Ke(zn),(_i=Ui())!==null&&_i!==void 0&&_i.style.height&&ei(!0)},Kt=!Ve&&!Xt&&!xt;return fe.createElement(we.BaseInput,{ref:ki,value:$t,allowClear:xt,handleReset:nt,suffix:Pt,prefixCls:It,classNames:(0,Be.Z)((0,Be.Z)({},dt),{},{affixWrapper:ye()(dt==null?void 0:dt.affixWrapper,(0,Se.Z)((0,Se.Z)({},"".concat(It,"-show-count"),Xt),"".concat(It,"-textarea-allow-clear"),xt))}),disabled:ze,focused:un,className:ye()(lt,Ii&&"".concat(It,"-out-of-range")),style:(0,Be.Z)((0,Be.Z)({},He),Ai&&!Kt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Nt=="string"?Nt:void 0}},hidden:it,readOnly:Qe,onClear:je},fe.createElement(Xe,(0,ke.Z)({},pt,{autoSize:Ve,maxLength:Ut,onKeyDown:$n,onChange:po,onFocus:Ue,onBlur:Je,onCompositionStart:hr,onCompositionEnd:or,className:ye()(dt==null?void 0:dt.textarea),style:(0,Be.Z)((0,Be.Z)({},tt==null?void 0:tt.textarea),{},{resize:He==null?void 0:He.resize}),disabled:ze,prefixCls:It,onResize:sn,ref:Wi,readOnly:Qe})))}),kt=gt,at=kt},639:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return le}});var ke=Ie(71409),Se=Ie(87075),Be=Ie(89490),Le=Ie(11036),Ce=Ie(39224),xe=Ie(59301),be=Ie(92310),ye=Ie.n(be),we=Ie(26112),pe=Ie(30699),de=function(ve){for(var Pe=ve.prefixCls,Ae=ve.level,De=ve.isStart,Oe=ve.isEnd,Ze="".concat(Pe,"-indent-unit"),qe=[],Xe=0;Xe<Ae;Xe+=1)qe.push(xe.createElement("span",{key:Xe,className:ye()(Ze,(0,Se.Z)((0,Se.Z)({},"".concat(Ze,"-start"),De[Xe]),"".concat(Ze,"-end"),Oe[Xe]))}));return xe.createElement("span",{"aria-hidden":"true",className:"".concat(Pe,"-indent")},qe)},ge=xe.memo(de),fe=Ie(65065),ue=Ie(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,De,Oe=ve.eventKey,Ze=ve.className,qe=ve.style,Xe=ve.dragOver,vt=ve.dragOverGapTop,gt=ve.dragOverGapBottom,kt=ve.isLeaf,at=ve.isStart,bt=ve.isEnd,ct=ve.expanded,Rt=ve.selected,ut=ve.checked,ot=ve.halfChecked,ht=ve.loading,yt=ve.domRef,_t=ve.active,xt=ve.data,Ut=ve.onMouseMove,Ht=ve.selectable,dn=(0,Ce.Z)(ve,ee),Ft=xe.useContext(pe.k),fn=xe.useContext(pe.y),It=xe.useRef(null),Xt=xe.useState(!1),tn=(0,Le.Z)(Xt,2),lt=tn[0],He=tn[1],ze=!!(Ft.disabled||ve.disabled||(Pe=fn.nodeDisabled)!==null&&Pe!==void 0&&Pe.call(fn,xt)),it=xe.useMemo(function(){return!Ft.checkable||ve.checkable===!1?!1:Ft.checkable},[Ft.checkable,ve.checkable]),dt=function(ti){ze||Ft.onNodeSelect(ti,(0,ue.F)(ve))},tt=function(ti){ze||!it||ve.disableCheckbox||Ft.onNodeCheck(ti,(0,ue.F)(ve),!ut)},Ke=xe.useMemo(function(){return typeof Ht=="boolean"?Ht:Ft.selectable},[Ht,Ft.selectable]),je=function(ti){Ft.onNodeClick(ti,(0,ue.F)(ve)),Ke?dt(ti):tt(ti)},Re=function(ti){Ft.onNodeDoubleClick(ti,(0,ue.F)(ve))},Qe=function(ti){Ft.onNodeMouseEnter(ti,(0,ue.F)(ve))},Ve=function(ti){Ft.onNodeMouseLeave(ti,(0,ue.F)(ve))},We=function(ti){Ft.onNodeContextMenu(ti,(0,ue.F)(ve))},pt=xe.useMemo(function(){return!!(Ft.draggable&&(!Ft.draggable.nodeDraggable||Ft.draggable.nodeDraggable(xt)))},[Ft.draggable,xt]),Mt=function(ti){ti.stopPropagation(),He(!0),Ft.onNodeDragStart(ti,ve);try{ti.dataTransfer.setData("text/plain","")}catch(Ii){}},Qt=function(ti){ti.preventDefault(),ti.stopPropagation(),Ft.onNodeDragEnter(ti,ve)},qt=function(ti){ti.preventDefault(),ti.stopPropagation(),Ft.onNodeDragOver(ti,ve)},Bt=function(ti){ti.stopPropagation(),Ft.onNodeDragLeave(ti,ve)},$t=function(ti){ti.stopPropagation(),He(!1),Ft.onNodeDragEnd(ti,ve)},Cn=function(ti){ti.preventDefault(),ti.stopPropagation(),He(!1),Ft.onNodeDrop(ti,ve)},mn=function(ti){ht||Ft.onNodeExpand(ti,(0,ue.F)(ve))},un=xe.useMemo(function(){var ai=(0,fe.Z)(Ft.keyEntities,Oe)||{},ti=ai.children;return!!(ti||[]).length},[Ft.keyEntities,Oe]),Kn=xe.useMemo(function(){return kt===!1?!1:kt||!Ft.loadData&&!un||Ft.loadData&&ve.loaded&&!un},[kt,Ft.loadData,un,ve.loaded]);xe.useEffect(function(){ht||typeof Ft.loadData=="function"&&ct&&!Kn&&!ve.loaded&&Ft.onNodeLoad((0,ue.F)(ve))},[ht,Ft.loadData,Ft.onNodeLoad,ct,Kn,ve]);var pn=xe.useMemo(function(){var ai;return(ai=Ft.draggable)!==null&&ai!==void 0&&ai.icon?xe.createElement("span",{className:"".concat(Ft.prefixCls,"-draggable-icon")},Ft.draggable.icon):null},[Ft.draggable]),Hn=function(ti){var Ii=ve.switcherIcon||Ft.switcherIcon;return typeof Ii=="function"?Ii((0,Be.Z)((0,Be.Z)({},ve),{},{isLeaf:ti})):Ii},Qn=function(){if(Kn){var ti=Hn(!0);return ti!==!1?xe.createElement("span",{className:ye()("".concat(Ft.prefixCls,"-switcher"),"".concat(Ft.prefixCls,"-switcher-noop"))},ti):null}var Ii=Hn(!1);return Ii!==!1?xe.createElement("span",{onClick:mn,className:ye()("".concat(Ft.prefixCls,"-switcher"),"".concat(Ft.prefixCls,"-switcher_").concat(ct?z:oe))},Ii):null},Ai=xe.useMemo(function(){if(!it)return null;var ai=typeof it!="boolean"?it:null;return xe.createElement("span",{className:ye()("".concat(Ft.prefixCls,"-checkbox"),(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(Ft.prefixCls,"-checkbox-checked"),ut),"".concat(Ft.prefixCls,"-checkbox-indeterminate"),!ut&&ot),"".concat(Ft.prefixCls,"-checkbox-disabled"),ze||ve.disableCheckbox)),onClick:tt,role:"checkbox","aria-checked":ot?"mixed":ut,"aria-disabled":ze||ve.disableCheckbox,"aria-label":"Select ".concat(typeof ve.title=="string"?ve.title:"tree node")},ai)},[it,ut,ot,ze,ve.disableCheckbox,ve.title]),ei=xe.useMemo(function(){return Kn?null:ct?z:oe},[Kn,ct]),ki=xe.useMemo(function(){return xe.createElement("span",{className:ye()("".concat(Ft.prefixCls,"-iconEle"),"".concat(Ft.prefixCls,"-icon__").concat(ei||"docu"),(0,Se.Z)({},"".concat(Ft.prefixCls,"-icon_loading"),ht))})},[Ft.prefixCls,ei,ht]),Wi=xe.useMemo(function(){var ai=!!Ft.draggable,ti=!ve.disabled&&ai&&Ft.dragOverNodeKey===Oe;return ti?Ft.dropIndicatorRender({dropPosition:Ft.dropPosition,dropLevelOffset:Ft.dropLevelOffset,indent:Ft.indent,prefixCls:Ft.prefixCls,direction:Ft.direction}):null},[Ft.dropPosition,Ft.dropLevelOffset,Ft.indent,Ft.prefixCls,Ft.direction,Ft.draggable,Ft.dragOverNodeKey,Ft.dropIndicatorRender]),Ui=xe.useMemo(function(){var ai=ve.title,ti=ai===void 0?re:ai,Ii="".concat(Ft.prefixCls,"-node-content-wrapper"),gr;if(Ft.showIcon){var hr=ve.icon||Ft.icon;gr=hr?xe.createElement("span",{className:ye()("".concat(Ft.prefixCls,"-iconEle"),"".concat(Ft.prefixCls,"-icon__customize"))},typeof hr=="function"?hr(ve):hr):ki}else Ft.loadData&&ht&&(gr=ki);var or;return typeof ti=="function"?or=ti(xt):Ft.titleRender?or=Ft.titleRender(xt):or=ti,xe.createElement("span",{ref:It,title:typeof ti=="string"?ti:"",className:ye()(Ii,"".concat(Ii,"-").concat(ei||"normal"),(0,Se.Z)({},"".concat(Ft.prefixCls,"-node-selected"),!ze&&(Rt||lt))),onMouseEnter:Qe,onMouseLeave:Ve,onContextMenu:We,onClick:je,onDoubleClick:Re},gr,xe.createElement("span",{className:"".concat(Ft.prefixCls,"-title")},or),Wi)},[Ft.prefixCls,Ft.showIcon,ve,Ft.icon,ki,Ft.titleRender,xt,ei,Qe,Ve,We,je,Re]),rr=(0,we.Z)(dn,{aria:!0,data:!0}),vr=(0,fe.Z)(Ft.keyEntities,Oe)||{},wr=vr.level,Oi=bt[bt.length-1],Zi=!ze&&pt,pr=Ft.draggingNodeKey===Oe,et=Ht!==void 0?{"aria-selected":!!Ht}:void 0;return xe.createElement("div",(0,ke.Z)({ref:yt,role:"treeitem","aria-expanded":kt?void 0:ct,className:ye()(Ze,"".concat(Ft.prefixCls,"-treenode"),(De={},(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)(De,"".concat(Ft.prefixCls,"-treenode-disabled"),ze),"".concat(Ft.prefixCls,"-treenode-switcher-").concat(ct?"open":"close"),!kt),"".concat(Ft.prefixCls,"-treenode-checkbox-checked"),ut),"".concat(Ft.prefixCls,"-treenode-checkbox-indeterminate"),ot),"".concat(Ft.prefixCls,"-treenode-selected"),Rt),"".concat(Ft.prefixCls,"-treenode-loading"),ht),"".concat(Ft.prefixCls,"-treenode-active"),_t),"".concat(Ft.prefixCls,"-treenode-leaf-last"),Oi),"".concat(Ft.prefixCls,"-treenode-draggable"),pt),"dragging",pr),(0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)((0,Se.Z)(De,"drop-target",Ft.dropTargetKey===Oe),"drop-container",Ft.dropContainerKey===Oe),"drag-over",!ze&&Xe),"drag-over-gap-top",!ze&&vt),"drag-over-gap-bottom",!ze&&gt),"filter-node",(Ae=Ft.filterTreeNode)===null||Ae===void 0?void 0:Ae.call(Ft,(0,ue.F)(ve))),"".concat(Ft.prefixCls,"-treenode-leaf"),Kn))),style:qe,draggable:Zi,onDragStart:Zi?Mt:void 0,onDragEnter:pt?Qt:void 0,onDragOver:pt?qt:void 0,onDragLeave:pt?Bt:void 0,onDrop:pt?Cn:void 0,onDragEnd:pt?$t:void 0,onMouseMove:Ut},et,rr),xe.createElement(ge,{prefixCls:Ft.prefixCls,level:wr,isStart:at,isEnd:bt}),pn,Qn(),Ai,Ui)};ae.isTreeNode=1;var le=ae},30699:function(Sn,ln,Ie){"use strict";Ie.d(ln,{k:function(){return Se},y:function(){return Be}});var ke=Ie(59301),Se=ke.createContext(null),Be=ke.createContext({})},62379:function(Sn,ln,Ie){"use strict";Ie.d(ln,{OF:function(){return Oe.Z},y6:function(){return oe.y},ZP:function(){return ze}});var ke=Ie(71409),Se=Ie(28788),Be=Ie(89490),Le=Ie(62730),Ce=Ie(16552),xe=Ie(19210),be=Ie(90264),ye=Ie(46654),we=Ie(37205),pe=Ie(87075),de=Ie(92310),ge=Ie.n(de),fe=Ie(10228),ue=Ie(26112),ee=Ie(48736),z=Ie(59301),oe=Ie(30699),re=function(dt){var tt=dt.dropPosition,Ke=dt.dropLevelOffset,je=dt.indent,Re={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(tt){case-1:Re.top=0,Re.left=-Ke*je;break;case 1:Re.bottom=0,Re.left=-Ke*je;break;case 0:Re.bottom=0,Re.left=je;break}return z.createElement("div",{style:Re})},ae=re;function le(it){if(it==null)throw new TypeError("Cannot destructure "+it)}var me=Ie(11036),ve=Ie(39224),Pe=Ie(34280),Ae=Ie(65283),De=Ie(77900),Oe=Ie(639);function Ze(it,dt){var tt=z.useState(!1),Ke=(0,me.Z)(tt,2),je=Ke[0],Re=Ke[1];(0,Pe.Z)(function(){if(je)return it(),function(){dt()}},[je]),(0,Pe.Z)(function(){return Re(!0),function(){Re(!1)}},[])}var qe=Ze,Xe=Ie(34061),vt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],gt=z.forwardRef(function(it,dt){var tt=it.className,Ke=it.style,je=it.motion,Re=it.motionNodes,Qe=it.motionType,Ve=it.onMotionStart,We=it.onMotionEnd,pt=it.active,Mt=it.treeNodeRequiredProps,Qt=(0,ve.Z)(it,vt),qt=z.useState(!0),Bt=(0,me.Z)(qt,2),$t=Bt[0],Cn=Bt[1],mn=z.useContext(oe.k),un=mn.prefixCls,Kn=Re&&Qe!=="hide";(0,Pe.Z)(function(){Re&&Kn!==$t&&Cn(Kn)},[Re]);var pn=function(){Re&&Ve()},Hn=z.useRef(!1),Qn=function(){Re&&!Hn.current&&(Hn.current=!0,We())};qe(pn,Qn);var Ai=function(ki){Kn===ki&&Qn()};return Re?z.createElement(De.default,(0,ke.Z)({ref:dt,visible:$t},je,{motionAppear:Qe==="show",onVisibleChanged:Ai}),function(ei,ki){var Wi=ei.className,Ui=ei.style;return z.createElement("div",{ref:ki,className:ge()("".concat(un,"-treenode-motion"),Wi),style:Ui},Re.map(function(rr){var vr=Object.assign({},(le(rr.data),rr.data)),wr=rr.title,Oi=rr.key,Zi=rr.isStart,pr=rr.isEnd;delete vr.children;var et=(0,Xe.H8)(Oi,Mt);return z.createElement(Oe.Z,(0,ke.Z)({},vr,et,{title:wr,active:pt,data:rr.data,key:Oi,isStart:Zi,isEnd:pr}))}))}):z.createElement(Oe.Z,(0,ke.Z)({domRef:dt,className:tt,style:Ke},Qt,{active:pt}))}),kt=gt;function at(){var it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],tt=it.length,Ke=dt.length;if(Math.abs(tt-Ke)!==1)return{add:!1,key:null};function je(Re,Qe){var Ve=new Map;Re.forEach(function(pt){Ve.set(pt,!0)});var We=Qe.filter(function(pt){return!Ve.has(pt)});return We.length===1?We[0]:null}return tt<Ke?{add:!0,key:je(it,dt)}:{add:!1,key:je(dt,it)}}function bt(it,dt,tt){var Ke=it.findIndex(function(Ve){return Ve.key===tt}),je=it[Ke+1],Re=dt.findIndex(function(Ve){return Ve.key===tt});if(je){var Qe=dt.findIndex(function(Ve){return Ve.key===je.key});return dt.slice(Re+1,Qe)}return dt.slice(Re+1)}var ct=["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"],Rt={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()),ht={key:ot},yt={key:ot,level:0,index:0,pos:"0",node:ht,nodes:[ht]},_t={parent:null,children:[],pos:yt.pos,data:ht,title:null,key:ot,isStart:[],isEnd:[]};function xt(it,dt,tt,Ke){return dt===!1||!tt?it:it.slice(0,Math.ceil(tt/Ke)+1)}function Ut(it){var dt=it.key,tt=it.pos;return(0,Xe.km)(dt,tt)}function Ht(it){for(var dt=String(it.data.key),tt=it;tt.parent;)tt=tt.parent,dt="".concat(tt.data.key," > ").concat(dt);return dt}var dn=z.forwardRef(function(it,dt){var tt=it.prefixCls,Ke=it.data,je=it.selectable,Re=it.checkable,Qe=it.expandedKeys,Ve=it.selectedKeys,We=it.checkedKeys,pt=it.loadedKeys,Mt=it.loadingKeys,Qt=it.halfCheckedKeys,qt=it.keyEntities,Bt=it.disabled,$t=it.dragging,Cn=it.dragOverNodeKey,mn=it.dropPosition,un=it.motion,Kn=it.height,pn=it.itemHeight,Hn=it.virtual,Qn=it.scrollWidth,Ai=it.focusable,ei=it.activeItem,ki=it.focused,Wi=it.tabIndex,Ui=it.onKeyDown,rr=it.onFocus,vr=it.onBlur,wr=it.onActiveChange,Oi=it.onListChangeStart,Zi=it.onListChangeEnd,pr=(0,ve.Z)(it,ct),et=z.useRef(null),ai=z.useRef(null);z.useImperativeHandle(dt,function(){return{scrollTo:function(vn){et.current.scrollTo(vn)},getIndentWidth:function(){return ai.current.offsetWidth}}});var ti=z.useState(Qe),Ii=(0,me.Z)(ti,2),gr=Ii[0],hr=Ii[1],or=z.useState(Ke),po=(0,me.Z)(or,2),$n=po[0],Ue=po[1],Je=z.useState(Ke),nt=(0,me.Z)(Je,2),Pt=nt[0],Nt=nt[1],sn=z.useState([]),Kt=(0,me.Z)(sn,2),_n=Kt[0],zn=Kt[1],_i=z.useState(null),Bi=(0,me.Z)(_i,2),wt=Bi[0],zt=Bi[1],En=z.useRef(Ke);En.current=Ke;function bn(){var yn=En.current;Ue(yn),Nt(yn),zn([]),zt(null),Zi()}(0,Pe.Z)(function(){hr(Qe);var yn=at(gr,Qe);if(yn.key!==null)if(yn.add){var vn=$n.findIndex(function(xi){var bi=xi.key;return bi===yn.key}),jn=xt(bt($n,Ke,yn.key),Hn,Kn,pn),Un=$n.slice();Un.splice(vn+1,0,_t),Nt(Un),zn(jn),zt("show")}else{var Gn=Ke.findIndex(function(xi){var bi=xi.key;return bi===yn.key}),An=xt(bt(Ke,$n,yn.key),Hn,Kn,pn),Li=Ke.slice();Li.splice(Gn+1,0,_t),Nt(Li),zn(An),zt("hide")}else $n!==Ke&&(Ue(Ke),Nt(Ke))},[Qe,Ke]),z.useEffect(function(){$t||bn()},[$t]);var Yt=un?Pt:Ke,gn={expandedKeys:Qe,selectedKeys:Ve,loadedKeys:pt,loadingKeys:Mt,checkedKeys:We,halfCheckedKeys:Qt,dragOverNodeKey:Cn,dropPosition:mn,keyEntities:qt};return z.createElement(z.Fragment,null,ki&&ei&&z.createElement("span",{style:Rt,"aria-live":"assertive"},Ht(ei)),z.createElement("div",null,z.createElement("input",{style:Rt,disabled:Ai===!1||Bt,tabIndex:Ai!==!1?Wi:null,onKeyDown:Ui,onFocus:rr,onBlur:vr,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:ai,className:"".concat(tt,"-indent-unit")}))),z.createElement(Ae.Z,(0,ke.Z)({},pr,{data:Yt,itemKey:Ut,height:Kn,fullHeight:!1,virtual:Hn,itemHeight:pn,scrollWidth:Qn,prefixCls:"".concat(tt,"-list"),ref:et,role:"tree",onVisibleChange:function(vn){vn.every(function(jn){return Ut(jn)!==ot})&&bn()}}),function(yn){var vn=yn.pos,jn=Object.assign({},(le(yn.data),yn.data)),Un=yn.title,Gn=yn.key,An=yn.isStart,Li=yn.isEnd,xi=(0,Xe.km)(Gn,vn);delete jn.key,delete jn.children;var bi=(0,Xe.H8)(xi,gn);return z.createElement(kt,(0,ke.Z)({},jn,bi,{title:Un,active:!!ei&&Gn===ei.key,pos:vn,data:yn.data,isStart:An,isEnd:Li,motion:un,motionNodes:Gn===ot?_n:null,motionType:wt,onMotionStart:Oi,onMotionEnd:bn,treeNodeRequiredProps:gn,onMouseMove:function(){wr(null)}}))}))}),Ft=dn,fn=Ie(82661),It=Ie(34643),Xt=Ie(65065),tn=10,lt=function(it){(0,ye.Z)(tt,it);var dt=(0,we.Z)(tt);function tt(){var Ke;(0,Ce.Z)(this,tt);for(var je=arguments.length,Re=new Array(je),Qe=0;Qe<je;Qe++)Re[Qe]=arguments[Qe];return Ke=dt.call.apply(dt,[this].concat(Re)),(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,Xe.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(Ve,We){var pt=Ke.state,Mt=pt.expandedKeys,Qt=pt.keyEntities,qt=Ke.props.onDragStart,Bt=We.eventKey;Ke.dragNodeProps=We,Ke.dragStartMousePosition={x:Ve.clientX,y:Ve.clientY};var $t=(0,fn._5)(Mt,Bt);Ke.setState({draggingNodeKey:Bt,dragChildrenKeys:(0,fn.wA)(Bt,Qt),indent:Ke.listRef.current.getIndentWidth()}),Ke.setExpandedKeys($t),window.addEventListener("dragend",Ke.onWindowDragEnd),qt==null||qt({event:Ve,node:(0,Xe.F)(We)})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDragEnter",function(Ve,We){var pt=Ke.state,Mt=pt.expandedKeys,Qt=pt.keyEntities,qt=pt.dragChildrenKeys,Bt=pt.flattenNodes,$t=pt.indent,Cn=Ke.props,mn=Cn.onDragEnter,un=Cn.onExpand,Kn=Cn.allowDrop,pn=Cn.direction,Hn=We.pos,Qn=We.eventKey;if(Ke.currentMouseOverDroppableNodeKey!==Qn&&(Ke.currentMouseOverDroppableNodeKey=Qn),!Ke.dragNodeProps){Ke.resetDragState();return}var Ai=(0,fn.OM)(Ve,Ke.dragNodeProps,We,$t,Ke.dragStartMousePosition,Kn,Bt,Qt,Mt,pn),ei=Ai.dropPosition,ki=Ai.dropLevelOffset,Wi=Ai.dropTargetKey,Ui=Ai.dropContainerKey,rr=Ai.dropTargetPos,vr=Ai.dropAllowed,wr=Ai.dragOverNodeKey;if(qt.includes(Wi)||!vr){Ke.resetDragState();return}if(Ke.delayedDragEnterLogic||(Ke.delayedDragEnterLogic={}),Object.keys(Ke.delayedDragEnterLogic).forEach(function(Oi){clearTimeout(Ke.delayedDragEnterLogic[Oi])}),Ke.dragNodeProps.eventKey!==We.eventKey&&(Ve.persist(),Ke.delayedDragEnterLogic[Hn]=window.setTimeout(function(){if(Ke.state.draggingNodeKey!==null){var Oi=(0,Le.Z)(Mt),Zi=(0,Xt.Z)(Qt,We.eventKey);Zi&&(Zi.children||[]).length&&(Oi=(0,fn.L0)(Mt,We.eventKey)),Ke.props.hasOwnProperty("expandedKeys")||Ke.setExpandedKeys(Oi),un==null||un(Oi,{node:(0,Xe.F)(We),expanded:!0,nativeEvent:Ve.nativeEvent})}},800)),Ke.dragNodeProps.eventKey===Wi&&ki===0){Ke.resetDragState();return}Ke.setState({dragOverNodeKey:wr,dropPosition:ei,dropLevelOffset:ki,dropTargetKey:Wi,dropContainerKey:Ui,dropTargetPos:rr,dropAllowed:vr}),mn==null||mn({event:Ve,node:(0,Xe.F)(We),expandedKeys:Mt})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDragOver",function(Ve,We){var pt=Ke.state,Mt=pt.dragChildrenKeys,Qt=pt.flattenNodes,qt=pt.keyEntities,Bt=pt.expandedKeys,$t=pt.indent,Cn=Ke.props,mn=Cn.onDragOver,un=Cn.allowDrop,Kn=Cn.direction;if(Ke.dragNodeProps){var pn=(0,fn.OM)(Ve,Ke.dragNodeProps,We,$t,Ke.dragStartMousePosition,un,Qt,qt,Bt,Kn),Hn=pn.dropPosition,Qn=pn.dropLevelOffset,Ai=pn.dropTargetKey,ei=pn.dropContainerKey,ki=pn.dropTargetPos,Wi=pn.dropAllowed,Ui=pn.dragOverNodeKey;Mt.includes(Ai)||!Wi||(Ke.dragNodeProps.eventKey===Ai&&Qn===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():Hn===Ke.state.dropPosition&&Qn===Ke.state.dropLevelOffset&&Ai===Ke.state.dropTargetKey&&ei===Ke.state.dropContainerKey&&ki===Ke.state.dropTargetPos&&Wi===Ke.state.dropAllowed&&Ui===Ke.state.dragOverNodeKey||Ke.setState({dropPosition:Hn,dropLevelOffset:Qn,dropTargetKey:Ai,dropContainerKey:ei,dropTargetPos:ki,dropAllowed:Wi,dragOverNodeKey:Ui}),mn==null||mn({event:Ve,node:(0,Xe.F)(We)}))}}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDragLeave",function(Ve,We){Ke.currentMouseOverDroppableNodeKey===We.eventKey&&!Ve.currentTarget.contains(Ve.relatedTarget)&&(Ke.resetDragState(),Ke.currentMouseOverDroppableNodeKey=null);var pt=Ke.props.onDragLeave;pt==null||pt({event:Ve,node:(0,Xe.F)(We)})}),(0,pe.Z)((0,be.Z)(Ke),"onWindowDragEnd",function(Ve){Ke.onNodeDragEnd(Ve,null,!0),window.removeEventListener("dragend",Ke.onWindowDragEnd)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDragEnd",function(Ve,We){var pt=Ke.props.onDragEnd;Ke.setState({dragOverNodeKey:null}),Ke.cleanDragState(),pt==null||pt({event:Ve,node:(0,Xe.F)(We)}),Ke.dragNodeProps=null,window.removeEventListener("dragend",Ke.onWindowDragEnd)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDrop",function(Ve,We){var pt,Mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Qt=Ke.state,qt=Qt.dragChildrenKeys,Bt=Qt.dropPosition,$t=Qt.dropTargetKey,Cn=Qt.dropTargetPos,mn=Qt.dropAllowed;if(mn){var un=Ke.props.onDrop;if(Ke.setState({dragOverNodeKey:null}),Ke.cleanDragState(),$t!==null){var Kn=(0,Be.Z)((0,Be.Z)({},(0,Xe.H8)($t,Ke.getTreeNodeRequiredProps())),{},{active:((pt=Ke.getActiveItem())===null||pt===void 0?void 0:pt.key)===$t,data:(0,Xt.Z)(Ke.state.keyEntities,$t).node}),pn=qt.includes($t);(0,ee.ZP)(!pn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Hn=(0,fn.yx)(Cn),Qn={event:Ve,node:(0,Xe.F)(Kn),dragNode:Ke.dragNodeProps?(0,Xe.F)(Ke.dragNodeProps):null,dragNodesKeys:[Ke.dragNodeProps.eventKey].concat(qt),dropToGap:Bt!==0,dropPosition:Bt+Number(Hn[Hn.length-1])};Mt||un==null||un(Qn),Ke.dragNodeProps=null}}}),(0,pe.Z)((0,be.Z)(Ke),"cleanDragState",function(){var Ve=Ke.state.draggingNodeKey;Ve!==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(Ve,We){var pt=Ke.state,Mt=pt.expandedKeys,Qt=pt.flattenNodes,qt=We.expanded,Bt=We.key,$t=We.isLeaf;if(!($t||Ve.shiftKey||Ve.metaKey||Ve.ctrlKey)){var Cn=Qt.filter(function(un){return un.key===Bt})[0],mn=(0,Xe.F)((0,Be.Z)((0,Be.Z)({},(0,Xe.H8)(Bt,Ke.getTreeNodeRequiredProps())),{},{data:Cn.data}));Ke.setExpandedKeys(qt?(0,fn._5)(Mt,Bt):(0,fn.L0)(Mt,Bt)),Ke.onNodeExpand(Ve,mn)}}),(0,pe.Z)((0,be.Z)(Ke),"onNodeClick",function(Ve,We){var pt=Ke.props,Mt=pt.onClick,Qt=pt.expandAction;Qt==="click"&&Ke.triggerExpandActionExpand(Ve,We),Mt==null||Mt(Ve,We)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeDoubleClick",function(Ve,We){var pt=Ke.props,Mt=pt.onDoubleClick,Qt=pt.expandAction;Qt==="doubleClick"&&Ke.triggerExpandActionExpand(Ve,We),Mt==null||Mt(Ve,We)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeSelect",function(Ve,We){var pt=Ke.state.selectedKeys,Mt=Ke.state,Qt=Mt.keyEntities,qt=Mt.fieldNames,Bt=Ke.props,$t=Bt.onSelect,Cn=Bt.multiple,mn=We.selected,un=We[qt.key],Kn=!mn;Kn?Cn?pt=(0,fn.L0)(pt,un):pt=[un]:pt=(0,fn._5)(pt,un);var pn=pt.map(function(Hn){var Qn=(0,Xt.Z)(Qt,Hn);return Qn?Qn.node:null}).filter(Boolean);Ke.setUncontrolledState({selectedKeys:pt}),$t==null||$t(pt,{event:"select",selected:Kn,node:We,selectedNodes:pn,nativeEvent:Ve.nativeEvent})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeCheck",function(Ve,We,pt){var Mt=Ke.state,Qt=Mt.keyEntities,qt=Mt.checkedKeys,Bt=Mt.halfCheckedKeys,$t=Ke.props,Cn=$t.checkStrictly,mn=$t.onCheck,un=We.key,Kn,pn={event:"check",node:We,checked:pt,nativeEvent:Ve.nativeEvent};if(Cn){var Hn=pt?(0,fn.L0)(qt,un):(0,fn._5)(qt,un),Qn=(0,fn._5)(Bt,un);Kn={checked:Hn,halfChecked:Qn},pn.checkedNodes=Hn.map(function(rr){return(0,Xt.Z)(Qt,rr)}).filter(Boolean).map(function(rr){return rr.node}),Ke.setUncontrolledState({checkedKeys:Hn})}else{var Ai=(0,It.S)([].concat((0,Le.Z)(qt),[un]),!0,Qt),ei=Ai.checkedKeys,ki=Ai.halfCheckedKeys;if(!pt){var Wi=new Set(ei);Wi.delete(un);var Ui=(0,It.S)(Array.from(Wi),{checked:!1,halfCheckedKeys:ki},Qt);ei=Ui.checkedKeys,ki=Ui.halfCheckedKeys}Kn=ei,pn.checkedNodes=[],pn.checkedNodesPositions=[],pn.halfCheckedKeys=ki,ei.forEach(function(rr){var vr=(0,Xt.Z)(Qt,rr);if(vr){var wr=vr.node,Oi=vr.pos;pn.checkedNodes.push(wr),pn.checkedNodesPositions.push({node:wr,pos:Oi})}}),Ke.setUncontrolledState({checkedKeys:ei},!1,{halfCheckedKeys:ki})}mn==null||mn(Kn,pn)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeLoad",function(Ve){var We,pt=Ve.key,Mt=Ke.state.keyEntities,Qt=(0,Xt.Z)(Mt,pt);if(!(Qt!=null&&(We=Qt.children)!==null&&We!==void 0&&We.length)){var qt=new Promise(function(Bt,$t){Ke.setState(function(Cn){var mn=Cn.loadedKeys,un=mn===void 0?[]:mn,Kn=Cn.loadingKeys,pn=Kn===void 0?[]:Kn,Hn=Ke.props,Qn=Hn.loadData,Ai=Hn.onLoad;if(!Qn||un.includes(pt)||pn.includes(pt))return null;var ei=Qn(Ve);return ei.then(function(){var ki=Ke.state.loadedKeys,Wi=(0,fn.L0)(ki,pt);Ai==null||Ai(Wi,{event:"load",node:Ve}),Ke.setUncontrolledState({loadedKeys:Wi}),Ke.setState(function(Ui){return{loadingKeys:(0,fn._5)(Ui.loadingKeys,pt)}}),Bt()}).catch(function(ki){if(Ke.setState(function(Ui){return{loadingKeys:(0,fn._5)(Ui.loadingKeys,pt)}}),Ke.loadingRetryTimes[pt]=(Ke.loadingRetryTimes[pt]||0)+1,Ke.loadingRetryTimes[pt]>=tn){var Wi=Ke.state.loadedKeys;(0,ee.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ke.setUncontrolledState({loadedKeys:(0,fn.L0)(Wi,pt)}),Bt()}$t(ki)}),{loadingKeys:(0,fn.L0)(pn,pt)}})});return qt.catch(function(){}),qt}}),(0,pe.Z)((0,be.Z)(Ke),"onNodeMouseEnter",function(Ve,We){var pt=Ke.props.onMouseEnter;pt==null||pt({event:Ve,node:We})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeMouseLeave",function(Ve,We){var pt=Ke.props.onMouseLeave;pt==null||pt({event:Ve,node:We})}),(0,pe.Z)((0,be.Z)(Ke),"onNodeContextMenu",function(Ve,We){var pt=Ke.props.onRightClick;pt&&(Ve.preventDefault(),pt({event:Ve,node:We}))}),(0,pe.Z)((0,be.Z)(Ke),"onFocus",function(){var Ve=Ke.props.onFocus;Ke.setState({focused:!0});for(var We=arguments.length,pt=new Array(We),Mt=0;Mt<We;Mt++)pt[Mt]=arguments[Mt];Ve==null||Ve.apply(void 0,pt)}),(0,pe.Z)((0,be.Z)(Ke),"onBlur",function(){var Ve=Ke.props.onBlur;Ke.setState({focused:!1}),Ke.onActiveChange(null);for(var We=arguments.length,pt=new Array(We),Mt=0;Mt<We;Mt++)pt[Mt]=arguments[Mt];Ve==null||Ve.apply(void 0,pt)}),(0,pe.Z)((0,be.Z)(Ke),"getTreeNodeRequiredProps",function(){var Ve=Ke.state,We=Ve.expandedKeys,pt=Ve.selectedKeys,Mt=Ve.loadedKeys,Qt=Ve.loadingKeys,qt=Ve.checkedKeys,Bt=Ve.halfCheckedKeys,$t=Ve.dragOverNodeKey,Cn=Ve.dropPosition,mn=Ve.keyEntities;return{expandedKeys:We||[],selectedKeys:pt||[],loadedKeys:Mt||[],loadingKeys:Qt||[],checkedKeys:qt||[],halfCheckedKeys:Bt||[],dragOverNodeKey:$t,dropPosition:Cn,keyEntities:mn}}),(0,pe.Z)((0,be.Z)(Ke),"setExpandedKeys",function(Ve){var We=Ke.state,pt=We.treeData,Mt=We.fieldNames,Qt=(0,Xe.oH)(pt,Ve,Mt);Ke.setUncontrolledState({expandedKeys:Ve,flattenNodes:Qt},!0)}),(0,pe.Z)((0,be.Z)(Ke),"onNodeExpand",function(Ve,We){var pt=Ke.state.expandedKeys,Mt=Ke.state,Qt=Mt.listChanging,qt=Mt.fieldNames,Bt=Ke.props,$t=Bt.onExpand,Cn=Bt.loadData,mn=We.expanded,un=We[qt.key];if(!Qt){var Kn=pt.includes(un),pn=!mn;if((0,ee.ZP)(mn&&Kn||!mn&&!Kn,"Expand state not sync with index check"),pt=pn?(0,fn.L0)(pt,un):(0,fn._5)(pt,un),Ke.setExpandedKeys(pt),$t==null||$t(pt,{node:We,expanded:pn,nativeEvent:Ve.nativeEvent}),pn&&Cn){var Hn=Ke.onNodeLoad(We);Hn&&Hn.then(function(){var Qn=(0,Xe.oH)(Ke.state.treeData,pt,qt);Ke.setUncontrolledState({flattenNodes:Qn})}).catch(function(){var Qn=Ke.state.expandedKeys,Ai=(0,fn._5)(Qn,un);Ke.setExpandedKeys(Ai)})}}}),(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(Ve){var We=Ke.state.activeKey,pt=Ke.props,Mt=pt.onActiveChange,Qt=pt.itemScrollOffset,qt=Qt===void 0?0:Qt;We!==Ve&&(Ke.setState({activeKey:Ve}),Ve!==null&&Ke.scrollTo({key:Ve,offset:qt}),Mt==null||Mt(Ve))}),(0,pe.Z)((0,be.Z)(Ke),"getActiveItem",function(){var Ve=Ke.state,We=Ve.activeKey,pt=Ve.flattenNodes;return We===null?null:pt.find(function(Mt){var Qt=Mt.key;return Qt===We})||null}),(0,pe.Z)((0,be.Z)(Ke),"offsetActiveKey",function(Ve){var We=Ke.state,pt=We.flattenNodes,Mt=We.activeKey,Qt=pt.findIndex(function($t){var Cn=$t.key;return Cn===Mt});Qt===-1&&Ve<0&&(Qt=pt.length),Qt=(Qt+Ve+pt.length)%pt.length;var qt=pt[Qt];if(qt){var Bt=qt.key;Ke.onActiveChange(Bt)}else Ke.onActiveChange(null)}),(0,pe.Z)((0,be.Z)(Ke),"onKeyDown",function(Ve){var We=Ke.state,pt=We.activeKey,Mt=We.expandedKeys,Qt=We.checkedKeys,qt=We.fieldNames,Bt=Ke.props,$t=Bt.onKeyDown,Cn=Bt.checkable,mn=Bt.selectable;switch(Ve.which){case fe.Z.UP:{Ke.offsetActiveKey(-1),Ve.preventDefault();break}case fe.Z.DOWN:{Ke.offsetActiveKey(1),Ve.preventDefault();break}}var un=Ke.getActiveItem();if(un&&un.data){var Kn=Ke.getTreeNodeRequiredProps(),pn=un.data.isLeaf===!1||!!(un.data[qt.children]||[]).length,Hn=(0,Xe.F)((0,Be.Z)((0,Be.Z)({},(0,Xe.H8)(pt,Kn)),{},{data:un.data,active:!0}));switch(Ve.which){case fe.Z.LEFT:{pn&&Mt.includes(pt)?Ke.onNodeExpand({},Hn):un.parent&&Ke.onActiveChange(un.parent.key),Ve.preventDefault();break}case fe.Z.RIGHT:{pn&&!Mt.includes(pt)?Ke.onNodeExpand({},Hn):un.children&&un.children.length&&Ke.onActiveChange(un.children[0].key),Ve.preventDefault();break}case fe.Z.ENTER:case fe.Z.SPACE:{Cn&&!Hn.disabled&&Hn.checkable!==!1&&!Hn.disableCheckbox?Ke.onNodeCheck({},Hn,!Qt.includes(pt)):!Cn&&mn&&!Hn.disabled&&Hn.selectable!==!1&&Ke.onNodeSelect({},Hn);break}}}$t==null||$t(Ve)}),(0,pe.Z)((0,be.Z)(Ke),"setUncontrolledState",function(Ve){var We=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 Mt=!1,Qt=!0,qt={};Object.keys(Ve).forEach(function(Bt){if(Ke.props.hasOwnProperty(Bt)){Qt=!1;return}Mt=!0,qt[Bt]=Ve[Bt]}),Mt&&(!We||Qt)&&Ke.setState((0,Be.Z)((0,Be.Z)({},qt),pt))}}),(0,pe.Z)((0,be.Z)(Ke),"scrollTo",function(Ve){Ke.listRef.current.scrollTo(Ve)}),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 je=this.props,Re=je.activeKey,Qe=je.itemScrollOffset,Ve=Qe===void 0?0:Qe;Re!==void 0&&Re!==this.state.activeKey&&(this.setState({activeKey:Re}),Re!==null&&this.scrollTo({key:Re,offset:Ve}))}},{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 je=this.state,Re=je.focused,Qe=je.flattenNodes,Ve=je.keyEntities,We=je.draggingNodeKey,pt=je.activeKey,Mt=je.dropLevelOffset,Qt=je.dropContainerKey,qt=je.dropTargetKey,Bt=je.dropPosition,$t=je.dragOverNodeKey,Cn=je.indent,mn=this.props,un=mn.prefixCls,Kn=mn.className,pn=mn.style,Hn=mn.showLine,Qn=mn.focusable,Ai=mn.tabIndex,ei=Ai===void 0?0:Ai,ki=mn.selectable,Wi=mn.showIcon,Ui=mn.icon,rr=mn.switcherIcon,vr=mn.draggable,wr=mn.checkable,Oi=mn.checkStrictly,Zi=mn.disabled,pr=mn.motion,et=mn.loadData,ai=mn.filterTreeNode,ti=mn.height,Ii=mn.itemHeight,gr=mn.scrollWidth,hr=mn.virtual,or=mn.titleRender,po=mn.dropIndicatorRender,$n=mn.onContextMenu,Ue=mn.onScroll,Je=mn.direction,nt=mn.rootClassName,Pt=mn.rootStyle,Nt=(0,ue.Z)(this.props,{aria:!0,data:!0}),sn;vr&&((0,Se.Z)(vr)==="object"?sn=vr:typeof vr=="function"?sn={nodeDraggable:vr}:sn={});var Kt={prefixCls:un,selectable:ki,showIcon:Wi,icon:Ui,switcherIcon:rr,draggable:sn,draggingNodeKey:We,checkable:wr,checkStrictly:Oi,disabled:Zi,keyEntities:Ve,dropLevelOffset:Mt,dropContainerKey:Qt,dropTargetKey:qt,dropPosition:Bt,dragOverNodeKey:$t,indent:Cn,direction:Je,dropIndicatorRender:po,loadData:et,filterTreeNode:ai,titleRender:or,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:Kt},z.createElement("div",{className:ge()(un,Kn,nt,(0,pe.Z)((0,pe.Z)((0,pe.Z)({},"".concat(un,"-show-line"),Hn),"".concat(un,"-focused"),Re),"".concat(un,"-active-focused"),pt!==null)),style:Pt},z.createElement(Ft,(0,ke.Z)({ref:this.listRef,prefixCls:un,style:pn,data:Qe,disabled:Zi,selectable:ki,checkable:!!wr,motion:pr,dragging:We!==null,height:ti,itemHeight:Ii,virtual:hr,focusable:Qn,focused:Re,tabIndex:ei,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:$n,onScroll:Ue,scrollWidth:gr},this.getTreeNodeRequiredProps(),Nt))))}}],[{key:"getDerivedStateFromProps",value:function(je,Re){var Qe=Re.prevProps,Ve={prevProps:je};function We(ei){return!Qe&&je.hasOwnProperty(ei)||Qe&&Qe[ei]!==je[ei]}var pt,Mt=Re.fieldNames;if(We("fieldNames")&&(Mt=(0,Xe.w$)(je.fieldNames),Ve.fieldNames=Mt),We("treeData")?pt=je.treeData:We("children")&&((0,ee.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),pt=(0,Xe.zn)(je.children)),pt){Ve.treeData=pt;var Qt=(0,Xe.I8)(pt,{fieldNames:Mt});Ve.keyEntities=(0,Be.Z)((0,pe.Z)({},ot,yt),Qt.keyEntities)}var qt=Ve.keyEntities||Re.keyEntities;if(We("expandedKeys")||Qe&&We("autoExpandParent"))Ve.expandedKeys=je.autoExpandParent||!Qe&&je.defaultExpandParent?(0,fn.r7)(je.expandedKeys,qt):je.expandedKeys;else if(!Qe&&je.defaultExpandAll){var Bt=(0,Be.Z)({},qt);delete Bt[ot];var $t=[];Object.keys(Bt).forEach(function(ei){var ki=Bt[ei];ki.children&&ki.children.length&&$t.push(ki.key)}),Ve.expandedKeys=$t}else!Qe&&je.defaultExpandedKeys&&(Ve.expandedKeys=je.autoExpandParent||je.defaultExpandParent?(0,fn.r7)(je.defaultExpandedKeys,qt):je.defaultExpandedKeys);if(Ve.expandedKeys||delete Ve.expandedKeys,pt||Ve.expandedKeys){var Cn=(0,Xe.oH)(pt||Re.treeData,Ve.expandedKeys||Re.expandedKeys,Mt);Ve.flattenNodes=Cn}if(je.selectable&&(We("selectedKeys")?Ve.selectedKeys=(0,fn.BT)(je.selectedKeys,je):!Qe&&je.defaultSelectedKeys&&(Ve.selectedKeys=(0,fn.BT)(je.defaultSelectedKeys,je))),je.checkable){var mn;if(We("checkedKeys")?mn=(0,fn.E6)(je.checkedKeys)||{}:!Qe&&je.defaultCheckedKeys?mn=(0,fn.E6)(je.defaultCheckedKeys)||{}:pt&&(mn=(0,fn.E6)(je.checkedKeys)||{checkedKeys:Re.checkedKeys,halfCheckedKeys:Re.halfCheckedKeys}),mn){var un=mn,Kn=un.checkedKeys,pn=Kn===void 0?[]:Kn,Hn=un.halfCheckedKeys,Qn=Hn===void 0?[]:Hn;if(!je.checkStrictly){var Ai=(0,It.S)(pn,!0,qt);pn=Ai.checkedKeys,Qn=Ai.halfCheckedKeys}Ve.checkedKeys=pn,Ve.halfCheckedKeys=Qn}}return We("loadedKeys")&&(Ve.loadedKeys=je.loadedKeys),Ve}}]),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",Oe.Z);var He=lt,ze=He},82661:function(Sn,ln,Ie){"use strict";Ie.d(ln,{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=Ie(62730),Se=Ie(28788),Be=Ie(48736),Le=Ie(59301),Ce=Ie(639),xe=Ie(65065),be=Ie(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 De(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Oe.forEach(function(Ze){var qe=Ze.key,Xe=Ze.children;Pe.push(qe),De(Xe)})}return De(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,De,Oe,Ze,qe,Xe,vt){var gt,kt=me.clientX,at=me.clientY,bt=me.target.getBoundingClientRect(),ct=bt.top,Rt=bt.height,ut=(vt==="rtl"?-1:1)*(((De==null?void 0:De.x)||0)-kt),ot=(ut-12)/Ae,ht=Xe.filter(function(ze){var it;return(it=qe[ze])===null||it===void 0||(it=it.children)===null||it===void 0?void 0:it.length}),yt=(0,xe.Z)(qe,Pe.eventKey);if(at<ct+Rt/2){var _t=Ze.findIndex(function(ze){return ze.key===yt.key}),xt=_t<=0?0:_t-1,Ut=Ze[xt].key;yt=(0,xe.Z)(qe,Ut)}var Ht=yt.key,dn=yt,Ft=yt.key,fn=0,It=0;if(!ht.includes(Ht))for(var Xt=0;Xt<ot&&fe(yt);Xt+=1)yt=yt.parent,It+=1;var tn=ve.data,lt=yt.node,He=!0;return ue(yt)&&yt.level===0&&at<ct+Rt/2&&Oe({dragNode:tn,dropNode:lt,dropPosition:-1})&&yt.key===Pe.eventKey?fn=-1:(dn.children||[]).length&&ht.includes(Ft)?Oe({dragNode:tn,dropNode:lt,dropPosition:0})?fn=0:He=!1:It===0?ot>-1.5?Oe({dragNode:tn,dropNode:lt,dropPosition:1})?fn=1:He=!1:Oe({dragNode:tn,dropNode:lt,dropPosition:0})?fn=0:Oe({dragNode:tn,dropNode:lt,dropPosition:1})?fn=1:He=!1:Oe({dragNode:tn,dropNode:lt,dropPosition:1})?fn=1:He=!1,{dropPosition:fn,dropLevelOffset:It,dropTargetKey:yt.key,dropTargetPos:yt.pos,dragOverNodeKey:Ft,dropContainerKey:fn===0?null:((gt=yt.parent)===null||gt===void 0?void 0:gt.key)||null,dropAllowed:He}}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,De=Ae===void 0?oe:Ae,Oe=Array.isArray(me)?me:[me];return Oe.map(function(Ze){var qe=Ze.children,Xe=_objectWithoutProperties(Ze,ye),vt=re(qe,ve);return React.createElement(TreeNode,_extends({key:Xe.key},De(Xe)),vt)})}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(De){if(!Pe.has(De)){var Oe=(0,xe.Z)(ve,De);if(Oe){Pe.add(De);var Ze=Oe.parent,qe=Oe.node;qe.disabled||Ze&&Ae(Ze.key)}}}return(me||[]).forEach(function(De){Ae(De)}),(0,ke.Z)(Pe)}},34643:function(Sn,ln,Ie){"use strict";Ie.d(ln,{S:function(){return be}});var ke=Ie(48736),Se=Ie(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 De=Ae.key,Oe=ge.has(De);ve&&!Oe&&(ve=!1),!Pe&&(Oe||fe.has(De))&&(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(De){return!ge(De.node)}).forEach(function(De){fe.delete(De.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(De){return!ge(De.node)}).forEach(function(De){var Oe=De.key,Ze=fe.has(Oe);Pe&&!Ze&&(Pe=!1),!Ae&&(Ze||ue.has(Oe))&&(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(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return ke}});function ke(Se,Be){return Se[Be]}},34061:function(Sn,ln,Ie){"use strict";Ie.d(ln,{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=Ie(28788),Se=Ie(62730),Be=Ie(89490),Le=Ie(39224),Ce=Ie(11592),xe=Ie(2738),be=Ie(48736),ye=Ie(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,De=ve.key,Oe=ve.children,Ze=Pe||"title";return{title:Ze,_title:Ae||[Ze],key:De||"key",children:Oe||"children"}}function ue(me,ve){var Pe=new Map;function Ae(De){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(De||[]).forEach(function(Ze){var qe=Ze[ve.key],Xe=Ze[ve.children];warning(qe!=null,"Tree node must have a certain key: [".concat(Oe).concat(qe,"]"));var vt=String(qe);warning(!Pe.has(vt)||qe===null||qe===void 0,"Same 'key' exist in the Tree: ".concat(vt)),Pe.set(vt,!0),Ae(Xe,"".concat(Oe).concat(vt," > "))})}Ae(me)}function ee(me){function ve(Pe){var Ae=(0,Ce.Z)(Pe);return Ae.map(function(De){if(!de(De))return(0,be.ZP)(!De,"Tree/TreeNode can only accept TreeNode as children."),null;var Oe=De.key,Ze=De.props,qe=Ze.children,Xe=(0,Le.Z)(Ze,we),vt=(0,Be.Z)({key:Oe},Xe),gt=ve(qe);return gt.length&&(vt.children=gt),vt}).filter(function(De){return De})}return ve(me)}function z(me,ve,Pe){var Ae=fe(Pe),De=Ae._title,Oe=Ae.key,Ze=Ae.children,qe=new Set(ve===!0?[]:ve),Xe=[];function vt(gt){var kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return gt.map(function(at,bt){for(var ct=pe(kt?kt.pos:"0",bt),Rt=ge(at[Oe],ct),ut,ot=0;ot<De.length;ot+=1){var ht=De[ot];if(at[ht]!==void 0){ut=at[ht];break}}var yt=Object.assign((0,xe.Z)(at,[].concat((0,Se.Z)(De),[Oe,Ze])),{title:ut,key:Rt,parent:kt,pos:ct,children:null,data:at,isStart:[].concat((0,Se.Z)(kt?kt.isStart:[]),[bt===0]),isEnd:[].concat((0,Se.Z)(kt?kt.isEnd:[]),[bt===gt.length-1])});return Xe.push(yt),ve===!0||qe.has(Rt)?yt.children=vt(at[Ze]||[],yt):yt.children=[],yt})}return vt(me),Xe}function oe(me,ve,Pe){var Ae={};(0,ke.Z)(Pe)==="object"?Ae=Pe:Ae={externalGetKey:Pe},Ae=Ae||{};var De=Ae,Oe=De.childrenPropName,Ze=De.externalGetKey,qe=De.fieldNames,Xe=fe(qe),vt=Xe.key,gt=Xe.children,kt=Oe||gt,at;Ze?typeof Ze=="string"?at=function(Rt){return Rt[Ze]}:typeof Ze=="function"&&(at=function(Rt){return Ze(Rt)}):at=function(Rt,ut){return ge(Rt[vt],ut)};function bt(ct,Rt,ut,ot){var ht=ct?ct[kt]:me,yt=ct?pe(ut.pos,Rt):"0",_t=ct?[].concat((0,Se.Z)(ot),[ct]):[];if(ct){var xt=at(ct,yt),Ut={node:ct,index:Rt,pos:yt,key:xt,parentPos:ut.node?ut.pos:null,level:ut.level+1,nodes:_t};ve(Ut)}ht&&ht.forEach(function(Ht,dn){bt(Ht,dn,{node:ct,pos:yt,level:ut?ut.level+1:-1},_t)})}bt(null)}function re(me){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Pe=ve.initWrapper,Ae=ve.processEntity,De=ve.onProcessFinished,Oe=ve.externalGetKey,Ze=ve.childrenPropName,qe=ve.fieldNames,Xe=arguments.length>2?arguments[2]:void 0,vt=Oe||Xe,gt={},kt={},at={posEntities:gt,keyEntities:kt};return Pe&&(at=Pe(at)||at),oe(me,function(bt){var ct=bt.node,Rt=bt.index,ut=bt.pos,ot=bt.key,ht=bt.parentPos,yt=bt.level,_t=bt.nodes,xt={node:ct,nodes:_t,index:Rt,key:ot,pos:ut,level:yt},Ut=ge(ot,ut);gt[ut]=xt,kt[Ut]=xt,xt.parent=gt[ht],xt.parent&&(xt.parent.children=xt.parent.children||[],xt.parent.children.push(xt)),Ae&&Ae(xt,at)},{externalGetKey:vt,childrenPropName:Ze,fieldNames:qe}),De&&De(at),at}function ae(me,ve){var Pe=ve.expandedKeys,Ae=ve.selectedKeys,De=ve.loadedKeys,Oe=ve.loadingKeys,Ze=ve.checkedKeys,qe=ve.halfCheckedKeys,Xe=ve.dragOverNodeKey,vt=ve.dropPosition,gt=ve.keyEntities,kt=(0,ye.Z)(gt,me),at={eventKey:me,expanded:Pe.indexOf(me)!==-1,selected:Ae.indexOf(me)!==-1,loaded:De.indexOf(me)!==-1,loading:Oe.indexOf(me)!==-1,checked:Ze.indexOf(me)!==-1,halfChecked:qe.indexOf(me)!==-1,pos:String(kt?kt.pos:""),dragOver:Xe===me&&vt===0,dragOverGapTop:Xe===me&&vt===-1,dragOverGapBottom:Xe===me&&vt===1};return at}function le(me){var ve=me.data,Pe=me.expanded,Ae=me.selected,De=me.checked,Oe=me.loaded,Ze=me.loading,qe=me.halfChecked,Xe=me.dragOver,vt=me.dragOverGapTop,gt=me.dragOverGapBottom,kt=me.pos,at=me.active,bt=me.eventKey,ct=(0,Be.Z)((0,Be.Z)({},ve),{},{expanded:Pe,selected:Ae,checked:De,loaded:Oe,loading:Ze,halfChecked:qe,dragOver:Xe,dragOverGapTop:vt,dragOverGapBottom:gt,pos:kt,active:at,key:bt});return"props"in ct||Object.defineProperty(ct,"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}}),ct}},8224:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return Se}});var ke=Ie(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(Sn,ln,Ie){"use strict";Ie.d(ln,{G:function(){return Le}});var ke=Ie(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)}},65283:function(Sn,ln,Ie){"use strict";Ie.d(ln,{Z:function(){return tn}});var ke=Ie(71409),Se=Ie(28788),Be=Ie(89490),Le=Ie(87075),Ce=Ie(11036),xe=Ie(39224),be=Ie(92310),ye=Ie.n(be),we=Ie(29301),pe=Ie(70425),de=Ie(34280),ge=Ie(59301),fe=Ie(4676),ue=ge.forwardRef(function(lt,He){var ze=lt.height,it=lt.offsetY,dt=lt.offsetX,tt=lt.children,Ke=lt.prefixCls,je=lt.onInnerResize,Re=lt.innerProps,Qe=lt.rtl,Ve=lt.extra,We={},pt={display:"flex",flexDirection:"column"};return it!==void 0&&(We={height:ze,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(it,"px)")},Qe?"marginRight":"marginLeft",-dt),"position","absolute"),"left",0),"right",0),"top",0))),ge.createElement("div",{style:We},ge.createElement(we.Z,{onResize:function(Qt){var qt=Qt.offsetHeight;qt&&je&&je()}},ge.createElement("div",(0,ke.Z)({style:pt,className:ye()((0,Le.Z)({},"".concat(Ke,"-holder-inner"),Ke)),ref:He},Re),tt,Ve)))});ue.displayName="Filler";var ee=ue;function z(lt){var He=lt.children,ze=lt.setRef,it=ge.useCallback(function(dt){ze(dt)},[]);return ge.cloneElement(He,{ref:it})}function oe(lt,He,ze,it,dt,tt,Ke,je){var Re=je.getKey;return lt.slice(He,ze+1).map(function(Qe,Ve){var We=He+Ve,pt=Ke(Qe,We,{style:{width:it},offsetX:dt}),Mt=Re(Qe);return ge.createElement(z,{key:Mt,setRef:function(qt){return tt(Qe,qt)}},pt)})}function re(lt,He,ze,it){var dt=ze-lt,tt=He-ze,Ke=Math.min(dt,tt)*2;if(it<=Ke){var je=Math.floor(it/2);return it%2?ze+je+1:ze-je}return dt>tt?ze-(it-tt):ze+(it-dt)}function ae(lt,He,ze){var it=lt.length,dt=He.length,tt,Ke;if(it===0&&dt===0)return null;it<dt?(tt=lt,Ke=He):(tt=He,Ke=lt);var je={__EMPTY_ITEM__:!0};function Re(Qt){return Qt!==void 0?ze(Qt):je}for(var Qe=null,Ve=Math.abs(it-dt)!==1,We=0;We<Ke.length;We+=1){var pt=Re(tt[We]),Mt=Re(Ke[We]);if(pt!==Mt){Qe=We,Ve=Ve||pt!==Re(Ke[We+1]);break}}return Qe===null?null:{index:Qe,multiple:Ve}}function le(lt,He,ze){var it=ge.useState(lt),dt=(0,Ce.Z)(it,2),tt=dt[0],Ke=dt[1],je=ge.useState(null),Re=(0,Ce.Z)(je,2),Qe=Re[0],Ve=Re[1];return ge.useEffect(function(){var We=ae(tt||[],lt||[],He);(We==null?void 0:We.index)!==void 0&&(ze==null||ze(We.index),Ve(lt[We.index])),Ke(lt)},[lt]),[Qe]}var me=Ie(16089),ve=(typeof navigator=="undefined"?"undefined":(0,Se.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Pe=ve,Ae=function(lt,He,ze,it){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 je=(0,ge.useRef)({top:lt,bottom:He,left:ze,right:it});return je.current.top=lt,je.current.bottom=He,je.current.left=ze,je.current.right=it,function(Re,Qe){var Ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,We=Re?Qe<0&&je.current.left||Qe>0&&je.current.right:Qe<0&&je.current.top||Qe>0&&je.current.bottom;return Ve&&We?(clearTimeout(tt.current),dt.current=!1):(!We||dt.current)&&Ke(),!dt.current&&We}};function De(lt,He,ze,it,dt,tt,Ke){var je=(0,ge.useRef)(0),Re=(0,ge.useRef)(null),Qe=(0,ge.useRef)(null),Ve=(0,ge.useRef)(!1),We=Ae(He,ze,it,dt);function pt(Cn,mn){if(me.Z.cancel(Re.current),!We(!1,mn)){var un=Cn;if(!un._virtualHandled)un._virtualHandled=!0;else return;je.current+=mn,Qe.current=mn,Pe||un.preventDefault(),Re.current=(0,me.Z)(function(){var Kn=Ve.current?10:1;Ke(je.current*Kn,!1),je.current=0})}}function Mt(Cn,mn){Ke(mn,!0),Pe||Cn.preventDefault()}var Qt=(0,ge.useRef)(null),qt=(0,ge.useRef)(null);function Bt(Cn){if(lt){me.Z.cancel(qt.current),qt.current=(0,me.Z)(function(){Qt.current=null},2);var mn=Cn.deltaX,un=Cn.deltaY,Kn=Cn.shiftKey,pn=mn,Hn=un;(Qt.current==="sx"||!Qt.current&&Kn&&un&&!mn)&&(pn=un,Hn=0,Qt.current="sx");var Qn=Math.abs(pn),Ai=Math.abs(Hn);Qt.current===null&&(Qt.current=tt&&Qn>Ai?"x":"y"),Qt.current==="y"?pt(Cn,Hn):Mt(Cn,pn)}}function $t(Cn){lt&&(Ve.current=Cn.detail===Qe.current)}return[Bt,$t]}function Oe(lt,He,ze,it){var dt=ge.useMemo(function(){return[new Map,[]]},[lt,ze.id,it]),tt=(0,Ce.Z)(dt,2),Ke=tt[0],je=tt[1],Re=function(Ve){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ve,pt=Ke.get(Ve),Mt=Ke.get(We);if(pt===void 0||Mt===void 0)for(var Qt=lt.length,qt=je.length;qt<Qt;qt+=1){var Bt,$t=lt[qt],Cn=He($t);Ke.set(Cn,qt);var mn=(Bt=ze.get(Cn))!==null&&Bt!==void 0?Bt:it;if(je[qt]=(je[qt-1]||0)+mn,Cn===Ve&&(pt=qt),Cn===We&&(Mt=qt),pt!==void 0&&Mt!==void 0)break}return{top:je[pt-1]||0,bottom:je[Mt]}};return Re}var Ze=Ie(16552),qe=Ie(19210),Xe=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,"diffRecords",new Map),this.maps=Object.create(null)}return(0,qe.Z)(lt,[{key:"set",value:function(ze,it){this.diffRecords.set(ze,this.maps[ze]),this.maps[ze]=it,this.id+=1}},{key:"get",value:function(ze){return this.maps[ze]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),lt}(),vt=Xe;function gt(lt){var He=parseFloat(lt);return isNaN(He)?0:He}function kt(lt,He,ze){var it=ge.useState(0),dt=(0,Ce.Z)(it,2),tt=dt[0],Ke=dt[1],je=(0,ge.useRef)(new Map),Re=(0,ge.useRef)(new vt),Qe=(0,ge.useRef)(0);function Ve(){Qe.current+=1}function We(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ve();var Qt=function(){var $t=!1;je.current.forEach(function(Cn,mn){if(Cn&&Cn.offsetParent){var un=Cn.offsetHeight,Kn=getComputedStyle(Cn),pn=Kn.marginTop,Hn=Kn.marginBottom,Qn=gt(pn),Ai=gt(Hn),ei=un+Qn+Ai;Re.current.get(mn)!==ei&&(Re.current.set(mn,ei),$t=!0)}}),$t&&Ke(function(Cn){return Cn+1})};if(Mt)Qt();else{Qe.current+=1;var qt=Qe.current;Promise.resolve().then(function(){qt===Qe.current&&Qt()})}}function pt(Mt,Qt){var qt=lt(Mt),Bt=je.current.get(qt);Qt?(je.current.set(qt,Qt),We()):je.current.delete(qt),!Bt!=!Qt&&(Qt?He==null||He(Mt):ze==null||ze(Mt))}return(0,ge.useEffect)(function(){return Ve},[]),[pt,We,Re.current,tt]}var at=14/15;function bt(lt,He,ze){var it=(0,ge.useRef)(!1),dt=(0,ge.useRef)(0),tt=(0,ge.useRef)(0),Ke=(0,ge.useRef)(null),je=(0,ge.useRef)(null),Re,Qe=function(Mt){if(it.current){var Qt=Math.ceil(Mt.touches[0].pageX),qt=Math.ceil(Mt.touches[0].pageY),Bt=dt.current-Qt,$t=tt.current-qt,Cn=Math.abs(Bt)>Math.abs($t);Cn?dt.current=Qt:tt.current=qt;var mn=ze(Cn,Cn?Bt:$t,!1,Mt);mn&&Mt.preventDefault(),clearInterval(je.current),mn&&(je.current=setInterval(function(){Cn?Bt*=at:$t*=at;var un=Math.floor(Cn?Bt:$t);(!ze(Cn,un,!0)||Math.abs(un)<=.1)&&clearInterval(je.current)},16))}},Ve=function(){it.current=!1,Re()},We=function(Mt){Re(),Mt.touches.length===1&&!it.current&&(it.current=!0,dt.current=Math.ceil(Mt.touches[0].pageX),tt.current=Math.ceil(Mt.touches[0].pageY),Ke.current=Mt.target,Ke.current.addEventListener("touchmove",Qe,{passive:!1}),Ke.current.addEventListener("touchend",Ve,{passive:!0}))};Re=function(){Ke.current&&(Ke.current.removeEventListener("touchmove",Qe),Ke.current.removeEventListener("touchend",Ve))},(0,de.Z)(function(){return lt&&He.current.addEventListener("touchstart",We,{passive:!0}),function(){var pt;(pt=He.current)===null||pt===void 0||pt.removeEventListener("touchstart",We),Re(),clearInterval(je.current)}},[lt])}function ct(lt){return Math.floor(Math.pow(lt,.5))}function Rt(lt,He){var ze="touches"in lt?lt.touches[0]:lt;return ze[He?"pageX":"pageY"]-window[He?"scrollX":"scrollY"]}function ut(lt,He,ze){ge.useEffect(function(){var it=He.current;if(lt&&it){var dt=!1,tt,Ke,je=function(){me.Z.cancel(tt)},Re=function pt(){je(),tt=(0,me.Z)(function(){ze(Ke),pt()})},Qe=function(Mt){if(!(Mt.target.draggable||Mt.button!==0)){var Qt=Mt;Qt._virtualHandled||(Qt._virtualHandled=!0,dt=!0)}},Ve=function(){dt=!1,je()},We=function(Mt){if(dt){var Qt=Rt(Mt,!1),qt=it.getBoundingClientRect(),Bt=qt.top,$t=qt.bottom;if(Qt<=Bt){var Cn=Bt-Qt;Ke=-ct(Cn),Re()}else if(Qt>=$t){var mn=Qt-$t;Ke=ct(mn),Re()}else je()}};return it.addEventListener("mousedown",Qe),it.ownerDocument.addEventListener("mouseup",Ve),it.ownerDocument.addEventListener("mousemove",We),function(){it.removeEventListener("mousedown",Qe),it.ownerDocument.removeEventListener("mouseup",Ve),it.ownerDocument.removeEventListener("mousemove",We),je()}}},[lt])}var ot=10;function ht(lt,He,ze,it,dt,tt,Ke,je){var Re=ge.useRef(),Qe=ge.useState(null),Ve=(0,Ce.Z)(Qe,2),We=Ve[0],pt=Ve[1];return(0,de.Z)(function(){if(We&&We.times<ot){if(!lt.current){pt(function(pr){return(0,Be.Z)({},pr)});return}tt();var Mt=We.targetAlign,Qt=We.originAlign,qt=We.index,Bt=We.offset,$t=lt.current.clientHeight,Cn=!1,mn=Mt,un=null;if($t){for(var Kn=Mt||Qt,pn=0,Hn=0,Qn=0,Ai=Math.min(He.length-1,qt),ei=0;ei<=Ai;ei+=1){var ki=dt(He[ei]);Hn=pn;var Wi=ze.get(ki);Qn=Hn+(Wi===void 0?it:Wi),pn=Qn}for(var Ui=Kn==="top"?Bt:$t-Bt,rr=Ai;rr>=0;rr-=1){var vr=dt(He[rr]),wr=ze.get(vr);if(wr===void 0){Cn=!0;break}if(Ui-=wr,Ui<=0)break}switch(Kn){case"top":un=Hn-Bt;break;case"bottom":un=Qn-$t+Bt;break;default:{var Oi=lt.current.scrollTop,Zi=Oi+$t;Hn<Oi?mn="top":Qn>Zi&&(mn="bottom")}}un!==null&&Ke(un),un!==We.lastTop&&(Cn=!0)}Cn&&pt((0,Be.Z)((0,Be.Z)({},We),{},{times:We.times+1,targetAlign:mn,lastTop:un}))}},[We,lt.current]),function(Mt){if(Mt==null){je();return}if(me.Z.cancel(Re.current),typeof Mt=="number")Ke(Mt);else if(Mt&&(0,Se.Z)(Mt)==="object"){var Qt,qt=Mt.align;"index"in Mt?Qt=Mt.index:Qt=He.findIndex(function(Cn){return dt(Cn)===Mt.key});var Bt=Mt.offset,$t=Bt===void 0?0:Bt;pt({times:0,index:Qt,offset:$t,originAlign:qt})}}}var yt=ge.forwardRef(function(lt,He){var ze=lt.prefixCls,it=lt.rtl,dt=lt.scrollOffset,tt=lt.scrollRange,Ke=lt.onStartMove,je=lt.onStopMove,Re=lt.onScroll,Qe=lt.horizontal,Ve=lt.spinSize,We=lt.containerSize,pt=lt.style,Mt=lt.thumbStyle,Qt=lt.showScrollBar,qt=ge.useState(!1),Bt=(0,Ce.Z)(qt,2),$t=Bt[0],Cn=Bt[1],mn=ge.useState(null),un=(0,Ce.Z)(mn,2),Kn=un[0],pn=un[1],Hn=ge.useState(null),Qn=(0,Ce.Z)(Hn,2),Ai=Qn[0],ei=Qn[1],ki=!it,Wi=ge.useRef(),Ui=ge.useRef(),rr=ge.useState(Qt),vr=(0,Ce.Z)(rr,2),wr=vr[0],Oi=vr[1],Zi=ge.useRef(),pr=function(){Qt===!0||Qt===!1||(clearTimeout(Zi.current),Oi(!0),Zi.current=setTimeout(function(){Oi(!1)},3e3))},et=tt-We||0,ai=We-Ve||0,ti=ge.useMemo(function(){if(dt===0||et===0)return 0;var nt=dt/et;return nt*ai},[dt,et,ai]),Ii=function(Pt){Pt.stopPropagation(),Pt.preventDefault()},gr=ge.useRef({top:ti,dragging:$t,pageY:Kn,startTop:Ai});gr.current={top:ti,dragging:$t,pageY:Kn,startTop:Ai};var hr=function(Pt){Cn(!0),pn(Rt(Pt,Qe)),ei(gr.current.top),Ke(),Pt.stopPropagation(),Pt.preventDefault()};ge.useEffect(function(){var nt=function(Kt){Kt.preventDefault()},Pt=Wi.current,Nt=Ui.current;return Pt.addEventListener("touchstart",nt,{passive:!1}),Nt.addEventListener("touchstart",hr,{passive:!1}),function(){Pt.removeEventListener("touchstart",nt),Nt.removeEventListener("touchstart",hr)}},[]);var or=ge.useRef();or.current=et;var po=ge.useRef();po.current=ai,ge.useEffect(function(){if($t){var nt,Pt=function(Kt){var _n=gr.current,zn=_n.dragging,_i=_n.pageY,Bi=_n.startTop;me.Z.cancel(nt);var wt=Wi.current.getBoundingClientRect(),zt=We/(Qe?wt.width:wt.height);if(zn){var En=(Rt(Kt,Qe)-_i)*zt,bn=Bi;!ki&&Qe?bn-=En:bn+=En;var Yt=or.current,gn=po.current,yn=gn?bn/gn:0,vn=Math.ceil(yn*Yt);vn=Math.max(vn,0),vn=Math.min(vn,Yt),nt=(0,me.Z)(function(){Re(vn,Qe)})}},Nt=function(){Cn(!1),je()};return window.addEventListener("mousemove",Pt,{passive:!0}),window.addEventListener("touchmove",Pt,{passive:!0}),window.addEventListener("mouseup",Nt,{passive:!0}),window.addEventListener("touchend",Nt,{passive:!0}),function(){window.removeEventListener("mousemove",Pt),window.removeEventListener("touchmove",Pt),window.removeEventListener("mouseup",Nt),window.removeEventListener("touchend",Nt),me.Z.cancel(nt)}}},[$t]),ge.useEffect(function(){return pr(),function(){clearTimeout(Zi.current)}},[dt]),ge.useImperativeHandle(He,function(){return{delayHidden:pr}});var $n="".concat(ze,"-scrollbar"),Ue={position:"absolute",visibility:wr?null:"hidden"},Je={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Qe?(Ue.height=8,Ue.left=0,Ue.right=0,Ue.bottom=0,Je.height="100%",Je.width=Ve,ki?Je.left=ti:Je.right=ti):(Ue.width=8,Ue.top=0,Ue.bottom=0,ki?Ue.right=0:Ue.left=0,Je.width="100%",Je.height=Ve,Je.top=ti),ge.createElement("div",{ref:Wi,className:ye()($n,(0,Le.Z)((0,Le.Z)((0,Le.Z)({},"".concat($n,"-horizontal"),Qe),"".concat($n,"-vertical"),!Qe),"".concat($n,"-visible"),wr)),style:(0,Be.Z)((0,Be.Z)({},Ue),pt),onMouseDown:Ii,onMouseMove:pr},ge.createElement("div",{ref:Ui,className:ye()("".concat($n,"-thumb"),(0,Le.Z)({},"".concat($n,"-thumb-moving"),$t)),style:(0,Be.Z)((0,Be.Z)({},Je),Mt),onMouseDown:hr}))}),_t=yt,xt=20;function Ut(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ze=lt/He*lt;return isNaN(ze)&&(ze=0),ze=Math.max(ze,xt),Math.floor(ze)}var Ht=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],dn=[],Ft={overflowY:"auto",overflowAnchor:"none"};function fn(lt,He){var ze=lt.prefixCls,it=ze===void 0?"rc-virtual-list":ze,dt=lt.className,tt=lt.height,Ke=lt.itemHeight,je=lt.fullHeight,Re=je===void 0?!0:je,Qe=lt.style,Ve=lt.data,We=lt.children,pt=lt.itemKey,Mt=lt.virtual,Qt=lt.direction,qt=lt.scrollWidth,Bt=lt.component,$t=Bt===void 0?"div":Bt,Cn=lt.onScroll,mn=lt.onVirtualScroll,un=lt.onVisibleChange,Kn=lt.innerProps,pn=lt.extraRender,Hn=lt.styles,Qn=lt.showScrollBar,Ai=Qn===void 0?"optional":Qn,ei=(0,xe.Z)(lt,Ht),ki=ge.useCallback(function(Nn){return typeof pt=="function"?pt(Nn):Nn==null?void 0:Nn[pt]},[pt]),Wi=kt(ki,null,null),Ui=(0,Ce.Z)(Wi,4),rr=Ui[0],vr=Ui[1],wr=Ui[2],Oi=Ui[3],Zi=!!(Mt!==!1&&tt&&Ke),pr=ge.useMemo(function(){return Object.values(wr.maps).reduce(function(Nn,Yn){return Nn+Yn},0)},[wr.id,wr.maps]),et=Zi&&Ve&&(Math.max(Ke*Ve.length,pr)>tt||!!qt),ai=Qt==="rtl",ti=ye()(it,(0,Le.Z)({},"".concat(it,"-rtl"),ai),dt),Ii=Ve||dn,gr=(0,ge.useRef)(),hr=(0,ge.useRef)(),or=(0,ge.useRef)(),po=(0,ge.useState)(0),$n=(0,Ce.Z)(po,2),Ue=$n[0],Je=$n[1],nt=(0,ge.useState)(0),Pt=(0,Ce.Z)(nt,2),Nt=Pt[0],sn=Pt[1],Kt=(0,ge.useState)(!1),_n=(0,Ce.Z)(Kt,2),zn=_n[0],_i=_n[1],Bi=function(){_i(!0)},wt=function(){_i(!1)},zt={getKey:ki};function En(Nn){Je(function(Yn){var qn;typeof Nn=="function"?qn=Nn(Yn):qn=Nn;var Bn=Di(qn);return gr.current.scrollTop=Bn,Bn})}var bn=(0,ge.useRef)({start:0,end:Ii.length}),Yt=(0,ge.useRef)(),gn=le(Ii,ki),yn=(0,Ce.Z)(gn,1),vn=yn[0];Yt.current=vn;var jn=ge.useMemo(function(){if(!Zi)return{scrollHeight:void 0,start:0,end:Ii.length-1,offset:void 0};if(!et){var Nn;return{scrollHeight:((Nn=hr.current)===null||Nn===void 0?void 0:Nn.offsetHeight)||0,start:0,end:Ii.length-1,offset:void 0}}for(var Yn=0,qn,Bn,Jn,Ti=Ii.length,ci=0;ci<Ti;ci+=1){var ni=Ii[ci],Pn=ki(ni),wi=wr.get(Pn),ji=Yn+(wi===void 0?Ke:wi);ji>=Ue&&qn===void 0&&(qn=ci,Bn=Yn),ji>Ue+tt&&Jn===void 0&&(Jn=ci),Yn=ji}return qn===void 0&&(qn=0,Bn=0,Jn=Math.ceil(tt/Ke)),Jn===void 0&&(Jn=Ii.length-1),Jn=Math.min(Jn+1,Ii.length-1),{scrollHeight:Yn,start:qn,end:Jn,offset:Bn}},[et,Zi,Ue,Ii,Oi,tt]),Un=jn.scrollHeight,Gn=jn.start,An=jn.end,Li=jn.offset;bn.current.start=Gn,bn.current.end=An,ge.useLayoutEffect(function(){var Nn=wr.getRecord();if(Nn.size===1){var Yn=Array.from(Nn.keys())[0],qn=Nn.get(Yn),Bn=Ii[Gn];if(Bn&&qn===void 0){var Jn=ki(Bn);if(Jn===Yn){var Ti=wr.get(Yn),ci=Ti-Ke;En(function(ni){return ni+ci})}}}wr.resetRecord()},[Un]);var xi=ge.useState({width:0,height:tt}),bi=(0,Ce.Z)(xi,2),hn=bi[0],Vi=bi[1],lr=function(Yn){Vi({width:Yn.offsetWidth,height:Yn.offsetHeight})},Mr=(0,ge.useRef)(),xn=(0,ge.useRef)(),Vn=ge.useMemo(function(){return Ut(hn.width,qt)},[hn.width,qt]),mi=ge.useMemo(function(){return Ut(hn.height,Un)},[hn.height,Un]),di=Un-tt,gi=(0,ge.useRef)(di);gi.current=di;function Di(Nn){var Yn=Nn;return Number.isNaN(gi.current)||(Yn=Math.min(Yn,gi.current)),Yn=Math.max(Yn,0),Yn}var Ji=Ue<=0,cr=Ue>=di,_r=Nt<=0,Rr=Nt>=qt,Mn=Ae(Ji,cr,_r,Rr),Qr=function(){return{x:ai?-Nt:Nt,y:Ue}},kn=(0,ge.useRef)(Qr()),Ri=(0,pe.zX)(function(Nn){if(mn){var Yn=(0,Be.Z)((0,Be.Z)({},Qr()),Nn);(kn.current.x!==Yn.x||kn.current.y!==Yn.y)&&(mn(Yn),kn.current=Yn)}});function kr(Nn,Yn){var qn=Nn;Yn?((0,fe.flushSync)(function(){sn(qn)}),Ri()):En(qn)}function mr(Nn){var Yn=Nn.currentTarget.scrollTop;Yn!==Ue&&En(Yn),Cn==null||Cn(Nn),Ri()}var eo=function(Yn){var qn=Yn,Bn=qt?qt-hn.width:0;return qn=Math.max(qn,0),qn=Math.min(qn,Bn),qn},Tr=(0,pe.zX)(function(Nn,Yn){Yn?((0,fe.flushSync)(function(){sn(function(qn){var Bn=qn+(ai?-Nn:Nn);return eo(Bn)})}),Ri()):En(function(qn){var Bn=qn+Nn;return Bn})}),Sr=De(Zi,Ji,cr,_r,Rr,!!qt,Tr),yo=(0,Ce.Z)(Sr,2),an=yo[0],On=yo[1];bt(Zi,gr,function(Nn,Yn,qn,Bn){var Jn=Bn;return Mn(Nn,Yn,qn)?!1:!Jn||!Jn._virtualHandled?(Jn&&(Jn._virtualHandled=!0),an({preventDefault:function(){},deltaX:Nn?Yn:0,deltaY:Nn?0:Yn}),!0):!1}),ut(et,gr,function(Nn){En(function(Yn){return Yn+Nn})}),(0,de.Z)(function(){function Nn(qn){var Bn=Ji&&qn.detail<0,Jn=cr&&qn.detail>0;Zi&&!Bn&&!Jn&&qn.preventDefault()}var Yn=gr.current;return Yn.addEventListener("wheel",an,{passive:!1}),Yn.addEventListener("DOMMouseScroll",On,{passive:!0}),Yn.addEventListener("MozMousePixelScroll",Nn,{passive:!1}),function(){Yn.removeEventListener("wheel",an),Yn.removeEventListener("DOMMouseScroll",On),Yn.removeEventListener("MozMousePixelScroll",Nn)}},[Zi,Ji,cr]),(0,de.Z)(function(){if(qt){var Nn=eo(Nt);sn(Nn),Ri({x:Nn})}},[hn.width,qt]);var on=function(){var Yn,qn;(Yn=Mr.current)===null||Yn===void 0||Yn.delayHidden(),(qn=xn.current)===null||qn===void 0||qn.delayHidden()},ft=ht(gr,Ii,wr,Ke,ki,function(){return vr(!0)},En,on);ge.useImperativeHandle(He,function(){return{nativeElement:or.current,getScrollInfo:Qr,scrollTo:function(Yn){function qn(Bn){return Bn&&(0,Se.Z)(Bn)==="object"&&("left"in Bn||"top"in Bn)}qn(Yn)?(Yn.left!==void 0&&sn(eo(Yn.left)),ft(Yn.top)):ft(Yn)}}}),(0,de.Z)(function(){if(un){var Nn=Ii.slice(Gn,An+1);un(Nn,Ii)}},[Gn,An,Ii]);var Wn=Oe(Ii,ki,wr,Ke),ii=pn==null?void 0:pn({start:Gn,end:An,virtual:et,offsetX:Nt,offsetY:Li,rtl:ai,getSize:Wn}),Mi=oe(Ii,Gn,An,qt,Nt,rr,We,zt),vi=null;tt&&(vi=(0,Be.Z)((0,Le.Z)({},Re?"height":"maxHeight",tt),Ft),Zi&&(vi.overflowY="hidden",qt&&(vi.overflowX="hidden"),zn&&(vi.pointerEvents="none")));var hi={};return ai&&(hi.dir="rtl"),ge.createElement("div",(0,ke.Z)({ref:or,style:(0,Be.Z)((0,Be.Z)({},Qe),{},{position:"relative"}),className:ti},hi,ei),ge.createElement(we.Z,{onResize:lr},ge.createElement($t,{className:"".concat(it,"-holder"),style:vi,ref:gr,onScroll:mr,onMouseEnter:on},ge.createElement(ee,{prefixCls:it,height:Un,offsetX:Nt,offsetY:Li,scrollWidth:qt,onInnerResize:vr,ref:hr,innerProps:Kn,rtl:ai,extra:ii},Mi))),et&&Un>tt&&ge.createElement(_t,{ref:Mr,prefixCls:it,scrollOffset:Ue,scrollRange:Un,rtl:ai,onScroll:kr,onStartMove:Bi,onStopMove:wt,spinSize:mi,containerSize:hn.height,style:Hn==null?void 0:Hn.verticalScrollBar,thumbStyle:Hn==null?void 0:Hn.verticalScrollBarThumb,showScrollBar:Ai}),et&&qt>hn.width&&ge.createElement(_t,{ref:xn,prefixCls:it,scrollOffset:Nt,scrollRange:qt,rtl:ai,onScroll:kr,onStartMove:Bi,onStopMove:wt,spinSize:Vn,containerSize:hn.width,horizontal:!0,style:Hn==null?void 0:Hn.horizontalScrollBar,thumbStyle:Hn==null?void 0:Hn.horizontalScrollBarThumb,showScrollBar:Ai}))}var It=ge.forwardRef(fn);It.displayName="List";var Xt=It,tn=Xt},7062:function(Sn,ln,Ie){var ke=Ie(19637),Se=Ie(97573),Be=[Ie(96627)];Sn.exports=ke.createStore(Se,Be)},96627:function(Sn,ln,Ie){Sn.exports=ke;function ke(){return Ie(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(Sn){return Sn<10?"0"+Sn:Sn}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(Sn){return rx_escapable.lastIndex=0,rx_escapable.test(Sn)?'"'+Sn.replace(rx_escapable,function(ln){var Ie=meta[ln];return typeof Ie=="string"?Ie:"\\u"+("0000"+ln.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Sn+'"'}function str(Sn,ln){var Ie,ke,Se,Be,Le=gap,Ce,xe=ln[Sn];switch(xe&&typeof xe=="object"&&typeof xe.toJSON=="function"&&(xe=xe.toJSON(Sn)),typeof rep=="function"&&(xe=rep.call(ln,Sn,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,Ie=0;Ie<Be;Ie+=1)Ce[Ie]=str(Ie,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,Ie=0;Ie<Be;Ie+=1)typeof rep[Ie]=="string"&&(ke=rep[Ie],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(Sn,ln,Ie){var ke;if(gap="",indent="",typeof Ie=="number")for(ke=0;ke<Ie;ke+=1)indent+=" ";else typeof Ie=="string"&&(indent=Ie);if(rep=ln,ln&&typeof ln!="function"&&(typeof ln!="object"||typeof ln.length!="number"))throw new Error("JSON.stringify");return str("",{"":Sn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Sn,ln){var Ie,ke,Se=Sn[ln];if(Se&&typeof Se=="object")for(Ie in Se)Object.prototype.hasOwnProperty.call(Se,Ie)&&(ke=walk(Se,Ie),ke!==void 0?Se[Ie]=ke:delete Se[Ie]);return reviver.call(Sn,ln,Se)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Sn){return"\\u"+("0000"+Sn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(Sn,ln,Ie){var ke=Ie(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;Sn.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 De=Se(arguments,0),Oe=this;function Ze(){if(Pe)return Le(arguments,function(Xe,vt){De[vt]=Xe}),Pe.apply(Oe,De)}var qe=[Ze].concat(De);return me.apply(Oe,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(De){ve._addPlugin(De)});return}var Pe=Be(this.plugins,function(De){return me===De});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(De,Oe){if(!ye(De))throw new Error("Bad plugin property: "+Oe+" from plugin "+me.name+". Plugins should only return functions.");ve._assignPluginFnProp(De,Oe)})}},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(Sn,ln,Ie){var ke=Ce(),Se=xe(),Be=be(),Le=typeof window!="undefined"?window:Ie.g;Sn.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(Sn,ln,Ie){Sn.exports=[Ie(52496),Ie(16436),Ie(76673),Ie(35701),Ie(65578),Ie(65300)]},35701:function(Sn,ln,Ie){var ke=Ie(67039),Se=ke.Global,Be=ke.trim;Sn.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(Sn,ln,Ie){var ke=Ie(67039),Se=ke.Global;Sn.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(Sn){Sn.exports={name:"memoryStorage",read:Ie,write:ke,each:Se,remove:Be,clearAll:Le};var ln={};function Ie(Ce){return ln[Ce]}function ke(Ce,xe){ln[Ce]=xe}function Se(Ce){for(var xe in ln)ln.hasOwnProperty(xe)&&Ce(ln[xe],xe)}function Be(Ce){delete ln[Ce]}function Le(Ce){ln={}}},16436:function(Sn,ln,Ie){var ke=Ie(67039),Se=ke.Global;Sn.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(Sn,ln,Ie){var ke=Ie(67039),Se=ke.Global;Sn.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(Sn,ln,Ie){var ke=Ie(67039),Se=ke.Global;Sn.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(Sn){var ln=arguments[3],Ie=arguments[4],ke=arguments[5],Se=JSON.stringify;Sn.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}Ie[Ce]=["function(require,module,exports){"+Be+"(self); }",de]}var ge=Math.floor(Math.pow(16,8)*Math.random()).toString(16),fe={};fe[Ce]=Ce,Ie[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 Ie[me][1]){var Pe=Ie[me][1][ve];ue[Pe]||ee(Pe)}}var z="("+ln+")({"+Object.keys(ue).map(function(me){return Se(me)+":["+Ie[me][0]+","+Se(Ie[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(Sn){(function(ln,Ie){if(1)Sn.exports=Ie();else var ke,Se})(window,function(){return function(ln){var Ie={};function ke(Se){if(Ie[Se])return Ie[Se].exports;var Be=Ie[Se]={i:Se,l:!1,exports:{}};return ln[Se].call(Be.exports,Be,Be.exports,ke),Be.l=!0,Be.exports}return ke.m=ln,ke.c=Ie,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(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.forwardEvent=Ie.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}();Ie.EventEmitter=Se,Ie.forwardEvent=function(Be,Le){return Be(function(Ce){return Le.fire(Ce)})}},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.IUnicodeService=Ie.IOptionsService=Ie.ILogService=Ie.IInstantiationService=Ie.IDirtyRowService=Ie.ICharsetService=Ie.ICoreService=Ie.ICoreMouseService=Ie.IBufferService=void 0;var Se=ke(14);Ie.IBufferService=Se.createDecorator("BufferService"),Ie.ICoreMouseService=Se.createDecorator("CoreMouseService"),Ie.ICoreService=Se.createDecorator("CoreService"),Ie.ICharsetService=Se.createDecorator("CharsetService"),Ie.IDirtyRowService=Se.createDecorator("DirtyRowService"),Ie.IInstantiationService=Se.createDecorator("InstantiationService"),Ie.ILogService=Se.createDecorator("LogService"),Ie.IOptionsService=Se.createDecorator("OptionsService"),Ie.IUnicodeService=Se.createDecorator("UnicodeService")},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getDisposeArrayDisposable=Ie.disposeArray=Ie.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}Ie.Disposable=Se,Ie.disposeArray=Be,Ie.getDisposeArrayDisposable=function(Le){return{dispose:function(){return Be(Le)}}}},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.WHITESPACE_CELL_CODE=Ie.WHITESPACE_CELL_WIDTH=Ie.WHITESPACE_CELL_CHAR=Ie.NULL_CELL_CODE=Ie.NULL_CELL_WIDTH=Ie.NULL_CELL_CHAR=Ie.CHAR_DATA_CODE_INDEX=Ie.CHAR_DATA_WIDTH_INDEX=Ie.CHAR_DATA_CHAR_INDEX=Ie.CHAR_DATA_ATTR_INDEX=Ie.DEFAULT_ATTR=Ie.DEFAULT_COLOR=void 0,Ie.DEFAULT_COLOR=256,Ie.DEFAULT_ATTR=256|Ie.DEFAULT_COLOR<<9,Ie.CHAR_DATA_ATTR_INDEX=0,Ie.CHAR_DATA_CHAR_INDEX=1,Ie.CHAR_DATA_WIDTH_INDEX=2,Ie.CHAR_DATA_CODE_INDEX=3,Ie.NULL_CELL_CHAR="",Ie.NULL_CELL_WIDTH=1,Ie.NULL_CELL_CODE=0,Ie.WHITESPACE_CELL_CHAR=" ",Ie.WHITESPACE_CELL_WIDTH=1,Ie.WHITESPACE_CELL_CODE=32},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.CellData=be},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.ISoundService=Ie.ISelectionService=Ie.IRenderService=Ie.IMouseService=Ie.ICoreBrowserService=Ie.ICharSizeService=void 0;var Se=ke(14);Ie.ICharSizeService=Se.createDecorator("CharSizeService"),Ie.ICoreBrowserService=Se.createDecorator("CoreBrowserService"),Ie.IMouseService=Se.createDecorator("MouseService"),Ie.IRenderService=Se.createDecorator("RenderService"),Ie.ISelectionService=Se.createDecorator("SelectionService"),Ie.ISoundService=Se.createDecorator("SoundService")},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.ExtendedAttrs=Ie.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}();Ie.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}();Ie.ExtendedAttrs=Be},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.addDisposableDomListener=void 0,Ie.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(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.Utf8ToUtf32=Ie.StringToUtf32=Ie.utf32ToString=Ie.stringFromCodePoint=void 0,Ie.stringFromCodePoint=function(Le){return Le>65535?(Le-=65536,String.fromCharCode(55296+(Le>>10))+String.fromCharCode(Le%1024+56320)):String.fromCharCode(Le)},Ie.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}();Ie.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}();Ie.Utf8ToUtf32=Be},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.CHAR_ATLAS_CELL_SPACING=Ie.DIM_OPACITY=Ie.INVERTED_DEFAULT_COLOR=void 0,Ie.INVERTED_DEFAULT_COLOR=257,Ie.DIM_OPACITY=.5,Ie.CHAR_ATLAS_CELL_SPACING=1},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.contrastRatio=Ie.toPaddedHex=Ie.rgba=Ie.rgb=Ie.css=Ie.color=Ie.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=Ie.channels||(Ie.channels={})),(Be=Ie.color||(Ie.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)}},(Ie.css||(Ie.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=Ie.rgb||(Ie.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=Ie.rgba||(Ie.rgba={})),Ie.toPaddedHex=xe,Ie.contrastRatio=be},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isLinux=Ie.isWindows=Ie.isIphone=Ie.isIpad=Ie.isMac=Ie.isSafari=Ie.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}Ie.isFirefox=!!~Be.indexOf("Firefox"),Ie.isSafari=/^((?!chrome|android).)*safari/i.test(Be),Ie.isMac=Ce(["Macintosh","MacIntel","MacPPC","Mac68K"],Le),Ie.isIpad=Le==="iPad",Ie.isIphone=Le==="iPhone",Ie.isWindows=Ce(["Windows","Win16","Win32","WinCE"],Le),Ie.isLinux=Le.indexOf("Linux")>=0},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.C1=Ie.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"}(Ie.C0||(Ie.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"}(Ie.C1||(Ie.C1={}))},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.BaseRenderLayer=we},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.createDecorator=Ie.getServiceDependencies=Ie.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)}Ie.serviceRegistry=new Map,Ie.getServiceDependencies=function(Be){return Be.di$dependencies||[]},Ie.createDecorator=function(Be){if(Ie.serviceRegistry.has(Be))return Ie.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},Ie.serviceRegistry.set(Be,Le),Le}},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.concat=Ie.fillFallback=Ie.fill=void 0,Ie.fill=function(Be,Le,Ce,xe){return Be.fill?Be.fill(Le,Ce,xe):Se(Be,Le,Ce,xe)},Ie.fillFallback=Se,Ie.concat=function(Be,Le){var Ce=new Be.constructor(Be.length+Le.length);return Ce.set(Be),Ce.set(Le,Be.length),Ce}},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.BufferLine=Ie.DEFAULT_ATTR_DATA=void 0;var Se=ke(8),Be=ke(3),Le=ke(4),Ce=ke(6);Ie.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&ge;de+=2097152&ge?this._combined[we]:fe?Se.stringFromCodePoint(fe):Be.WHITESPACE_CELL_CHAR,we+=ge>>22||1}return de},be}();Ie.BufferLine=xe},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.removeElementFromParent=void 0,Ie.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(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.tooMuchOutput=Ie.promptLabel=void 0,Ie.promptLabel="Terminal input",Ie.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(ln,Ie,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(ve,Pe){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ae,De){Ae.__proto__=De}||function(Ae,De){for(var Oe in De)De.hasOwnProperty(Oe)&&(Ae[Oe]=De[Oe])})(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(Ie,"__esModule",{value:!0}),Ie.InputHandler=Ie.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=Ie.WindowsOptionsReportType||(Ie.WindowsOptionsReportType={}));var le=function(){function ve(Pe,Ae,De,Oe){this._bufferService=Pe,this._coreService=Ae,this._logService=De,this._optionsService=Oe,this._data=new Uint32Array(0)}return ve.prototype.hook=function(Pe){this._data=new Uint32Array(0)},ve.prototype.put=function(Pe,Ae,De){this._data=we.concat(this._data,Pe.subarray(Ae,De))},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 De=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+De+Ce.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r0m"+Ce.C0.ESC+"\\");case" q":var Oe={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return Oe-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(Ce.C0.ESC+"P1$r"+Oe+" 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,De,Oe,Ze,qe,Xe,vt,gt,kt){kt===void 0&&(kt=new be.EscapeSequenceParser);var at=ve.call(this)||this;at._bufferService=Ae,at._charsetService=De,at._coreService=Oe,at._dirtyRowService=Ze,at._logService=qe,at._optionsService=Xe,at._coreMouseService=vt,at._unicodeService=gt,at._parser=kt,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,ht){at._logService.debug("Unknown OSC code: ",{identifier:ut,action:ot,data:ht})}),at._parser.setDcsHandlerFallback(function(ut,ot,ht){ot==="HOOK"&&(ht=ht.toArray()),at._logService.debug("Unknown DCS code: ",{identifier:at._parser.identToString(ut),action:ot,payload:ht})}),at._parser.setPrintHandler(function(ut,ot,ht){return at.print(ut,ot,ht)}),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 bt=function(ut){ct._parser.setEscHandler({intermediates:"(",final:ut},function(){return at.selectCharset("("+ut)}),ct._parser.setEscHandler({intermediates:")",final:ut},function(){return at.selectCharset(")"+ut)}),ct._parser.setEscHandler({intermediates:"*",final:ut},function(){return at.selectCharset("*"+ut)}),ct._parser.setEscHandler({intermediates:"+",final:ut},function(){return at.selectCharset("+"+ut)}),ct._parser.setEscHandler({intermediates:"-",final:ut},function(){return at.selectCharset("-"+ut)}),ct._parser.setEscHandler({intermediates:".",final:ut},function(){return at.selectCharset("."+ut)}),ct._parser.setEscHandler({intermediates:"/",final:ut},function(){return at.selectCharset("/"+ut)})},ct=this;for(var Rt in xe.CHARSETS)bt(Rt);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 De=this._bufferService.buffer,Oe=De.x,Ze=De.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 Xe=qe+131072<Ae.length?qe+131072:Ae.length,vt=typeof Ae=="string"?this._stringDecoder.decode(Ae.substring(qe,Xe),this._parseBuffer):this._utf8Decoder.decode(Ae.subarray(qe,Xe),this._parseBuffer);this._parser.parse(this._parseBuffer,vt)}else vt=typeof Ae=="string"?this._stringDecoder.decode(Ae,this._parseBuffer):this._utf8Decoder.decode(Ae,this._parseBuffer),this._parser.parse(this._parseBuffer,vt);(De=this._bufferService.buffer).x===Oe&&De.y===Ze||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},Pe.prototype.print=function(Ae,De,Oe){var Ze,qe,Xe=this._bufferService.buffer,vt=this._charsetService.charset,gt=this._optionsService.options.screenReaderMode,kt=this._bufferService.cols,at=this._coreService.decPrivateModes.wraparound,bt=this._coreService.modes.insertMode,ct=this._curAttrData,Rt=Xe.lines.get(Xe.ybase+Xe.y);this._dirtyRowService.markDirty(Xe.y),Xe.x&&Oe-De>0&&Rt.getWidth(Xe.x-1)===2&&Rt.setCellFromCodePoint(Xe.x-1,0,1,ct.fg,ct.bg,ct.extended);for(var ut=De;ut<Oe;++ut){if(Ze=Ae[ut],qe=this._unicodeService.wcwidth(Ze),Ze<127&&vt){var ot=vt[String.fromCharCode(Ze)];ot&&(Ze=ot.charCodeAt(0))}if(gt&&this._onA11yChar.fire(pe.stringFromCodePoint(Ze)),qe||!Xe.x){if(Xe.x+qe-1>=kt){if(at){for(;Xe.x<kt;)Rt.setCellFromCodePoint(Xe.x++,0,1,ct.fg,ct.bg,ct.extended);Xe.x=0,Xe.y++,Xe.y===Xe.scrollBottom+1?(Xe.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Xe.y>=this._bufferService.rows&&(Xe.y=this._bufferService.rows-1),Xe.lines.get(Xe.ybase+Xe.y).isWrapped=!0),Rt=Xe.lines.get(Xe.ybase+Xe.y)}else if(Xe.x=kt-1,qe===2)continue}if(bt&&(Rt.insertCells(Xe.x,qe,Xe.getNullCell(ct),ct),Rt.getWidth(kt-1)===2&&Rt.setCellFromCodePoint(kt-1,fe.NULL_CELL_CODE,fe.NULL_CELL_WIDTH,ct.fg,ct.bg,ct.extended)),Rt.setCellFromCodePoint(Xe.x++,Ze,qe,ct.fg,ct.bg,ct.extended),qe>0)for(;--qe;)Rt.setCellFromCodePoint(Xe.x++,0,0,ct.fg,ct.bg,ct.extended)}else Rt.getWidth(Xe.x-1)?Rt.addCodepointToCell(Xe.x-1,Ze):Rt.addCodepointToCell(Xe.x-2,Ze)}Oe-De>0&&(Rt.loadCell(Xe.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),Xe.x<kt&&Oe-De>0&&Rt.getWidth(Xe.x)===0&&!Rt.hasContent(Xe.x)&&Rt.setCellFromCodePoint(Xe.x,0,1,ct.fg,ct.bg,ct.extended),this._dirtyRowService.markDirty(Xe.y)},Pe.prototype.addCsiHandler=function(Ae,De){var Oe=this;return Ae.final!=="t"||Ae.prefix||Ae.intermediates?this._parser.addCsiHandler(Ae,De):this._parser.addCsiHandler(Ae,function(Ze){return!ae(Ze.params[0],Oe._optionsService.options.windowOptions)||De(Ze)})},Pe.prototype.addDcsHandler=function(Ae,De){return this._parser.addDcsHandler(Ae,new oe.DcsHandler(De))},Pe.prototype.addEscHandler=function(Ae,De){return this._parser.addEscHandler(Ae,De)},Pe.prototype.addOscHandler=function(Ae,De){return this._parser.addOscHandler(Ae,new z.OscHandler(De))},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,De=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(De.x>0&&De.x--);if(this._restrictCursor(this._bufferService.cols),De.x>0)De.x--;else if(De.x===0&&De.y>De.scrollTop&&De.y<=De.scrollBottom&&(!((Ae=De.lines.get(De.ybase+De.y))===null||Ae===void 0)&&Ae.isWrapped)){De.lines.get(De.ybase+De.y).isWrapped=!1,De.y--,De.x=this._bufferService.cols-1;var Oe=De.lines.get(De.ybase+De.y);Oe.hasWidth(De.x)&&!Oe.hasContent(De.x)&&De.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,De){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+De):(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=De),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},Pe.prototype._moveCursor=function(Ae,De){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Ae,this._bufferService.buffer.y+De)},Pe.prototype.cursorUp=function(Ae){var De=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;De>=0?this._moveCursor(0,-Math.min(De,Ae.params[0]||1)):this._moveCursor(0,-(Ae.params[0]||1))},Pe.prototype.cursorDown=function(Ae){var De=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;De>=0?this._moveCursor(0,Math.min(De,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 De=Ae.params[0];De===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:De===3&&(this._bufferService.buffer.tabs={})},Pe.prototype.cursorForwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1;De--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},Pe.prototype.cursorBackwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1,Oe=this._bufferService.buffer;De--;)Oe.x=Oe.prevStop()},Pe.prototype._eraseInBufferLine=function(Ae,De,Oe,Ze){Ze===void 0&&(Ze=!1);var qe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);qe.replaceCells(De,Oe,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ze&&(qe.isWrapped=!1)},Pe.prototype._resetBufferLine=function(Ae){var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);De.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),De.isWrapped=!1},Pe.prototype.eraseInDisplay=function(Ae){var De;switch(this._restrictCursor(),Ae.params[0]){case 0:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);De<this._bufferService.rows;De++)this._resetBufferLine(De);this._dirtyRowService.markDirty(De);break;case 1:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(De+1).isWrapped=!1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 2:for(De=this._bufferService.rows,this._dirtyRowService.markDirty(De-1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 3:var Oe=this._bufferService.buffer.lines.length-this._bufferService.rows;Oe>0&&(this._bufferService.buffer.lines.trimStart(Oe),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-Oe,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-Oe,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 De=Ae.params[0]||1,Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){for(var Ze=Oe.ybase+Oe.y,qe=this._bufferService.rows-1-Oe.scrollBottom,Xe=this._bufferService.rows-1+Oe.ybase-qe+1;De--;)Oe.lines.splice(Xe-1,1),Oe.lines.splice(Ze,0,Oe.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Oe.y,Oe.scrollBottom),Oe.x=0}},Pe.prototype.deleteLines=function(Ae){this._restrictCursor();var De=Ae.params[0]||1,Oe=this._bufferService.buffer;if(!(Oe.y>Oe.scrollBottom||Oe.y<Oe.scrollTop)){var Ze,qe=Oe.ybase+Oe.y;for(Ze=this._bufferService.rows-1-Oe.scrollBottom,Ze=this._bufferService.rows-1+Oe.ybase-Ze;De--;)Oe.lines.splice(qe,1),Oe.lines.splice(Ze,0,Oe.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Oe.y,Oe.scrollBottom),Oe.x=0}},Pe.prototype.insertChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.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 De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.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 De=Ae.params[0]||1,Oe=this._bufferService.buffer;De--;)Oe.lines.splice(Oe.ybase+Oe.scrollTop,1),Oe.lines.splice(Oe.ybase+Oe.scrollBottom,0,Oe.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)},Pe.prototype.scrollDown=function(Ae){for(var De=Ae.params[0]||1,Oe=this._bufferService.buffer;De--;)Oe.lines.splice(Oe.ybase+Oe.scrollBottom,1),Oe.lines.splice(Oe.ybase+Oe.scrollTop,0,Oe.getBlankLine(de.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(Oe.scrollTop,Oe.scrollBottom)},Pe.prototype.scrollLeft=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var Oe=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var qe=De.lines.get(De.ybase+Ze);qe.deleteCells(0,Oe,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.scrollRight=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var Oe=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var qe=De.lines.get(De.ybase+Ze);qe.insertCells(0,Oe,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.insertColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var Oe=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var qe=this._bufferService.buffer.lines.get(De.ybase+Ze);qe.insertCells(De.x,Oe,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.deleteColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var Oe=Ae.params[0]||1,Ze=De.scrollTop;Ze<=De.scrollBottom;++Ze){var qe=De.lines.get(De.ybase+Ze);qe.deleteCells(De.x,Oe,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),qe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},Pe.prototype.eraseChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.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 De=Ae.params[0]||1,Oe=new Uint32Array(De),Ze=0;Ze<De;++Ze)Oe[Ze]=this._parser.precedingCodepoint;this.print(Oe,0,Oe.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 De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!0}},Pe.prototype.setModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){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 De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!1}},Pe.prototype.resetModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){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[De]===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,De,Oe,Ze,qe){return De===2?(Ae|=50331648,Ae&=-16777216,Ae|=ee.AttributeData.fromColorRGB([Oe,Ze,qe])):De===5&&(Ae&=-50331904,Ae|=33554432|255&Oe),Ae},Pe.prototype._extractColor=function(Ae,De,Oe){var Ze=[0,0,-1,0,0,0],qe=0,Xe=0;do{if(Ze[Xe+qe]=Ae.params[De+Xe],Ae.hasSubParams(De+Xe)){var vt=Ae.getSubParams(De+Xe),gt=0;do Ze[1]===5&&(qe=1),Ze[Xe+gt+1+qe]=vt[gt];while(++gt<vt.length&&gt+Xe+1+qe<Ze.length);break}if(Ze[1]===5&&Xe+qe>=2||Ze[1]===2&&Xe+qe>=5)break;Ze[1]&&(qe=1)}while(++Xe+De<Ae.length&&Xe+qe<Ze.length);for(gt=2;gt<Ze.length;++gt)Ze[gt]===-1&&(Ze[gt]=0);switch(Ze[0]){case 38:Oe.fg=this._updateAttrColor(Oe.fg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 48:Oe.bg=this._updateAttrColor(Oe.bg,Ze[1],Ze[3],Ze[4],Ze[5]);break;case 58:Oe.extended=Oe.extended.clone(),Oe.extended.underlineColor=this._updateAttrColor(Oe.extended.underlineColor,Ze[1],Ze[3],Ze[4],Ze[5])}return Xe},Pe.prototype._processUnderline=function(Ae,De){De.extended=De.extended.clone(),(!~Ae||Ae>5)&&(Ae=1),De.extended.underlineStyle=Ae,De.fg|=268435456,Ae===0&&(De.fg&=-268435457),De.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 De,Oe=Ae.length,Ze=this._curAttrData,qe=0;qe<Oe;qe++)(De=Ae.params[qe])>=30&&De<=37?(Ze.fg&=-50331904,Ze.fg|=16777216|De-30):De>=40&&De<=47?(Ze.bg&=-50331904,Ze.bg|=16777216|De-40):De>=90&&De<=97?(Ze.fg&=-50331904,Ze.fg|=16777224|De-90):De>=100&&De<=107?(Ze.bg&=-50331904,Ze.bg|=16777224|De-100):De===0?(Ze.fg=de.DEFAULT_ATTR_DATA.fg,Ze.bg=de.DEFAULT_ATTR_DATA.bg):De===1?Ze.fg|=134217728:De===3?Ze.bg|=67108864:De===4?(Ze.fg|=268435456,this._processUnderline(Ae.hasSubParams(qe)?Ae.getSubParams(qe)[0]:1,Ze)):De===5?Ze.fg|=536870912:De===7?Ze.fg|=67108864:De===8?Ze.fg|=1073741824:De===2?Ze.bg|=134217728:De===21?this._processUnderline(2,Ze):De===22?(Ze.fg&=-134217729,Ze.bg&=-134217729):De===23?Ze.bg&=-67108865:De===24?Ze.fg&=-268435457:De===25?Ze.fg&=-536870913:De===27?Ze.fg&=-67108865:De===28?Ze.fg&=-1073741825:De===39?(Ze.fg&=-67108864,Ze.fg|=16777215&de.DEFAULT_ATTR_DATA.fg):De===49?(Ze.bg&=-67108864,Ze.bg|=16777215&de.DEFAULT_ATTR_DATA.bg):De===38||De===48||De===58?qe+=this._extractColor(Ae,qe,Ze):De===59?(Ze.extended=Ze.extended.clone(),Ze.extended.underlineColor=-1,Ze.updateExtended()):De===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.",De)},Pe.prototype.deviceStatus=function(Ae){switch(Ae.params[0]){case 5:this._coreService.triggerDataEvent(Ce.C0.ESC+"[0n");break;case 6:var De=this._bufferService.buffer.y+1,Oe=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"["+De+";"+Oe+"R")}},Pe.prototype.deviceStatusPrivate=function(Ae){switch(Ae.params[0]){case 6:var De=this._bufferService.buffer.y+1,Oe=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(Ce.C0.ESC+"[?"+De+";"+Oe+"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 De=Ae.params[0]||1;switch(De){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 Oe=De%2==1;this._optionsService.options.cursorBlink=Oe},Pe.prototype.setScrollRegion=function(Ae){var De,Oe=Ae.params[0]||1;(Ae.length<2||(De=Ae.params[1])>this._bufferService.rows||De===0)&&(De=this._bufferService.rows),De>Oe&&(this._bufferService.buffer.scrollTop=Oe-1,this._bufferService.buffer.scrollBottom=De-1,this._setCursor(0,0))},Pe.prototype.windowOptions=function(Ae){if(ae(Ae.params[0],this._optionsService.options.windowOptions)){var De=Ae.length>1?Ae.params[1]:0;switch(Ae.params[0]){case 14:De!==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:De!==0&&De!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),De!==0&&De!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:De!==0&&De!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),De!==0&&De!==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 De=Ae.scrollBottom-Ae.scrollTop;Ae.lines.shiftElements(Ae.ybase+Ae.y,De,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 De=this._bufferService.buffer;this._setCursor(0,0);for(var Oe=0;Oe<this._bufferService.rows;++Oe){var Ze=De.ybase+De.y+Oe,qe=De.lines.get(Ze);qe&&(qe.fill(Ae),qe.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},Pe}(ye.Disposable);Ie.InputHandler=me},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.DEFAULT_CHARSET=Ie.CHARSETS=void 0,Ie.CHARSETS={},Ie.DEFAULT_CHARSET=Ie.CHARSETS.B,Ie.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"},Ie.CHARSETS.A={"#":"\xA3"},Ie.CHARSETS.B=void 0,Ie.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},Ie.CHARSETS.C=Ie.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Ie.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},Ie.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},Ie.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},Ie.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},Ie.CHARSETS.E=Ie.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},Ie.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},Ie.CHARSETS.H=Ie.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Ie.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.Params=Se},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.OscHandler=Ie.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}();Ie.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}();Ie.OscHandler=Ce},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.PAYLOAD_LIMIT=void 0,Ie.PAYLOAD_LIMIT=1e7},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.DcsHandler=Ie.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}();Ie.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}();Ie.DcsHandler=be},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.removeTerminalFromCache=Ie.acquireCharAtlas=void 0;var Se=ke(26),Be=ke(43),Le=[];Ie.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},Ie.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(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.is256Color=Ie.configEquals=Ie.generateConfig=void 0;var Se=ke(3);Ie.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}},Ie.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},Ie.is256Color=function(Be){return Be<Se.DEFAULT_COLOR}},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.ColorManager=Ie.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};Ie.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:Ie.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,Ie.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(de.red,Ie.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(de.green,Ie.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(de.yellow,Ie.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(de.blue,Ie.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(de.magenta,Ie.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(de.cyan,Ie.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(de.white,Ie.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(de.brightBlack,Ie.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(de.brightRed,Ie.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(de.brightGreen,Ie.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(de.brightYellow,Ie.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(de.brightBlue,Ie.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(de.brightMagenta,Ie.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(de.brightCyan,Ie.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(de.brightWhite,Ie.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}();Ie.ColorManager=we},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.throwIfFalsy=void 0,Ie.throwIfFalsy=function(Se){if(!Se)throw new Error("value must not be falsy");return Se}},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.CharacterJoinerRegistry=Ie.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);Ie.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}();Ie.CharacterJoinerRegistry=ye},function(ln,Ie,ke){"use strict";function Se(Be,Le){var Ce=Le.getBoundingClientRect();return[Be.clientX-Ce.left,Be.clientY-Ce.top]}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getRawByteCoords=Ie.getCoords=Ie.getCoordsRelativeToElement=void 0,Ie.getCoordsRelativeToElement=Se,Ie.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}},Ie.getRawByteCoords=function(Be){if(Be)return{x:Be[0]+32,y:Be[1]+32}}},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.RenderDebouncer=Se},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.ScreenDprMonitor=Le},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.clone=void 0,Ie.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(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.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(ln,Ie,ke){"use strict";var Se,Be=this&&this.__extends||(Se=function(kt,at){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(bt,ct){bt.__proto__=ct}||function(bt,ct){for(var Rt in ct)ct.hasOwnProperty(Rt)&&(bt[Rt]=ct[Rt])})(kt,at)},function(kt,at){function bt(){this.constructor=kt}Se(kt,at),kt.prototype=at===null?Object.create(at):(bt.prototype=at.prototype,new bt)});Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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),De=ke(61),Oe=ke(62),Ze=ke(63),qe=ke(64),Xe=ke(65),vt=typeof window!="undefined"?window.document:null,gt=function(kt){function at(bt){bt===void 0&&(bt={});var ct=kt.call(this,bt)||this;return ct.browser=ge,ct._keyDownHandled=!1,ct._onCursorMove=new le.EventEmitter,ct._onKey=new le.EventEmitter,ct._onRender=new le.EventEmitter,ct._onSelectionChange=new le.EventEmitter,ct._onTitleChange=new le.EventEmitter,ct._onFocus=new le.EventEmitter,ct._onBlur=new le.EventEmitter,ct._onA11yCharEmitter=new le.EventEmitter,ct._onA11yTabEmitter=new le.EventEmitter,ct._setup(),ct.linkifier=ct._instantiationService.createInstance(pe.Linkifier),ct.linkifier2=ct.register(ct._instantiationService.createInstance(Ze.Linkifier2)),ct.register(ct._inputHandler.onRequestBell(function(){return ct.bell()})),ct.register(ct._inputHandler.onRequestRefreshRows(function(Rt,ut){return ct.refresh(Rt,ut)})),ct.register(ct._inputHandler.onRequestReset(function(){return ct.reset()})),ct.register(ct._inputHandler.onRequestScroll(function(Rt,ut){return ct.scroll(Rt,ut||void 0)})),ct.register(ct._inputHandler.onRequestWindowsOptionsReport(function(Rt){return ct._reportWindowsOptions(Rt)})),ct.register(le.forwardEvent(ct._inputHandler.onCursorMove,ct._onCursorMove)),ct.register(le.forwardEvent(ct._inputHandler.onTitleChange,ct._onTitleChange)),ct.register(le.forwardEvent(ct._inputHandler.onA11yChar,ct._onA11yCharEmitter)),ct.register(le.forwardEvent(ct._inputHandler.onA11yTab,ct._onA11yTabEmitter)),ct.register(ct._bufferService.onResize(function(Rt){return ct._afterResize(Rt.cols,Rt.rows)})),ct}return Be(at,kt),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 bt,ct,Rt;this._isDisposed||(kt.prototype.dispose.call(this),(bt=this._renderService)===null||bt===void 0||bt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Rt=(ct=this.element)===null||ct===void 0?void 0:ct.parentNode)===null||Rt===void 0||Rt.removeChild(this.element))},at.prototype._setup=function(){kt.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(bt){var ct,Rt,ut,ot;switch(kt.prototype._updateOptions.call(this,bt),bt){case"fontFamily":case"fontSize":(ct=this._renderService)===null||ct===void 0||ct.clear(),(Rt=this._charSizeService)===null||Rt===void 0||Rt.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(bt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(be.C0.ESC+"[I"),this.updateCursorStyle(bt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},at.prototype.blur=function(){var bt;return(bt=this.textarea)===null||bt===void 0?void 0:bt.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 bt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),ct=this._bufferService.buffer.y*bt,Rt=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=Rt+"px",this.textarea.style.top=ct+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=bt+"px",this.textarea.style.lineHeight=bt+"px",this.textarea.style.zIndex="-5"}},at.prototype._initGlobal=function(){var bt=this;this._bindKeys(),this.register(fe.addDisposableDomListener(this.element,"copy",function(Rt){bt.hasSelection()&&xe.copyHandler(Rt,bt._selectionService)}));var ct=function(Rt){return xe.handlePasteEvent(Rt,bt.textarea,bt._coreService)};this.register(fe.addDisposableDomListener(this.textarea,"paste",ct)),this.register(fe.addDisposableDomListener(this.element,"paste",ct)),ge.isFirefox?this.register(fe.addDisposableDomListener(this.element,"mousedown",function(Rt){Rt.button===2&&xe.rightClickHandler(Rt,bt.textarea,bt.screenElement,bt._selectionService,bt.options.rightClickSelectsWord)})):this.register(fe.addDisposableDomListener(this.element,"contextmenu",function(Rt){xe.rightClickHandler(Rt,bt.textarea,bt.screenElement,bt._selectionService,bt.options.rightClickSelectsWord)})),ge.isLinux&&this.register(fe.addDisposableDomListener(this.element,"auxclick",function(Rt){Rt.button===1&&xe.moveTextAreaUnderMouseCursor(Rt,bt.textarea,bt.screenElement)}))},at.prototype._bindKeys=function(){var bt=this;this.register(fe.addDisposableDomListener(this.textarea,"keyup",function(ct){return bt._keyUp(ct)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"keydown",function(ct){return bt._keyDown(ct)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"keypress",function(ct){return bt._keyPress(ct)},!0)),this.register(fe.addDisposableDomListener(this.textarea,"compositionstart",function(){return bt._compositionHelper.compositionstart()})),this.register(fe.addDisposableDomListener(this.textarea,"compositionupdate",function(ct){return bt._compositionHelper.compositionupdate(ct)})),this.register(fe.addDisposableDomListener(this.textarea,"compositionend",function(){return bt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return bt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(ct){return bt._queueLinkification(ct.start,ct.end)}))},at.prototype.open=function(bt){var ct=this;if(!bt)throw new Error("Terminal requires a parent element.");vt.body.contains(bt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=bt.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"),bt.appendChild(this.element);var Rt=vt.createDocumentFragment();this._viewportElement=vt.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Rt.appendChild(this._viewportElement),this._viewportScrollArea=vt.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=vt.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=vt.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Rt.appendChild(this.screenElement),this.textarea=vt.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(ht){return ct._onTextAreaFocus(ht)})),this.register(fe.addDisposableDomListener(this.textarea,"blur",function(){return ct._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(De.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(Ae.ICharSizeService,this._charSizeService),this._compositionView=vt.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(Rt),this._theme=this.options.theme||this._theme,this._colorManager=new ve.ColorManager(vt,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(ht){return ct._colorManager.onOptionsChange(ht)})),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(ht){return ct._onRender.fire(ht)})),this.onResize(function(ht){return ct._renderService.resize(ht.cols,ht.rows)}),this._soundService=this._instantiationService.createInstance(ee.SoundService),this._instantiationService.setService(Ae.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(Oe.MouseService),this._instantiationService.setService(Ae.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(Ce.Viewport,function(ht,yt){return ct.scrollLines(ht,yt)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return ct.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){ct._renderService.onCursorMove(),ct._syncTextArea()})),this.register(this.onResize(function(){return ct._renderService.onResize(ct.cols,ct.rows)})),this.register(this.onBlur(function(){return ct._renderService.onBlur()})),this.register(this.onFocus(function(){return ct._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return ct.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(ht){return ct.scrollLines(ht.amount,ht.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return ct._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(ht){return ct._renderService.onSelectionChanged(ht.start,ht.end,ht.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(ht){ct.textarea.value=ht,ct.textarea.focus(),ct.textarea.select()})),this.register(this.onScroll(function(){ct.viewport.syncScrollArea(),ct._selectionService.refresh()})),this.register(fe.addDisposableDomListener(this._viewportElement,"scroll",function(){return ct._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(z.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return ct._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(ht){return ct._selectionService.onMouseDown(ht)})),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(bt){var ct,Rt,ut;this._theme=bt,(ct=this._colorManager)===null||ct===void 0||ct.setTheme(bt),(Rt=this._renderService)===null||Rt===void 0||Rt.setColors(this._colorManager.colors),(ut=this.viewport)===null||ut===void 0||ut.onThemeChange(this._colorManager.colors)},at.prototype.bindMouse=function(){var bt=this,ct=this,Rt=this.element;function ut(Ut){var Ht,dn,Ft=ct._mouseService.getRawByteCoords(Ut,ct.screenElement,ct.cols,ct.rows);if(!Ft)return!1;switch(Ut.overrideType||Ut.type){case"mousemove":dn=32,Ut.buttons===void 0?(Ht=3,Ut.button!==void 0&&(Ht=Ut.button<3?Ut.button:3)):Ht=1&Ut.buttons?0:4&Ut.buttons?1:2&Ut.buttons?2:3;break;case"mouseup":dn=0,Ht=Ut.button<3?Ut.button:3;break;case"mousedown":dn=1,Ht=Ut.button<3?Ut.button:3;break;case"wheel":Ut.deltaY!==0&&(dn=Ut.deltaY<0?0:1),Ht=4;break;default:return!1}return!(dn===void 0||Ht===void 0||Ht>4)&&ct._coreMouseService.triggerMouseEvent({col:Ft.x-33,row:Ft.y-33,button:Ht,action:dn,ctrl:Ut.ctrlKey,alt:Ut.altKey,shift:Ut.shiftKey})}var ot={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ht=function(Ut){return ut(Ut),Ut.buttons||(bt._document.removeEventListener("mouseup",ot.mouseup),ot.mousedrag&&bt._document.removeEventListener("mousemove",ot.mousedrag)),bt.cancel(Ut)},yt=function(Ut){return ut(Ut),Ut.preventDefault(),bt.cancel(Ut)},_t=function(Ut){Ut.buttons&&ut(Ut)},xt=function(Ut){Ut.buttons||ut(Ut)};this.register(this._coreMouseService.onProtocolChange(function(Ut){Ut?(bt.optionsService.options.logLevel==="debug"&&bt._logService.debug("Binding to mouse events:",bt._coreMouseService.explainEvents(Ut)),bt.element.classList.add("enable-mouse-events"),bt._selectionService.disable()):(bt._logService.debug("Unbinding from mouse events."),bt.element.classList.remove("enable-mouse-events"),bt._selectionService.enable()),8&Ut?ot.mousemove||(Rt.addEventListener("mousemove",xt),ot.mousemove=xt):(Rt.removeEventListener("mousemove",ot.mousemove),ot.mousemove=null),16&Ut?ot.wheel||(Rt.addEventListener("wheel",yt,{passive:!1}),ot.wheel=yt):(Rt.removeEventListener("wheel",ot.wheel),ot.wheel=null),2&Ut?ot.mouseup||(ot.mouseup=ht):(bt._document.removeEventListener("mouseup",ot.mouseup),ot.mouseup=null),4&Ut?ot.mousedrag||(ot.mousedrag=_t):(bt._document.removeEventListener("mousemove",ot.mousedrag),ot.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(fe.addDisposableDomListener(Rt,"mousedown",function(Ut){if(Ut.preventDefault(),bt.focus(),bt._coreMouseService.areMouseEventsActive&&!bt._selectionService.shouldForceSelection(Ut))return ut(Ut),ot.mouseup&&bt._document.addEventListener("mouseup",ot.mouseup),ot.mousedrag&&bt._document.addEventListener("mousemove",ot.mousedrag),bt.cancel(Ut)})),this.register(fe.addDisposableDomListener(Rt,"wheel",function(Ut){if(!ot.wheel){if(!bt.buffer.hasScrollback){var Ht=bt.viewport.getLinesScrolled(Ut);if(Ht===0)return;for(var dn=be.C0.ESC+(bt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Ut.deltaY<0?"A":"B"),Ft="",fn=0;fn<Math.abs(Ht);fn++)Ft+=dn;bt._coreService.triggerDataEvent(Ft,!0)}}},{passive:!0})),this.register(fe.addDisposableDomListener(Rt,"wheel",function(Ut){if(!ot.wheel)return bt.viewport.onWheel(Ut)?void 0:bt.cancel(Ut)},{passive:!1})),this.register(fe.addDisposableDomListener(Rt,"touchstart",function(Ut){if(!bt._coreMouseService.areMouseEventsActive)return bt.viewport.onTouchStart(Ut),bt.cancel(Ut)},{passive:!0})),this.register(fe.addDisposableDomListener(Rt,"touchmove",function(Ut){if(!bt._coreMouseService.areMouseEventsActive)return bt.viewport.onTouchMove(Ut)?void 0:bt.cancel(Ut)},{passive:!1}))},at.prototype.refresh=function(bt,ct){var Rt;(Rt=this._renderService)===null||Rt===void 0||Rt.refreshRows(bt,ct)},at.prototype._queueLinkification=function(bt,ct){var Rt;(Rt=this.linkifier)===null||Rt===void 0||Rt.linkifyRows(bt,ct)},at.prototype.updateCursorStyle=function(bt){this._selectionService&&this._selectionService.shouldColumnSelect(bt)?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(bt,ct){kt.prototype.scrollLines.call(this,bt,ct),this.refresh(0,this.rows-1)},at.prototype.paste=function(bt){xe.paste(bt,this.textarea,this._coreService)},at.prototype.attachCustomKeyEventHandler=function(bt){this._customKeyEventHandler=bt},at.prototype.registerLinkMatcher=function(bt,ct,Rt){var ut=this.linkifier.registerLinkMatcher(bt,ct,Rt);return this.refresh(0,this.rows-1),ut},at.prototype.deregisterLinkMatcher=function(bt){this.linkifier.deregisterLinkMatcher(bt)&&this.refresh(0,this.rows-1)},at.prototype.registerLinkProvider=function(bt){return this.linkifier2.registerLinkProvider(bt)},at.prototype.registerCharacterJoiner=function(bt){var ct=this._renderService.registerCharacterJoiner(bt);return this.refresh(0,this.rows-1),ct},at.prototype.deregisterCharacterJoiner=function(bt){this._renderService.deregisterCharacterJoiner(bt)&&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(bt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+bt)},at.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},at.prototype.select=function(bt,ct,Rt){this._selectionService.setSelection(bt,ct,Rt)},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 bt;(bt=this._selectionService)===null||bt===void 0||bt.clearSelection()},at.prototype.selectAll=function(){var bt;(bt=this._selectionService)===null||bt===void 0||bt.selectAll()},at.prototype.selectLines=function(bt,ct){var Rt;(Rt=this._selectionService)===null||Rt===void 0||Rt.selectLines(bt,ct)},at.prototype._keyDown=function(bt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(bt)===!1)return!1;if(!this._compositionHelper.keydown(bt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var ct=ae.evaluateKeyboardEvent(bt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(bt),ct.type===3||ct.type===2){var Rt=this.rows-1;return this.scrollLines(ct.type===2?-Rt:Rt),this.cancel(bt,!0)}return ct.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,bt)||(ct.cancel&&this.cancel(bt,!0),!ct.key||(ct.key!==be.C0.ETX&&ct.key!==be.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ct.key,domEvent:bt}),this._showCursor(),this._coreService.triggerDataEvent(ct.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(bt,!0)))},at.prototype._isThirdLevelShift=function(bt,ct){var Rt=bt.isMac&&!this.options.macOptionIsMeta&&ct.altKey&&!ct.ctrlKey&&!ct.metaKey||bt.isWindows&&ct.altKey&&ct.ctrlKey&&!ct.metaKey;return ct.type==="keypress"?Rt:Rt&&(!ct.keyCode||ct.keyCode>47)},at.prototype._keyUp=function(bt){this._customKeyEventHandler&&this._customKeyEventHandler(bt)===!1||(function(ct){return ct.keyCode===16||ct.keyCode===17||ct.keyCode===18}(bt)||this.focus(),this.updateCursorStyle(bt))},at.prototype._keyPress=function(bt){var ct;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(bt)===!1)return!1;if(this.cancel(bt),bt.charCode)ct=bt.charCode;else if(bt.which===null||bt.which===void 0)ct=bt.keyCode;else{if(bt.which===0||bt.charCode===0)return!1;ct=bt.which}return!(!ct||(bt.altKey||bt.ctrlKey||bt.metaKey)&&!this._isThirdLevelShift(this.browser,bt))&&(ct=String.fromCharCode(ct),this._onKey.fire({key:ct,domEvent:bt}),this._showCursor(),this._coreService.triggerDataEvent(ct,!0),!0)},at.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},at.prototype.resize=function(bt,ct){bt!==this.cols||ct!==this.rows?kt.prototype.resize.call(this,bt,ct):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},at.prototype._afterResize=function(bt,ct){var Rt,ut;(Rt=this._charSizeService)===null||Rt===void 0||Rt.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 bt=1;bt<this.rows;bt++)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 bt,ct;this.options.rows=this.rows,this.options.cols=this.cols;var Rt=this._customKeyEventHandler;this._setup(),kt.prototype.reset.call(this),(bt=this._selectionService)===null||bt===void 0||bt.reset(),this._customKeyEventHandler=Rt,this.refresh(0,this.rows-1),(ct=this.viewport)===null||ct===void 0||ct.syncScrollArea()},at.prototype._reportWindowsOptions=function(bt){if(this._renderService)switch(bt){case ye.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var ct=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Rt=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(be.C0.ESC+"[4;"+Rt+";"+ct+"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(bt,ct){if(this.options.cancelEvents||ct)return bt.preventDefault(),bt.stopPropagation(),!1},at.prototype._visualBell=function(){return!1},at.prototype._soundBell=function(){return this.options.bellStyle==="sound"},at}(Xe.CoreTerminal);Ie.Terminal=gt},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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)}();Ie.CompositionHelper=xe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.Viewport=pe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.rightClickHandler=Ie.moveTextAreaUnderMouseCursor=Ie.paste=Ie.handlePasteEvent=Ie.copyHandler=Ie.bracketTextForPaste=Ie.prepareTextForTerminal=void 0,Ie.prepareTextForTerminal=Se,Ie.bracketTextForPaste=Be,Ie.copyHandler=function(xe,be){xe.clipboardData&&xe.clipboardData.setData("text/plain",be.selectionText),xe.preventDefault()},Ie.handlePasteEvent=function(xe,be,ye){xe.stopPropagation(),xe.clipboardData&&Le(xe.clipboardData.getData("text/plain"),be,ye)},Ie.paste=Le,Ie.moveTextAreaUnderMouseCursor=Ce,Ie.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(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.EscapeSequenceParser=Ie.VT500_TRANSITION_TABLE=Ie.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}();Ie.TransitionTable=we,Ie.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=Ie.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 De=this._csiHandlers[le<<8|ee],Oe=De?De.length-1:-1;Oe>=0&&De[Oe](me)===!1;Oe--);Oe<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 Xe=Pe+1;;++Xe)if(Xe>=ue||(ee=fe[Xe])===24||ee===26||ee===27||ee>127&&ee<160){ae.put(fe,Pe,Xe),Pe=Xe-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 vt=Pe+1;;vt++)if(vt>=ue||(ee=fe[vt])<32||ee>127&&ee<=159){re.put(fe,Pe,vt),Pe=vt-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);Ie.EscapeSequenceParser=pe},function(ln,Ie,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 De=re.length-1;De>=0;De--)(ve=re[De])&&(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(Ie,"__esModule",{value:!0}),Ie.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,De,Oe,Ze,qe){var Xe=re.call(this)||this;Xe._colors=le,Xe._screenElement=me,Xe._bufferService=Ae,Xe._charSizeService=De,Xe._optionsService=Oe,Xe._id=z++,Xe._onRequestRedraw=new ee.EventEmitter;var vt=Xe._optionsService.options.allowTransparency;return Xe._characterJoinerRegistry=new pe.CharacterJoinerRegistry(Xe._bufferService),Xe._renderLayers=[new xe.TextRenderLayer(Xe._screenElement,0,Xe._colors,Xe._characterJoinerRegistry,vt,Xe._id,Xe._bufferService,Oe),new be.SelectionRenderLayer(Xe._screenElement,1,Xe._colors,Xe._id,Xe._bufferService,Oe),new we.LinkRenderLayer(Xe._screenElement,2,Xe._colors,Xe._id,ve,Pe,Xe._bufferService,Oe),new ye.CursorRenderLayer(Xe._screenElement,3,Xe._colors,Xe._id,Xe._onRequestRedraw,Xe._bufferService,Oe,Ze,qe)],Xe.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},Xe._devicePixelRatio=window.devicePixelRatio,Xe._updateDimensions(),Xe.onOptionsChanged(),Xe}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);Ie.Renderer=oe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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 De=le.shift();ve=new ye.JoinedCellData(this._workCell,ae.translateToString(!0,De[0],De[1]),De[1]-De[0]),Ae=De[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);Ie.TextRenderLayer=pe},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.GridCache=Se},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.NoneCharAtlas=Ie.DynamicCharAtlas=Ie.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)}Ie.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 Xe=!0,vt=qe.rgba>>>24,gt=qe.rgba>>>16&255,kt=qe.rgba>>>8&255,at=0;at<Ze.data.length;at+=4)Ze.data[at]===vt&&Ze.data[at+1]===gt&&Ze.data[at+2]===kt?Ze.data[at+3]=0:Xe=!1;return Xe}(ve,ae));var Ae=this._toCoordinateX(re),De=this._toCoordinateY(re);this._cacheCtx.putImageData(ve,Ae,De);var Oe={index:re,isEmpty:Pe,inBitmap:!1};return this._addGlyphToBitmap(Oe),Oe},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);Ie.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);Ie.NoneCharAtlas=ue},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.BaseCharAtlas=Se},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.ColorContrastCache=Se},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.LRUMap=Se},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.SelectionRenderLayer=Le},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.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(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.LinkRenderLayer=be},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.MouseZone=Ie.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)}();Ie.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};Ie.MouseZone=be},function(ln,Ie,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 De=re.length-1;De>=0;De--)(ve=re[De])&&(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(Ie,"__esModule",{value:!0}),Ie.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,De,Oe){var Ze=re.call(this)||this;return Ze._element=le,Ze._screenElement=me,Ze._bufferService=ve,Ze._coreService=Pe,Ze._mouseService=Ae,Ze._optionsService=De,Ze._renderService=Oe,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 De=ve.translateBufferLineToString(Ae,!0,le[0],me[0]);Pe.push(De)}}else{var Oe=le[1]===me[1]?me[0]:void 0;for(Pe.push(ve.translateBufferLineToString(le[1],!0,le[0],Oe)),Ae=le[1]+1;Ae<=me[1]-1;Ae++){var Ze=ve.lines.get(Ae);De=ve.translateBufferLineToString(Ae,!0),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=De:Pe.push(De)}le[1]!==me[1]&&(Ze=ve.lines.get(me[1]),De=ve.translateBufferLineToString(me[1],!0,0,me[0]),Ze&&Ze.isWrapped?Pe[Pe.length-1]+=De:Pe.push(De))}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,De=Ae.lines.get(le[1]);if(De){var Oe=Ae.translateBufferLineToString(le[1],!1),Ze=this._convertViewportColToCharacterIndex(De,le),qe=Ze,Xe=le[0]-Ze,vt=0,gt=0,kt=0,at=0;if(Oe.charAt(Ze)===" "){for(;Ze>0&&Oe.charAt(Ze-1)===" ";)Ze--;for(;qe<Oe.length&&Oe.charAt(qe+1)===" ";)qe++}else{var bt=le[0],ct=le[0];De.getWidth(bt)===0&&(vt++,bt--),De.getWidth(ct)===2&&(gt++,ct++);var Rt=De.getString(ct).length;for(Rt>1&&(at+=Rt-1,qe+=Rt-1);bt>0&&Ze>0&&!this._isCharWordSeparator(De.loadCell(bt-1,this._workCell));){De.loadCell(bt-1,this._workCell);var ut=this._workCell.getChars().length;this._workCell.getWidth()===0?(vt++,bt--):ut>1&&(kt+=ut-1,Ze-=ut-1),Ze--,bt--}for(;ct<De.length&&qe+1<Oe.length&&!this._isCharWordSeparator(De.loadCell(ct+1,this._workCell));){De.loadCell(ct+1,this._workCell);var ot=this._workCell.getChars().length;this._workCell.getWidth()===2?(gt++,ct++):ot>1&&(at+=ot-1,qe+=ot-1),qe++,ct++}}qe++;var ht=Ze+Xe-vt+kt,yt=Math.min(this._bufferService.cols,qe-Ze+vt+gt-kt-at);if(me||Oe.slice(Ze,qe).trim()!==""){if(ve&&ht===0&&De.getCodePoint(0)!==32){var _t=Ae.lines.get(le[1]-1);if(_t&&De.isWrapped&&_t.getCodePoint(this._bufferService.cols-1)!==32){var xt=this._getWordAt([this._bufferService.cols-1,le[1]-1],!1,!0,!1);if(xt){var Ut=this._bufferService.cols-xt.start;ht-=Ut,yt+=Ut}}}if(Pe&&ht+yt===this._bufferService.cols&&De.getCodePoint(this._bufferService.cols-1)!==32){var Ht=Ae.lines.get(le[1]+1);if(Ht&&Ht.isWrapped&&Ht.getCodePoint(0)!==32){var dn=this._getWordAt([0,le[1]+1],!1,!1,!0);dn&&(yt+=dn.length)}}return{start:ht,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);Ie.SelectionService=oe},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.SelectionModel=Se},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}Ie.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,De=function(Oe,Ze,qe,Xe,vt,gt){var kt;return kt=Be(qe,Xe,vt,gt).length>0?Xe-Le(vt,Xe):Ze,Oe<qe&&kt<=Xe||Oe>=qe&&kt<Xe?"C":"D"}(oe,re,ae,le,me,ve);return ye(xe(oe,Pe,ae,Ae,De==="C",me).length,be(De,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(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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)}();Ie.SoundService=Ce},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.MouseZoneManager=pe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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="&nbsp;":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);Ie.AccessibilityManager=de},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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,De,Oe){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=De,Ze._bufferService=Oe,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 De=document.createDocumentFragment();if(le)De.appendChild(this._createSelectionElement(Pe,re[0],ae[0],Ae-Pe+1));else{var Oe=me===Pe?re[0]:0,Ze=Pe===Ae?ae[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Pe,Oe,Ze));var qe=Ae-Pe-1;if(De.appendChild(this._createSelectionElement(Pe+1,0,this._bufferService.cols,qe)),Pe!==Ae){var Xe=ve===Ae?ae[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Ae,0,Xe))}}this._selectionContainer.appendChild(De)}}},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 De=Pe+this._bufferService.buffer.ydisp,Oe=this._bufferService.buffer.lines.get(De),Ze=this._optionsService.options.cursorStyle;Ae.appendChild(this._rowFactory.createRow(Oe,De===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 De=Ae.children[re];De&&(De.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);Ie.DomRenderer=ee},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.DomRendererRowFactory=Ie.CURSOR_STYLE_UNDERLINE_CLASS=Ie.CURSOR_STYLE_BAR_CLASS=Ie.CURSOR_STYLE_BLOCK_CLASS=Ie.CURSOR_BLINK_CLASS=Ie.CURSOR_CLASS=Ie.UNDERLINE_CLASS=Ie.ITALIC_CLASS=Ie.DIM_CLASS=Ie.BOLD_CLASS=void 0;var Se=ke(9),Be=ke(3),Le=ke(4),Ce=ke(10);Ie.BOLD_CLASS="xterm-bold",Ie.DIM_CLASS="xterm-dim",Ie.ITALIC_CLASS="xterm-italic",Ie.UNDERLINE_CLASS="xterm-underline",Ie.CURSOR_CLASS="xterm-cursor",Ie.CURSOR_BLINK_CLASS="xterm-cursor-blink",Ie.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",Ie.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",Ie.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(Ie.CURSOR_CLASS),fe&&le.classList.add(Ie.CURSOR_BLINK_CLASS),de){case"bar":le.classList.add(Ie.CURSOR_STYLE_BAR_CLASS);break;case"underline":le.classList.add(Ie.CURSOR_STYLE_UNDERLINE_CLASS);break;default:le.classList.add(Ie.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&le.classList.add(Ie.BOLD_CLASS),this._workCell.isItalic()&&le.classList.add(Ie.ITALIC_CLASS),this._workCell.isDim()&&le.classList.add(Ie.DIM_CLASS),this._workCell.isUnderline()&&le.classList.add(Ie.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(),De=!!this._workCell.isInverse();if(De){var Oe=me;me=Pe,Pe=Oe;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)||De&&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:De&&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}Ie.DomRendererRowFactory=xe},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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:["'",'"']};Ie.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(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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,De){return ve._renderRows(Ae,De)}),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);Ie.RenderService=fe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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)}();Ie.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(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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)}();Ie.MouseService=xe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.Linkifier2=pe},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.CoreBrowserService=Se},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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,De=this._bufferService.buffer;(Ae=this._cachedBlankLine)&&Ae.length===this.cols&&Ae.getFg(0)===ve.fg&&Ae.getBg(0)===ve.bg||(Ae=De.getBlankLine(ve,Pe),this._cachedBlankLine=Ae),Ae.isWrapped=Pe;var Oe=De.ybase+De.scrollTop,Ze=De.ybase+De.scrollBottom;if(De.scrollTop===0){var qe=De.lines.isFull;Ze===De.lines.length-1?qe?De.lines.recycle().copyFrom(Ae):De.lines.push(Ae.clone()):De.lines.splice(Ze+1,0,Ae.clone()),qe?this._bufferService.isUserScrolling&&(De.ydisp=Math.max(De.ydisp-1,0)):(De.ybase++,this._bufferService.isUserScrolling||De.ydisp++)}else{var Xe=Ze-Oe+1;De.lines.shiftElements(Oe+1,Xe-1,-1),De.lines.set(Ze,Ae.clone())}this._bufferService.isUserScrolling||(De.ydisp=De.ybase),this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom),this._onScroll.fire(De.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 De=Ae.ydisp;Ae.ydisp=Math.max(Math.min(Ae.ydisp+ve,Ae.ybase),0),De!==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,De=Pe;Ae<De.length;Ae++)De[Ae].dispose()}}}},me}(Le.Disposable);Ie.CoreTerminal=ae},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.InstantiationService=Ie.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}();Ie.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}();Ie.InstantiationService=xe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.LogService=Ie.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=Ie.LogLevel||(Ie.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)}();Ie.LogService=ye},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.BufferService=Ie.MINIMUM_ROWS=Ie.MINIMUM_COLS=void 0;var xe=ke(1),be=ke(69),ye=ke(0),we=ke(2);Ie.MINIMUM_COLS=2,Ie.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,Ie.MINIMUM_COLS),ue.rows=Math.max(fe.options.rows,Ie.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);Ie.BufferService=pe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.BufferSet=xe},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.BufferStringIterator=Ie.Buffer=Ie.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);Ie.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>Ie.MAX_BUFFER_SIZE?Ie.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,De=void 0;De=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 Oe=[],Ze=0;Ze<Ae;Ze++){var qe=this.getBlankLine(Be.DEFAULT_ATTR_DATA,!0);Oe.push(qe)}Oe.length>0&&(z.push({start:re+le.length+oe,newLines:Oe}),oe+=Oe.length),le.push.apply(le,Oe);var Xe=Pe.length-1,vt=Pe[Xe];vt===0&&(vt=Pe[--Xe]);for(var gt=le.length-Ae-1,kt=ve;gt>=0;){var at=Math.min(kt,vt);if(le[Xe].copyCellsFrom(le[gt],kt-at,vt-at,at,!0),(vt-=at)===0&&(vt=Pe[--Xe]),(kt-=at)===0){gt--;var bt=Math.max(gt,0);kt=xe.getWrappedLineTrimmedLength(le,bt,this._cols)}}for(Ze=0;Ze<le.length;Ze++)Pe[Ze]<fe&&le[Ze].setCell(Pe[Ze],ee);for(var ct=Ae-De;ct-- >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 Rt=[],ut=[];for(Ze=0;Ze<this.lines.length;Ze++)ut.push(this.lines.get(Ze));var ot=this.lines.length,ht=ot-1,yt=0,_t=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(_t&&_t.start>ht+xt){for(var Ut=_t.newLines.length-1;Ut>=0;Ut--)this.lines.set(Ze--,_t.newLines[Ut]);Ze++,Rt.push({index:ht+1,amount:_t.newLines.length}),xt+=_t.newLines.length,_t=z[++yt]}else this.lines.set(Ze,ut[ht--]);var Ht=0;for(Ze=Rt.length-1;Ze>=0;Ze--)Rt[Ze].index+=Ht,this.lines.onInsertEmitter.fire(Rt[Ze]),Ht+=Rt[Ze].amount;var dn=Math.max(0,ot+oe-this.lines.maxLength);dn>0&&this.lines.onTrimEmitter.fire(dn)}},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}();Ie.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}();Ie.BufferStringIterator=de},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.CircularList=Be},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.getWrappedLineTrimmedLength=Ie.reflowSmallerGetNewLineLengths=Ie.reflowLargerApplyNewLayout=Ie.reflowLargerCreateNewLayout=Ie.reflowLargerGetLinesToRemove=void 0,Ie.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},Ie.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}},Ie.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},Ie.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},Ie.getWrappedLineTrimmedLength=Se},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.Marker=Ce},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.OptionsService=Ie.DEFAULT_OPTIONS=Ie.DEFAULT_BELL_SOUND=void 0;var Se=ke(0),Be=ke(11),Le=ke(33);Ie.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",Ie.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:Ie.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(Ie.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 Ie.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=Ie.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 Ie.DEFAULT_OPTIONS))throw new Error('No option with key "'+ye+'"');return this.options[ye]},be}();Ie.OptionsService=xe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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);Ie.CoreService=ge},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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)}();Ie.CoreMouseService=pe},function(ln,Ie,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(Ie,"__esModule",{value:!0}),Ie.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)}();Ie.DirtyRowService=Ce},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.UnicodeService=Le},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.UnicodeV6=xe},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.CharsetService=Se},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.updateWindowsModeWrappedState=void 0;var Se=ke(3);Ie.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(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.WriteBuffer=Se},function(ln,Ie,ke){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.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}();Ie.AddonManager=Se}])})},93314:function(Sn){"use strict";Sn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},62522:function(Sn){"use strict";Sn.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(Sn,ln,Ie){"use strict";Ie.d(ln,{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:_t=>_t!==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,De=(ue=(fe=window.visualViewport)==null?void 0:fe.height)!=null?ue:innerHeight,{scrollX:Oe,scrollY:Ze}=window,{height:qe,width:Xe,top:vt,right:gt,bottom:kt,left:at}=we.getBoundingClientRect(),{top:bt,right:ct,bottom:Rt,left:ut}=(_t=>{const xt=window.getComputedStyle(_t);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"?vt-bt:z==="end"?kt+Rt:vt+qe/2-bt+Rt,ht=oe==="center"?at+Xe/2-ut+ct:oe==="end"?gt+ct:at-ut;const yt=[];for(let _t=0;_t<ve.length;_t++){const xt=ve[_t],{height:Ut,width:Ht,top:dn,right:Ft,bottom:fn,left:It}=xt.getBoundingClientRect();if(ee==="if-needed"&&vt>=0&&at>=0&&kt<=De&&gt<=Ae&&(xt===me&&!Be(xt)||vt>=dn&&kt<=fn&&at>=It&&gt<=Ft))return yt;const Xt=getComputedStyle(xt),tn=parseInt(Xt.borderLeftWidth,10),lt=parseInt(Xt.borderTopWidth,10),He=parseInt(Xt.borderRightWidth,10),ze=parseInt(Xt.borderBottomWidth,10);let it=0,dt=0;const tt="offsetWidth"in xt?xt.offsetWidth-xt.clientWidth-tn-He:0,Ke="offsetHeight"in xt?xt.offsetHeight-xt.clientHeight-lt-ze:0,je="offsetWidth"in xt?xt.offsetWidth===0?0:Ht/xt.offsetWidth:0,Re="offsetHeight"in xt?xt.offsetHeight===0?0:Ut/xt.offsetHeight:0;if(me===xt)it=z==="start"?ot:z==="end"?ot-De:z==="nearest"?Le(Ze,Ze+De,De,lt,ze,Ze+ot,Ze+ot+qe,qe):ot-De/2,dt=oe==="start"?ht:oe==="center"?ht-Ae/2:oe==="end"?ht-Ae:Le(Oe,Oe+Ae,Ae,tn,He,Oe+ht,Oe+ht+Xe,Xe),it=Math.max(0,it+Ze),dt=Math.max(0,dt+Oe);else{it=z==="start"?ot-dn-lt:z==="end"?ot-fn+ze+Ke:z==="nearest"?Le(dn,fn,Ut,lt,ze+Ke,ot,ot+qe,qe):ot-(dn+Ut/2)+Ke/2,dt=oe==="start"?ht-It-tn:oe==="center"?ht-(It+Ht/2)+tt/2:oe==="end"?ht-Ft+He+tt:Le(It,Ft,Ht,tn,He+tt,ht,ht+Xe,Xe);const{scrollLeft:Qe,scrollTop:Ve}=xt;it=Re===0?0:Math.max(0,Math.min(Ve+it/Re,xt.scrollHeight-Ut/Re+Ke)),dt=je===0?0:Math.max(0,Math.min(Qe+dt/je,xt.scrollWidth-Ht/je+tt)),ot+=Ve-it,ht+=Qe-dt}yt.push({el:xt,top:it,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})}}}}]);